Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	 <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/backlight: Remove try_vesa_interface
Date: Thu, 26 Feb 2026 10:25:16 +0530	[thread overview]
Message-ID: <de59cde0-48be-44ca-a377-f211badb7e5a@intel.com> (raw)
In-Reply-To: <20260224031322.2568874-1-suraj.kandpal@intel.com>


On 2/24/2026 8:43 AM, Suraj Kandpal wrote:
> Remove try_vesa_interface. This is because we now make VESA Interface
> as a fallback mechanism for Panels which needs VESA DPCD AUX backlight
> mechanism to work but have a broken VBT indicating otherwise.

I think lets start with the problem:

- some panels need VESA DPCD Aux backlight but VBT says otherwise

- we try with Intel backlight interface first, then check for 
try_vesa_interface flag before trying VESA backlight interface

-this causes blankout on such panels as try_vesa_interface is not set 
and VESA backlight is not tried.

- remove try_vesa_interface flag and lets attempt VESA backlight 
interface as a fallback mechansim.

> While at in sneak in a small comment cleanup too.
>
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15679
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   .../drm/i915/display/intel_dp_aux_backlight.c | 19 +++++++------------
>   1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> index eb05ef4bd9f6..a8e9872566cd 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -644,9 +644,10 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
>   	struct intel_dp *intel_dp = intel_attached_dp(connector);
>   	struct drm_device *dev = connector->base.dev;
>   	struct intel_panel *panel = &connector->panel;
> -	bool try_intel_interface = false, try_vesa_interface = false;
> +	bool try_intel_interface = false;
>   
> -	/* Check the VBT and user's module parameters to figure out which
> +	/*
> +	 * Check the VBT and user's module parameters to figure out which
>   	 * interfaces to probe
>   	 */
>   	switch (display->params.enable_dpcd_backlight) {
> @@ -655,7 +656,6 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
>   	case INTEL_DP_AUX_BACKLIGHT_AUTO:
>   		switch (panel->vbt.backlight.type) {
>   		case INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE:
> -			try_vesa_interface = true;
>   			break;
>   		case INTEL_BACKLIGHT_DISPLAY_DDI:
>   			try_intel_interface = true;
> @@ -668,20 +668,12 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
>   		if (panel->vbt.backlight.type != INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE)
>   			try_intel_interface = true;
>   
> -		try_vesa_interface = true;
> -		break;
> -	case INTEL_DP_AUX_BACKLIGHT_FORCE_VESA:
> -		try_vesa_interface = true;
>   		break;
>   	case INTEL_DP_AUX_BACKLIGHT_FORCE_INTEL:
>   		try_intel_interface = true;
>   		break;
>   	}
>   
> -	/* For eDP 1.5 and above we are supposed to use VESA interface for brightness control */
> -	if (intel_dp->edp_dpcd[0] >= DP_EDP_15)
> -		try_vesa_interface = true;
> -
>   	/*
>   	 * Since Intel has their own backlight control interface, the majority of machines out there
>   	 * using DPCD backlight controls with Intel GPUs will be using this interface as opposed to
> @@ -694,6 +686,9 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
>   	 * panel with Intel's OUI - which is also required for us to be able to detect Intel's
>   	 * backlight interface at all. This means that the only sensible way for us to detect both
>   	 * interfaces is to probe for Intel's first, and VESA's second.
> +	 *
> +	 * Also there is a chance some VBT's may advertise false Intel backlight support even if the

s/VBT's/VBTs


> +	 * tcon's DPCD says otherwise. This mean we keep VESA interface as fallback in that case.

s/tcon/TCON


With above nitpicks sorted, this is:

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

>   	 */
>   	if (try_intel_interface && intel_dp_aux_supports_hdr_backlight(connector) &&
>   	    intel_dp->edp_dpcd[0] <= DP_EDP_14b) {
> @@ -703,7 +698,7 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
>   		return 0;
>   	}
>   
> -	if (try_vesa_interface && intel_dp_aux_supports_vesa_backlight(connector)) {
> +	if (intel_dp_aux_supports_vesa_backlight(connector)) {
>   		drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Using VESA eDP backlight controls\n",
>   			    connector->base.base.id, connector->base.name);
>   		panel->backlight.funcs = &intel_dp_vesa_bl_funcs;

  parent reply	other threads:[~2026-02-26  4:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  3:13 [PATCH] drm/i915/backlight: Remove try_vesa_interface Suraj Kandpal
2026-02-24  3:20 ` ✓ CI.KUnit: success for " Patchwork
2026-02-26  4:55 ` Nautiyal, Ankit K [this message]
2026-03-31 23:35 ` [PATCH] " Ville Syrjälä
2026-04-01  3:07   ` Kandpal, Suraj
2026-04-01  3:25     ` Kandpal, Suraj
2026-04-01  3:44       ` Kandpal, Suraj
2026-04-13 23:09 ` Werner Sembach
2026-04-14  6:11   ` Kandpal, Suraj
2026-04-14 15:45     ` Werner Sembach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de59cde0-48be-44ca-a377-f211badb7e5a@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox