[PATCH 07/17] drm/amd/display: Prevent dcn314 RCO from enabling on unsupported chips
Hamza Mahfooz
hamza.mahfooz at amd.com
Wed Jun 14 17:57:40 UTC 2023
From: Daniel Miess <daniel.miess at amd.com>
[Why]
In some cases enabling RCO on older dcn314 chips leads to underflow
[How]
Explicitly disable RCO on unsupported dcn314 chips
Fixes: 0e1961c93839 ("drm/amd/display: Enable dcn314 DPP RCO")
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz at amd.com>
Signed-off-by: Daniel Miess <daniel.miess at amd.com>
---
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +-
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
index cf23d7bc560a..0746ed31d1d1 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dccg.c
@@ -332,7 +332,7 @@ static void dccg314_dpp_root_clock_control(
{
struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
- if (dccg->dpp_clock_gated[dpp_inst] == clock_on)
+ if (dccg->dpp_clock_gated[dpp_inst] != clock_on)
return;
if (clock_on) {
diff --git a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
index 03c5690ff54b..1290c294d47e 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
@@ -1904,11 +1904,15 @@ static bool dcn314_resource_construct(
else
dc->debug = debug_defaults_diags;
- /* Disable pipe power gating when unsupported */
+
if (ctx->asic_id.hw_internal_rev == 0x01 ||
ctx->asic_id.hw_internal_rev == 0x80) {
+ /* Disable pipe power gating when unsupported */
dc->debug.disable_dpp_power_gate = true;
dc->debug.disable_hubp_power_gate = true;
+
+ /* Disable root clock optimization when unsupported*/
+ dc->debug.root_clock_optimization.u32All = 0;
}
// Init the vm_helper
--
2.40.1
More information about the amd-gfx
mailing list