diff options
| author | Dave Airlie <airlied@nx6125b.(none)> | 2007-06-05 10:09:11 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@nx6125b.(none)> | 2007-06-05 10:09:11 +1000 |
| commit | 07345af838a7443d29d12cb3fe91614e43c4fa81 (patch) | |
| tree | 9a16e9ea79c70c6aea65ac11e395dfbf83459453 /linux-core/drm_stub.c | |
| parent | 704ca0638977f58742a8bff6aba9905fe862cfb3 (diff) | |
| parent | 4327d7f3142cdbf3f3f94426ae33e2d30b5a40c8 (diff) | |
Merge branch 'origin' into radeon-ttm
Conflicts:
shared-core/radeon_drv.h
Diffstat (limited to 'linux-core/drm_stub.c')
| -rw-r--r-- | linux-core/drm_stub.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c index f4da7dac..7b0a0f97 100644 --- a/linux-core/drm_stub.c +++ b/linux-core/drm_stub.c @@ -60,6 +60,12 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, { int retcode; + INIT_LIST_HEAD(&dev->drwlist); + INIT_LIST_HEAD(&dev->filelist); + INIT_LIST_HEAD(&dev->ctxlist); + INIT_LIST_HEAD(&dev->vmalist); + INIT_LIST_HEAD(&dev->maplist); + spin_lock_init(&dev->count_lock); spin_lock_init(&dev->drw_lock); spin_lock_init(&dev->tasklet_lock); @@ -70,6 +76,8 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, mutex_init(&dev->bm.init_mutex); mutex_init(&dev->bm.evict_mutex); + idr_init(&dev->drw_idr); + dev->pdev = pdev; dev->pci_device = pdev->device; dev->pci_vendor = pdev->vendor; @@ -80,28 +88,20 @@ static int drm_fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, dev->irq = pdev->irq; if (drm_ht_create(&dev->map_hash, DRM_MAP_HASH_ORDER)) { - drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); return -ENOMEM; } if (drm_mm_init(&dev->offset_manager, DRM_FILE_PAGE_OFFSET_START, DRM_FILE_PAGE_OFFSET_SIZE)) { - drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); drm_ht_remove(&dev->map_hash); return -ENOMEM; } if (drm_ht_create(&dev->object_hash, DRM_OBJECT_HASH_ORDER)) { - drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); drm_ht_remove(&dev->map_hash); drm_mm_takedown(&dev->offset_manager); return -ENOMEM; } - dev->maplist = drm_calloc(1, sizeof(*dev->maplist), DRM_MEM_MAPS); - if (dev->maplist == NULL) - return -ENOMEM; - INIT_LIST_HEAD(&dev->maplist->head); - /* the DRM has 6 counters */ dev->counters = 6; dev->types[0] = _DRM_STAT_LOCK; |
