diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-10-12 12:09:16 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-10-12 12:09:16 +0200 |
commit | 10150df02b7062b9975661ccd82b475cd23c8839 (patch) | |
tree | 26e4c7f9e56ab7fe56a32d7be96c82f4fef9ec16 /linux-core/i915_buffer.c | |
parent | 30703893674b3da5b862dee2acd6efca13424398 (diff) |
Simplify the AGP backend interface somewhat.
Fix buffer bound caching policy changing, Allow
on-the-fly changing of caching policy on bound buffers if the hardware
supports it.
Allow drivers to use driver-specific AGP memory types for TTM AGP pages.
Will make AGP drivers much easier to migrate.
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r-- | linux-core/i915_buffer.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index 2d76f075..8016bb1b 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -33,12 +33,13 @@ #include "i915_drm.h" #include "i915_drv.h" -drm_ttm_backend_t *i915_create_ttm_backend_entry(drm_device_t *dev, int cached) +#define INTEL_AGP_MEM_USER (1 << 16) +#define INTEL_AGP_MEM_UCACHED (2 << 16) + +drm_ttm_backend_t *i915_create_ttm_backend_entry(drm_device_t *dev) { - if (cached) - return drm_agp_init_ttm_cached(dev, NULL); - else - return drm_agp_init_ttm_uncached(dev, NULL); + return drm_agp_init_ttm(dev, NULL, INTEL_AGP_MEM_USER, INTEL_AGP_MEM_UCACHED, + INTEL_AGP_MEM_USER); } int i915_fence_types(uint32_t buffer_flags, uint32_t *class, uint32_t *type) @@ -53,9 +54,9 @@ int i915_fence_types(uint32_t buffer_flags, uint32_t *class, uint32_t *type) int i915_invalidate_caches(drm_device_t *dev, uint32_t flags) { - /* - * FIXME: Only emit once per batchbuffer submission. - */ + /* + * FIXME: Only emit once per batchbuffer submission. + */ uint32_t flush_cmd = MI_NO_WRITE_FLUSH; |