Merge tag 'driver-core-4.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / drivers / gpu / drm / radeon / radeon_object.c
index 2d901bf..41b72ce 100644 (file)
@@ -446,6 +446,10 @@ void radeon_bo_force_delete(struct radeon_device *rdev)
 
 int radeon_bo_init(struct radeon_device *rdev)
 {
+       /* reserve PAT memory space to WC for VRAM */
+       arch_io_reserve_memtype_wc(rdev->mc.aper_base,
+                                  rdev->mc.aper_size);
+
        /* Add an MTRR for the VRAM */
        if (!rdev->fastfb_working) {
                rdev->mc.vram_mtrr = arch_phys_wc_add(rdev->mc.aper_base,
@@ -463,6 +467,7 @@ void radeon_bo_fini(struct radeon_device *rdev)
 {
        radeon_ttm_fini(rdev);
        arch_phys_wc_del(rdev->mc.vram_mtrr);
+       arch_io_free_memtype_wc(rdev->mc.aper_base, rdev->mc.aper_size);
 }
 
 /* Returns how many bytes TTM can move per IB.
@@ -832,13 +837,13 @@ int radeon_bo_wait(struct radeon_bo *bo, u32 *mem_type, bool no_wait)
 {
        int r;
 
-       r = ttm_bo_reserve(&bo->tbo, true, no_wait, false, NULL);
+       r = ttm_bo_reserve(&bo->tbo, true, no_wait, NULL);
        if (unlikely(r != 0))
                return r;
        if (mem_type)
                *mem_type = bo->tbo.mem.mem_type;
 
-       r = ttm_bo_wait(&bo->tbo, true, true, no_wait);
+       r = ttm_bo_wait(&bo->tbo, true, no_wait);
        ttm_bo_unreserve(&bo->tbo);
        return r;
 }