summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/core
diff options
context:
space:
mode:
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>2018-03-29 16:39:10 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-05-15 13:43:23 -0500
commitc5b38aec266deade4067ddc606634ace68d2da8c (patch)
treedf7d0d9561ca4febab4fb419ededd4357c77bcfc /drivers/gpu/drm/amd/display/dc/core
parentfc6de1c565e03f492a3d9725b93092dac0cc1845 (diff)
downloadop-kernel-dev-c5b38aec266deade4067ddc606634ace68d2da8c.zip
op-kernel-dev-c5b38aec266deade4067ddc606634ace68d2da8c.tar.gz
drm/amd/display: fix segfault on insufficient TG during validation
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_resource.c2
1 files changed, 1 insertions, 1 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 8d7bc1f..d7a92ec 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -1700,7 +1700,7 @@ enum dc_status resource_map_pool_resources(
pipe_idx = acquire_first_split_pipe(&context->res_ctx, pool, stream);
#endif
- if (pipe_idx < 0)
+ if (pipe_idx < 0 || context->res_ctx.pipe_ctx[pipe_idx].stream_res.tg == NULL)
return DC_NO_CONTROLLER_RESOURCE;
pipe_ctx = &context->res_ctx.pipe_ctx[pipe_idx];
OpenPOWER on IntegriCloud