[Intel-gfx] [PATCH] drm/i915/display: Warn about types of backlight not handled

Imre Deak imre.deak at intel.com
Wed Nov 25 19:05:49 UTC 2020


On Fri, Nov 20, 2020 at 11:57:48AM -0800, José Roberto de Souza wrote:
> Right now we are only explicitly handling the backlight of types
> INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE, INTEL_BACKLIGHT_DSI_DCS and
> INTEL_BACKLIGHT_DISPLAY_DDI all others are being handled as
> INTEL_BACKLIGHT_DISPLAY_DDI(south display engine PWM) but that
> might not be the intended HW usage, so lets warn to identify those
> systems and implement it properly if needed.
> 
> Cc: Imre Deak <imre.deak at intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_panel.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 9f23bac0d792..368722536462 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -2023,6 +2023,21 @@ intel_panel_init_backlight_funcs(struct intel_panel *panel)
>  	struct intel_connector *connector =
>  		container_of(panel, struct intel_connector, panel);
>  	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> +	enum intel_backlight_type type = dev_priv->vbt.backlight.type;
> +
> +	if (dev_priv->params.enable_dpcd_backlight)
> +		type = INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE;
> +
> +	drm_dbg_kms(&dev_priv->drm,
> +		    "Connector %s backlight type %u controller %u\n",
> +		    connector->base.name, type,
> +		    dev_priv->vbt.backlight.controller);
> +
> +	if (type != INTEL_BACKLIGHT_DISPLAY_DDI &&
> +	    type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE &&
> +	    type != INTEL_BACKLIGHT_DSI_DCS)
> +		drm_warn(&dev_priv->drm, "Backlight type %i not properly handled\n",
> +			 type);

Not sure about the history/current state of VBT errors wrt. the
backlight type and so this may generate a lot of bug reports without an
actual problem. A backlight problem would be anyway visible, so
we'd get a report and then we could just use the previous debug print
you added. It could be added to the relevant debug print in 
intel_panel_setup_backlight().

+Jani.

>  
>  	if (connector->base.connector_type == DRM_MODE_CONNECTOR_eDP &&
>  	    intel_dp_aux_init_backlight_funcs(connector) == 0)
> -- 
> 2.29.2
> 


More information about the Intel-gfx mailing list