Message ID | 20230421134654.273182-2-andi.shyti@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Use i915 instead of dev_priv | expand |
On Fri, Apr 21, 2023 at 03:46:53PM +0200, Andi Shyti wrote: > for_each_gt() loops through engines in the GT, not in dev_priv. typo here? ^ with that fixed: Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > Because it's misleading, call it "gt__" instead of "dev_priv__". > > Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> > --- > drivers/gpu/drm/i915/i915_drv.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index fe7eeafe9cff6..c16f8a3cd914f 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -381,11 +381,11 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915) > } > > /* Simple iterator over all initialised engines */ > -#define for_each_engine(engine__, dev_priv__, id__) \ > +#define for_each_engine(engine__, gt__, id__) \ > for ((id__) = 0; \ > (id__) < I915_NUM_ENGINES; \ > (id__)++) \ > - for_each_if ((engine__) = (dev_priv__)->engine[(id__)]) > + for_each_if ((engine__) = (gt__)->engine[(id__)]) > > /* Iterator over subset of engines selected by mask */ > #define for_each_engine_masked(engine__, gt__, mask__, tmp__) \ > -- > 2.40.0 >
On Fri, Apr 21, 2023 at 10:00:29AM -0400, Rodrigo Vivi wrote: > On Fri, Apr 21, 2023 at 03:46:53PM +0200, Andi Shyti wrote: > > for_each_gt() loops through engines in the GT, not in dev_priv. > > typo here? ^ > > with that fixed: oh, in the commit subject as well... > > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > > > Because it's misleading, call it "gt__" instead of "dev_priv__". > > > > Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> > > --- > > drivers/gpu/drm/i915/i915_drv.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > > index fe7eeafe9cff6..c16f8a3cd914f 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.h > > +++ b/drivers/gpu/drm/i915/i915_drv.h > > @@ -381,11 +381,11 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915) > > } > > > > /* Simple iterator over all initialised engines */ > > -#define for_each_engine(engine__, dev_priv__, id__) \ > > +#define for_each_engine(engine__, gt__, id__) \ > > for ((id__) = 0; \ > > (id__) < I915_NUM_ENGINES; \ > > (id__)++) \ > > - for_each_if ((engine__) = (dev_priv__)->engine[(id__)]) > > + for_each_if ((engine__) = (gt__)->engine[(id__)]) > > > > /* Iterator over subset of engines selected by mask */ > > #define for_each_engine_masked(engine__, gt__, mask__, tmp__) \ > > -- > > 2.40.0 > >
Hi Rodrigo, On Fri, Apr 21, 2023 at 10:05:07AM -0400, Rodrigo Vivi wrote: > On Fri, Apr 21, 2023 at 10:00:29AM -0400, Rodrigo Vivi wrote: > > On Fri, Apr 21, 2023 at 03:46:53PM +0200, Andi Shyti wrote: > > > for_each_gt() loops through engines in the GT, not in dev_priv. > > > > typo here? ^ > > > > with that fixed: > > oh, in the commit subject as well... The power of habit! Thanks! Andi
On 21.04.2023 15:46, Andi Shyti wrote: > for_each_gt() loops through engines in the GT, not in dev_priv. > Because it's misleading, call it "gt__" instead of "dev_priv__". > > Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> With fixes mentioned by Rodrigo. Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Regards Andrzej > --- > drivers/gpu/drm/i915/i915_drv.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index fe7eeafe9cff6..c16f8a3cd914f 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -381,11 +381,11 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915) > } > > /* Simple iterator over all initialised engines */ > -#define for_each_engine(engine__, dev_priv__, id__) \ > +#define for_each_engine(engine__, gt__, id__) \ > for ((id__) = 0; \ > (id__) < I915_NUM_ENGINES; \ > (id__)++) \ > - for_each_if ((engine__) = (dev_priv__)->engine[(id__)]) > + for_each_if ((engine__) = (gt__)->engine[(id__)]) > > /* Iterator over subset of engines selected by mask */ > #define for_each_engine_masked(engine__, gt__, mask__, tmp__) \
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index fe7eeafe9cff6..c16f8a3cd914f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -381,11 +381,11 @@ static inline struct intel_gt *to_gt(struct drm_i915_private *i915) } /* Simple iterator over all initialised engines */ -#define for_each_engine(engine__, dev_priv__, id__) \ +#define for_each_engine(engine__, gt__, id__) \ for ((id__) = 0; \ (id__) < I915_NUM_ENGINES; \ (id__)++) \ - for_each_if ((engine__) = (dev_priv__)->engine[(id__)]) + for_each_if ((engine__) = (gt__)->engine[(id__)]) /* Iterator over subset of engines selected by mask */ #define for_each_engine_masked(engine__, gt__, mask__, tmp__) \
for_each_gt() loops through engines in the GT, not in dev_priv. Because it's misleading, call it "gt__" instead of "dev_priv__". Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> --- drivers/gpu/drm/i915/i915_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)