diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/gpu/drm/drm_agpsupport.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/gpu/drm/drm_agpsupport.c')
-rw-r--r-- | drivers/gpu/drm/drm_agpsupport.c | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index ba38e0147220..0cb2ba50af53 100644 --- a/drivers/gpu/drm/drm_agpsupport.c +++ b/drivers/gpu/drm/drm_agpsupport.c | |||
@@ -193,7 +193,7 @@ int drm_agp_enable_ioctl(struct drm_device *dev, void *data, | |||
193 | * \return zero on success or a negative number on failure. | 193 | * \return zero on success or a negative number on failure. |
194 | * | 194 | * |
195 | * Verifies the AGP device is present and has been acquired, allocates the | 195 | * Verifies the AGP device is present and has been acquired, allocates the |
196 | * memory via alloc_agp() and creates a drm_agp_mem entry for it. | 196 | * memory via agp_allocate_memory() and creates a drm_agp_mem entry for it. |
197 | */ | 197 | */ |
198 | int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) | 198 | int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) |
199 | { | 199 | { |
@@ -211,7 +211,7 @@ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request) | |||
211 | 211 | ||
212 | pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; | 212 | pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; |
213 | type = (u32) request->type; | 213 | type = (u32) request->type; |
214 | if (!(memory = drm_alloc_agp(dev, pages, type))) { | 214 | if (!(memory = agp_allocate_memory(dev->agp->bridge, pages, type))) { |
215 | kfree(entry); | 215 | kfree(entry); |
216 | return -ENOMEM; | 216 | return -ENOMEM; |
217 | } | 217 | } |
@@ -423,38 +423,6 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev) | |||
423 | return head; | 423 | return head; |
424 | } | 424 | } |
425 | 425 | ||
426 | /** Calls agp_allocate_memory() */ | ||
427 | DRM_AGP_MEM *drm_agp_allocate_memory(struct agp_bridge_data * bridge, | ||
428 | size_t pages, u32 type) | ||
429 | { | ||
430 | return agp_allocate_memory(bridge, pages, type); | ||
431 | } | ||
432 | |||
433 | /** Calls agp_free_memory() */ | ||
434 | int drm_agp_free_memory(DRM_AGP_MEM * handle) | ||
435 | { | ||
436 | if (!handle) | ||
437 | return 0; | ||
438 | agp_free_memory(handle); | ||
439 | return 1; | ||
440 | } | ||
441 | |||
442 | /** Calls agp_bind_memory() */ | ||
443 | int drm_agp_bind_memory(DRM_AGP_MEM * handle, off_t start) | ||
444 | { | ||
445 | if (!handle) | ||
446 | return -EINVAL; | ||
447 | return agp_bind_memory(handle, start); | ||
448 | } | ||
449 | |||
450 | /** Calls agp_unbind_memory() */ | ||
451 | int drm_agp_unbind_memory(DRM_AGP_MEM * handle) | ||
452 | { | ||
453 | if (!handle) | ||
454 | return -EINVAL; | ||
455 | return agp_unbind_memory(handle); | ||
456 | } | ||
457 | |||
458 | /** | 426 | /** |
459 | * Binds a collection of pages into AGP memory at the given offset, returning | 427 | * Binds a collection of pages into AGP memory at the given offset, returning |
460 | * the AGP memory structure containing them. | 428 | * the AGP memory structure containing them. |
@@ -474,7 +442,7 @@ drm_agp_bind_pages(struct drm_device *dev, | |||
474 | 442 | ||
475 | DRM_DEBUG("\n"); | 443 | DRM_DEBUG("\n"); |
476 | 444 | ||
477 | mem = drm_agp_allocate_memory(dev->agp->bridge, num_pages, | 445 | mem = agp_allocate_memory(dev->agp->bridge, num_pages, |
478 | type); | 446 | type); |
479 | if (mem == NULL) { | 447 | if (mem == NULL) { |
480 | DRM_ERROR("Failed to allocate memory for %ld pages\n", | 448 | DRM_ERROR("Failed to allocate memory for %ld pages\n", |
@@ -487,7 +455,7 @@ drm_agp_bind_pages(struct drm_device *dev, | |||
487 | mem->page_count = num_pages; | 455 | mem->page_count = num_pages; |
488 | 456 | ||
489 | mem->is_flushed = true; | 457 | mem->is_flushed = true; |
490 | ret = drm_agp_bind_memory(mem, gtt_offset / PAGE_SIZE); | 458 | ret = agp_bind_memory(mem, gtt_offset / PAGE_SIZE); |
491 | if (ret != 0) { | 459 | if (ret != 0) { |
492 | DRM_ERROR("Failed to bind AGP memory: %d\n", ret); | 460 | DRM_ERROR("Failed to bind AGP memory: %d\n", ret); |
493 | agp_free_memory(mem); | 461 | agp_free_memory(mem); |
@@ -498,10 +466,4 @@ drm_agp_bind_pages(struct drm_device *dev, | |||
498 | } | 466 | } |
499 | EXPORT_SYMBOL(drm_agp_bind_pages); | 467 | EXPORT_SYMBOL(drm_agp_bind_pages); |
500 | 468 | ||
501 | void drm_agp_chipset_flush(struct drm_device *dev) | ||
502 | { | ||
503 | agp_flush_chipset(dev->agp->bridge); | ||
504 | } | ||
505 | EXPORT_SYMBOL(drm_agp_chipset_flush); | ||
506 | |||
507 | #endif /* __OS_HAS_AGP */ | 469 | #endif /* __OS_HAS_AGP */ |