diff options
author | Shirish S <shirish.s@amd.com> | 2017-06-08 11:55:06 +0530 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:07:59 -0400 |
commit | aed8b319180f18402ed90929f85e2b3e5b81e71d (patch) | |
tree | 145a65c20a3093be96e536d4868f7c3b7eca14cb /drivers/gpu/drm/amd/display/dc/core/dc_debug.c | |
parent | 561f3a4db315d639b93adf86eedbb8405dd81fbe (diff) |
drm/amd/display: remove get_position() of underlay
get_position() returns CRTC vertical/horizontal counters,
hence it is not applicable for underlay which is plane and not
attached to one crtc.
This patch hence removes the callback from dce110_tg_v_funcs
and hence fixes a bug in dc_debug.c where in
get_position() for underlay pipe is called un-conditionally.
Witout this patch get_position() is called in case one has
to update underlay plane's data,
since callback implmented with an ASSERT(),
the old_surface_count and new_surface_count mismatches; causing
only one plane update which is not right and also assert makes the
rendering slow.
Signed-off-by: Shirish S <shirish.s@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/drm/amd/display/dc/core/dc_debug.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c index ad556e9b0754..9a5df3a848b5 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c @@ -297,11 +297,16 @@ void context_timing_trace( struct dal_logger *logger = core_dc->ctx->logger; int h_pos[MAX_PIPES], v_pos[MAX_PIPES]; struct crtc_position position; + unsigned int underlay_idx = core_dc->res_pool->underlay_pipe_index; + for (i = 0; i < core_dc->res_pool->pipe_count; i++) { struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; - - if (pipe_ctx->stream == NULL) + /* get_position() returns CRTC vertical/horizontal counter + * hence not applicable for underlay pipe + */ + if (pipe_ctx->stream == NULL + || pipe_ctx->pipe_idx == underlay_idx) continue; pipe_ctx->tg->funcs->get_position(pipe_ctx->tg, &position); |