From 626a1922a0b8eb944df9e8d75120a6bce2d0ec6f Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 24 Aug 2023 06:24:54 +0000 Subject: [PATCH] drm/amd/display: disable RCO for DCN314 From Daniel Miess d4008eadfce5d7791bf078f5e51ba5b735fd8c09 in linux-6.1.y/6.1.47 85e41f1ed5d94a26fe4e57003c399936d291ed70 in mainline linux --- sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_dccg.c | 2 +- sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_dccg.c b/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_dccg.c index 97c6a79dfba..b74705c1c8d 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_dccg.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_dccg.c @@ -296,7 +296,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/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c b/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c index 012f6369dae..503ab45b4ac 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c @@ -1933,6 +1933,10 @@ static bool dcn314_resource_construct( dc->debug = debug_defaults_drv; else dc->debug = debug_defaults_diags; + + /* Disable root clock optimization */ + dc->debug.root_clock_optimization.u32All = 0; + // Init the vm_helper if (dc->vm_helper) vm_helper_init(dc->vm_helper, 16); -- 2.20.1