drm/i915: Move GEM domain management to its own file

Continuing the decluttering of i915_gem.c, that of the read/write
domains, perhaps the biggest of GEM's follies?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528092956.14910-7-chris@chris-wilson.co.uk
This commit is contained in:
Chris Wilson
2019-05-28 10:29:48 +01:00
parent b414fcd5be
commit f0e4a06397
13 changed files with 839 additions and 822 deletions

View File

@@ -1058,11 +1058,11 @@ static u32 *copy_batch(struct drm_i915_gem_object *dst_obj,
void *dst, *src;
int ret;
ret = i915_gem_obj_prepare_shmem_read(src_obj, &src_needs_clflush);
ret = i915_gem_object_prepare_read(src_obj, &src_needs_clflush);
if (ret)
return ERR_PTR(ret);
ret = i915_gem_obj_prepare_shmem_write(dst_obj, &dst_needs_clflush);
ret = i915_gem_object_prepare_write(dst_obj, &dst_needs_clflush);
if (ret) {
dst = ERR_PTR(ret);
goto unpin_src;
@@ -1120,9 +1120,9 @@ static u32 *copy_batch(struct drm_i915_gem_object *dst_obj,
*needs_clflush_after = dst_needs_clflush & CLFLUSH_AFTER;
unpin_dst:
i915_gem_obj_finish_shmem_access(dst_obj);
i915_gem_object_finish_access(dst_obj);
unpin_src:
i915_gem_obj_finish_shmem_access(src_obj);
i915_gem_object_finish_access(src_obj);
return dst;
}