diff options
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 45 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 35 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_mem.c | 24 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 11 |
6 files changed, 52 insertions, 71 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 1a60626f6803..f112c769d533 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -643,9 +643,9 @@ static int i915_batchbuffer(struct drm_device *dev, void *data, | |||
643 | return -EINVAL; | 643 | return -EINVAL; |
644 | 644 | ||
645 | if (batch->num_cliprects) { | 645 | if (batch->num_cliprects) { |
646 | cliprects = drm_calloc(batch->num_cliprects, | 646 | cliprects = kcalloc(batch->num_cliprects, |
647 | sizeof(struct drm_clip_rect), | 647 | sizeof(struct drm_clip_rect), |
648 | DRM_MEM_DRIVER); | 648 | GFP_KERNEL); |
649 | if (cliprects == NULL) | 649 | if (cliprects == NULL) |
650 | return -ENOMEM; | 650 | return -ENOMEM; |
651 | 651 | ||
@@ -664,9 +664,7 @@ static int i915_batchbuffer(struct drm_device *dev, void *data, | |||
664 | sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | 664 | sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); |
665 | 665 | ||
666 | fail_free: | 666 | fail_free: |
667 | drm_free(cliprects, | 667 | kfree(cliprects); |
668 | batch->num_cliprects * sizeof(struct drm_clip_rect), | ||
669 | DRM_MEM_DRIVER); | ||
670 | 668 | ||
671 | return ret; | 669 | return ret; |
672 | } | 670 | } |
@@ -692,7 +690,7 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, | |||
692 | if (cmdbuf->num_cliprects < 0) | 690 | if (cmdbuf->num_cliprects < 0) |
693 | return -EINVAL; | 691 | return -EINVAL; |
694 | 692 | ||
695 | batch_data = drm_alloc(cmdbuf->sz, DRM_MEM_DRIVER); | 693 | batch_data = kmalloc(cmdbuf->sz, GFP_KERNEL); |
696 | if (batch_data == NULL) | 694 | if (batch_data == NULL) |
697 | return -ENOMEM; | 695 | return -ENOMEM; |
698 | 696 | ||
@@ -701,9 +699,8 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, | |||
701 | goto fail_batch_free; | 699 | goto fail_batch_free; |
702 | 700 | ||
703 | if (cmdbuf->num_cliprects) { | 701 | if (cmdbuf->num_cliprects) { |
704 | cliprects = drm_calloc(cmdbuf->num_cliprects, | 702 | cliprects = kcalloc(cmdbuf->num_cliprects, |
705 | sizeof(struct drm_clip_rect), | 703 | sizeof(struct drm_clip_rect), GFP_KERNEL); |
706 | DRM_MEM_DRIVER); | ||
707 | if (cliprects == NULL) | 704 | if (cliprects == NULL) |
708 | goto fail_batch_free; | 705 | goto fail_batch_free; |
709 | 706 | ||
@@ -726,11 +723,9 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data, | |||
726 | sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); | 723 | sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); |
727 | 724 | ||
728 | fail_clip_free: | 725 | fail_clip_free: |
729 | drm_free(cliprects, | 726 | kfree(cliprects); |
730 | cmdbuf->num_cliprects * sizeof(struct drm_clip_rect), | ||
731 | DRM_MEM_DRIVER); | ||
732 | fail_batch_free: | 727 | fail_batch_free: |
733 | drm_free(batch_data, cmdbuf->sz, DRM_MEM_DRIVER); | 728 | kfree(batch_data); |
734 | 729 | ||
735 | return ret; | 730 | return ret; |
736 | } | 731 | } |
@@ -1067,7 +1062,7 @@ int i915_master_create(struct drm_device *dev, struct drm_master *master) | |||
1067 | { | 1062 | { |
1068 | struct drm_i915_master_private *master_priv; | 1063 | struct drm_i915_master_private *master_priv; |
1069 | 1064 | ||
1070 | master_priv = drm_calloc(1, sizeof(*master_priv), DRM_MEM_DRIVER); | 1065 | master_priv = kzalloc(sizeof(*master_priv), GFP_KERNEL); |
1071 | if (!master_priv) | 1066 | if (!master_priv) |
1072 | return -ENOMEM; | 1067 | return -ENOMEM; |
1073 | 1068 | ||
@@ -1082,7 +1077,7 @@ void i915_master_destroy(struct drm_device *dev, struct drm_master *master) | |||
1082 | if (!master_priv) | 1077 | if (!master_priv) |
1083 | return; | 1078 | return; |
1084 | 1079 | ||
1085 | drm_free(master_priv, sizeof(*master_priv), DRM_MEM_DRIVER); | 1080 | kfree(master_priv); |
1086 | 1081 | ||
1087 | master->driver_priv = NULL; | 1082 | master->driver_priv = NULL; |
1088 | } | 1083 | } |
@@ -1111,12 +1106,10 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) | |||
1111 | dev->types[8] = _DRM_STAT_SECONDARY; | 1106 | dev->types[8] = _DRM_STAT_SECONDARY; |
1112 | dev->types[9] = _DRM_STAT_DMA; | 1107 | dev->types[9] = _DRM_STAT_DMA; |
1113 | 1108 | ||
1114 | dev_priv = drm_alloc(sizeof(drm_i915_private_t), DRM_MEM_DRIVER); | 1109 | dev_priv = kzalloc(sizeof(drm_i915_private_t), GFP_KERNEL); |
1115 | if (dev_priv == NULL) | 1110 | if (dev_priv == NULL) |
1116 | return -ENOMEM; | 1111 | return -ENOMEM; |
1117 | 1112 | ||
1118 | memset(dev_priv, 0, sizeof(drm_i915_private_t)); | ||
1119 | |||
1120 | dev->dev_private = (void *)dev_priv; | 1113 | dev->dev_private = (void *)dev_priv; |
1121 | dev_priv->dev = dev; | 1114 | dev_priv->dev = dev; |
1122 | 1115 | ||
@@ -1153,13 +1146,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) | |||
1153 | "performance may suffer.\n"); | 1146 | "performance may suffer.\n"); |
1154 | } | 1147 | } |
1155 | 1148 | ||
1156 | #ifdef CONFIG_HIGHMEM64G | ||
1157 | /* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */ | ||
1158 | dev_priv->has_gem = 0; | ||
1159 | #else | ||
1160 | /* enable GEM by default */ | 1149 | /* enable GEM by default */ |
1161 | dev_priv->has_gem = 1; | 1150 | dev_priv->has_gem = 1; |
1162 | #endif | ||
1163 | 1151 | ||
1164 | dev->driver->get_vblank_counter = i915_get_vblank_counter; | 1152 | dev->driver->get_vblank_counter = i915_get_vblank_counter; |
1165 | dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ | 1153 | dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ |
@@ -1221,7 +1209,7 @@ out_iomapfree: | |||
1221 | out_rmmap: | 1209 | out_rmmap: |
1222 | iounmap(dev_priv->regs); | 1210 | iounmap(dev_priv->regs); |
1223 | free_priv: | 1211 | free_priv: |
1224 | drm_free(dev_priv, sizeof(struct drm_i915_private), DRM_MEM_DRIVER); | 1212 | kfree(dev_priv); |
1225 | return ret; | 1213 | return ret; |
1226 | } | 1214 | } |
1227 | 1215 | ||
@@ -1261,8 +1249,7 @@ int i915_driver_unload(struct drm_device *dev) | |||
1261 | i915_gem_lastclose(dev); | 1249 | i915_gem_lastclose(dev); |
1262 | } | 1250 | } |
1263 | 1251 | ||
1264 | drm_free(dev->dev_private, sizeof(drm_i915_private_t), | 1252 | kfree(dev->dev_private); |
1265 | DRM_MEM_DRIVER); | ||
1266 | 1253 | ||
1267 | return 0; | 1254 | return 0; |
1268 | } | 1255 | } |
@@ -1273,7 +1260,7 @@ int i915_driver_open(struct drm_device *dev, struct drm_file *file_priv) | |||
1273 | 1260 | ||
1274 | DRM_DEBUG_DRIVER(I915_DRV, "\n"); | 1261 | DRM_DEBUG_DRIVER(I915_DRV, "\n"); |
1275 | i915_file_priv = (struct drm_i915_file_private *) | 1262 | i915_file_priv = (struct drm_i915_file_private *) |
1276 | drm_alloc(sizeof(*i915_file_priv), DRM_MEM_FILES); | 1263 | kmalloc(sizeof(*i915_file_priv), GFP_KERNEL); |
1277 | 1264 | ||
1278 | if (!i915_file_priv) | 1265 | if (!i915_file_priv) |
1279 | return -ENOMEM; | 1266 | return -ENOMEM; |
@@ -1326,7 +1313,7 @@ void i915_driver_postclose(struct drm_device *dev, struct drm_file *file_priv) | |||
1326 | { | 1313 | { |
1327 | struct drm_i915_file_private *i915_file_priv = file_priv->driver_priv; | 1314 | struct drm_i915_file_private *i915_file_priv = file_priv->driver_priv; |
1328 | 1315 | ||
1329 | drm_free(i915_file_priv, sizeof(*i915_file_priv), DRM_MEM_FILES); | 1316 | kfree(i915_file_priv); |
1330 | } | 1317 | } |
1331 | 1318 | ||
1332 | struct drm_ioctl_desc i915_ioctls[] = { | 1319 | struct drm_ioctl_desc i915_ioctls[] = { |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 174aef2d6481..fd2b8bdffe3f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1207,8 +1207,7 @@ i915_gem_create_mmap_offset(struct drm_gem_object *obj) | |||
1207 | 1207 | ||
1208 | /* Set the object up for mmap'ing */ | 1208 | /* Set the object up for mmap'ing */ |
1209 | list = &obj->map_list; | 1209 | list = &obj->map_list; |
1210 | list->map = drm_calloc(1, sizeof(struct drm_map_list), | 1210 | list->map = kzalloc(sizeof(struct drm_map_list), GFP_KERNEL); |
1211 | DRM_MEM_DRIVER); | ||
1212 | if (!list->map) | 1211 | if (!list->map) |
1213 | return -ENOMEM; | 1212 | return -ENOMEM; |
1214 | 1213 | ||
@@ -1248,7 +1247,7 @@ i915_gem_create_mmap_offset(struct drm_gem_object *obj) | |||
1248 | out_free_mm: | 1247 | out_free_mm: |
1249 | drm_mm_put_block(list->file_offset_node); | 1248 | drm_mm_put_block(list->file_offset_node); |
1250 | out_free_list: | 1249 | out_free_list: |
1251 | drm_free(list->map, sizeof(struct drm_map_list), DRM_MEM_DRIVER); | 1250 | kfree(list->map); |
1252 | 1251 | ||
1253 | return ret; | 1252 | return ret; |
1254 | } | 1253 | } |
@@ -1270,7 +1269,7 @@ i915_gem_free_mmap_offset(struct drm_gem_object *obj) | |||
1270 | } | 1269 | } |
1271 | 1270 | ||
1272 | if (list->map) { | 1271 | if (list->map) { |
1273 | drm_free(list->map, sizeof(struct drm_map), DRM_MEM_DRIVER); | 1272 | kfree(list->map); |
1274 | list->map = NULL; | 1273 | list->map = NULL; |
1275 | } | 1274 | } |
1276 | 1275 | ||
@@ -1493,7 +1492,7 @@ i915_add_request(struct drm_device *dev, struct drm_file *file_priv, | |||
1493 | if (file_priv != NULL) | 1492 | if (file_priv != NULL) |
1494 | i915_file_priv = file_priv->driver_priv; | 1493 | i915_file_priv = file_priv->driver_priv; |
1495 | 1494 | ||
1496 | request = drm_calloc(1, sizeof(*request), DRM_MEM_DRIVER); | 1495 | request = kzalloc(sizeof(*request), GFP_KERNEL); |
1497 | if (request == NULL) | 1496 | if (request == NULL) |
1498 | return 0; | 1497 | return 0; |
1499 | 1498 | ||
@@ -1675,7 +1674,7 @@ i915_gem_retire_requests(struct drm_device *dev) | |||
1675 | 1674 | ||
1676 | list_del(&request->list); | 1675 | list_del(&request->list); |
1677 | list_del(&request->client_list); | 1676 | list_del(&request->client_list); |
1678 | drm_free(request, sizeof(*request), DRM_MEM_DRIVER); | 1677 | kfree(request); |
1679 | } else | 1678 | } else |
1680 | break; | 1679 | break; |
1681 | } | 1680 | } |
@@ -2833,8 +2832,7 @@ i915_gem_object_set_to_full_cpu_read_domain(struct drm_gem_object *obj) | |||
2833 | /* Free the page_cpu_valid mappings which are now stale, whether | 2832 | /* Free the page_cpu_valid mappings which are now stale, whether |
2834 | * or not we've got I915_GEM_DOMAIN_CPU. | 2833 | * or not we've got I915_GEM_DOMAIN_CPU. |
2835 | */ | 2834 | */ |
2836 | drm_free(obj_priv->page_cpu_valid, obj->size / PAGE_SIZE, | 2835 | kfree(obj_priv->page_cpu_valid); |
2837 | DRM_MEM_DRIVER); | ||
2838 | obj_priv->page_cpu_valid = NULL; | 2836 | obj_priv->page_cpu_valid = NULL; |
2839 | } | 2837 | } |
2840 | 2838 | ||
@@ -2876,8 +2874,8 @@ i915_gem_object_set_cpu_read_domain_range(struct drm_gem_object *obj, | |||
2876 | * newly adding I915_GEM_DOMAIN_CPU | 2874 | * newly adding I915_GEM_DOMAIN_CPU |
2877 | */ | 2875 | */ |
2878 | if (obj_priv->page_cpu_valid == NULL) { | 2876 | if (obj_priv->page_cpu_valid == NULL) { |
2879 | obj_priv->page_cpu_valid = drm_calloc(1, obj->size / PAGE_SIZE, | 2877 | obj_priv->page_cpu_valid = kzalloc(obj->size / PAGE_SIZE, |
2880 | DRM_MEM_DRIVER); | 2878 | GFP_KERNEL); |
2881 | if (obj_priv->page_cpu_valid == NULL) | 2879 | if (obj_priv->page_cpu_valid == NULL) |
2882 | return -ENOMEM; | 2880 | return -ENOMEM; |
2883 | } else if ((obj->read_domains & I915_GEM_DOMAIN_CPU) == 0) | 2881 | } else if ((obj->read_domains & I915_GEM_DOMAIN_CPU) == 0) |
@@ -3300,8 +3298,8 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
3300 | } | 3298 | } |
3301 | 3299 | ||
3302 | if (args->num_cliprects != 0) { | 3300 | if (args->num_cliprects != 0) { |
3303 | cliprects = drm_calloc(args->num_cliprects, sizeof(*cliprects), | 3301 | cliprects = kcalloc(args->num_cliprects, sizeof(*cliprects), |
3304 | DRM_MEM_DRIVER); | 3302 | GFP_KERNEL); |
3305 | if (cliprects == NULL) | 3303 | if (cliprects == NULL) |
3306 | goto pre_mutex_err; | 3304 | goto pre_mutex_err; |
3307 | 3305 | ||
@@ -3554,8 +3552,7 @@ err: | |||
3554 | pre_mutex_err: | 3552 | pre_mutex_err: |
3555 | drm_free_large(object_list); | 3553 | drm_free_large(object_list); |
3556 | drm_free_large(exec_list); | 3554 | drm_free_large(exec_list); |
3557 | drm_free(cliprects, sizeof(*cliprects) * args->num_cliprects, | 3555 | kfree(cliprects); |
3558 | DRM_MEM_DRIVER); | ||
3559 | 3556 | ||
3560 | return ret; | 3557 | return ret; |
3561 | } | 3558 | } |
@@ -3772,7 +3769,7 @@ int i915_gem_init_object(struct drm_gem_object *obj) | |||
3772 | { | 3769 | { |
3773 | struct drm_i915_gem_object *obj_priv; | 3770 | struct drm_i915_gem_object *obj_priv; |
3774 | 3771 | ||
3775 | obj_priv = drm_calloc(1, sizeof(*obj_priv), DRM_MEM_DRIVER); | 3772 | obj_priv = kzalloc(sizeof(*obj_priv), GFP_KERNEL); |
3776 | if (obj_priv == NULL) | 3773 | if (obj_priv == NULL) |
3777 | return -ENOMEM; | 3774 | return -ENOMEM; |
3778 | 3775 | ||
@@ -3810,9 +3807,9 @@ void i915_gem_free_object(struct drm_gem_object *obj) | |||
3810 | 3807 | ||
3811 | i915_gem_free_mmap_offset(obj); | 3808 | i915_gem_free_mmap_offset(obj); |
3812 | 3809 | ||
3813 | drm_free(obj_priv->page_cpu_valid, 1, DRM_MEM_DRIVER); | 3810 | kfree(obj_priv->page_cpu_valid); |
3814 | kfree(obj_priv->bit_17); | 3811 | kfree(obj_priv->bit_17); |
3815 | drm_free(obj->driver_private, 1, DRM_MEM_DRIVER); | 3812 | kfree(obj->driver_private); |
3816 | } | 3813 | } |
3817 | 3814 | ||
3818 | /** Unbinds all objects that are on the given buffer list. */ | 3815 | /** Unbinds all objects that are on the given buffer list. */ |
@@ -4266,7 +4263,7 @@ int i915_gem_init_phys_object(struct drm_device *dev, | |||
4266 | if (dev_priv->mm.phys_objs[id - 1] || !size) | 4263 | if (dev_priv->mm.phys_objs[id - 1] || !size) |
4267 | return 0; | 4264 | return 0; |
4268 | 4265 | ||
4269 | phys_obj = drm_calloc(1, sizeof(struct drm_i915_gem_phys_object), DRM_MEM_DRIVER); | 4266 | phys_obj = kzalloc(sizeof(struct drm_i915_gem_phys_object), GFP_KERNEL); |
4270 | if (!phys_obj) | 4267 | if (!phys_obj) |
4271 | return -ENOMEM; | 4268 | return -ENOMEM; |
4272 | 4269 | ||
@@ -4285,7 +4282,7 @@ int i915_gem_init_phys_object(struct drm_device *dev, | |||
4285 | 4282 | ||
4286 | return 0; | 4283 | return 0; |
4287 | kfree_obj: | 4284 | kfree_obj: |
4288 | drm_free(phys_obj, sizeof(struct drm_i915_gem_phys_object), DRM_MEM_DRIVER); | 4285 | kfree(phys_obj); |
4289 | return ret; | 4286 | return ret; |
4290 | } | 4287 | } |
4291 | 4288 | ||
diff --git a/drivers/gpu/drm/i915/i915_mem.c b/drivers/gpu/drm/i915/i915_mem.c index 96e271986d2a..83b7b81bb2b8 100644 --- a/drivers/gpu/drm/i915/i915_mem.c +++ b/drivers/gpu/drm/i915/i915_mem.c | |||
@@ -94,8 +94,8 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size, | |||
94 | { | 94 | { |
95 | /* Maybe cut off the start of an existing block */ | 95 | /* Maybe cut off the start of an existing block */ |
96 | if (start > p->start) { | 96 | if (start > p->start) { |
97 | struct mem_block *newblock = | 97 | struct mem_block *newblock = kmalloc(sizeof(*newblock), |
98 | drm_alloc(sizeof(*newblock), DRM_MEM_BUFLISTS); | 98 | GFP_KERNEL); |
99 | if (!newblock) | 99 | if (!newblock) |
100 | goto out; | 100 | goto out; |
101 | newblock->start = start; | 101 | newblock->start = start; |
@@ -111,8 +111,8 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size, | |||
111 | 111 | ||
112 | /* Maybe cut off the end of an existing block */ | 112 | /* Maybe cut off the end of an existing block */ |
113 | if (size < p->size) { | 113 | if (size < p->size) { |
114 | struct mem_block *newblock = | 114 | struct mem_block *newblock = kmalloc(sizeof(*newblock), |
115 | drm_alloc(sizeof(*newblock), DRM_MEM_BUFLISTS); | 115 | GFP_KERNEL); |
116 | if (!newblock) | 116 | if (!newblock) |
117 | goto out; | 117 | goto out; |
118 | newblock->start = start + size; | 118 | newblock->start = start + size; |
@@ -169,7 +169,7 @@ static void free_block(struct mem_block *p) | |||
169 | p->size += q->size; | 169 | p->size += q->size; |
170 | p->next = q->next; | 170 | p->next = q->next; |
171 | p->next->prev = p; | 171 | p->next->prev = p; |
172 | drm_free(q, sizeof(*q), DRM_MEM_BUFLISTS); | 172 | kfree(q); |
173 | } | 173 | } |
174 | 174 | ||
175 | if (p->prev->file_priv == NULL) { | 175 | if (p->prev->file_priv == NULL) { |
@@ -177,7 +177,7 @@ static void free_block(struct mem_block *p) | |||
177 | q->size += p->size; | 177 | q->size += p->size; |
178 | q->next = p->next; | 178 | q->next = p->next; |
179 | q->next->prev = q; | 179 | q->next->prev = q; |
180 | drm_free(p, sizeof(*q), DRM_MEM_BUFLISTS); | 180 | kfree(p); |
181 | } | 181 | } |
182 | } | 182 | } |
183 | 183 | ||
@@ -185,14 +185,14 @@ static void free_block(struct mem_block *p) | |||
185 | */ | 185 | */ |
186 | static int init_heap(struct mem_block **heap, int start, int size) | 186 | static int init_heap(struct mem_block **heap, int start, int size) |
187 | { | 187 | { |
188 | struct mem_block *blocks = drm_alloc(sizeof(*blocks), DRM_MEM_BUFLISTS); | 188 | struct mem_block *blocks = kmalloc(sizeof(*blocks), GFP_KERNEL); |
189 | 189 | ||
190 | if (!blocks) | 190 | if (!blocks) |
191 | return -ENOMEM; | 191 | return -ENOMEM; |
192 | 192 | ||
193 | *heap = drm_alloc(sizeof(**heap), DRM_MEM_BUFLISTS); | 193 | *heap = kmalloc(sizeof(**heap), GFP_KERNEL); |
194 | if (!*heap) { | 194 | if (!*heap) { |
195 | drm_free(blocks, sizeof(*blocks), DRM_MEM_BUFLISTS); | 195 | kfree(blocks); |
196 | return -ENOMEM; | 196 | return -ENOMEM; |
197 | } | 197 | } |
198 | 198 | ||
@@ -233,7 +233,7 @@ void i915_mem_release(struct drm_device * dev, struct drm_file *file_priv, | |||
233 | p->size += q->size; | 233 | p->size += q->size; |
234 | p->next = q->next; | 234 | p->next = q->next; |
235 | p->next->prev = p; | 235 | p->next->prev = p; |
236 | drm_free(q, sizeof(*q), DRM_MEM_BUFLISTS); | 236 | kfree(q); |
237 | } | 237 | } |
238 | } | 238 | } |
239 | } | 239 | } |
@@ -250,10 +250,10 @@ void i915_mem_takedown(struct mem_block **heap) | |||
250 | for (p = (*heap)->next; p != *heap;) { | 250 | for (p = (*heap)->next; p != *heap;) { |
251 | struct mem_block *q = p; | 251 | struct mem_block *q = p; |
252 | p = p->next; | 252 | p = p->next; |
253 | drm_free(q, sizeof(*q), DRM_MEM_BUFLISTS); | 253 | kfree(q); |
254 | } | 254 | } |
255 | 255 | ||
256 | drm_free(*heap, sizeof(**heap), DRM_MEM_BUFLISTS); | 256 | kfree(*heap); |
257 | *heap = NULL; | 257 | *heap = NULL; |
258 | } | 258 | } |
259 | 259 | ||
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 754dd22fdd77..cdd126d068a7 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -124,8 +124,7 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv, | |||
124 | entry = &lvds_lfp_data->data[lvds_options->panel_type]; | 124 | entry = &lvds_lfp_data->data[lvds_options->panel_type]; |
125 | dvo_timing = &entry->dvo_timing; | 125 | dvo_timing = &entry->dvo_timing; |
126 | 126 | ||
127 | panel_fixed_mode = drm_calloc(1, sizeof(*panel_fixed_mode), | 127 | panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); |
128 | DRM_MEM_DRIVER); | ||
129 | 128 | ||
130 | fill_detail_timing_data(panel_fixed_mode, dvo_timing); | 129 | fill_detail_timing_data(panel_fixed_mode, dvo_timing); |
131 | 130 | ||
@@ -156,8 +155,7 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv, | |||
156 | if (!dvo_timing) | 155 | if (!dvo_timing) |
157 | return; | 156 | return; |
158 | 157 | ||
159 | panel_fixed_mode = drm_calloc(1, sizeof(*panel_fixed_mode), | 158 | panel_fixed_mode = kzalloc(sizeof(*panel_fixed_mode), GFP_KERNEL); |
160 | DRM_MEM_DRIVER); | ||
161 | 159 | ||
162 | if (!panel_fixed_mode) | 160 | if (!panel_fixed_mode) |
163 | return; | 161 | return; |
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index fbe96005fa1e..3955476eb64f 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -142,7 +142,7 @@ intel_hdmi_edid_detect(struct drm_connector *connector) | |||
142 | intel_output->ddc_bus); | 142 | intel_output->ddc_bus); |
143 | hdmi_priv->has_hdmi_sink = false; | 143 | hdmi_priv->has_hdmi_sink = false; |
144 | if (edid) { | 144 | if (edid) { |
145 | if (edid->digital) { | 145 | if (edid->input & DRM_EDID_INPUT_DIGITAL) { |
146 | status = connector_status_connected; | 146 | status = connector_status_connected; |
147 | hdmi_priv->has_hdmi_sink = drm_detect_hdmi_monitor(edid); | 147 | hdmi_priv->has_hdmi_sink = drm_detect_hdmi_monitor(edid); |
148 | } | 148 | } |
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 50d7ed70b338..ea68992e4416 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1561,8 +1561,7 @@ intel_tv_destroy (struct drm_connector *connector) | |||
1561 | 1561 | ||
1562 | drm_sysfs_connector_remove(connector); | 1562 | drm_sysfs_connector_remove(connector); |
1563 | drm_connector_cleanup(connector); | 1563 | drm_connector_cleanup(connector); |
1564 | drm_free(intel_output, sizeof(struct intel_output) + sizeof(struct intel_tv_priv), | 1564 | kfree(intel_output); |
1565 | DRM_MEM_DRIVER); | ||
1566 | } | 1565 | } |
1567 | 1566 | ||
1568 | 1567 | ||
@@ -1695,8 +1694,8 @@ intel_tv_init(struct drm_device *dev) | |||
1695 | (tv_dac_off & TVDAC_STATE_CHG_EN) != 0) | 1694 | (tv_dac_off & TVDAC_STATE_CHG_EN) != 0) |
1696 | return; | 1695 | return; |
1697 | 1696 | ||
1698 | intel_output = drm_calloc(1, sizeof(struct intel_output) + | 1697 | intel_output = kzalloc(sizeof(struct intel_output) + |
1699 | sizeof(struct intel_tv_priv), DRM_MEM_DRIVER); | 1698 | sizeof(struct intel_tv_priv), GFP_KERNEL); |
1700 | if (!intel_output) { | 1699 | if (!intel_output) { |
1701 | return; | 1700 | return; |
1702 | } | 1701 | } |
@@ -1730,8 +1729,8 @@ intel_tv_init(struct drm_device *dev) | |||
1730 | connector->doublescan_allowed = false; | 1729 | connector->doublescan_allowed = false; |
1731 | 1730 | ||
1732 | /* Create TV properties then attach current values */ | 1731 | /* Create TV properties then attach current values */ |
1733 | tv_format_names = drm_alloc(sizeof(char *) * NUM_TV_MODES, | 1732 | tv_format_names = kmalloc(sizeof(char *) * NUM_TV_MODES, |
1734 | DRM_MEM_DRIVER); | 1733 | GFP_KERNEL); |
1735 | if (!tv_format_names) | 1734 | if (!tv_format_names) |
1736 | goto out; | 1735 | goto out; |
1737 | for (i = 0; i < NUM_TV_MODES; i++) | 1736 | for (i = 0; i < NUM_TV_MODES; i++) |