aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Li <roman.li@amd.com>2024-05-06 15:34:55 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-05-20 16:20:24 -0400
commita329598e9eab8cb0f33ec0ede1f7a4e290b1be1c (patch)
tree00264da4dc49aa7e5e9dd87870fe08aef4a3e127
parentdrm/amd/display: Add 3DLUT DMA load trigger (diff)
downloadlinux-rng-a329598e9eab8cb0f33ec0ede1f7a4e290b1be1c.tar.xz
linux-rng-a329598e9eab8cb0f33ec0ede1f7a4e290b1be1c.zip
drm/amd/display: Clear shared dmub firmware state on init
[Why] Reset the shared dmub firmware region on dmub hw init to start with known state. [How] Memset the shared region to 0 in dmub_hw_init(). Suggested-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Roman Li <roman.li@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index b2e37f6bea5b..3bcfc95ad36a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1207,6 +1207,9 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
memset(fb_info->fb[DMUB_WINDOW_6_FW_STATE].cpu_addr, 0,
fb_info->fb[DMUB_WINDOW_6_FW_STATE].size);
+ memset(fb_info->fb[DMUB_WINDOW_SHARED_STATE].cpu_addr, 0,
+ fb_info->fb[DMUB_WINDOW_SHARED_STATE].size);
+
/* Initialize hardware. */
memset(&hw_params, 0, sizeof(hw_params));
hw_params.fb_base = adev->gmc.fb_start;