[PATCH v2 2/2] drm/dp: set pwm bit count when pwm hz is not set

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

 



Set pwmgen_bit_count to have proper brightness inc/dec steps
even when driver_pwm_freq_hz (optional) is zero.

cat /sys/class/backlight/nv_backlight/max_brightness
255

Can now tune properly backlight from 0 to 255.

---
Changes for v2:
none

Signed-off-by: Angelo Dureghello <angelo@xxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/display/drm_dp_helper.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
index f5d4be897866..30c4ed0f2ff1 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -3768,6 +3768,7 @@ drm_edp_backlight_probe_max(struct drm_dp_aux *aux, struct drm_edp_backlight_inf
 	}
 
 	pn &= DP_EDP_PWMGEN_BIT_COUNT_MASK;
+	bl->pwmgen_bit_count = pn;
 	bl->max = (1 << pn) - 1;
 	if (!driver_pwm_freq_hz)
 		return 0;
-- 
2.44.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux