summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/hubp/dcn401
diff options
context:
space:
mode:
authorAric Cyr <Aric.Cyr@amd.com>2025-01-09 15:03:48 -0500
committerAlex Deucher <alexander.deucher@amd.com>2025-01-24 09:56:22 -0500
commit01130f5260e5868fb6b15ab8c00dbc894139f48e (patch)
tree58e65b35b1bb2373c66d2a9a1e22b72af30a49f1 /drivers/gpu/drm/amd/display/dc/hubp/dcn401
parent335acfb64eb88eb638e2adc8ba5bfa530f2dd20d (diff)
downloadlinux-01130f5260e5868fb6b15ab8c00dbc894139f48e.tar.gz
linux-01130f5260e5868fb6b15ab8c00dbc894139f48e.tar.bz2
linux-01130f5260e5868fb6b15ab8c00dbc894139f48e.zip
drm/amd/display: Add hubp cache reset when powergating
[Why] When HUBP is power gated, the SW state can get out of sync with the hardware state causing cursor to not be programmed correctly. [How] Similar to DPP, add a HUBP reset function which is called wherever HUBP is initialized or powergated. This function will clear the cursor position and attribute cache allowing for proper programming when the HUBP is brought back up. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Sung Lee <sung.lee@amd.com> Signed-off-by: Aric Cyr <Aric.Cyr@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/hubp/dcn401')
-rw-r--r--drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
index 28ceceaf9e31..d8b81ad69e35 100644
--- a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
+++ b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
@@ -141,7 +141,7 @@ void hubp401_update_mall_sel(struct hubp *hubp, uint32_t mall_sel, bool c_cursor
void hubp401_init(struct hubp *hubp)
{
- //For now nothing to do, HUBPREQ_DEBUG_DB register is removed on DCN4x.
+ hubp_reset(hubp);
}
void hubp401_vready_at_or_After_vsync(struct hubp *hubp,
@@ -998,6 +998,7 @@ static struct hubp_funcs dcn401_hubp_funcs = {
.hubp_set_vm_system_aperture_settings = hubp3_set_vm_system_aperture_settings,
.set_blank = hubp2_set_blank,
.set_blank_regs = hubp2_set_blank_regs,
+ .hubp_reset = hubp_reset,
.mem_program_viewport = hubp401_set_viewport,
.set_cursor_attributes = hubp32_cursor_set_attributes,
.set_cursor_position = hubp401_cursor_set_position,