summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2023-10-02 10:47:03 +0200
committerJani Nikula <jani.nikula@intel.com>2023-10-04 17:27:46 +0200
commit39fa9a7d5fb7d8316b9c7c56a1f8e473008244e8 (patch)
tree02382eba1f70e6a77335c9e612c6e169ec5acef4 /drivers/gpu/drm/i915/i915_drv.h
parentdrm/i915/mocs: use to_gt() instead of direct &i915->gt (diff)
downloadlinux-39fa9a7d5fb7d8316b9c7c56a1f8e473008244e8.tar.xz
linux-39fa9a7d5fb7d8316b9c7c56a1f8e473008244e8.zip
drm/i915: allocate i915->gt0 dynamically
Convert i915->gt0 to a pointer, and allocate it dynamically. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Acked-by: MichaƂ Winiarski <michal.winiarski@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/01bf968aa431b77d491790178cbeece18b5fc4c0.1696236329.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index da2217c16153..70240f71d886 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -318,10 +318,10 @@ struct drm_i915_private {
struct i915_hwmon *hwmon;
/* Abstract the submission mechanism (legacy ringbuffer or execlists) away */
- struct intel_gt gt0;
+ struct intel_gt *gt0;
/*
- * i915->gt[0] == &i915->gt0
+ * i915->gt[0] == i915->gt0
*/
struct intel_gt *gt[I915_MAX_GT];
@@ -382,9 +382,9 @@ static inline struct drm_i915_private *pdev_to_i915(struct pci_dev *pdev)
return pci_get_drvdata(pdev);
}
-static inline struct intel_gt *to_gt(struct drm_i915_private *i915)
+static inline struct intel_gt *to_gt(const struct drm_i915_private *i915)
{
- return &i915->gt0;
+ return i915->gt0;
}
/* Simple iterator over all initialised engines */