summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-08-07 10:41:28 +0100
committerAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2019-08-09 12:25:10 +0300
commit44982c82c10cd15d2b635ea61c92af6836492ec9 (patch)
tree11b640ff12bbabb81c957c78446b6d3a3552084c
parente8f884ac36ab4a482d16908d92322175b51d51ed (diff)
drm/i915: Drop expectations of VM_IO from our GGTT mmappingsdrm-tip-internal-rebase
We don't really want to use VM_IO for our GGTT mmaps (it implies that the mmap contains memory mapped registers, which we do not expose) yet I overzealously added it to an assert just because that's how we always had setup the vma. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190807094128.9993-1-chris@chris-wilson.co.uk
-rw-r--r--drivers/gpu/drm/i915/i915_mm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
index e4935dd1fd37..01771e3d5911 100644
--- a/drivers/gpu/drm/i915/i915_mm.c
+++ b/drivers/gpu/drm/i915/i915_mm.c
@@ -64,9 +64,8 @@ int remap_io_mapping(struct vm_area_struct *vma,
struct remap_pfn r;
int err;
- GEM_BUG_ON((vma->vm_flags &
- (VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP)) !=
- (VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP));
+#define EXPECTED_FLAGS (VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP)
+ GEM_BUG_ON((vma->vm_flags & EXPECTED_FLAGS) != EXPECTED_FLAGS);
/* We rely on prevalidation of the io-mapping to skip track_pfn(). */
r.mm = vma->vm_mm;