diff options
author | Chris Wilson <chris.p.wilson@intel.com> | 2022-07-27 15:29:51 +0300 |
---|---|---|
committer | Andi Shyti <andi.shyti@linux.intel.com> | 2022-07-28 14:47:01 +0300 |
commit | 4bedceaed1ae1172cfe72d3ff752b3a1d32fe4d9 (patch) | |
tree | 0bdf3c43785a4c3f056b50469c90a8c5b256847b /drivers/gpu/drm/i915/gt/intel_gt_pm.h | |
parent | 353819d85f87be46aeb9c1dd929d445a006fc6ec (diff) | |
download | linux-4bedceaed1ae1172cfe72d3ff752b3a1d32fe4d9.tar.xz |
drm/i915/gt: Ignore TLB invalidations on idle engines
Check if the device is powered down prior to any engine activity,
as, on such cases, all the TLBs were already invalidated, so an
explicit TLB invalidation is not needed, thus reducing the
performance regression impact due to it.
This becomes more significant with GuC, as it can only do so when
the connection to the GuC is awake.
Cc: stable@vger.kernel.org
Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store")
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Cc: Fei Yang <fei.yang@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Acked-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/278a57a672edac75683f0818b292e95da583a5fe.1658924372.git.mchehab@kernel.org
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_gt_pm.h')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_gt_pm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h index bc898df7a48c..a334787a4939 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.h +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.h @@ -55,6 +55,9 @@ static inline void intel_gt_pm_might_put(struct intel_gt *gt) for (tmp = 1, intel_gt_pm_get(gt); tmp; \ intel_gt_pm_put(gt), tmp = 0) +#define with_intel_gt_pm_if_awake(gt, wf) \ + for (wf = intel_gt_pm_get_if_awake(gt); wf; intel_gt_pm_put_async(gt), wf = 0) + static inline int intel_gt_pm_wait_for_idle(struct intel_gt *gt) { return intel_wakeref_wait_for_idle(>->wakeref); |