]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amdgpu: Use correct VIEWPORT_DIMENSION for DCN2
authorHarry Wentland <harry.wentland@amd.com>
Tue, 4 Jan 2022 15:45:41 +0000 (10:45 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 3 Feb 2022 09:26:41 +0000 (10:26 +0100)
commitde44ce64091566c6413bfcbff271c9420e0ab1af
tree21b4941dbbd5df95565a0b90cda89f78bf8b04cd
parentb5e304b36a67fd88355cdb5c40e8d62be9af5bf7
drm/amdgpu: Use correct VIEWPORT_DIMENSION for DCN2

BugLink: https://bugs.launchpad.net/bugs/1959878
commit dc5d4aff2e99c312df8abbe1ee9a731d2913bc1b upstream.

For some reason this file isn't using the appropriate register
headers for DCN headers, which means that on DCN2 we're getting
the VIEWPORT_DIMENSION offset wrong.

This means that we're not correctly carving out the framebuffer
memory correctly for a framebuffer allocated by EFI and
therefore see corruption when loading amdgpu before the display
driver takes over control of the framebuffer scanout.

Fix this by checking the DCE_HWIP and picking the correct offset
accordingly.

Long-term we should expose this info from DC as GMC shouldn't
need to know about DCN registers.

Cc: stable@vger.kernel.org
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c