Commit 8c82f914 authored by Tejas Upadhyay's avatar Tejas Upadhyay Committed by Rodrigo Vivi

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 more GTs (struct xe_gt).
So lets align sysfs paths accordingly.

TODO: Currently we have gt0 under tile0 and gt1 under tile1
on multi-tile. This GT indexing still under discussion, when
it is concluded we need to revisit this change.
Reviewed-by: default avatarAravind Iddamsetty <aravind.iddamsetty@intel.com>
Signed-off-by: default avatarTejas Upadhyay <tejas.upadhyay@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent e5a845fd
...@@ -31,7 +31,7 @@ static void gt_sysfs_fini(struct drm_device *drm, void *arg) ...@@ -31,7 +31,7 @@ static void gt_sysfs_fini(struct drm_device *drm, void *arg)
int xe_gt_sysfs_init(struct xe_gt *gt) 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; struct kobj_gt *kg;
int err; int err;
...@@ -42,7 +42,7 @@ int xe_gt_sysfs_init(struct xe_gt *gt) ...@@ -42,7 +42,7 @@ int xe_gt_sysfs_init(struct xe_gt *gt)
kobject_init(&kg->base, &xe_gt_sysfs_kobj_type); kobject_init(&kg->base, &xe_gt_sysfs_kobj_type);
kg->gt = gt; 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);
if (err) { if (err) {
kobject_put(&kg->base); kobject_put(&kg->base);
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment