bl: fix backlight regression
PATCH 1/1 bl: fix backlight regression
fixes d9c0aadc5aa241df26ce8301d34a8418919fb5ae
Signed-off-by Karol Herbst <[email protected]>
--- drm/nouveau/nouveau_backlight.c | 7 +++++++ drm/nouveau/nv50_display.c | 4 ++-- drm/nouveau/nv50_display.h | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-)
drm/nouveau/nouveau_backlight.c +7 -0
@@ -38,6 +38,8 @@#include "nouveau_reg.h" #include "nouveau_encoder.h" +#include "nv50_display.h" +static struct ida bl_ida;#define BL_NAME_SIZE 15 // 12 for name + 2 for digits + 1 for '\0'
@@ -220,6 +222,7 @@ nv50_backlight_init(struct drm_connector *connector)const struct backlight_ops *ops;struct backlight_connector bl_connector;char backlight_name[BL_NAME_SIZE ]; +int ret; nv_encoder =find_encoder (connector,DCB_OUTPUT_LVDS );if (!nv_encoder) {
@@ -228,8 +231,12 @@ nv50_backlight_init(struct drm_connector *connector)return -ENODEV ; } + ret =nv50_outp_acquire (nv_encoder); +if (ret) +return ret;if (!nvif_rd32 (device,NV50_PDISP_SOR_PWM_CTL (nv_encoder->or)))return 0 ; +nv50_outp_release (nv_encoder); if (drm->client.device.info.chipset <= 0xa0 || drm->client.device.info.chipset == 0xaa ||
drm/nouveau/nv50_display.c +2 -2
@@ -2444,7 +2444,7 @@ out:/****************************************************************************** * Output path helpers *****************************************************************************/ -static void +void nv50_outp_release (struct nouveau_encoder *nv_encoder) {struct nv50_disp *disp =nv50_disp (nv_encoder->base.base.dev);
@@ -2462,7 +2462,7 @@ nv50_outp_release(struct nouveau_encoder *nv_encoder) nv_encoder->link =0 ; } -static int +int nv50_outp_acquire (struct nouveau_encoder *nv_encoder) {struct nouveau_drm *drm =nouveau_drm (nv_encoder->base.base.dev);
drm/nouveau/nv50_display.h +4 -0
@@ -31,8 +31,12 @@#include "nouveau_crtc.h" #include "nouveau_reg.h" +struct nouveau_encoder ; +int nv50_display_create (struct drm_device *);void nv50_display_destroy (struct drm_device *);int nv50_display_init (struct drm_device *);void nv50_display_fini (struct drm_device *); +void nv50_outp_release (struct nouveau_encoder *); +int nv50_outp_acquire (struct nouveau_encoder *);#endif /* __NV50_DISPLAY_H__ */
Signature · 6 lines
2.14.3 _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau