From: Charlene Liu <charlene....@amd.com>

[why]
check dmub_Srv exist or not before accessing dmub.

Acked-by: Stylon Wang <stylon.w...@amd.com>
Signed-off-by: Charlene Liu <charlene....@amd.com>
Reviewed-by: Zhan Liu <zhan....@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 0d3ec50b1385..41b4c360c5b2 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_stream.c
@@ -276,7 +276,7 @@ static void program_cursor_attributes(
                }
 
                dc->hwss.set_cursor_attribute(pipe_ctx);
-
+               if (dc->ctx->dmub_srv)
                dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
                if (dc->hwss.set_cursor_sdr_white_level)
                        dc->hwss.set_cursor_sdr_white_level(pipe_ctx);
@@ -396,7 +396,7 @@ static void program_cursor_position(
                }
 
                dc->hwss.set_cursor_position(pipe_ctx);
-
+               if (dc->ctx->dmub_srv)
                dc_send_update_cursor_info_to_dmu(pipe_ctx, i);
        }
 
-- 
2.40.1

Reply via email to