[Intel-xe] [PATCH 2/3] drm/xe: Add GTs under respective tile sysfs

Ghimiray, Himal Prasad himal.prasad.ghimiray at intel.com
Tue Jun 6 11:50:45 UTC 2023



> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of Tejas
> Upadhyay
> Sent: 06 June 2023 16:43
> To: intel-xe at lists.freedesktop.org
> Subject: [Intel-xe] [PATCH 2/3] drm/xe: Add GTs under respective tile sysfs
> 
> With the separation of xe_tile and xe_gt, We now consider a PCI device
> (xe_device) to contain one or more tiles (struct xe_tile).
> Each tile will contain one or two GTs (struct xe_gt).
> So lets align sysfs paths accordingly.
> 
> Signed-off-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_gt_sysfs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_gt_sysfs.c
> b/drivers/gpu/drm/xe/xe_gt_sysfs.c
> index c01cc689058c..13570987a756 100644
> --- a/drivers/gpu/drm/xe/xe_gt_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_gt_sysfs.c
> @@ -31,7 +31,7 @@ static void gt_sysfs_fini(struct drm_device *drm, void
> *arg)
> 
>  int xe_gt_sysfs_init(struct xe_gt *gt)
>  {
> -	struct device *dev = gt_to_xe(gt)->drm.dev;
> +	struct xe_tile *tile = gt_to_tile(gt);
>  	struct kobj_gt *kg;
>  	int err;
> 
> @@ -42,7 +42,7 @@ int xe_gt_sysfs_init(struct xe_gt *gt)
>  	kobject_init(&kg->base, &xe_gt_sysfs_kobj_type);
>  	kg->gt = gt;
> 
> -	err = kobject_add(&kg->base, &dev->kobj, "gt%d", gt->info.id);
> +	err = kobject_add(&kg->base, tile->sysfs, "gt%d", gt->info.id);
We need to address exposing of tiles number from device query ioctl and 
the proper dereferencing of gt wrt tile from IGT. Otherwise all current testcases will fail.
>  	if (err) {
>  		kobject_put(&kg->base);
>  		return err;
> --
> 2.25.1



More information about the Intel-xe mailing list