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_ioctl.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_ioctl.c')
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 1fad76289e66..9b9ff46c2378 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
@@ -93,7 +93,7 @@ int drm_setunique(struct drm_device *dev, void *data, | |||
93 | 93 | ||
94 | master->unique_len = u->unique_len; | 94 | master->unique_len = u->unique_len; |
95 | master->unique_size = u->unique_len + 1; | 95 | master->unique_size = u->unique_len + 1; |
96 | master->unique = drm_alloc(master->unique_size, DRM_MEM_DRIVER); | 96 | master->unique = kmalloc(master->unique_size, GFP_KERNEL); |
97 | if (!master->unique) | 97 | if (!master->unique) |
98 | return -ENOMEM; | 98 | return -ENOMEM; |
99 | if (copy_from_user(master->unique, u->unique, master->unique_len)) | 99 | if (copy_from_user(master->unique, u->unique, master->unique_len)) |
@@ -101,9 +101,8 @@ int drm_setunique(struct drm_device *dev, void *data, | |||
101 | 101 | ||
102 | master->unique[master->unique_len] = '\0'; | 102 | master->unique[master->unique_len] = '\0'; |
103 | 103 | ||
104 | dev->devname = | 104 | dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + |
105 | drm_alloc(strlen(dev->driver->pci_driver.name) + | 105 | strlen(master->unique) + 2, GFP_KERNEL); |
106 | strlen(master->unique) + 2, DRM_MEM_DRIVER); | ||
107 | if (!dev->devname) | 106 | if (!dev->devname) |
108 | return -ENOMEM; | 107 | return -ENOMEM; |
109 | 108 | ||
@@ -138,7 +137,7 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv) | |||
138 | 137 | ||
139 | master->unique_len = 40; | 138 | master->unique_len = 40; |
140 | master->unique_size = master->unique_len; | 139 | master->unique_size = master->unique_len; |
141 | master->unique = drm_alloc(master->unique_size, DRM_MEM_DRIVER); | 140 | master->unique = kmalloc(master->unique_size, GFP_KERNEL); |
142 | if (master->unique == NULL) | 141 | if (master->unique == NULL) |
143 | return -ENOMEM; | 142 | return -ENOMEM; |
144 | 143 | ||
@@ -152,9 +151,8 @@ static int drm_set_busid(struct drm_device *dev, struct drm_file *file_priv) | |||
152 | else | 151 | else |
153 | master->unique_len = len; | 152 | master->unique_len = len; |
154 | 153 | ||
155 | dev->devname = | 154 | dev->devname = kmalloc(strlen(dev->driver->pci_driver.name) + |
156 | drm_alloc(strlen(dev->driver->pci_driver.name) + master->unique_len + | 155 | master->unique_len + 2, GFP_KERNEL); |
157 | 2, DRM_MEM_DRIVER); | ||
158 | if (dev->devname == NULL) | 156 | if (dev->devname == NULL) |
159 | return -ENOMEM; | 157 | return -ENOMEM; |
160 | 158 | ||