drm/amdgpu/fb: use virt_to_phys to get smem_start
Subsystems (2)
PATCH 1/1 drm/amdgpu/fb: use virt_to_phys to get smem_start
We set the fb smem pointer to the offset into the BAR which doesn't handle framebuffers in system memory. Use virt_to_phys which should handle both BARs and system memory.
Fixes 6c8d74caa2fa33 ("drm/amdgpu: Enable scatter gather display support")
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +1 -3
@@ -205,7 +205,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,struct drm_gem_object *gobj =NULL ;struct amdgpu_bo *abo =NULL ;int ret; -unsigned long tmp; mode_cmd.width = sizes->surface_width; mode_cmd.height = sizes->surface_height;
@@ -245,8 +244,7 @@ static int amdgpufb_create(struct drm_fb_helper *helper, info->fbops = &amdgpufb_ops; - tmp =amdgpu_bo_gpu_offset (abo) - adev->gmc.vram_start; - info->fix.smem_start = adev->gmc.aper_base + tmp; + info->fix.smem_start =virt_to_phys (amdgpu_bo_kptr (abo)); info->fix.smem_len =amdgpu_bo_size (abo); info->screen_base =amdgpu_bo_kptr (abo); info->screen_size =amdgpu_bo_size (abo);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx