summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorYongqiang Sun <yongqiang.sun@amd.com>2016-12-21 16:48:51 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-09-26 17:07:02 -0400
commit6680b6a1377f944e5369f456fe1b9d193dd4624b (patch)
tree044d51905b4b3fbf286dda3df6661230f6b56b9f /drivers/gpu
parent80bd20967261d9438dc814f3e6e904aea053163b (diff)
downloadlinux-stable-6680b6a1377f944e5369f456fe1b9d193dd4624b.tar.gz
linux-stable-6680b6a1377f944e5369f456fe1b9d193dd4624b.tar.bz2
linux-stable-6680b6a1377f944e5369f456fe1b9d193dd4624b.zip
drm/amd/display: Fixed crash
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.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 891075e39ecf..e6010abc9e0d 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -167,24 +167,20 @@ static bool stream_adjust_vmin_vmax(struct dc *dc,
struct core_stream *core_stream = DC_STREAM_TO_CORE(stream[0]);
int i = 0;
bool ret = false;
- struct pipe_ctx *pipes;
- unsigned int underlay_idx = core_dc->res_pool->underlay_pipe_index;
for (i = 0; i < MAX_PIPES; i++) {
- if (core_dc->current_context->res_ctx.pipe_ctx[i].stream == core_stream
- && i != underlay_idx) {
+ struct pipe_ctx *pipe = &core_dc->current_context->res_ctx.pipe_ctx[i];
- pipes = &core_dc->current_context->res_ctx.pipe_ctx[i];
- core_dc->hwss.set_drr(&pipes, 1, vmin, vmax);
+ if (pipe->stream == core_stream && pipe->stream_enc) {
+ core_dc->hwss.set_drr(&pipe, 1, vmin, vmax);
/* build and update the info frame */
- resource_build_info_frame(pipes);
- core_dc->hwss.update_info_frame(pipes);
+ resource_build_info_frame(pipe);
+ core_dc->hwss.update_info_frame(pipe);
ret = true;
}
}
-
return ret;
}