summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2022-07-01 01:27:28 +0200
committerDave Airlie <airlied@redhat.com>2022-07-01 01:27:55 +0200
commitb8f0009bc9edf9186b20ae2a9e442ef0af93040e (patch)
treeee69b7603ae091238e62ff7e7666da3e2ecbb517 /drivers/gpu
parentMerge tag 'amd-drm-fixes-5.19-2022-06-29' of https://gitlab.freedesktop.org/a... (diff)
parentfbdev: Disable sysfb device registration when removing conflicting FBs (diff)
downloadlinux-b8f0009bc9edf9186b20ae2a9e442ef0af93040e.tar.xz
linux-b8f0009bc9edf9186b20ae2a9e442ef0af93040e.zip
Merge tag 'drm-misc-fixes-2022-06-30' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
A NULL pointer dereference fix for vc4, and 3 patches to improve the sysfb device behaviour when removing conflicting framebuffers Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220630072404.2fa4z3nk5h5q34ci@houat
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vc4/vc4_perfmon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_perfmon.c b/drivers/gpu/drm/vc4/vc4_perfmon.c
index c7f5adb6bcf8..79a74184d732 100644
--- a/drivers/gpu/drm/vc4/vc4_perfmon.c
+++ b/drivers/gpu/drm/vc4/vc4_perfmon.c
@@ -17,13 +17,16 @@
void vc4_perfmon_get(struct vc4_perfmon *perfmon)
{
- struct vc4_dev *vc4 = perfmon->dev;
+ struct vc4_dev *vc4;
+ if (!perfmon)
+ return;
+
+ vc4 = perfmon->dev;
if (WARN_ON_ONCE(vc4->is_vc5))
return;
- if (perfmon)
- refcount_inc(&perfmon->refcnt);
+ refcount_inc(&perfmon->refcnt);
}
void vc4_perfmon_put(struct vc4_perfmon *perfmon)