[PATCH] drm/xe: Return immediately on tile_init failure

Rodrigo Vivi rodrigo.vivi at intel.com
Wed Mar 6 21:37:29 UTC 2024


On Wed, Mar 06, 2024 at 12:53:41PM -0800, Matt Roper wrote:
> On Wed, Mar 06, 2024 at 03:31:10PM -0500, Rodrigo Vivi wrote:
> > There's no reason to proceed with applying workaround and initing
> > sysfs if we are going to abort the probe upon failure.
> > 
> > Fixes: 876611c2b756 ("drm/xe: Memory allocations are tile-based, not GT-based")
> 
> Should this actually be
> 
> Fixes: e5a845fd8fa4 ("drm/xe: Add sysfs entry for tile")
> 
> instead?  The commit you cited here was already returning immediately as
> expected, but the sysfs commit started adding additional steps in the
> middle.

that was indeed the first bad case. I replaced the fixes while
pushing the patch. Thanks for the correction.

> 
> Anyway,
> 
> Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
> 
> > Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> > Cc: Matt Roper <matthew.d.roper at intel.com>
> > Cc: Matthew Auld <matthew.auld at intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> > ---
> >  drivers/gpu/drm/xe/xe_tile.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
> > index 044c20881de7..0650b2fa75ef 100644
> > --- a/drivers/gpu/drm/xe/xe_tile.c
> > +++ b/drivers/gpu/drm/xe/xe_tile.c
> > @@ -167,9 +167,10 @@ int xe_tile_init_noalloc(struct xe_tile *tile)
> >  		goto err_mem_access;
> >  
> >  	tile->mem.kernel_bb_pool = xe_sa_bo_manager_init(tile, SZ_1M, 16);
> > -	if (IS_ERR(tile->mem.kernel_bb_pool))
> > +	if (IS_ERR(tile->mem.kernel_bb_pool)) {
> >  		err = PTR_ERR(tile->mem.kernel_bb_pool);
> > -
> > +		goto err_mem_access;
> > +	}
> >  	xe_wa_apply_tile_workarounds(tile);
> >  
> >  	xe_tile_sysfs_init(tile);
> > -- 
> > 2.43.2
> > 
> 
> -- 
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation


More information about the Intel-xe mailing list