]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/backlight: Just set all backlight types as RAW
authorLyude Paul <lyude@redhat.com>
Fri, 4 Feb 2022 19:33:19 +0000 (14:33 -0500)
committerLyude Paul <lyude@redhat.com>
Tue, 8 Feb 2022 20:22:35 +0000 (15:22 -0500)
commitf89caf7cf22a4badeb82dd9f84e0238ef08396b7
treebf50c8bf4341f27f6297f7b6f0fd901133d3d3db
parentaab1d40b3963363dac13315179ea96cd888288fc
drm/nouveau/backlight: Just set all backlight types as RAW

Currently we can get a warning on systems with eDP backlights like so:

  nv_backlight: invalid backlight type
  WARNING: CPU: 4 PID: 454 at drivers/video/backlight/backlight.c:420
    backlight_device_register+0x226/0x250

This happens as a result of us not filling out props.type for the eDP
backlight, even though we do it for all other backlight types.

Since nothing in our driver uses anything but BACKLIGHT_RAW, let's take the
props\.type assignments out of the codepaths for individual backlight types
and just set it unconditionally to prevent this from happening again.

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