[PATCH v2 1/2] drm/xe: introduce xe_gt_reset and xe_gt_reset_wait

Raag Jadav raag.jadav at intel.com
Wed Dec 11 04:58:21 UTC 2024


On Tue, Dec 10, 2024 at 07:56:20AM -0800, Lucas De Marchi wrote:
> On Tue, Dec 10, 2024 at 03:37:47PM +0100, Maciej Patelczyk wrote:
> > Adding synchronous version gt reset as there are few places where it
> > is expected.
> > Adding also a wait helper to wait until gt reset is done.

...

> > diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > index 3e8c351a0eab..79f61532fd00 100644
> > --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
> > @@ -135,7 +135,7 @@ static int force_reset_sync(struct xe_gt *gt, struct drm_printer *p)
> > 	xe_gt_reset_async(gt);
> > 	xe_pm_runtime_put(gt_to_xe(gt));
> > 
> > -	flush_work(&gt->reset.worker);
> > +	xe_gt_reset_wait(gt);
> 
> this can become a xe_gt_reset() since the only thing we are doing
> between the calls is to release the runtime pm.... doesn't really
> matter for this debugfs call.

I see the worker taking a pm ref as well, can this be a problem?

Raag


More information about the Intel-xe mailing list