diff options
| author | Matthew Auld <matthew.auld@intel.com> | 2021-10-27 17:18:13 +0100 |
|---|---|---|
| committer | Matthew Auld <matthew.auld@intel.com> | 2021-11-02 09:44:10 +0000 |
| commit | 068b1bd0925387ff3a2900726a681ce697e4c1a9 (patch) | |
| tree | 640f33f64807927bf62fc8ba1127a69d7381003d /drivers/gpu/drm/i915/gem/i915_gem_clflush.c | |
| parent | 2ea6ec76430b87c49f3d82e284722dfbdf137bb9 (diff) | |
drm/i915: stop setting cache_dirty on discrete
Should not be needed. Even with non-coherent display, we should be using
device local-memory there, and not system memory.
v2: also add a warning in i915_gem_clflush_object
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> #v1
Link: https://patchwork.freedesktop.org/patch/msgid/20211027161813.3094681-4-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_clflush.c')
| -rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_clflush.c b/drivers/gpu/drm/i915/gem/i915_gem_clflush.c index fc76175bf9be..8a248003dfae 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_clflush.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_clflush.c @@ -74,6 +74,11 @@ bool i915_gem_clflush_object(struct drm_i915_gem_object *obj, assert_object_held(obj); + if (IS_DGFX(i915)) { + WARN_ON_ONCE(obj->cache_dirty); + return false; + } + /* * Stolen memory is always coherent with the GPU as it is explicitly * marked as wc by the system, or the system is cache-coherent. @@ -81,7 +86,7 @@ bool i915_gem_clflush_object(struct drm_i915_gem_object *obj, * anything not backed by physical memory we consider to be always * coherent and not need clflushing. */ - if (!i915_gem_object_has_struct_page(obj) || IS_DGFX(i915)) { + if (!i915_gem_object_has_struct_page(obj)) { obj->cache_dirty = false; return false; } |
