summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gt/intel_gt.h
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2019-07-13 11:00:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-07-13 20:08:44 +0100
commit84b1ca2f0e68e89186f552ab839dc8da7c3ddc87 (patch)
treea503ad97d8484a70be1d79126196740429fcfddb /drivers/gpu/drm/i915/gt/intel_gt.h
parentca7b2c1bbede6187342dd0bec8666ab4481fa6ad (diff)
drm/i915/uc: prefer intel_gt over i915 in GuC/HuC paths
With our HW interface logic moving from i915 to gt and with GuC and HuC being part of the gt HW, it makes sense to use the intel_gt structure instead of i915 as our reference object in GuC/HuC paths. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20190713100016.8026-9-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_gt.h')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_gt.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_gt.h b/drivers/gpu/drm/i915/gt/intel_gt.h
index 26c94521ad1b..640bb0531f5b 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt.h
@@ -17,6 +17,16 @@ static inline struct intel_gt *uc_to_gt(struct intel_uc *uc)
return container_of(uc, struct intel_gt, uc);
}
+static inline struct intel_gt *guc_to_gt(struct intel_guc *guc)
+{
+ return container_of(guc, struct intel_gt, uc.guc);
+}
+
+static inline struct intel_gt *huc_to_gt(struct intel_huc *huc)
+{
+ return container_of(huc, struct intel_gt, uc.huc);
+}
+
void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915);
void intel_gt_init_hw(struct drm_i915_private *i915);