Skip to content

Commit

Permalink
drm/i915/gem: Clear read/write domains for GPU clear
Browse files Browse the repository at this point in the history
Update the domains for the write via the GPU so that we do not
shortcircuit any set-domain clflush afterwards.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110978
Fixes: b2dbf8d ("drm/i915/blt: Remove recursive vma->lock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190624141630.11015-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Jun 24, 2019
1 parent 8db7933 commit 871918d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/gem/i915_gem_client_blt.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ static void clear_pages_worker(struct work_struct *work)
goto out_signal;

if (obj->cache_dirty) {
obj->write_domain = 0;
if (i915_gem_object_has_struct_page(obj))
drm_clflush_sg(w->sleeve->pages);
obj->cache_dirty = false;
}
obj->read_domains = I915_GEM_GPU_DOMAINS;
obj->write_domain = 0;

/* XXX: we need to kill this */
mutex_lock(&i915->drm.struct_mutex);
Expand Down

0 comments on commit 871918d

Please sign in to comment.