diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:15:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:15:30 -0400 |
commit | 43813f399c72aa22e01a680559c1cb5274bf2140 (patch) | |
tree | 933c0e7c445b9c3478b5a0db06a162d0d39f00f2 /drivers/gpu/drm/drm_dma.c | |
parent | a552f0af753eb4b5bbbe9eff205fe874b04c4583 (diff) | |
parent | 0b7af262aba912f52bc6ef76f1bc0960b01b8502 (diff) |
Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (24 commits)
agp/intel: Make intel_i965_mask_memory use dma_addr_t for physical addresses
agp: add user mapping support to ATI AGP bridge.
drm/i915: enable GEM on PAE.
drm/radeon: fix unused variables warning
agp: switch AGP to use page array instead of unsigned long array
agpgart: detected ALi M???? chipset with M1621
drm/radeon: command stream checker for r3xx-r5xx hardware
drm/radeon: Fully initialize LVDS info also when we can't get it from the ROM.
radeon: Fix CP byte order on big endian architectures with KMS.
agp/uninorth: Handle user memory types.
drm/ttm: Add some powerpc cache flush code.
radeon: Enable modesetting on non-x86.
drm/radeon: Respect AGP cant_use_aperture flag.
drm: EDID endianness fixes.
drm/radeon: this VRAM vs aperture test is wrong, just remove it.
drm/ttm: fix an error path to exit function correctly
drm: Apply "Memory fragmentation from lost alignment blocks"
ttm: Return -ERESTART when a signal interrupts bo eviction.
drm: Remove memory debugging infrastructure.
drm/i915: Clear fence register on tiling stride change.
...
Diffstat (limited to 'drivers/gpu/drm/drm_dma.c')
-rw-r--r-- | drivers/gpu/drm/drm_dma.c | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/drivers/gpu/drm/drm_dma.c b/drivers/gpu/drm/drm_dma.c index 7a8e2fba4678..13f1537413fb 100644 --- a/drivers/gpu/drm/drm_dma.c +++ b/drivers/gpu/drm/drm_dma.c | |||
@@ -47,7 +47,7 @@ int drm_dma_setup(struct drm_device *dev) | |||
47 | { | 47 | { |
48 | int i; | 48 | int i; |
49 | 49 | ||
50 | dev->dma = drm_alloc(sizeof(*dev->dma), DRM_MEM_DRIVER); | 50 | dev->dma = kmalloc(sizeof(*dev->dma), GFP_KERNEL); |
51 | if (!dev->dma) | 51 | if (!dev->dma) |
52 | return -ENOMEM; | 52 | return -ENOMEM; |
53 | 53 | ||
@@ -88,36 +88,19 @@ void drm_dma_takedown(struct drm_device *dev) | |||
88 | drm_pci_free(dev, dma->bufs[i].seglist[j]); | 88 | drm_pci_free(dev, dma->bufs[i].seglist[j]); |
89 | } | 89 | } |
90 | } | 90 | } |
91 | drm_free(dma->bufs[i].seglist, | 91 | kfree(dma->bufs[i].seglist); |
92 | dma->bufs[i].seg_count | ||
93 | * sizeof(*dma->bufs[0].seglist), DRM_MEM_SEGS); | ||
94 | } | 92 | } |
95 | if (dma->bufs[i].buf_count) { | 93 | if (dma->bufs[i].buf_count) { |
96 | for (j = 0; j < dma->bufs[i].buf_count; j++) { | 94 | for (j = 0; j < dma->bufs[i].buf_count; j++) { |
97 | if (dma->bufs[i].buflist[j].dev_private) { | 95 | kfree(dma->bufs[i].buflist[j].dev_private); |
98 | drm_free(dma->bufs[i].buflist[j]. | ||
99 | dev_private, | ||
100 | dma->bufs[i].buflist[j]. | ||
101 | dev_priv_size, DRM_MEM_BUFS); | ||
102 | } | ||
103 | } | 96 | } |
104 | drm_free(dma->bufs[i].buflist, | 97 | kfree(dma->bufs[i].buflist); |
105 | dma->bufs[i].buf_count * | ||
106 | sizeof(*dma->bufs[0].buflist), DRM_MEM_BUFS); | ||
107 | } | 98 | } |
108 | } | 99 | } |
109 | 100 | ||
110 | if (dma->buflist) { | 101 | kfree(dma->buflist); |
111 | drm_free(dma->buflist, | 102 | kfree(dma->pagelist); |
112 | dma->buf_count * sizeof(*dma->buflist), DRM_MEM_BUFS); | 103 | kfree(dev->dma); |
113 | } | ||
114 | |||
115 | if (dma->pagelist) { | ||
116 | drm_free(dma->pagelist, | ||
117 | dma->page_count * sizeof(*dma->pagelist), | ||
118 | DRM_MEM_PAGES); | ||
119 | } | ||
120 | drm_free(dev->dma, sizeof(*dev->dma), DRM_MEM_DRIVER); | ||
121 | dev->dma = NULL; | 104 | dev->dma = NULL; |
122 | } | 105 | } |
123 | 106 | ||