summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cheng <michael.cheng@intel.com>2022-03-22 01:38:17 +0300
committerMatt Roper <matthew.d.roper@intel.com>2022-03-22 20:10:52 +0300
commit92b0cba49e80759e4b67757e0eb3499575dc7e06 (patch)
treeb50aed5ebe1d1789c60866c1a90b316518a0e8e5
parentdc0406820ee750f17d516824666fbd6fe5b34537 (diff)
downloadlinux-92b0cba49e80759e4b67757e0eb3499575dc7e06.tar.xz
drm/i915/gt: Re-work reset_csb
Use drm_clflush_virt_range instead of directly invoking clflush. This will prevent compiler errors when building for non-x86 architectures. v2(Michael Cheng): Remove extra clflush v3(Michael Cheng): Remove memory barrier since drm_clflush_virt_range takes care of it. v4(Michael Cheng): Get the size of value and not the size of the pointer when passing in execlists->csb_write. Thanks to Matt Roper for pointing this out. Signed-off-by: Michael Cheng <michael.cheng@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220321223819.72833-4-michael.cheng@intel.com
-rw-r--r--drivers/gpu/drm/i915/gt/intel_execlists_submission.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
index 436d935d53c2..4247fe11a105 100644
--- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
+++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
@@ -2952,9 +2952,8 @@ reset_csb(struct intel_engine_cs *engine, struct i915_request **inactive)
{
struct intel_engine_execlists * const execlists = &engine->execlists;
- mb(); /* paranoia: read the CSB pointers from after the reset */
- clflush(execlists->csb_write);
- mb();
+ drm_clflush_virt_range(execlists->csb_write,
+ sizeof(execlists->csb_write[0]));
inactive = process_csb(engine, inactive); /* drain preemption events */