From: Dmytro Laktyushkin <dmytro.laktyush...@amd.com>

Change-Id: I98ac559661295af4c2d4d151c4dd6029e27349c1
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyush...@amd.com>
Reviewed-by: Tony Cheng <tony.ch...@amd.com>
Acked-by: Harry Wentland <harry.wentl...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 ++--
 1 file changed, 2 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 47816c5ee0e0..e1f579bcd789 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -232,8 +232,8 @@ bool dc_stream_set_cursor_position(
        for (i = 0; i < MAX_PIPES; i++) {
                struct pipe_ctx *pipe_ctx = &res_ctx->pipe_ctx[i];
 
-               if ((pipe_ctx->stream == stream) &&
-                               (pipe_ctx->ipp != NULL)) {
+               if (pipe_ctx->stream == stream &&
+                               pipe_ctx->ipp && pipe_ctx->surface) {
                        struct input_pixel_processor *ipp = pipe_ctx->ipp;
                        struct dc_cursor_mi_param param = {
                                .pixel_clk_khz = dc_stream->timing.pix_clk_khz,
-- 
2.9.3

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to