aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
diff options
context:
space:
mode:
authorDaniel Stone <daniels@collabora.com>2018-03-30 10:11:38 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-04-11 14:07:56 -0400
commite68d14dd4ebaf596bf0c237ba82f815c2f561dec (patch)
treedd96c294e3ba73fa919b5d24f1cbd01250938d56 /drivers/gpu/drm/amd/amdgpu/dce_virtual.c
parent9a0f0c9d0c9de76324807571694f8c89b433e3f1 (diff)
drm/amdgpu: Move GEM BO to drm_framebuffer
Since drm_framebuffer can now store GEM objects directly, place them there rather than in our own subclass. As this makes the framebuffer create_handle and destroy functions the same as the GEM framebuffer helper, we can reuse those. Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Stone <daniels@collabora.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: David (ChunMing) Zhou <David1.Zhou@amd.com> Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_virtual.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/dce_virtual.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
index b51f05dc9582..89b2286a9d6b 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
@@ -168,11 +168,9 @@ static void dce_virtual_crtc_disable(struct drm_crtc *crtc)
168 dce_virtual_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); 168 dce_virtual_crtc_dpms(crtc, DRM_MODE_DPMS_OFF);
169 if (crtc->primary->fb) { 169 if (crtc->primary->fb) {
170 int r; 170 int r;
171 struct amdgpu_framebuffer *amdgpu_fb;
172 struct amdgpu_bo *abo; 171 struct amdgpu_bo *abo;
173 172
174 amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb); 173 abo = gem_to_amdgpu_bo(crtc->primary->fb->obj[0]);
175 abo = gem_to_amdgpu_bo(amdgpu_fb->obj);
176 r = amdgpu_bo_reserve(abo, true); 174 r = amdgpu_bo_reserve(abo, true);
177 if (unlikely(r)) 175 if (unlikely(r))
178 DRM_ERROR("failed to reserve abo before unpin\n"); 176 DRM_ERROR("failed to reserve abo before unpin\n");