diff options
author | Shirish S <shirish.s@amd.com> | 2018-02-21 05:40:33 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-28 15:14:41 -0500 |
commit | d6b6669762898dfc99e9273b8d8603bc47014aa9 (patch) | |
tree | cac84c37b7bd97569faa084bb1045fe560bf6b78 /drivers | |
parent | 219b3b22df9d828367a4eeceed7600890e2ff4ef (diff) |
drm/amd/display: check for ipp before calling cursor operations
Currently all cursor related functions are made to all
pipes that are attached to a particular stream.
This is not applicable to pipes that do not have cursor plane
initialised like underlay.
Hence this patch allows cursor related operations on a pipe
only if ipp in available on that particular pipe.
The check is added to set_cursor_position & set_cursor_attribute.
Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c index 261811e0c094..539c3e0a6292 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c | |||
@@ -197,7 +197,8 @@ bool dc_stream_set_cursor_attributes( | |||
197 | for (i = 0; i < MAX_PIPES; i++) { | 197 | for (i = 0; i < MAX_PIPES; i++) { |
198 | struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; | 198 | struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i]; |
199 | 199 | ||
200 | if (pipe_ctx->stream != stream || (!pipe_ctx->plane_res.xfm && !pipe_ctx->plane_res.dpp)) | 200 | if (pipe_ctx->stream != stream || (!pipe_ctx->plane_res.xfm && |
201 | !pipe_ctx->plane_res.dpp) || !pipe_ctx->plane_res.ipp) | ||
201 | continue; | 202 | continue; |
202 | if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) | 203 | if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) |
203 | continue; | 204 | continue; |
@@ -273,7 +274,8 @@ bool dc_stream_set_cursor_position( | |||
273 | if (pipe_ctx->stream != stream || | 274 | if (pipe_ctx->stream != stream || |
274 | (!pipe_ctx->plane_res.mi && !pipe_ctx->plane_res.hubp) || | 275 | (!pipe_ctx->plane_res.mi && !pipe_ctx->plane_res.hubp) || |
275 | !pipe_ctx->plane_state || | 276 | !pipe_ctx->plane_state || |
276 | (!pipe_ctx->plane_res.xfm && !pipe_ctx->plane_res.dpp)) | 277 | (!pipe_ctx->plane_res.xfm && !pipe_ctx->plane_res.dpp) || |
278 | !pipe_ctx->plane_res.ipp) | ||
277 | continue; | 279 | continue; |
278 | 280 | ||
279 | if (pipe_ctx->plane_state->address.type | 281 | if (pipe_ctx->plane_state->address.type |