[Intel-gfx] [PATCH 2/3] drm/i915: Don't add the "force audio" property to DP connectors that don't support audio

Daniel Vetter daniel at ffwll.ch
Thu Nov 30 08:16:31 UTC 2017


On Wed, Nov 29, 2017 at 03:26:53PM -0800, Rodrigo Vivi wrote:
> On Wed, Nov 29, 2017 at 04:43:02PM +0000, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > No point in adding the "force audio" property to DP connectors
> > that don't support audio (g4x or port A).
> 
> It makes sense... but the lack of the property there couldn't
> break any existent user space?

It's optional, other connectors don't have it. In general userspace can't
really assume any given property is there (minus the atomic ones which
every atomic driver has). Exceptions apply, but in general this works
fairly well. And if we hit an exception, we can take a closer look.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> 
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 0e1a20e625e4..f8ead29e3c81 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -5180,8 +5180,11 @@ static void
> >  intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connector)
> >  {
> >  	struct drm_i915_private *dev_priv = to_i915(connector->dev);
> > +	enum port port = dp_to_dig_port(intel_dp)->base.port;
> > +
> > +	if (!IS_G4X(dev_priv) && port != PORT_A)
> > +		intel_attach_force_audio_property(connector);
> >  
> > -	intel_attach_force_audio_property(connector);
> >  	intel_attach_broadcast_rgb_property(connector);
> >  
> >  	if (intel_dp_is_edp(intel_dp)) {
> > -- 
> > 2.13.6
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list