drm/i915/gt: Ignore TLB invalidations on idle engines
authorChris Wilson <chris.p.wilson@intel.com>
Wed, 27 Jul 2022 12:29:51 +0000 (14:29 +0200)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 8 Aug 2022 17:14:47 +0000 (13:14 -0400)
commitdb100e28fdf026a1fc10657c5170bb1e65663805
treeb0c3aec5bc5350ce662dfb5b862cdfbe63e0e6f7
parent232d150fa15606e96c0e01e5c7a2d4e03f621787
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
(cherry picked from commit 4bedceaed1ae1172cfe72d3ff752b3a1d32fe4d9)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gem/i915_gem_pages.c
drivers/gpu/drm/i915/gt/intel_gt.c
drivers/gpu/drm/i915/gt/intel_gt_pm.h