Message ID | 20180321140755.16792-1-jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Quoting Jani Nikula (2018-03-21 14:07:54) > Fix the last two direct ->gen usages. > > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/intel_device_info.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c > index a504281e2afa..af538c4a3aeb 100644 > --- a/drivers/gpu/drm/i915/intel_device_info.c > +++ b/drivers/gpu/drm/i915/intel_device_info.c > @@ -119,7 +119,7 @@ void intel_device_info_dump(const struct intel_device_info *info, > INTEL_DEVID(dev_priv), > INTEL_REVID(dev_priv), > intel_platform_name(info->platform), > - info->gen); > + INTEL_GEN(dev_priv)); This is wrong, this should be from the local intel_device_info *info. (Passed in from the caller, so dev_priv is very wrong here, and yes the INTEL_foo() above are on my hit list :) -Chris
On Wed, 21 Mar 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote: > Quoting Jani Nikula (2018-03-21 14:07:54) >> Fix the last two direct ->gen usages. >> >> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> >> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> --- >> drivers/gpu/drm/i915/intel_device_info.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c >> index a504281e2afa..af538c4a3aeb 100644 >> --- a/drivers/gpu/drm/i915/intel_device_info.c >> +++ b/drivers/gpu/drm/i915/intel_device_info.c >> @@ -119,7 +119,7 @@ void intel_device_info_dump(const struct intel_device_info *info, >> INTEL_DEVID(dev_priv), >> INTEL_REVID(dev_priv), >> intel_platform_name(info->platform), >> - info->gen); >> + INTEL_GEN(dev_priv)); > > This is wrong, this should be from the local intel_device_info *info. > (Passed in from the caller, so dev_priv is very wrong here, and yes the > INTEL_foo() above are on my hit list :) Contemplated that. I guess you'll need to remove them for turning intel_device_info into a pointer rather than a copy in dev_priv? BR, Jani.
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index a504281e2afa..af538c4a3aeb 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -119,7 +119,7 @@ void intel_device_info_dump(const struct intel_device_info *info, INTEL_DEVID(dev_priv), INTEL_REVID(dev_priv), intel_platform_name(info->platform), - info->gen); + INTEL_GEN(dev_priv)); intel_device_info_dump_flags(info, p); } @@ -809,7 +809,7 @@ void intel_device_info_runtime_init(struct intel_device_info *info) gen9_sseu_info_init(dev_priv); else if (INTEL_GEN(dev_priv) == 10) gen10_sseu_info_init(dev_priv); - else if (INTEL_INFO(dev_priv)->gen >= 11) + else if (INTEL_GEN(dev_priv) >= 11) gen11_sseu_info_init(dev_priv); /* Initialize command stream timestamp frequency */
Fix the last two direct ->gen usages. Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/intel_device_info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)