diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 21:57:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 21:57:59 -0400 |
commit | c48c43e422c1404fd72c57d1d21a6f6d01e18900 (patch) | |
tree | 48e5d3828b4f5479361986535f71a1ae44e4f3c1 /drivers/gpu/drm/drm_agpsupport.c | |
parent | 520045db940a381d2bee1c1b2179f7921b40fb10 (diff) | |
parent | 135cba0dc399fdd47bd3ae305c1db75fcd77243f (diff) |
Merge branch 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (476 commits)
vmwgfx: Implement a proper GMR eviction mechanism
drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2
drm/radeon/kms: properly compute group_size on 6xx/7xx
drm/radeon/kms: fix 2D tile height alignment in the r600 CS checker
drm/radeon/kms/evergreen: set the clear state to the blit state
drm/radeon/kms: don't poll dac load detect.
gpu: Add Intel GMA500(Poulsbo) Stub Driver
drm/radeon/kms: MC vram map needs to be >= pci aperture size
drm/radeon/kms: implement display watermark support for evergreen
drm/radeon/kms/evergreen: add some additional safe regs v2
drm/radeon/r600: fix tiling issues in CS checker.
drm/i915: Move gpu_write_list to per-ring
drm/i915: Invalidate the to-ring, flush the old-ring when updating domains
drm/i915/ringbuffer: Write the value passed in to the tail register
agp/intel: Restore valid PTE bit for Sandybridge after bdd3072
drm/i915: Fix flushing regression from 9af90d19f
drm/i915/sdvo: Remove unused encoding member
i915: enable AVI infoframe for intel_hdmi.c [v4]
drm/i915: Fix current fb blocking for page flip
drm/i915: IS_IRONLAKE is synonymous with gen == 5
...
Fix up conflicts in
- drivers/gpu/drm/i915/{i915_gem.c, i915/intel_overlay.c}: due to the
new simplified stack-based kmap_atomic() interface
- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c: added .llseek entry due to BKL
removal cleanups.
Diffstat (limited to 'drivers/gpu/drm/drm_agpsupport.c')
-rw-r--r-- | drivers/gpu/drm/drm_agpsupport.c | 40 |
1 files changed, 4 insertions, 36 deletions
diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c index ba38e0147220..252fdb98b73a 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); |