drm/i915/huc: Add huc_to_i915
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>
Tue, 14 Mar 2017 14:28:06 +0000 (15:28 +0100)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Wed, 15 Mar 2017 12:26:30 +0000 (14:26 +0200)
Used to obtain "dev_priv" from huc struct pointer.
We already have similar thing for guc.

Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.h

index 48ff648122898b31d6ee9fdbf1c0f16804838159..5156bcc59dea08307e0d11cf568ab17089c154e2 100644 (file)
@@ -2541,6 +2541,11 @@ static inline struct drm_i915_private *guc_to_i915(struct intel_guc *guc)
        return container_of(guc, struct drm_i915_private, guc);
 }
 
+static inline struct drm_i915_private *huc_to_i915(struct intel_huc *huc)
+{
+       return container_of(huc, struct drm_i915_private, huc);
+}
+
 /* Simple iterator over all initialised engines */
 #define for_each_engine(engine__, dev_priv__, id__) \
        for ((id__) = 0; \