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>
Cc: <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH] drm/i915/backlight: Fix VESA backlight possible check condition
Date: Mon, 6 Apr 2026 20:12:05 +0530 [thread overview]
Message-ID: <ab78f6b4-fb84-4d4e-8f4d-63f4754b79eb@intel.com> (raw)
In-Reply-To: <20260401034332.1321585-1-suraj.kandpal@intel.com>
On 4/1/2026 9:13 AM, Suraj Kandpal wrote:
> VESA backlight is possible through AUX only when
> BACKLIGHT_AUX_ENABLE_CAPABLE is true or when we use BL_ENABLE bit
This statement seems a bit wrong to me.
From my understanding of Section 12.2, Display Backlight Control Using
DPCD Registers (quoting part of spec below):
Backlight Enable may be implemented through the use of an AUX command or
the BL_ENABLE eDP connector pin.
Backlight Enable control capability is indicated as follows:
- Through an AUX command : BACKLIGHT_AUX_ENABLE_CAPABLE bit in the
EDP_GENERAL_CAPABILITY_1 register is set (DPCD 00701h[2] = 1)
- From the BL_ENABLE eDP connector pin : BACKLIGHT_PIN_ENABLE_CAPABLE
bit in the EDP_GENERAL_CAPABILITY_1 register is set (DPCD 00701h[1] = 1)
So, backlight enable is possible in two ways: AUX-based or via the eDP
BL_ENABLE pin.
Similarly, backlight brightness adjustment can be done via AUX-based
control or PWM pin-based control.
It means there can be three configurations:
1) Full AUX-based: Enable and adjustment both via AUX. We currently
support this
(apart from the AUX luminance-based backlight control).
2) Hybrid: Enable via the BL_ENABLE pin, adjustment via either AUX or PWM.
3) Fully PWM pin-based: Enable via the BL_ENABLE pin, adjustment via PWM.
(As far as I understand, AUX-based enable and brightness adjustment via
PWM is not possible.)
So, the first statement needs to be corrected slightly, as it implies
that the BL_ENABLE bit is part of AUX‑based backlight control, which is
not the case.
Also, I think this can be added as a note before the call to
intel_dp_aux_supports_vesa_backlight(), something like:
Currently, VESA backlight is supported only via the full AUX-based
mechanism (or via the AUX luminance-based backlight control).
#TODO: Implement eDP BL_ENABLE pin-based backlight enable and hybrid mode.
> to enable backlight. Since that is not implemented we need to make
> sure we do not try to manipulate backlight when
> BACKLIGHT_AUX_ENABLE_CAPABLE is not set.
> Also fix return value when condition is not fulfilled.
>
> Fixes: 40d2f5820951 ("drm/i915/backlight: Remove try_vesa_interface")
I think fixes should have this commit :
0fb03890d182 ("drm/i915/backlight: Check if VESA backlight is possible")
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 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 d0c76632a946..138d5b5e5482 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> @@ -615,8 +615,9 @@ check_if_vesa_backlight_possible(struct intel_dp *intel_dp)
> int ret;
> u8 bit_min, bit_max;
>
> - if (!(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP))
> - return true;
> + if (!(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP &&
> + intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP))
> + return false;
Hmm... we already validate DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP in
drm_edp_backlight_supported(), which establishes that the TCON supports
backlight adjustment.
At this point, for AUX‑only VESA backlight, we should explicitly check:
DP_EDP_BACKLIGHT_AUX_ENABLE_CAP (00701h[2]) : backlight can be enabled
via AUX
DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP (00702h[1]) : brightness can be
set via AUX
So, I do agree that both checks are needed, but IMHO we should check
Enable capability first and then the Adjustment capability.
Regards,
Ankit
>
> ret = drm_dp_dpcd_read_byte(&intel_dp->aux, DP_EDP_PWMGEN_BIT_COUNT_CAP_MIN, &bit_min);
> if (ret < 0)
next prev parent reply other threads:[~2026-04-06 14:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 3:43 [PATCH] drm/i915/backlight: Fix VESA backlight possible check condition Suraj Kandpal
2026-04-01 3:50 ` ✓ CI.KUnit: success for " Patchwork
2026-04-01 4:36 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-01 10:53 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-02 19:18 ` [PATCH] " Ville Syrjälä
2026-04-06 14:42 ` Nautiyal, Ankit K [this message]
2026-04-07 3:07 ` [PATCH v2] " Suraj Kandpal
2026-04-07 11:10 ` Nautiyal, Ankit K
2026-04-07 4:30 ` ✓ CI.KUnit: success for drm/i915/backlight: Fix VESA backlight possible check condition (rev2) Patchwork
2026-04-07 5:07 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-07 6:39 ` ✗ Xe.CI.FULL: failure " Patchwork
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=ab78f6b4-fb84-4d4e-8f4d-63f4754b79eb@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 \
--cc=ville.syrjala@linux.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