Skip to content

Commit

Permalink
drm/amd/display: enable dsc_clk even if dsc_pg disabled
Browse files Browse the repository at this point in the history
[ Upstream commit 40255df ]

[why]
need to enable dsc_clk regardless dsc_pg

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Muhammad Ahmed <ahmed.ahmed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Muhammad Ahmed authored and gregkh committed Nov 28, 2023
1 parent 1d1cc27 commit 3b70d45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/amd/display/dc/core/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
if (dc->hwss.subvp_pipe_control_lock)
dc->hwss.subvp_pipe_control_lock(dc, context, true, true, NULL, subvp_prev_use);

if (dc->debug.enable_double_buffered_dsc_pg_support)
if (dc->hwss.update_dsc_pg)
dc->hwss.update_dsc_pg(dc, context, false);

disable_dangling_plane(dc, context);
Expand Down Expand Up @@ -1905,7 +1905,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
dc->hwss.optimize_bandwidth(dc, context);
}

if (dc->debug.enable_double_buffered_dsc_pg_support)
if (dc->hwss.update_dsc_pg)
dc->hwss.update_dsc_pg(dc, context, true);

if (dc->ctx->dce_version >= DCE_VERSION_MAX)
Expand Down Expand Up @@ -2193,7 +2193,7 @@ void dc_post_update_surfaces_to_stream(struct dc *dc)

dc->hwss.optimize_bandwidth(dc, context);

if (dc->debug.enable_double_buffered_dsc_pg_support)
if (dc->hwss.update_dsc_pg)
dc->hwss.update_dsc_pg(dc, context, true);
}

Expand Down Expand Up @@ -3453,7 +3453,7 @@ static void commit_planes_for_stream(struct dc *dc,
if (get_seamless_boot_stream_count(context) == 0)
dc->hwss.prepare_bandwidth(dc, context);

if (dc->debug.enable_double_buffered_dsc_pg_support)
if (dc->hwss.update_dsc_pg)
dc->hwss.update_dsc_pg(dc, context, false);

context_clock_trace(dc, context);
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ void dcn32_dsc_pg_control(
if (hws->ctx->dc->debug.disable_dsc_power_gate)
return;

if (!hws->ctx->dc->debug.enable_double_buffered_dsc_pg_support)
return;

REG_GET(DC_IP_REQUEST_CNTL, IP_REQUEST_EN, &org_ip_request_cntl);
if (org_ip_request_cntl == 0)
REG_SET(DC_IP_REQUEST_CNTL, 0, IP_REQUEST_EN, 1);
Expand Down

0 comments on commit 3b70d45

Please sign in to comment.