If the brightness fetched from VBT/previous state is 0 on backlight
initialization, then set the brightness to a default/max value.
Whenever the minimum brightness is reported as 0 there are chances
we maybe sometimes end up with blank screen. This confuses the user
into thinking the display is acting weird. This occurs in eDP 1.4b
when we use proprietary INTEL AUX HDR DPCD registers to manipulate
brightness via luminance values.

Signed-off-by: Suraj Kandpal <[email protected]>
Reviewed-by: Arun R Murthy <[email protected]>
---
v1 -> v2:
- Let users set brightness to 0, make it so that it's just not
done by default (Arun)

v1 -> v2:
- Update commit header & message (Arun)

 drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 2 ++
 1 file changed, 2 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 aac6cdb5b69b..725370bcfa3b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
@@ -442,6 +442,8 @@ intel_dp_aux_hdr_setup_backlight(struct intel_connector 
*connector, enum pipe pi
 
        panel->backlight.level = intel_dp_aux_hdr_get_backlight(connector, 
pipe);
        panel->backlight.enabled = panel->backlight.level != 0;
+       if (!panel->backlight.level)
+               panel->backlight.level = panel->backlight.max;
 
        return 0;
 }
-- 
2.34.1

Reply via email to