drm/ttm: Fixes for "Make parts of a struct ttm_bo_device global"
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 20 Aug 2009 08:29:08 +0000 (10:29 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 20 Aug 2009 08:58:13 +0000 (18:58 +1000)
ttm:
Remove a stray debug printout.
Remove a re-init of the lru spinlock at device init.

radeon:
Fix the size of the bo_global allocation.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_ttm.c
drivers/gpu/drm/ttm/ttm_bo.c

index 6f5ad0802fcd5243a184dafe2aa3814b14a07a55..0a85e7b5d59271a7737819790e6444a8da7e0656 100644 (file)
@@ -86,7 +86,7 @@ static int radeon_ttm_global_init(struct radeon_device *rdev)
                rdev->mman.mem_global_ref.object;
        global_ref = &rdev->mman.bo_global_ref.ref;
        global_ref->global_type = TTM_GLOBAL_TTM_BO;
-       global_ref->size = sizeof(struct ttm_mem_global);
+       global_ref->size = sizeof(struct ttm_bo_global);
        global_ref->init = &ttm_bo_global_init;
        global_ref->release = &ttm_bo_global_release;
        r = ttm_global_item_ref(global_ref);
index fa87ccbcc6cec3fdfdb65b3c063239e6f73ea736..87c06252d4643e35f0fc5234438efba8311c7ed6 100644 (file)
@@ -1333,7 +1333,6 @@ static void ttm_bo_global_kobj_release(struct kobject *kobj)
        struct ttm_bo_global *glob =
                container_of(kobj, struct ttm_bo_global, kobj);
 
-       printk(KERN_INFO TTM_PFX "Freeing bo global.\n");
        ttm_mem_unregister_shrink(glob->mem_glob, &glob->shrink);
        __free_page(glob->dummy_read_page);
        kfree(glob);
@@ -1456,8 +1455,6 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
        int ret = -EINVAL;
 
        rwlock_init(&bdev->vm_lock);
-       spin_lock_init(&glob->lru_lock);
-
        bdev->driver = driver;
 
        memset(bdev->man, 0, sizeof(bdev->man));