OSDN Git Service

drm/i915/cmdparser: Only cache the dst vmap
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 16:17:13 +0000 (17:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 18 Aug 2016 21:36:59 +0000 (22:36 +0100)
commited13033f0287051577bc1678cde63a42fa419f3c
treeeb373a58eaa673846e9fc24f324b62cc7587a6ca
parent0b5372727be37944239100ff05a63df9771c8484
drm/i915/cmdparser: Only cache the dst vmap

For simplicity, we want to continue using a contiguous mapping of the
command buffer, but we can reduce the number of vmappings we hold by
switching over to a page-by-page copy from the user batch buffer to the
shadow. The cost for saving one linear mapping is about 5% in trivial
workloads - which is more or less the overhead in calling kmap_atomic().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-34-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_cmd_parser.c