Message ID | 1313110048-2971-3-git-send-email-ben@bwidawsk.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index a546a71..8e14fbe 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1156,6 +1156,11 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data, return -E2BIG; } + if (args->offset & 1) { + atomic_set(&(to_intel_bo(obj)->always_cpu_dirty), 1); + args->offset -= 1; + } + down_write(¤t->mm->mmap_sem); addr = do_mmap(obj->filp, 0, args->size, PROT_READ | PROT_WRITE, MAP_SHARED,
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_gem.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)