drm/radeon: Drop radeon_gem_object_(un)pin.
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 14 Mar 2012 13:59:25 +0000 (14:59 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Mar 2012 08:47:50 +0000 (08:47 +0000)
Only radeon_gem_object_unpin was used anymore, in only one place.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_cursor.c
drivers/gpu/drm/radeon/radeon_gem.c

index 6923fa14308e3cd725cb264abef47993c4bd0fb1..d2870a014ec03df66b1107faf91be3a70ffee9a8 100644 (file)
@@ -414,9 +414,6 @@ int radeon_gem_object_create(struct radeon_device *rdev, int size,
                                int alignment, int initial_domain,
                                bool discardable, bool kernel,
                                struct drm_gem_object **obj);
-int radeon_gem_object_pin(struct drm_gem_object *obj, uint32_t pin_domain,
-                         uint64_t *gpu_addr);
-void radeon_gem_object_unpin(struct drm_gem_object *obj);
 
 int radeon_mode_dumb_create(struct drm_file *file_priv,
                            struct drm_device *dev,
index 986d608002a36b60ef543d81e84bfe625032964f..42acc6449dd622e702cfb8e8e576023a1e8338a2 100644 (file)
@@ -197,7 +197,12 @@ int radeon_crtc_cursor_set(struct drm_crtc *crtc,
 
 unpin:
        if (radeon_crtc->cursor_bo) {
-               radeon_gem_object_unpin(radeon_crtc->cursor_bo);
+               robj = gem_to_radeon_bo(radeon_crtc->cursor_bo);
+               ret = radeon_bo_reserve(robj, false);
+               if (likely(ret == 0)) {
+                       radeon_bo_unpin(robj);
+                       radeon_bo_unreserve(robj);
+               }
                drm_gem_object_unreference_unlocked(radeon_crtc->cursor_bo);
        }
 
index 7337850af2fa86cff62cd1104c127d65dc056328..c7008b5210f74d43481017c6d544ae77f78f83cf 100644 (file)
@@ -75,32 +75,6 @@ int radeon_gem_object_create(struct radeon_device *rdev, int size,
        return 0;
 }
 
-int radeon_gem_object_pin(struct drm_gem_object *obj, uint32_t pin_domain,
-                         uint64_t *gpu_addr)
-{
-       struct radeon_bo *robj = gem_to_radeon_bo(obj);
-       int r;
-
-       r = radeon_bo_reserve(robj, false);
-       if (unlikely(r != 0))
-               return r;
-       r = radeon_bo_pin(robj, pin_domain, gpu_addr);
-       radeon_bo_unreserve(robj);
-       return r;
-}
-
-void radeon_gem_object_unpin(struct drm_gem_object *obj)
-{
-       struct radeon_bo *robj = gem_to_radeon_bo(obj);
-       int r;
-
-       r = radeon_bo_reserve(robj, false);
-       if (likely(r == 0)) {
-               radeon_bo_unpin(robj);
-               radeon_bo_unreserve(robj);
-       }
-}
-
 int radeon_gem_set_domain(struct drm_gem_object *gobj,
                          uint32_t rdomain, uint32_t wdomain)
 {