]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/i915: Remove partial attempt to swizzle on pread/pwrite
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 5 Jan 2019 12:07:58 +0000 (12:07 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 5 Jan 2019 12:51:06 +0000 (12:51 +0000)
commitb9d126e75b1ec040d8f6593c95703003859d6110
tree28ca099c94b7fcc46e2457888075c0cc4ef07783
parent55c15512a9cf6e287883ca826a4671a26f4f2afc
drm/i915: Remove partial attempt to swizzle on pread/pwrite

Our attempt to account for bit17 swizzling of pread/pwrite onto tiled
objects was flawed due to the simple fact that we do not always know the
swizzling for a particular page (due to the swizzling varying based on
location in certain unbalanced configurations). Furthermore, the
pread/pwrite paths are now unbalanced in that we are required to use the
GTT as in some cases we do not have direct CPU access to the backing
physical pages (thus some paths trying to account for the swizzle, but
others neglecting, chaos ensues).

There are no known users who do use pread/pwrite into a tiled object
(you need to manually detile anyway, so why now just use mmap and avoid
the copy?) and no user bug reports to indicate that it is being used in
the wild. As no one is hitting the buggy path, we can just remove the
buggy code.

v2: Just use the fault allowing kmap() + normal copy_(to|from)_user
v3: Avoid int overflow in computing 'length' from 'remain' (Tvrtko)

References: fe115628d567 ("drm/i915: Implement pwrite without struct-mutex")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190105120758.9237-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c