Skip to contentSkip to conversation

drm/nouveau/disp: add backlight for ada lovelace

PATCH Superseded Angelo Dureghello 1 participant 1 message Apr 9, 2024

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 266826eac4a7..50a41af6550c 100644
@@ -3767,6 +3767,8 @@ drm_edp_backlight_probe_max(struct drm_dp_aux *aux, struct drm_edp_backlight_inf
 		return -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