drm/i915: Handle all GTs on driver (un)load paths
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 15 Sep 2022 23:26:54 +0000 (16:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:06 +0000 (13:32 +0100)
commited52edf44432a053cda7a1891f6c97f746d92fad
tree85761fdacc4808842805532a3888d6e62bb37f6c
parent12a9b4c4ebd9a0ba856370e088564af83cffd565
drm/i915: Handle all GTs on driver (un)load paths

[ Upstream commit f569ae759472fbe1f6fdddc7398360d43fdcc199 ]

This, along with the changes already landed in commit 1c66a12ab431
("drm/i915: Handle each GT on init/release and suspend/resume") makes
engines from all GTs actually known to the driver.

To accomplish this we need to sprinkle a lot of for_each_gt calls around
but is otherwise pretty un-eventuful.

v2:
 - Consolidate adjacent GT loops in a couple places.  (Daniele)

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220915232654.3283095-5-matthew.d.roper@intel.com
Stable-dep-of: 1cacd6894d5f ("drm/i915/dgfx: Grab wakeref at i915_ttm_unmap_virtual")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/i915/i915_driver.c
drivers/gpu/drm/i915/i915_gem.c