]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/intel_display.c
drm/i915: Perform object clflushing asynchronously
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Feb 2017 11:40:48 +0000 (11:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 22 Feb 2017 12:12:15 +0000 (12:12 +0000)
commit57822dc6b9cfeb5300e467ff83d8371aead90047
treefd2cda9d94247ffc3ab1cec90780883ca76404e0
parentf6aaba4dfbc8eaa1b2b756b989fb423a789ee4e8
drm/i915: Perform object clflushing asynchronously

Flushing the cachelines for an object is slow, can be as much as 100ms
for a large framebuffer. We currently do this under the struct_mutex BKL
on execution or on pageflip. But now with the ability to add fences to
obj->resv for both flips and execbuf (and we naturally wait on the fence
before CPU access), we can move the clflush operation to a workqueue and
signal a fence for completion, thereby doing the work asynchronously and
not blocking the driver or its clients.

v2: Introduce i915_gem_clflush.h and use a new name, split out some
extras into separate patches.

Suggested-by: Akash Goel <akash.goel@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170222114049.28456-5-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_clflush.c [new file with mode: 0644]
drivers/gpu/drm/i915/i915_gem_clflush.h [new file with mode: 0644]
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/intel_display.c