[SRU][P][PATCH 4/8] drm/i915/backlight: Check Luminance based brightness control for VESA

En-Wei Wu en-wei.wu at canonical.com
Mon Mar 31 06:59:32 UTC 2025


From: Suraj Kandpal <suraj.kandpal at intel.com>

BugLink: https://bugs.launchpad.net/bugs/2097818

Check if we are capable of controlling brightness via luminance
which is dependent on PANEL_LUMINANCE_CONTROL_CAPABLE bit being set
on EDP_GENERAL_CAPABILITY_2 register.

--v2
-Prefer using luminance rather than nits [Jani]
-Fix commit message

--v3
-Fix the bit name used in commit message [Arun]
-Use correct edp_dpcd[] to check the capability [Arun]

Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
Tested-by: Ben Kao <ben.kao at intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-5-suraj.kandpal@intel.com
(cherry picked from commit 64481497924d8055fa7d6e60948ca899fe341cb6 linux-next)
Signed-off-by: En-Wei Wu <en-wei.wu at canonical.com>
---
 drivers/gpu/drm/i915/display/intel_display_types.h    | 1 +
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 8271e50e3644..566a3f34d41e 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -412,6 +412,7 @@ struct intel_panel {
 		union {
 			struct {
 				struct drm_edp_backlight_info info;
+				bool luminance_control_support;
 			} vesa;
 			struct {
 				bool sdr_uses_aux;
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 09e82f24d030..2599aa39b21d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -575,6 +575,15 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector)
 {
 	struct intel_display *display = to_intel_display(connector);
 	struct intel_dp *intel_dp = intel_attached_dp(connector);
+	struct intel_panel *panel = &connector->panel;
+
+	if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) {
+		drm_dbg_kms(display->drm,
+			    "[CONNECTOR:%d:%s] AUX Luminance Based Backlight Control Supported!\n",
+			    connector->base.base.id, connector->base.name);
+		panel->backlight.edp.vesa.luminance_control_support = true;
+		return true;
+	}
 
 	if (drm_edp_backlight_supported(intel_dp->edp_dpcd)) {
 		drm_dbg_kms(display->drm,
-- 
2.43.0




More information about the kernel-team mailing list