drm/fb-helper: Add locking to sysrq handling
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 7 Oct 2020 13:30:35 +0000 (15:30 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 8 Oct 2020 09:29:33 +0000 (11:29 +0200)
commita76fa3540fc33de4718b386aea37ed4a7236d253
tree6192addbe3e42dec62715eaf41d2cb9e41d6dd7d
parent5a3884320a5753395e7167a74f4be257d490a578
drm/fb-helper: Add locking to sysrq handling

We didn't take the kernel_fb_helper_lock mutex, which protects that
code. While at it, simplify the code
- inline the function (originally shared with kgdb I think)
- drop the error tracking and all the complications
- drop the pointless early out, it served nothing

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201007133036.1541639-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_fb_helper.c