]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
Merge tag 'csky-for-linus-5.13-rc1' of git://github.com/c-sky/csky-linux
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_fb.c
index 24010cacf7d0ec87f37b41a45b1c820f3f85882c..4f10c452984068c08428f440ca9cc8675e23c798 100644 (file)
@@ -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;
 
        memset(&mode_cmd, 0, sizeof(mode_cmd));
        mode_cmd.width = sizes->surface_width;
@@ -232,8 +231,8 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
                goto out;
        }
 
-       ret = amdgpu_display_framebuffer_init(adev_to_drm(adev), &rfbdev->rfb,
-                                             &mode_cmd, gobj);
+       ret = amdgpu_display_gem_fb_init(adev_to_drm(adev), &rfbdev->rfb,
+                                        &mode_cmd, gobj);
        if (ret) {
                DRM_ERROR("failed to initialize framebuffer %d\n", ret);
                goto out;
@@ -246,8 +245,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 = amdgpu_gmc_vram_cpu_pa(adev, abo);
        info->fix.smem_len = amdgpu_bo_size(abo);
        info->screen_base = amdgpu_bo_kptr(abo);
        info->screen_size = amdgpu_bo_size(abo);
This page took 0.034046 seconds and 4 git commands to generate.