Skip to content

Commit 9535c6a

Browse files
committed
drm/i915/backlight: Use proper interface based on eDP version
eDP is supposed to use VESA interface when using revision 1.5 and above, use Intel interface for backlight control otherwise. Add check to use correct interface. 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-4-suraj.kandpal@intel.com
1 parent 9ee1855 commit 9535c6a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ static const struct intel_panel_bl_funcs intel_dp_vesa_bl_funcs = {
604604
int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
605605
{
606606
struct intel_display *display = to_intel_display(connector);
607+
struct intel_dp *intel_dp = intel_attached_dp(connector);
607608
struct drm_device *dev = connector->base.dev;
608609
struct intel_panel *panel = &connector->panel;
609610
bool try_intel_interface = false, try_vesa_interface = false;
@@ -640,6 +641,10 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
640641
break;
641642
}
642643

644+
/* For eDP 1.5 and above we are supposed to use VESA interface for brightness control */
645+
if (intel_dp->edp_dpcd[0] >= DP_EDP_15)
646+
try_vesa_interface = true;
647+
643648
/*
644649
* Since Intel has their own backlight control interface, the majority of machines out there
645650
* using DPCD backlight controls with Intel GPUs will be using this interface as opposed to
@@ -653,7 +658,8 @@ int intel_dp_aux_init_backlight_funcs(struct intel_connector *connector)
653658
* backlight interface at all. This means that the only sensible way for us to detect both
654659
* interfaces is to probe for Intel's first, and VESA's second.
655660
*/
656-
if (try_intel_interface && intel_dp_aux_supports_hdr_backlight(connector)) {
661+
if (try_intel_interface && intel_dp_aux_supports_hdr_backlight(connector) &&
662+
intel_dp->edp_dpcd[0] <= DP_EDP_14b) {
657663
drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Using Intel proprietary eDP backlight controls\n",
658664
connector->base.base.id, connector->base.name);
659665
panel->backlight.funcs = &intel_dp_hdr_bl_funcs;

0 commit comments

Comments
 (0)