drm/nouveau/disp: add backlight for ada lovelace
Subsystems (3)
PATCH 1/1 drm/nouveau/disp: add backlight for ada lovelace
Add working backlight for "ada lovelace" missing case.
The nvif method is actually not working for this chipset so used the drm apis. Also, by dpcd, drm layer is calculating a max brightness of 255, but to get a real correct max brightnes the maximum must be multiplied by a factor of 16.
Tested to work properly in Legion Lenovo Pro 5
Lenovo Legion 5 Pro 16ARX8
Bios ver LPCN49WW
LPEC49WW
SN PF4T63AZ
Nvidia RTX4060 MaxQ/Mobile rev a1 (ADA LOVELACE AD107M) AMD Ryzen 9 7945HX + Radeon
and wayland.
Signed-off-by Angelo Dureghello <[email protected]>
--- drivers/gpu/drm/display/drm_dp_helper.c | 2 + drivers/gpu/drm/nouveau/nouveau_backlight.c | 51 +++++++++++++++++++++ 2 files changed, 53 insertions(+)
drivers/gpu/drm/display/drm_dp_helper.c +2 -0
@@ -3767,6 +3767,8 @@ drm_edp_backlight_probe_max(struct drm_dp_aux *aux, struct drm_edp_backlight_infreturn -ENODEV ; } +printk ("%s() pn %d\n" , __func__, pn); + pn &=DP_EDP_PWMGEN_BIT_COUNT_MASK ; bl->max = (1 << pn) -1 ;if (!driver_pwm_freq_hz)
drivers/gpu/drm/nouveau/nouveau_backlight.c +51 -0
63 lines not on this page · raw message
Signature · 1 line
2.44.0