summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>2019-03-26 13:26:37 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-04-10 13:53:28 -0500
commitfe6382cd69de98802455e77040c6e00d9e12cc47 (patch)
treeac47ec82a5faaf5cfcf6d4fa3b604bc59a2c9583 /drivers/gpu
parentcc1fec5724d16295979c8bb7cf27ac2f4696b19c (diff)
drm/amd/display: fix is odm head pipe logic
Simply return true/false, don't iterate up the tree. Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Nikola Cornij <Nikola.Cornij@amd.com> Acked-by: Leo Li <sunpeng.li@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.c11
1 files changed, 3 insertions, 8 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 f798fc28fb2a..3830e6ce1355 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -1305,18 +1305,13 @@ struct pipe_ctx *dc_res_get_odm_bottom_pipe(struct pipe_ctx *pipe_ctx)
bool dc_res_is_odm_head_pipe(struct pipe_ctx *pipe_ctx)
{
struct pipe_ctx *top_pipe = pipe_ctx->top_pipe;
- bool result = false;
+ if (!top_pipe)
+ return false;
if (top_pipe && top_pipe->stream_res.opp == pipe_ctx->stream_res.opp)
return false;
- while (top_pipe) {
- if (!top_pipe->top_pipe && top_pipe->stream_res.opp != pipe_ctx->stream_res.opp)
- result = true;
- top_pipe = top_pipe->top_pipe;
- }
-
- return result;
+ return true;
}
bool dc_remove_plane_from_context(