[PATCH] drm/i915/dp: add a delay before setting panel brightness after power on

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Panel in my Dell XPS 7590, that uses Intel's HDR backlight interface to
control brightness, apparently needs a delay before setting brightness
after power on. Without this delay the panel does accept the setting
and may come up with some arbitrary brightness (sometimes it's too dark,
sometimes it's too bright, I wasn't able to find a system).

I don't have access to the spec, so I'm not sure if it's expected
behavior or a quirk for particular device.

Delay was chosen by experiment: it works with 100ms, but fails with
anything lower than 75ms.

Signed-off-by: Vasily Khoruzhick <anarsoul@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 4 ++++
 1 file changed, 4 insertions(+)

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 4f8337c7fd2e..c4f35e1b5870 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -210,6 +210,10 @@ intel_dp_aux_hdr_enable_backlight(const struct intel_crtc_state *crtc_state,
 
 	ctrl = old_ctrl;
 	if (panel->backlight.edp.intel.sdr_uses_aux) {
+		/* Wait 100ms to ensure that panel is ready otherwise it may not
+		 * set chosen backlight level
+		 */
+		msleep(100);
 		ctrl |= INTEL_EDP_HDR_TCON_BRIGHTNESS_AUX_ENABLE;
 		intel_dp_aux_hdr_set_aux_backlight(conn_state, level);
 	} else {
-- 
2.33.0




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux