Fix for nouveau backlight regression (rhbz 1511786)
This commit is contained in:
parent
020840307e
commit
1d7702f585
|
@ -0,0 +1,68 @@
|
|||
From 9e75dc61eaa9acd1bff83c3b814ac2af6dc1f64c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <9e75dc61eaa9acd1bff83c3b814ac2af6dc1f64c.1521737559.git.jeremy@jcline.org>
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
Date: Mon, 19 Feb 2018 17:09:45 +0100
|
||||
Subject: [PATCH] drm/nouveau/bl: fix backlight regression
|
||||
|
||||
Fixes: 3c66c87dc9 ("drm/nouveau/disp: remove hw-specific customisation
|
||||
of output paths")
|
||||
Suggested-by: Ben Skeggs <skeggsb@redhat.com>
|
||||
Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
||||
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
||||
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
||||
---
|
||||
drivers/gpu/drm/nouveau/nouveau_backlight.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
|
||||
index f56f60f695e1..debbbf0fd4bd 100644
|
||||
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
|
||||
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
|
||||
@@ -134,7 +134,7 @@ nv50_get_intensity(struct backlight_device *bd)
|
||||
struct nouveau_encoder *nv_encoder = bl_get_data(bd);
|
||||
struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
|
||||
struct nvif_object *device = &drm->client.device.object;
|
||||
- int or = nv_encoder->or;
|
||||
+ int or = ffs(nv_encoder->dcb->or) - 1;
|
||||
u32 div = 1025;
|
||||
u32 val;
|
||||
|
||||
@@ -149,7 +149,7 @@ nv50_set_intensity(struct backlight_device *bd)
|
||||
struct nouveau_encoder *nv_encoder = bl_get_data(bd);
|
||||
struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
|
||||
struct nvif_object *device = &drm->client.device.object;
|
||||
- int or = nv_encoder->or;
|
||||
+ int or = ffs(nv_encoder->dcb->or) - 1;
|
||||
u32 div = 1025;
|
||||
u32 val = (bd->props.brightness * div) / 100;
|
||||
|
||||
@@ -170,7 +170,7 @@ nva3_get_intensity(struct backlight_device *bd)
|
||||
struct nouveau_encoder *nv_encoder = bl_get_data(bd);
|
||||
struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
|
||||
struct nvif_object *device = &drm->client.device.object;
|
||||
- int or = nv_encoder->or;
|
||||
+ int or = ffs(nv_encoder->dcb->or) - 1;
|
||||
u32 div, val;
|
||||
|
||||
div = nvif_rd32(device, NV50_PDISP_SOR_PWM_DIV(or));
|
||||
@@ -188,7 +188,7 @@ nva3_set_intensity(struct backlight_device *bd)
|
||||
struct nouveau_encoder *nv_encoder = bl_get_data(bd);
|
||||
struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev);
|
||||
struct nvif_object *device = &drm->client.device.object;
|
||||
- int or = nv_encoder->or;
|
||||
+ int or = ffs(nv_encoder->dcb->or) - 1;
|
||||
u32 div, val;
|
||||
|
||||
div = nvif_rd32(device, NV50_PDISP_SOR_PWM_DIV(or));
|
||||
@@ -228,7 +228,7 @@ nv50_backlight_init(struct drm_connector *connector)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
- if (!nvif_rd32(device, NV50_PDISP_SOR_PWM_CTL(nv_encoder->or)))
|
||||
+ if (!nvif_rd32(device, NV50_PDISP_SOR_PWM_CTL(ffs(nv_encoder->dcb->or) - 1)))
|
||||
return 0;
|
||||
|
||||
if (drm->client.device.info.chipset <= 0xa0 ||
|
||||
--
|
||||
2.16.2
|
||||
|
|
@ -670,6 +670,9 @@ Patch662: mm-khugepaged-Convert-VM_BUG_ON-to-collapse-fail.patch
|
|||
# CVE-2017-18232 rhbz 1558066 1558067
|
||||
Patch663: 0001-scsi-libsas-direct-call-probe-and-destruct.patch
|
||||
|
||||
# rhbz 1511786
|
||||
Patch 664: drm-nouveau-bl-fix-backlight-regression.patch
|
||||
|
||||
# END OF PATCH DEFINITIONS
|
||||
|
||||
%endif
|
||||
|
@ -2000,6 +2003,9 @@ fi
|
|||
#
|
||||
#
|
||||
%changelog
|
||||
* Thu Mar 22 2018 Jeremy Cline <jeremy@jcline.org>
|
||||
- Fix for nouveau backlight regression (rhbz 1511786)
|
||||
|
||||
* Wed Mar 21 2018 Laura Abbott <labbott@redhat.com> - 4.15.12-300
|
||||
- Linux v4.15.12
|
||||
|
||||
|
|
Loading…
Reference in New Issue