diff mbox series

[3/3] drm/i915/gt: remove i915->gt0 in favour of i915->gt[0]

Message ID 5319364f4c9416fed218382d020a57c5b0a17bee.1696236329.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: nuke i915->gt0 | expand

Commit Message

Jani Nikula Oct. 2, 2023, 8:47 a.m. UTC
Since gt0 == i915->gt[0], just drop the former.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt.c               | 4 +---
 drivers/gpu/drm/i915/i915_drv.h                  | 8 +-------
 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 -
 3 files changed, 2 insertions(+), 11 deletions(-)

Comments

Gustavo Sousa Oct. 2, 2023, 2:33 p.m. UTC | #1
Quoting Jani Nikula (2023-10-02 05:47:04-03:00)
>Since gt0 == i915->gt[0], just drop the former.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>

>---
> drivers/gpu/drm/i915/gt/intel_gt.c               | 4 +---
> drivers/gpu/drm/i915/i915_drv.h                  | 8 +-------
> drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 -
> 3 files changed, 2 insertions(+), 11 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
>index b293ace6745d..ed32bf5b1546 100644
>--- a/drivers/gpu/drm/i915/gt/intel_gt.c
>+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
>@@ -68,7 +68,7 @@ int intel_root_gt_init_early(struct drm_i915_private *i915)
>         if (!gt)
>                 return -ENOMEM;
> 
>-        i915->gt0 = gt;
>+        i915->gt[0] = gt;
> 
>         gt->i915 = i915;
>         gt->uncore = &i915->uncore;
>@@ -928,8 +928,6 @@ int intel_gt_probe_all(struct drm_i915_private *i915)
>         if (ret)
>                 return ret;
> 
>-        i915->gt[0] = gt;
>-
>         if (!HAS_EXTRA_GT_LIST(i915))
>                 return 0;
> 
>diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>index a1cb16afa46d..d04a9c32c44f 100644
>--- a/drivers/gpu/drm/i915/i915_drv.h
>+++ b/drivers/gpu/drm/i915/i915_drv.h
>@@ -317,12 +317,6 @@ struct drm_i915_private {
> 
>         struct i915_hwmon *hwmon;
> 
>-        /* Abstract the submission mechanism (legacy ringbuffer or execlists) away */
>-        struct intel_gt *gt0;
>-
>-        /*
>-         * i915->gt[0] == i915->gt0
>-         */
>         struct intel_gt *gt[I915_MAX_GT];
> 
>         struct kobject *sysfs_gt;
>@@ -384,7 +378,7 @@ static inline struct drm_i915_private *pdev_to_i915(struct pci_dev *pdev)
> 
> static inline struct intel_gt *to_gt(const struct drm_i915_private *i915)
> {
>-        return i915->gt0;
>+        return i915->gt[0];
> }
> 
> /* Simple iterator over all initialised engines */
>diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
>index 7de6477803f8..af349fd9abc2 100644
>--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
>+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
>@@ -114,7 +114,6 @@ static struct dev_pm_domain pm_domain = {
> 
> static void mock_gt_probe(struct drm_i915_private *i915)
> {
>-        i915->gt[0] = to_gt(i915);
>         i915->gt[0]->name = "Mock GT";
> }
> 
>-- 
>2.39.2
>
Andi Shyti Oct. 3, 2023, 7:47 a.m. UTC | #2
Hi Jani,

On Mon, Oct 02, 2023 at 11:47:04AM +0300, Jani Nikula wrote:
> Since gt0 == i915->gt[0], just drop the former.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Looks correct!

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> 

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index b293ace6745d..ed32bf5b1546 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -68,7 +68,7 @@  int intel_root_gt_init_early(struct drm_i915_private *i915)
 	if (!gt)
 		return -ENOMEM;
 
-	i915->gt0 = gt;
+	i915->gt[0] = gt;
 
 	gt->i915 = i915;
 	gt->uncore = &i915->uncore;
@@ -928,8 +928,6 @@  int intel_gt_probe_all(struct drm_i915_private *i915)
 	if (ret)
 		return ret;
 
-	i915->gt[0] = gt;
-
 	if (!HAS_EXTRA_GT_LIST(i915))
 		return 0;
 
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a1cb16afa46d..d04a9c32c44f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -317,12 +317,6 @@  struct drm_i915_private {
 
 	struct i915_hwmon *hwmon;
 
-	/* Abstract the submission mechanism (legacy ringbuffer or execlists) away */
-	struct intel_gt *gt0;
-
-	/*
-	 * i915->gt[0] == i915->gt0
-	 */
 	struct intel_gt *gt[I915_MAX_GT];
 
 	struct kobject *sysfs_gt;
@@ -384,7 +378,7 @@  static inline struct drm_i915_private *pdev_to_i915(struct pci_dev *pdev)
 
 static inline struct intel_gt *to_gt(const struct drm_i915_private *i915)
 {
-	return i915->gt0;
+	return i915->gt[0];
 }
 
 /* Simple iterator over all initialised engines */
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 7de6477803f8..af349fd9abc2 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -114,7 +114,6 @@  static struct dev_pm_domain pm_domain = {
 
 static void mock_gt_probe(struct drm_i915_private *i915)
 {
-	i915->gt[0] = to_gt(i915);
 	i915->gt[0]->name = "Mock GT";
 }