drm/radeon: introduce gem_to_radeon_bo helper
... and switch it to container_of upcasting. v2: converted new pageflip code-paths. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
441921d530
commit
7e4d15d90a
@@ -415,7 +415,7 @@ int radeon_crtc_do_set_base(struct drm_crtc *crtc,
|
||||
|
||||
/* Pin framebuffer & get tilling informations */
|
||||
obj = radeon_fb->obj;
|
||||
rbo = obj->driver_private;
|
||||
rbo = gem_to_radeon_bo(obj);
|
||||
r = radeon_bo_reserve(rbo, false);
|
||||
if (unlikely(r != 0))
|
||||
return r;
|
||||
@@ -520,7 +520,7 @@ int radeon_crtc_do_set_base(struct drm_crtc *crtc,
|
||||
|
||||
if (!atomic && fb && fb != crtc->fb) {
|
||||
radeon_fb = to_radeon_framebuffer(fb);
|
||||
rbo = radeon_fb->obj->driver_private;
|
||||
rbo = gem_to_radeon_bo(radeon_fb->obj);
|
||||
r = radeon_bo_reserve(rbo, false);
|
||||
if (unlikely(r != 0))
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user