]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/backlight: Fix LVDS backlight detection on some laptops
authorLyude Paul <lyude@redhat.com>
Fri, 4 Feb 2022 18:05:04 +0000 (13:05 -0500)
committerLyude Paul <lyude@redhat.com>
Tue, 8 Feb 2022 20:22:16 +0000 (15:22 -0500)
commit8289a09bf1d2e0e9b849f87a8583bcf9faf921bb
treeb8134d6cee32e4b491baa4e13e97554eb6d2fb3d
parent50acdaf1285e26d27a1e8bbc453c37b16d630d8d
drm/nouveau/backlight: Fix LVDS backlight detection on some laptops

It seems that some laptops will report having both an eDP and LVDS
connector, even though only the LVDS connector is actually hooked up. This
can lead to issues with backlight registration if the eDP connector ends up
getting registered before the LVDS connector, as the backlight device will
then be registered to the eDP connector instead of the LVDS connector.

So, fix this by only registering the backlight on connectors that are
reported as being connected.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 403a17169ef3 ("drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau")
Bugzilla: https://gitlab.freedesktop.org/drm/nouveau/-/issues/137
Cc: <stable@vger.kernel.org> # v5.15+
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220204180504.328999-1-lyude@redhat.com
drivers/gpu/drm/nouveau/nouveau_backlight.c