summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorYongqiang Sun <yongqiang.sun@amd.com>2016-12-21 11:16:48 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 17:06:55 -0400
commit0f4e66cd7dac538adca4b1cac8f36b90db1709e6 (patch)
treec44c5fd992cf4615927288bbf3bee79c33db15d9 /drivers/gpu
parentd7194cf6b8ddf0344e70834397d0b1af2cc5fe05 (diff)
downloadlinux-stable-0f4e66cd7dac538adca4b1cac8f36b90db1709e6.tar.gz
linux-stable-0f4e66cd7dac538adca4b1cac8f36b90db1709e6.tar.bz2
linux-stable-0f4e66cd7dac538adca4b1cac8f36b90db1709e6.zip
drm/amd/display: don't crash if stream is NULL when trying to share clocks
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_resource.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 343114b2680f..eac597d0c790 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -288,6 +288,11 @@ static bool is_sharable_clk_src(
if (pipe_with_clk_src->clock_source == NULL)
return false;
+ if (pipe_with_clk_src->stream == NULL) {
+ ASSERT(0);
+ return false;
+ }
+
if (pipe_with_clk_src->stream->signal == SIGNAL_TYPE_VIRTUAL)
return false;