drm/i915: Prepare more multi-GT initialization
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 6 Sep 2022 23:49:25 +0000 (16:49 -0700)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 12 Sep 2022 12:23:12 +0000 (15:23 +0300)
commit70fff19a570d4c9f73ccf0ca8c8b261b467d2491
tree72297f2db44e2b0f7c2e13f2c1e551dd9883b781
parent9ebb80e80e471fa314b9bbf0a031b3bbc7b511b8
drm/i915: Prepare more multi-GT initialization

We're going to introduce an additional intel_gt for MTL's media unit
soon.  Let's provide a bit more multi-GT initialization framework in
preparation for that.  The initialization will pull the list of GTs for
a platform from the device info structure.  Although necessary for the
immediate MTL media enabling, this same framework will also be used
farther down the road when we enable remote tiles on xehpsdv and pvc.

v2:
 - Re-add missing test for !HAS_EXTRA_GT_LIST in intel_gt_probe_all().

v3:
 - Move intel_gt_definition struct to intel_gt_types.h.  (Jani)
 - Drop gtdef->setup().  For now we'll just use a switch() based on GT
   type since we don't have too many different handlers for the
   foreseeable future.  (Jani)

Cc: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220906234934.3655440-6-matthew.d.roper@intel.com
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/gt/intel_engine_cs.c
drivers/gpu/drm/i915/gt/intel_gt.c
drivers/gpu/drm/i915/gt/intel_gt.h
drivers/gpu/drm/i915/gt/intel_gt_types.h
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_device_info.h
drivers/gpu/drm/i915/selftests/mock_gem_device.c