From: Arkadiusz Hiler Date: Tue, 14 Mar 2017 14:28:06 +0000 (+0100) Subject: drm/i915/huc: Add huc_to_i915 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=50beba55e8e27903019611354624322677462cb7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915/huc: Add huc_to_i915 Used to obtain "dev_priv" from huc struct pointer. We already have similar thing for guc. Cc: Michal Wajdeczko Signed-off-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko Signed-off-by: Joonas Lahtinen --- diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 48ff64812289..5156bcc59dea 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -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; \