drm/i915: Share the common force-audio property between connectors
Make the audio property creation routine common and share the single property between the connectors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
committed by
Keith Packard
parent
4bce2da393
commit
3f43c48d33
@ -148,8 +148,6 @@ struct intel_sdvo_connector {
|
||||
int format_supported_num;
|
||||
struct drm_property *tv_format;
|
||||
|
||||
struct drm_property *force_audio_property;
|
||||
|
||||
/* add the property for the SDVO-TV */
|
||||
struct drm_property *left;
|
||||
struct drm_property *right;
|
||||
@ -1712,7 +1710,7 @@ intel_sdvo_set_property(struct drm_connector *connector,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (property == intel_sdvo_connector->force_audio_property) {
|
||||
if (property == dev_priv->force_audio_property) {
|
||||
int i = val;
|
||||
bool has_audio;
|
||||
|
||||
@ -2037,15 +2035,7 @@ intel_sdvo_add_hdmi_properties(struct intel_sdvo_connector *connector)
|
||||
{
|
||||
struct drm_device *dev = connector->base.base.dev;
|
||||
|
||||
connector->force_audio_property =
|
||||
drm_property_create(dev, DRM_MODE_PROP_RANGE, "force_audio", 2);
|
||||
if (connector->force_audio_property) {
|
||||
connector->force_audio_property->values[0] = -1;
|
||||
connector->force_audio_property->values[1] = 1;
|
||||
drm_connector_attach_property(&connector->base.base,
|
||||
connector->force_audio_property, 0);
|
||||
}
|
||||
|
||||
intel_attach_force_audio_property(&connector->base.base);
|
||||
if (INTEL_INFO(dev)->gen >= 4 && IS_MOBILE(dev))
|
||||
intel_attach_broadcast_rgb_property(&connector->base.base);
|
||||
}
|
||||
|
Reference in New Issue
Block a user