Skip to content

Commit 6448149

Browse files
committed
drm/i915/backlight: Check Luminance based brightness control for VESA
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@intel.com> Tested-by: Ben Kao <ben.kao@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250206063253.2827017-5-suraj.kandpal@intel.com
1 parent 9535c6a commit 6448149

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ struct intel_panel {
413413
union {
414414
struct {
415415
struct drm_edp_backlight_info info;
416+
bool luminance_control_support;
416417
} vesa;
417418
struct {
418419
bool sdr_uses_aux;

drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,15 @@ intel_dp_aux_supports_vesa_backlight(struct intel_connector *connector)
575575
{
576576
struct intel_display *display = to_intel_display(connector);
577577
struct intel_dp *intel_dp = intel_attached_dp(connector);
578+
struct intel_panel *panel = &connector->panel;
579+
580+
if ((intel_dp->edp_dpcd[3] & DP_EDP_PANEL_LUMINANCE_CONTROL_CAPABLE)) {
581+
drm_dbg_kms(display->drm,
582+
"[CONNECTOR:%d:%s] AUX Luminance Based Backlight Control Supported!\n",
583+
connector->base.base.id, connector->base.name);
584+
panel->backlight.edp.vesa.luminance_control_support = true;
585+
return true;
586+
}
578587

579588
if (drm_edp_backlight_supported(intel_dp->edp_dpcd)) {
580589
drm_dbg_kms(display->drm,

0 commit comments

Comments
 (0)