]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Only copy back the modified fields to userspace from execbuffer
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 23 May 2014 09:45:52 +0000 (10:45 +0100)
committerJani Nikula <jani.nikula@intel.com>
Tue, 27 May 2014 08:18:39 +0000 (11:18 +0300)
commit66729cb83fb2e4b6c78607f3c790ddd773f7cf7d
treea067229b1557076fc66d2d49e546c599ecc2052f
parent635d29a88fa5d0edfc04e5c8765a64b7fb592b4b
drm/i915: Only copy back the modified fields to userspace from execbuffer

We only want to modifiy a single field in the userspace view of the
execbuffer command buffer, so explicitly change that rather than copy
everything back again.

This serves two purposes:

1. The single fields are much cheaper to copy (constant size so the
copy uses special case code) and much smaller than the whole array.

2. We modify the array for internal use that need to be masked from
the user.

Note: We need this backported since without it the next bugfix will
blow up when userspace recycles batchbuffers and relocations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_execbuffer.c