[Intel-gfx] [PATCH 03/11] drm/i915/display/dp: Attach and set drm connector VRR property

Navare, Manasi manasi.d.navare at intel.com
Tue Dec 1 22:46:59 UTC 2020


On Tue, Nov 10, 2020 at 12:41:07PM +0200, Jani Nikula wrote:
> On Thu, 22 Oct 2020, Manasi Navare <manasi.d.navare at intel.com> wrote:
> > From: Aditya Swarup <aditya.swarup at intel.com>
> >
> > This function sets the VRR property for connector based
> > on the platform support, EDID monitor range and DP sink
> > DPCD capability of outputing video without msa
> > timing information.
> >
> > v7:
> > * Move the helper to separate file (Manasi)
> > v6:
> > * Remove unset of prop
> > v5:
> > * Fix the vrr prop not being set in kernel (Manasi)
> > * Unset the prop on connector disconnect (Manasi)
> > v4:
> > * Rebase (Mansi)
> > v3:
> > * intel_dp_is_vrr_capable can be used for debugfs, make it
> > non static (Manasi)
> > v2:
> > * Just set this in intel_dp_get_modes instead of new hook (Jani)
> >
> > Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > Cc: Jani Nikula <jani.nikula at linux.intel.com>
> > Signed-off-by: Aditya Swarup <aditya.swarup at intel.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare at intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp.c | 8 ++++++++
> >  drivers/gpu/drm/i915/display/intel_dp.h | 1 +
> >  2 files changed, 9 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 818daab252f3..3794b8f35edc 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -62,6 +62,7 @@
> >  #include "intel_sideband.h"
> >  #include "intel_tc.h"
> >  #include "intel_vdsc.h"
> > +#include "intel_vrr.h"
> >  
> >  #define DP_DPRX_ESI_LEN 14
> >  
> > @@ -6622,6 +6623,10 @@ static int intel_dp_get_modes(struct drm_connector *connector)
> >  	edid = intel_connector->detect_edid;
> >  	if (edid) {
> >  		int ret = intel_connector_update_modes(connector, edid);
> > +
> > +		if (intel_is_vrr_capable(connector))
> > +			drm_connector_set_vrr_capable_property(connector,
> > +							       true);
> >  		if (ret)
> >  			return ret;
> >  	}
> > @@ -7080,6 +7085,9 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
> >  		connector->state->scaling_mode = DRM_MODE_SCALE_ASPECT;
> >  
> >  	}
> > +
> > +	if (INTEL_GEN(dev_priv) >= 12)
> 
> I wonder if we should just add a wrapper
> 
> #define HAS_VRR(i915) (INTEL_GEN(i915) >= 12)
> 
> to be more descriptive. And use it in the previous patch too.

Yea I like the idea of adding this wrapper in intel_vrr.c and have the platform check in that
and then use that in intel_vrr_is_capable() ?

> 
> > +		drm_connector_attach_vrr_capable_property(connector);
> >  }
> >  
> >  static void intel_dp_init_panel_power_timestamps(struct intel_dp *intel_dp)
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> > index 3f862b4fd34f..aaf0a41582d7 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> > @@ -15,6 +15,7 @@ enum pipe;
> >  enum port;
> >  struct drm_connector_state;
> >  struct drm_encoder;
> > +struct drm_connector;
> 
> Unrelated change.

Yea I dont rem now why I added that here probably unrelated will remove

Manasi

> 
> >  struct drm_i915_private;
> >  struct drm_modeset_acquire_ctx;
> >  struct drm_dp_vsc_sdp;
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list