[Intel-xe] [PATCH v2 06/31] drm/xe: Ensure LR engines are not persistent

Matthew Brost matthew.brost at intel.com
Mon May 8 01:03:59 UTC 2023


On Fri, May 05, 2023 at 02:38:45PM -0400, Rodrigo Vivi wrote:
> On Mon, May 01, 2023 at 05:17:02PM -0700, Matthew Brost wrote:
> > With our ref counting scheme LR engines only close properly if not
> > persistent, ensure that LR engines are non-persistent.
> 
> Better to spell out long running somewhere here...
> 

Will do.

> > 
> > Signed-off-by: Matthew Brost <matthew.brost at intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_engine.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_engine.c b/drivers/gpu/drm/xe/xe_engine.c
> > index d1e84d7adbd4..91600b1e8249 100644
> > --- a/drivers/gpu/drm/xe/xe_engine.c
> > +++ b/drivers/gpu/drm/xe/xe_engine.c
> > @@ -596,7 +596,9 @@ int xe_engine_create_ioctl(struct drm_device *dev, void *data,
> >  			return -ENOENT;
> >  
> >  		e = xe_engine_create(xe, vm, logical_mask,
> > -				     args->width, hwe, ENGINE_FLAG_PERSISTENT);
> > +				     args->width, hwe,
> > +				     xe_vm_no_dma_fences(vm) ? 0 :
> 
> shouldn't we use that existent function xe_engine_is_lr instead of this?
>

The engine isn't created yet... So no this seems to be correct as a LR
engine us a user engine with a VM that doesn't allow DMA fences.

Matt<

> > +				     ENGINE_FLAG_PERSISTENT);
> >  		xe_vm_put(vm);
> >  		if (IS_ERR(e))
> >  			return PTR_ERR(e);
> > -- 
> > 2.34.1
> > 


More information about the Intel-xe mailing list