[PATCH 5/7] drm/xe: Cleanup unwind of gt initialization
Raag Jadav
raag.jadav at intel.com
Sat Feb 1 06:24:50 UTC 2025
On Fri, Jan 31, 2025 at 02:31:38PM -0800, Lucas De Marchi wrote:
> Move the xe_gt_remove() to be handled by xe_gt.c itself so the caller,
> xe_device_probe() doesn't have to unwind the gt loop. It's also more in
> line with the xe_device_probe() style.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
> drivers/gpu/drm/xe/xe_device.c | 21 ++-----------------
> drivers/gpu/drm/xe/xe_gt.c | 37 ++++++++++++++++------------------
> drivers/gpu/drm/xe/xe_gt.h | 1 -
> 3 files changed, 19 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index e519f435b1606..bea626f6b4cbf 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -743,7 +743,6 @@ int xe_device_probe(struct xe_device *xe)
> struct xe_tile *tile;
> struct xe_gt *gt;
> int err;
> - u8 last_gt;
> u8 id;
>
> xe_pat_init_early(xe);
> @@ -851,18 +850,16 @@ int xe_device_probe(struct xe_device *xe)
> return err;
>
> for_each_gt(gt, xe, id) {
> - last_gt = id;
> -
> err = xe_gt_init(gt);
> if (err)
> - goto err_fini_gt;
> + return err;
So it's either all or nothing? Can't we operate with atleast what we have?
Raag
More information about the Intel-xe
mailing list