summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-01-27 22:56:44 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-01-27 22:56:44 +0000
commitf5a555a91a3f87b03e49445af45a976c634ac455 (patch)
tree9fd2397b0d780d77232f183286c16740f5de5c5f /sys/dev/pci
parentbb9087b71c5fa0994cbb191984f3a650d14cd668 (diff)
drm/amd/display: check top_pipe_to_program pointer
From Yang Li 1fffa8ffd62fc511d4447b793641252c4743e81c in linux 5.15.y/5.15.17 a689e8d1f80012f90384ebac9dcfac4201f9f77e in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
index c798c65d427..1860ccc3f4f 100644
--- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
+++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
@@ -2703,7 +2703,8 @@ static void commit_planes_for_stream(struct dc *dc,
#endif
if ((update_type != UPDATE_TYPE_FAST) && stream->update_flags.bits.dsc_changed)
- if (top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {
+ if (top_pipe_to_program &&
+ top_pipe_to_program->stream_res.tg->funcs->lock_doublebuffer_enable) {
if (should_use_dmub_lock(stream->link)) {
union dmub_hw_lock_flags hw_locks = { 0 };
struct dmub_hw_lock_inst_flags inst_flags = { 0 };