aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAric Cyr <aric.cyr@amd.com>2021-11-26 21:20:09 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-12-07 13:11:58 -0500
commit6fc429c81a64b0b77fea38809b01ae94a9348025 (patch)
tree485562a38baaeee8bb837e70f56c3fdaa4cc5d47
parentdrm/amd/display: Query DMCUB for dp alt status (diff)
downloadlinux-dev-6fc429c81a64b0b77fea38809b01ae94a9348025.tar.xz
linux-dev-6fc429c81a64b0b77fea38809b01ae94a9348025.zip
drm/amd/display: Reduce stack usage
Reduce stack usage by moving an unnecessary structure copy to a pointer. Reviewed-by: Joshua Aberback <Joshua.Aberback@amd.com> Acked-by: Pavle Kotarac <Pavle.Kotarac@amd.com> Signed-off-by: Aric Cyr <aric.cyr@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 471620a3d7ae..7ee548ffbdaf 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -3001,12 +3001,12 @@ static void commit_planes_for_stream(struct dc *dc,
#ifdef CONFIG_DRM_AMD_DC_DCN
if (dc->debug.validate_dml_output) {
for (i = 0; i < dc->res_pool->pipe_count; i++) {
- struct pipe_ctx cur_pipe = context->res_ctx.pipe_ctx[i];
- if (cur_pipe.stream == NULL)
+ struct pipe_ctx *cur_pipe = &context->res_ctx.pipe_ctx[i];
+ if (cur_pipe->stream == NULL)
continue;
- cur_pipe.plane_res.hubp->funcs->validate_dml_output(
- cur_pipe.plane_res.hubp, dc->ctx,
+ cur_pipe->plane_res.hubp->funcs->validate_dml_output(
+ cur_pipe->plane_res.hubp, dc->ctx,
&context->res_ctx.pipe_ctx[i].rq_regs,
&context->res_ctx.pipe_ctx[i].dlg_regs,
&context->res_ctx.pipe_ctx[i].ttu_regs);