[Intel-xe] [PATCH 3/3] drm/xe: Add sysfs entry to report per gt memory size

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri May 5 18:03:46 UTC 2023


On Fri, 05 May 2023 07:40:33 -0700, Rodrigo Vivi wrote:
>
> > > > @@ -50,9 +114,15 @@ int xe_gt_sysfs_init(struct xe_gt *gt)
> > > >
> > > >		gt->sysfs = &kg->base;
> > > >
> > > > +	gt->sysfs_defaults = kobject_create_and_add(".defaults", gt->sysfs);
> > >
> > > what is the use of defaults??
> >
> > No use. There is no use I saw in i915 as well. But may be for some
> > future use it is kept. Or I missed something. If want to remove, can be
> > removed on objections.
>
> Cc: Ashutosh
>
> The defaults is used in i915 so Level-0/Sysman can perform the
> restore_defaults operation.
>
> I believe it is a useful feature...

Yeah for RW sysfs attributes, i915 had the convention of exposing default
values in /sys/class/.../.defaults (look at intel_gt_sysfs.c and
sysfs_engines.c) so userland can restore default values if sysfs attributes
had been previously modified. Level 0 was doing this in some cases.

For xe, we can do the same or something different I guess.

Also, are we going to re-create sysfs as done in this series or use
something like hwmon (it was being debated)?

Thanks.
--
Ashutosh


More information about the Intel-xe mailing list