Re: [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-14 Thread Andrzej Hajda
On 13.03.2022 20:45, Andi Shyti wrote: Hi Andrzej, I'm sorry, but I'm not fully understanding, +struct intel_gt *intel_gt_sysfs_get_drvdata(struct device *dev, + const char *name) +{ + struct kobject *kobj = >kobj; + + /* +* We

Re: [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-13 Thread Andi Shyti
> > > > > +struct intel_gt *intel_gt_sysfs_get_drvdata(struct device *dev, > > > > > + const char *name) > > > > > +{ > > > > > + struct kobject *kobj = >kobj; > > > > > + > > > > > + /* > > > > > + * We are interested at knowing from where the

Re: [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-13 Thread Andi Shyti
Hi Andrzej, I'm sorry, but I'm not fully understanding, > > > > +struct intel_gt *intel_gt_sysfs_get_drvdata(struct device *dev, > > > > + const char *name) > > > > +{ > > > > + struct kobject *kobj = >kobj; > > > > + > > > > + /* > > > > +

Re: [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-07 Thread Andrzej Hajda
On 07.03.2022 00:04, Andi Shyti wrote: Hi Andrzej, [...] +bool is_object_gt(struct kobject *kobj) +{ + return !strncmp(kobj->name, "gt", 2); +} It looks quite fragile, at the moment I do not have better idea:) maybe after reviewing the rest of the patches. yeah... it's not pretty,

Re: [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-06 Thread Andi Shyti
Hi Andrzej, [...] > > +bool is_object_gt(struct kobject *kobj) > > +{ > > + return !strncmp(kobj->name, "gt", 2); > > +} > > It looks quite fragile, at the moment I do not have better idea:) maybe > after reviewing the rest of the patches. yeah... it's not pretty, I agree, but I couldn't

Re: [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-02 Thread Andrzej Hajda
On 17.02.2022 15:41, Andi Shyti wrote: Now that we have tiles we want each of them to have its own interface. A directory "gt/" is created under "cardN/" that will contain as many diroctories as the tiles. In the coming patches tile related interfaces will be added. For now the sysfs gt

[PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-02-17 Thread Andi Shyti
Now that we have tiles we want each of them to have its own interface. A directory "gt/" is created under "cardN/" that will contain as many diroctories as the tiles. In the coming patches tile related interfaces will be added. For now the sysfs gt structure simply has an id interface related to