diff options
author | Dave Airlie <airlied@redhat.com> | 2010-10-05 20:11:56 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-05 20:11:56 -0400 |
commit | 9a170caed6fce89da77852575a7eee7dbadee332 (patch) | |
tree | 489082522869cb382a2dc464ccbd474846693a37 /drivers/gpu/drm/drm_gem.c | |
parent | 45ff46c54a31bf8924b61e3e3411654410a3b5c3 (diff) | |
parent | 7b4f3990a22fbe800945f12001bc30db374d0af5 (diff) |
Merge remote branch 'intel/drm-intel-next' of ../drm-next into drm-core-next
* 'intel/drm-intel-next' of ../drm-next: (266 commits)
drm/i915: Avoid circular locking from intel_fbdev_fini()
drm/i915: mark display port DPMS state as 'ON' when enabling output
drm/i915: Skip pread/pwrite if size to copy is 0.
drm/i915: avoid struct mutex output_poll mutex lock loop on unload
drm/i915: Rephrase pwrite bounds checking to avoid any potential overflow
drm/i915: Sanity check pread/pwrite
drm/i915: Use pipe state to tell when pipe is off
drm/i915: vblank status not valid while training display port
drivers/gpu/drm/i915/i915_gem.c: Add missing error handling code
drm/i915: Don't mask the return code whilst relocating.
drm/i915: If the GPU hangs twice within 5 seconds, declare it wedged.
drm/i915: Only print 'generating error event' if we actually are
drm/i915: Try to reset gen2 devices.
drm/i915: Clear fence registers on GPU reset
drm/i915: Force the domain to CPU on unbinding whilst wedged.
drm: Move the GTT accounting to i915
drm/i915: Fix refleak during eviction.
i915: Added function to initialize VBT settings
drm/i915: Remove redundant deletion of obj->gpu_write_list
drm/i915: Make get/put pages static
...
Diffstat (limited to 'drivers/gpu/drm/drm_gem.c')
-rw-r--r-- | drivers/gpu/drm/drm_gem.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index cff7317d3830..3ea0692ce59a 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c | |||
@@ -92,12 +92,6 @@ drm_gem_init(struct drm_device *dev) | |||
92 | 92 | ||
93 | spin_lock_init(&dev->object_name_lock); | 93 | spin_lock_init(&dev->object_name_lock); |
94 | idr_init(&dev->object_name_idr); | 94 | idr_init(&dev->object_name_idr); |
95 | atomic_set(&dev->object_count, 0); | ||
96 | atomic_set(&dev->object_memory, 0); | ||
97 | atomic_set(&dev->pin_count, 0); | ||
98 | atomic_set(&dev->pin_memory, 0); | ||
99 | atomic_set(&dev->gtt_count, 0); | ||
100 | atomic_set(&dev->gtt_memory, 0); | ||
101 | 95 | ||
102 | mm = kzalloc(sizeof(struct drm_gem_mm), GFP_KERNEL); | 96 | mm = kzalloc(sizeof(struct drm_gem_mm), GFP_KERNEL); |
103 | if (!mm) { | 97 | if (!mm) { |
@@ -151,9 +145,6 @@ int drm_gem_object_init(struct drm_device *dev, | |||
151 | kref_init(&obj->handlecount); | 145 | kref_init(&obj->handlecount); |
152 | obj->size = size; | 146 | obj->size = size; |
153 | 147 | ||
154 | atomic_inc(&dev->object_count); | ||
155 | atomic_add(obj->size, &dev->object_memory); | ||
156 | |||
157 | return 0; | 148 | return 0; |
158 | } | 149 | } |
159 | EXPORT_SYMBOL(drm_gem_object_init); | 150 | EXPORT_SYMBOL(drm_gem_object_init); |
@@ -180,8 +171,6 @@ drm_gem_object_alloc(struct drm_device *dev, size_t size) | |||
180 | return obj; | 171 | return obj; |
181 | fput: | 172 | fput: |
182 | /* Object_init mangles the global counters - readjust them. */ | 173 | /* Object_init mangles the global counters - readjust them. */ |
183 | atomic_dec(&dev->object_count); | ||
184 | atomic_sub(obj->size, &dev->object_memory); | ||
185 | fput(obj->filp); | 174 | fput(obj->filp); |
186 | free: | 175 | free: |
187 | kfree(obj); | 176 | kfree(obj); |
@@ -436,10 +425,7 @@ drm_gem_release(struct drm_device *dev, struct drm_file *file_private) | |||
436 | void | 425 | void |
437 | drm_gem_object_release(struct drm_gem_object *obj) | 426 | drm_gem_object_release(struct drm_gem_object *obj) |
438 | { | 427 | { |
439 | struct drm_device *dev = obj->dev; | ||
440 | fput(obj->filp); | 428 | fput(obj->filp); |
441 | atomic_dec(&dev->object_count); | ||
442 | atomic_sub(obj->size, &dev->object_memory); | ||
443 | } | 429 | } |
444 | EXPORT_SYMBOL(drm_gem_object_release); | 430 | EXPORT_SYMBOL(drm_gem_object_release); |
445 | 431 | ||