]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: fix root clock disabled when DSC power gate disabled for DCN314
authorJing Zhou <Jing.Zhou@amd.com>
Thu, 16 Apr 2026 05:47:52 +0000 (13:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Apr 2026 18:30:43 +0000 (14:30 -0400)
commit120e4243625690ee8bd3d6a8a6e2eac4269ba40d
tree68b70a2d3ac2dff35fa87bcd87c0f400cbe61238
parent04f5c13b5543006fbeeeacc5d4f4e2ed3ef8e6bb
drm/amd/display: fix root clock disabled when DSC power gate disabled for DCN314

[Why]
When set debug.disable_dsc_power_gate = true, the original code
uses an early return to skip the power gate sequence and root
clock enable and disable.

For this case, install new driver without uninstall old driver.
The sequence like below:
1. On the power-off path, the old driver will power gate dsc and
   disable_dsc() (root clock disable) due to
   debug.disable_dsc_power_gate = false.
2. On the power-on path, the new driver will force power on dsc but skip
   enable_dsc() (root clock enable) due to
   debug.disable_dsc_power_gate = true.

Finally, when mode needs DSC but the root clock is disabled, underflow
happened.

[How]
- Moving enable_dsc() before the disable_dsc_power_gate check so the
  root clock is always enabled on the power-on path.
- Replacing the early return with a goto that skips only the power gate
  register writes, allowing disable_dsc() to still execute on the
  power-off path.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Jing Zhou <Jing.Zhou@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c