Skip to content

Commit 949933b

Browse files
committed
drm/amd/display: use the proper fb offset for DM
This fixes DMCU initialization in APU GPU passthrough. The DMCU needs the GPU physical address, not the CPU physical address. This ends up working out on bare metal because we always use the physical address, but doesn't work in passthrough because the addresses are different. Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 39dd895 commit 949933b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
10961096
/* Initialize hardware. */
10971097
memset(&hw_params, 0, sizeof(hw_params));
10981098
hw_params.fb_base = adev->gmc.fb_start;
1099-
hw_params.fb_offset = adev->gmc.aper_base;
1099+
hw_params.fb_offset = adev->vm_manager.vram_base_offset;
11001100

11011101
/* backdoor load firmware and trigger dmub running */
11021102
if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
@@ -1218,7 +1218,7 @@ static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_
12181218
pa_config->system_aperture.agp_top = (uint64_t)agp_top << 24;
12191219

12201220
pa_config->system_aperture.fb_base = adev->gmc.fb_start;
1221-
pa_config->system_aperture.fb_offset = adev->gmc.aper_base;
1221+
pa_config->system_aperture.fb_offset = adev->vm_manager.vram_base_offset;
12221222
pa_config->system_aperture.fb_top = adev->gmc.fb_end;
12231223

12241224
pa_config->gart_config.page_table_start_addr = page_table_start.quad_part << 12;

0 commit comments

Comments
 (0)