[Intel-gfx] [PATCH v3 6/6] drm/i915: Setup final panel drrs_type already during init

Jani Nikula jani.nikula at linux.intel.com
Tue Oct 4 09:00:03 UTC 2022


On Mon, 03 Oct 2022, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Now that we track the VBT drrs type per-panel we can move the
> has_drrs_modes() check to the panel init rather than doing it
> for every intel_panel_drrs_type() call.

And we also get the correct DRRS type logging hint early on.

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_panel.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index d18c56cf957d..2b4b359b8342 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -165,9 +165,6 @@ static bool has_drrs_modes(struct intel_connector *connector)
>  
>  enum drrs_type intel_panel_drrs_type(struct intel_connector *connector)
>  {
> -	if (!has_drrs_modes(connector))
> -		return DRRS_TYPE_NONE;
> -
>  	return connector->panel.vbt.drrs_type;
>  }
>  
> @@ -668,6 +665,9 @@ int intel_panel_init(struct intel_connector *connector)
>  
>  	intel_backlight_init_funcs(panel);
>  
> +	if (!has_drrs_modes(connector))
> +		connector->panel.vbt.drrs_type = DRRS_TYPE_NONE;
> +
>  	drm_dbg_kms(connector->base.dev,
>  		    "[CONNECTOR:%d:%s] DRRS type: %s\n",
>  		    connector->base.base.id, connector->base.name,

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list