drm/amd/display: Fix MPO exit and cursor issue.
authorYongqiang Sun <yongqiang.sun@amd.com>
Mon, 27 Mar 2017 13:59:38 +0000 (09:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:21:21 +0000 (17:21 -0400)
Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c
drivers/gpu/drm/amd/display/dc/dc.h

index 512a53bdc32f0ca9d96bf7abd5db1dc265ae7db6..bf209f7bbf9861cd1db648c89585a3c95440869c 100644 (file)
@@ -215,7 +215,7 @@ bool dc_stream_set_cursor_attributes(
 
 bool dc_stream_set_cursor_position(
        const struct dc_stream *dc_stream,
-       const struct dc_cursor_position *position)
+       struct dc_cursor_position *position)
 {
        int i;
        struct core_stream *stream;
@@ -251,6 +251,9 @@ bool dc_stream_set_cursor_position(
                                .h_scale_ratio = pipe_ctx->scl_data.ratios.horz,
                        };
 
+                       if (pipe_ctx->top_pipe && pipe_ctx->surface != pipe_ctx->top_pipe->surface)
+                               position->enable = false;
+
                        ipp->funcs->ipp_cursor_set_position(ipp, position, &param);
                        ret = true;
                }
index b3d5b922aae4799f78b898022f2ee9ab87a5ff43..0731045f6084f9cfc9846f228b87d85f1f0e32c0 100644 (file)
@@ -744,7 +744,7 @@ bool dc_stream_set_cursor_attributes(
 
 bool dc_stream_set_cursor_position(
        const struct dc_stream *stream,
-       const struct dc_cursor_position *position);
+       struct dc_cursor_position *position);
 
 /* Newer interfaces  */
 struct dc_cursor {