[PATCH v4 6/7] drm/xe/tile: Abort driver load for sysfs creation failure

Lucas De Marchi lucas.demarchi at intel.com
Thu Apr 18 15:02:00 UTC 2024


On Fri, Apr 12, 2024 at 11:42:10PM GMT, Himal Prasad Ghimiray wrote:
>Ensure that the status of all tile associated sysfs entries creation is
>relayed to xe_tile_init_noalloc, leading to a driver load abort if any
>sysfs creation failures occur.
>
>-v2
>Avoid unnecessary warn/error messages. (Lucas)
>
>Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
>Cc: Lucas De Marchi <lucas.demarchi at intel.com>
>Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
>---
> drivers/gpu/drm/xe/xe_tile.c       |  2 +-
> drivers/gpu/drm/xe/xe_tile_sysfs.c | 16 +++++++---------
> drivers/gpu/drm/xe/xe_tile_sysfs.h |  2 +-
> drivers/gpu/drm/xe/xe_vram_freq.c  | 20 ++++++++------------
> drivers/gpu/drm/xe/xe_vram_freq.h  |  2 +-
> 5 files changed, 18 insertions(+), 24 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
>index 0650b2fa75ef..409cf55aa8a1 100644
>--- a/drivers/gpu/drm/xe/xe_tile.c
>+++ b/drivers/gpu/drm/xe/xe_tile.c
>@@ -173,7 +173,7 @@ int xe_tile_init_noalloc(struct xe_tile *tile)
> 	}
> 	xe_wa_apply_tile_workarounds(tile);
>
>-	xe_tile_sysfs_init(tile);
>+	err = xe_tile_sysfs_init(tile);
>
> err_mem_access:
> 	xe_device_mem_access_put(tile_to_xe(tile));
>diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.c b/drivers/gpu/drm/xe/xe_tile_sysfs.c
>index 237a0761d3ad..e1bfe0e4257d 100644
>--- a/drivers/gpu/drm/xe/xe_tile_sysfs.c
>+++ b/drivers/gpu/drm/xe/xe_tile_sysfs.c
>@@ -29,7 +29,7 @@ static void tile_sysfs_fini(struct drm_device *drm, void *arg)
> 	kobject_put(tile->sysfs);
> }
>
>-void xe_tile_sysfs_init(struct xe_tile *tile)
>+int  xe_tile_sysfs_init(struct xe_tile *tile)

      ^ extra space here

if we don't need a new version for other reasons, no need to respin... I
can fixup this whitespace while applying.

thanks
Lucas De Marchi


More information about the Intel-xe mailing list