diff options
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r-- | linux-core/i915_buffer.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index 08067476..ba586888 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -89,7 +89,7 @@ int i915_init_mem_type(struct drm_device *dev, uint32_t type, man->drm_bus_maptype = _DRM_AGP; man->gpu_offset = 0; break; - case DRM_BO_MEM_PRIV0: + case DRM_BO_MEM_VRAM: if (!(drm_core_has_AGP(dev) && dev->agp)) { DRM_ERROR("AGP is not enabled for memory type %u\n", (unsigned)type); @@ -103,6 +103,9 @@ int i915_init_mem_type(struct drm_device *dev, uint32_t type, man->drm_bus_maptype = _DRM_AGP; man->gpu_offset = 0; break; + case DRM_BO_MEM_PRIV0: /* for OS preallocated space */ + DRM_ERROR("PRIV0 not used yet.\n"); + break; default: DRM_ERROR("Unsupported memory type %u\n", (unsigned)type); return -EINVAL; @@ -139,7 +142,7 @@ static void i915_emit_copy_blit(struct drm_device * dev, { uint32_t cur_pages; uint32_t stride = PAGE_SIZE; - drm_i915_private_t *dev_priv = dev->dev_private; + struct drm_i915_private *dev_priv = dev->dev_private; RING_LOCALS; if (!dev_priv) @@ -267,10 +270,12 @@ static inline void clflush(volatile void *__p) static inline void drm_cache_flush_addr(void *virt) { +#ifdef cpu_has_clflush int i; for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size) clflush(virt+i); +#endif } static inline void drm_cache_flush_page(struct page *p) @@ -288,6 +293,9 @@ void i915_flush_ttm(struct drm_ttm *ttm) DRM_MEMORYBARRIER(); #ifdef CONFIG_X86_32 +#ifndef cpu_has_clflush +#define cpu_has_clflush 0 +#endif /* Hopefully nobody has built an x86-64 processor without clflush */ if (!cpu_has_clflush) { wbinvd(); |