All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sundaresan, Sujaritha" <sujaritha.sundaresan@intel.com>
To: "Welty, Brian" <brian.welty@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-xe@lists.freedesktop.org, vivi.rodrigo@intel.com
Subject: Re: [Intel-xe] [RFC 2/4] drm/xe: Add memory directory for vram attributes
Date: Wed, 22 Nov 2023 14:06:41 +0530	[thread overview]
Message-ID: <ba3816ef-c9b0-4286-b2ce-fb8f4b6de6fa@intel.com> (raw)
In-Reply-To: <165bdc38-a10c-4bc4-8a51-40c15e6cbc7d@intel.com>


On 11/18/2023 6:55 AM, Welty, Brian wrote:
>
>
> On 11/17/2023 1:37 PM, Rodrigo Vivi wrote:
>> On Thu, Nov 16, 2023 at 08:00:41PM +0530, Sujaritha Sundaresan wrote:
>>> Adding a new "memory" directory under for vram attributes
>>> under the exisiting tile<n> directory.
>>>
>>> Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
>>
>> Cc: Brian Welty <brian.welty@intel.com>
>>
>> Brian, should this directory be under the tile, or maybe we create
>> separated xe_vram_sysfs components for
>>
>> /sys/..../device/vram<n>
>>
>> and then if it makes sense inside the tile we just have a symbolic
>> link between them?
>
> Oh. Good question. Seems reasonable to me to have vram<n> in both 
> places as you suggest.
>
>>
>> Or better for now go with what Suja suggested and then later adjust
>> with symbolic links if needed?
>
> Yeah, maybe defer doing anything here until later...
>
> But let me ask....
> Was it considered to make the sysfs hierarchy more flat?
>
> Could also go with -
> /sys/..../device/gt<n>
> and:
> /sys/..../device/vram<n>
>
> and remove 'tile' directory?
>
> Could add:
> /sys/..../device/gt<n>/tile
> /sys/..../device/vram<n>/tile
> if feel is important to communicate which tile they are in.
>
> I don't know, just an idea.  Feel free to ignore.
>
> -Brian
>
I think for now I'll just have the /tile/memory and then add a sub 
directory for frequency

under memory for any vram frequency attributes.

Thanks,

Suja

>
>>
>>> ---
>>>   drivers/gpu/drm/xe/xe_tile_sysfs.c | 9 ++++++++-
>>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.c 
>>> b/drivers/gpu/drm/xe/xe_tile_sysfs.c
>>> index 16376607c68f..d61c6fb1df40 100644
>>> --- a/drivers/gpu/drm/xe/xe_tile_sysfs.c
>>> +++ b/drivers/gpu/drm/xe/xe_tile_sysfs.c
>>> @@ -46,6 +46,7 @@ void xe_tile_sysfs_init(struct xe_tile *tile)
>>>       struct xe_device *xe = tile_to_xe(tile);
>>>       struct device *dev = xe->drm.dev;
>>>       struct kobj_tile *kt;
>>> +    struct kobject *kobj;
>>>       int err;
>>>         kt = kzalloc(sizeof(*kt), GFP_KERNEL);
>>> @@ -64,8 +65,14 @@ void xe_tile_sysfs_init(struct xe_tile *tile)
>>>         tile->sysfs = &kt->base;
>>>   +    kobj = kobject_create_and_add("memory", tile->sysfs);
>>> +    if (!kobj) {
>>> +        drm_warn(&xe->drm, "%s failed, err: %d\n", __func__, -ENOMEM);
>>> +        return;
>>> +    }
>>> +
>>>       if (IS_DGFX(xe) && xe->info.platform != XE_DG1 &&
>>> -        sysfs_create_file(tile->sysfs, physical_memsize_attr))
>>> +        sysfs_create_file(kobj, physical_memsize_attr))
>>>           drm_warn(&xe->drm,
>>>                "Sysfs creation to read addr_range per tile failed\n");
>>>   --
>>> 2.25.1
>>>

  reply	other threads:[~2023-11-22  8:37 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 14:30 [Intel-xe] [RFC 0/4] Adding new frequency sysfs attributes Sujaritha Sundaresan
2023-11-16 14:20 ` [Intel-xe] ✗ CI.Patch_applied: failure for " Patchwork
2023-11-16 14:30 ` [Intel-xe] [RFC 1/4] drm/xe: Moving and renaming existing " Sujaritha Sundaresan
2023-11-21  4:12   ` Dixit, Ashutosh
2023-11-21  4:50   ` Riana Tauro
2023-11-21  4:58     ` Dixit, Ashutosh
2023-11-22  8:25       ` Sundaresan, Sujaritha
2023-11-22 14:32         ` Gupta, Anshuman
2023-11-16 14:30 ` [Intel-xe] [RFC 2/4] drm/xe: Add memory directory for vram attributes Sujaritha Sundaresan
2023-11-17 21:37   ` Rodrigo Vivi
2023-11-18  1:25     ` Welty, Brian
2023-11-22  8:36       ` Sundaresan, Sujaritha [this message]
2023-11-22  8:37       ` Sundaresan, Sujaritha
2023-11-16 14:30 ` [Intel-xe] [RFC 3/4] drm/xe: Add throttle reasons sysfs attributes Sujaritha Sundaresan
2023-11-17 21:41   ` Rodrigo Vivi
2023-11-20  3:33     ` Sundaresan, Sujaritha
2023-11-22  8:33     ` Sundaresan, Sujaritha
2023-11-16 14:30 ` [Intel-xe] [RFC 4/4] drm/xe: Add vram frequency " Sujaritha Sundaresan
2023-11-17 21:43   ` Rodrigo Vivi
2023-11-18  2:24 ` [Intel-xe] ✓ CI.Patch_applied: success for Adding new " Patchwork
2023-11-18  2:24 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-11-18  2:25 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-11-18  2:32 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-18  2:33 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-18  2:34 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-18  3:12 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba3816ef-c9b0-4286-b2ce-fb8f4b6de6fa@intel.com \
    --to=sujaritha.sundaresan@intel.com \
    --cc=brian.welty@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=vivi.rodrigo@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.