On Mon, 03 Oct 2022, Ville Syrjala <[email protected]> wrote:
> From: Ville Syrjälä <[email protected]>
>
> 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 <[email protected]>

>
> Signed-off-by: Ville Syrjälä <[email protected]>
> ---
>  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

Reply via email to