[PATCH 5/9] drm/xe: Nuke xe from xe_devcoredump
Rodrigo Vivi
rodrigo.vivi at intel.com
Mon Jan 22 20:40:18 UTC 2024
On Mon, Jan 22, 2024 at 03:26:57PM -0500, Souza, Jose wrote:
> On Mon, 2024-01-22 at 15:11 -0500, Rodrigo Vivi wrote:
> > On Mon, Jan 22, 2024 at 09:04:41AM -0800, José Roberto de Souza wrote:
> > > xe is never set in xe_devcoredump but if xe_device is needed
> > > devcoredump_to_xe_device() can be used.
> > >
> > > Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > > Cc: Maarten Lankhorst <dev at lankhorst.se>
> > > Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> > > ---
> > > drivers/gpu/drm/xe/xe_devcoredump_types.h | 2 --
> > > drivers/gpu/drm/xe/xe_device.h | 5 +++++
> > > 2 files changed, 5 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/xe/xe_devcoredump_types.h b/drivers/gpu/drm/xe/xe_devcoredump_types.h
> > > index 9a12959ed6b14..d259119b2c980 100644
> > > --- a/drivers/gpu/drm/xe/xe_devcoredump_types.h
> > > +++ b/drivers/gpu/drm/xe/xe_devcoredump_types.h
> > > @@ -47,8 +47,6 @@ struct xe_devcoredump_snapshot {
> > > * for reading the information.
> > > */
> > > struct xe_devcoredump {
> > > - /** @xe: Xe device. */
> > > - struct xe_device *xe;
> >
> > good catch.
> >
> > > /** @captured: The snapshot of the first hang has already been taken. */
> > > bool captured;
> > > /** @snapshot: Snapshot is captured at time of the first crash */
> > > diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
> > > index ce20f6fe6219a..781a1aa164ecf 100644
> > > --- a/drivers/gpu/drm/xe/xe_device.h
> > > +++ b/drivers/gpu/drm/xe/xe_device.h
> > > @@ -35,6 +35,11 @@ static inline struct xe_device *ttm_to_xe_device(struct ttm_device *ttm)
> > > return container_of(ttm, struct xe_device, ttm);
> > > }
> > >
> > > +static inline struct xe_device *devcoredump_to_xe_device(struct xe_devcoredump *devcoredump)
> > > +{
> > > + return container_of(devcoredump, struct xe_device, devcoredump);
> > > +}
> > > +
> >
> > But now this is kind of duplicated with the coredump_to_xe that is in xe_devcoredump.c
> > itself.
>
> oh missed that, will drop devcoredump_to_xe_device() then.
with that feel free to already use:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
>
> >
> > > struct xe_device *xe_device_create(struct pci_dev *pdev,
> > > const struct pci_device_id *ent);
> > > int xe_device_probe_early(struct xe_device *xe);
> > > --
> > > 2.43.0
> > >
>
More information about the Intel-xe
mailing list