drm/nouveau: Adding support to control backlight using bl_power for nva3.
Subsystems (3)
PATCH 1/1 drm/nouveau: Adding support to control backlight using bl_power for nva3.
Test plan:
* Turn off:
echo 1 > /sys/class/backlight/nv_backlight/bl_power
* Turn on:
echo 0 > /sys/class/backlight/nv_backlight/bl_power
Signed-off-by antoniospg <[email protected]>
--- drivers/gpu/drm/nouveau/nouveau_backlight.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_backlight.c +10 -1
@@ -263,7 +263,16 @@ nva3_set_intensity(struct backlight_device *bd)u32 div, val; div =nvif_rd32 (device,NV50_PDISP_SOR_PWM_DIV (or)); - val = (bd->props.brightness * div) /100 ; + +switch (bd->props.power) { +case FB_BLANK_UNBLANK : + val = (bd->props.brightness * div) /100 ; +break ; +default : + val =0 ; +break ; + } +if (div) { nvif_wr32(device, NV50_PDISP_SOR_PWM_CTL(or), val |
Signature · 1 line
2.25.1