[Intel-xe] [RFC 2/3] drm/xe: Add wrapper over intel_step_name

Borah, Chaitanya Kumar chaitanya.kumar.borah at intel.com
Wed Sep 20 07:24:54 UTC 2023


Hello Jani,

> -----Original Message-----
> From: Jani Nikula <jani.nikula at linux.intel.com>
> Sent: Tuesday, September 19, 2023 7:35 PM
> To: Borah, Chaitanya Kumar <chaitanya.kumar.borah at intel.com>; intel-
> xe at lists.freedesktop.org
> Subject: Re: [Intel-xe] [RFC 2/3] drm/xe: Add wrapper over intel_step_name
> 
> On Mon, 18 Sep 2023, Chaitanya Kumar Borah
> <chaitanya.kumar.borah at intel.com> wrote:
> > To maintain compatibility between xe and i915, let's create a wrapper
> > with same name over driver specific calls made to retrieve the step
> > name.
> >
> > Signed-off-by: Chaitanya Kumar Borah
> <chaitanya.kumar.borah at intel.com>
> > Signed-off-by: Animesh Manna <animesh.manna at intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_step.c | 5 +++++  drivers/gpu/drm/xe/xe_step.h
> > | 1 +
> 
> These files must not have references to struct drm_i915_private.
> 
> Try building with CONFIG_DRM_XE_DISPLAY=n.
> 

I did have a bad feeling about this one. Replaced it with xe_device in the latest revision.
Let me know your thoughts.

Regards

Chaitanya

> BR,
> Jani.
> 
> >  2 files changed, 6 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_step.c
> > b/drivers/gpu/drm/xe/xe_step.c index 371cac951e0f..9a79451ccf52
> 100644
> > --- a/drivers/gpu/drm/xe/xe_step.c
> > +++ b/drivers/gpu/drm/xe/xe_step.c
> > @@ -254,3 +254,8 @@ const char *xe_step_name(enum xe_step step)
> >  		return "**";
> >  	}
> >  }
> > +
> > +const char *intel_get_step_name(struct drm_i915_private *i915) {
> > +	return xe_step_name(i915->info.step.display);
> > +}
> > diff --git a/drivers/gpu/drm/xe/xe_step.h
> > b/drivers/gpu/drm/xe/xe_step.h index a384b640f2af..3e78d46566a0
> 100644
> > --- a/drivers/gpu/drm/xe/xe_step.h
> > +++ b/drivers/gpu/drm/xe/xe_step.h
> > @@ -17,5 +17,6 @@ struct xe_step_info xe_step_gmdid_get(struct
> xe_device *xe,
> >  				      u32 graphics_gmdid_revid,
> >  				      u32 media_gmdid_revid);
> >  const char *xe_step_name(enum xe_step step);
> > +const char *intel_get_step_name(struct drm_i915_private *i915);
> >
> >  #endif
> 
> --
> Jani Nikula, Intel


More information about the Intel-xe mailing list