summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-11-30 02:43:09 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-11-30 02:43:09 +0000
commitc31d476240e02d82090e9cbef2971e9207063954 (patch)
tree6fbfad7cf51dce7065fa54de41a4f0d7bfb808a1
parent190dc8ecb6dc4118f8322828daa5983df11a518f (diff)
drm/amd/display: enable dsc_clk even if dsc_pg disabled
From Muhammad Ahmed 3b70d45c7ea8e6c4584f497b1bad1dba1c3b9557 in linux-6.1.y/6.1.64 40255df370e94d44f0f0a924400d68db0ee31bec in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c8
-rw-r--r--sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_hwseq.c3
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
index 9d321f4f486..7a309547c2b 100644
--- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
+++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
@@ -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);
@@ -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)
@@ -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);
}
@@ -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);
diff --git a/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_hwseq.c
index fa075789c9e..4af01ba3fa9 100644
--- a/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_hwseq.c
+++ b/sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_hwseq.c
@@ -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);