Skip to content

Commit

Permalink
drm/amd/display: Update OTG instance in the commit stream
Browse files Browse the repository at this point in the history
commit eef019e upstream

OTG instance is not updated in dc_commit_state_no_check for newly
committed streams because mode_change is not set. Notice that OTG update
is part of the software state, and after hardware programming, it must
be updated; for this reason, this commit updates the OTG offset right
after hardware programming.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Co-developed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
rodrigosiqueira authored and gregkh committed Aug 16, 2023
1 parent b2415df commit 4fe91c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/amd/display/dc/core/dc.c
Expand Up @@ -1995,6 +1995,12 @@ enum dc_status dc_commit_streams(struct dc *dc,

res = dc_commit_state_no_check(dc, context);

for (i = 0; i < stream_count; i++) {
for (j = 0; j < context->stream_count; j++)
if (streams[i]->stream_id == context->streams[j]->stream_id)
streams[i]->out.otg_offset = context->stream_status[j].primary_otg_inst;
}

fail:
dc_release_state(context);

Expand Down

0 comments on commit 4fe91c5

Please sign in to comment.