Merge tag 'amd-drm-next-6.3-2023-01-13' of https://gitlab.freedesktop.org/agd5f/linux...
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_gem.c
index 6936cd6..ed1164a 100644 (file)
@@ -34,6 +34,7 @@
 #include <drm/amdgpu_drm.h>
 #include <drm/drm_drv.h>
 #include <drm/drm_gem_ttm_helper.h>
+#include <drm/ttm/ttm_tt.h>
 
 #include "amdgpu.h"
 #include "amdgpu_display.h"
@@ -256,7 +257,7 @@ static int amdgpu_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_str
         * becoming writable and makes is_cow_mapping(vm_flags) false.
         */
        if (is_cow_mapping(vma->vm_flags) &&
-           !(vma->vm_flags & (VM_READ | VM_WRITE | VM_EXEC)))
+           !(vma->vm_flags & VM_ACCESS_FLAGS))
                vma->vm_flags &= ~VM_MAYWRITE;
 
        return drm_gem_ttm_mmap(obj, vma);