Commit f9f4daf1 authored by David Zhang's avatar David Zhang Committed by Alex Deucher

drm/amd/display: pass panel instance in DMUB dirty rect command

[Why]

In cases where there are multiple eDP instances, DMUB needs to know
which instance the command is for. Today, the field for specifying the
panel_inst exists in both dmub_cmd_update_dirty_rect_data and
dmub_cmd_update_cursor_info_data.

For cursor updates, we already specify the panel_inst, but that's not
the case for dirty_rect updates. Today, a value of '0' is used (due
to initial memsetting of the cmd struct to 0)

[how]

In dc_dmub_update_dirty_rect(), Call dc_get_edp_link_panel_inst() to get
the panel_inst, and fill it in the DMUB cmd struct.

v2: Update commit message for clarity.
Signed-off-by: default avatarMikita Lipski <mikita.lipski@amd.com>
Signed-off-by: default avatarDavid Zhang <dingchen.zhang@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6651875a
...@@ -2837,10 +2837,14 @@ void dc_dmub_update_dirty_rect(struct dc *dc, ...@@ -2837,10 +2837,14 @@ void dc_dmub_update_dirty_rect(struct dc *dc,
struct dc_context *dc_ctx = dc->ctx; struct dc_context *dc_ctx = dc->ctx;
struct dmub_cmd_update_dirty_rect_data *update_dirty_rect; struct dmub_cmd_update_dirty_rect_data *update_dirty_rect;
unsigned int i, j; unsigned int i, j;
unsigned int panel_inst = 0;
if (stream->link->psr_settings.psr_version != DC_PSR_VERSION_SU_1) if (stream->link->psr_settings.psr_version != DC_PSR_VERSION_SU_1)
return; return;
if (!dc_get_edp_link_panel_inst(dc, stream->link, &panel_inst))
return;
memset(&cmd, 0x0, sizeof(cmd)); memset(&cmd, 0x0, sizeof(cmd));
cmd.update_dirty_rect.header.type = DMUB_CMD__UPDATE_DIRTY_RECT; cmd.update_dirty_rect.header.type = DMUB_CMD__UPDATE_DIRTY_RECT;
cmd.update_dirty_rect.header.sub_type = 0; cmd.update_dirty_rect.header.sub_type = 0;
...@@ -2869,6 +2873,7 @@ void dc_dmub_update_dirty_rect(struct dc *dc, ...@@ -2869,6 +2873,7 @@ void dc_dmub_update_dirty_rect(struct dc *dc,
if (pipe_ctx->plane_state != plane_state) if (pipe_ctx->plane_state != plane_state)
continue; continue;
update_dirty_rect->panel_inst = panel_inst;
update_dirty_rect->pipe_idx = j; update_dirty_rect->pipe_idx = j;
dc_dmub_srv_cmd_queue(dc_ctx->dmub_srv, &cmd); dc_dmub_srv_cmd_queue(dc_ctx->dmub_srv, &cmd);
dc_dmub_srv_cmd_execute(dc_ctx->dmub_srv); dc_dmub_srv_cmd_execute(dc_ctx->dmub_srv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment