drm/amd/display: Cache cursor position.
authorYongqiang Sun <yongqiang.sun@amd.com>
Tue, 21 Nov 2017 21:12:23 +0000 (16:12 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Dec 2017 15:54:25 +0000 (10:54 -0500)
When programming cursor position after front end programmed,
if position is already set previously, it doesn't make sense
to program position with all 0.
Cache position and use the parameter after front end programming.

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>
drivers/gpu/drm/amd/display/dc/core/dc_stream.c
drivers/gpu/drm/amd/display/dc/dc_stream.h

index e39568b4460c86850cfa140d4a0c7bea8a900355..261811e0c094a81a0a1c0c1c6420f83d4db4a3bc 100644 (file)
@@ -301,6 +301,8 @@ bool dc_stream_set_cursor_position(
 
        }
 
+       stream->cursor_position = *position;
+
        return true;
 }
 
index fed0e5ea96256fc74f86c84b0e78904dc02b5f1d..01c60f11b2bdeec208f5df9e5cfd2092a614eac5 100644 (file)
@@ -86,6 +86,7 @@ struct dc_stream_state {
        struct dc_stream_status status;
 
        struct dc_cursor_attributes cursor_attributes;
+       struct dc_cursor_position cursor_position;
 
        /* from stream struct */
        struct kref refcount;