From: Riana Tauro <riana.tauro@intel.com>
To: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: rodrigo.vivi@intel.com
Subject: Re: [Intel-xe] [PATCH 1/2] drm/xe: Add a new memory direcory under tile
Date: Mon, 27 Nov 2023 16:18:05 +0530 [thread overview]
Message-ID: <196f822e-415b-4333-b4d3-e2245bd2bedc@intel.com> (raw)
In-Reply-To: <20231124122755.91279-2-sujaritha.sundaresan@intel.com>
Hi Suja
Typo in subject
%s/direcory/directory
Thanks
Riana
On 11/24/2023 5:57 PM, Sujaritha Sundaresan wrote:
> Add a new memory directory under /device/tile<n> and move
> physical_vram_size attribute to the new directory.
>
> New hierarchy:
>
> /device/tile<n>/memory/physical_vram_size_bytes
>
> Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
> ---
> drivers/gpu/drm/xe/xe_tile_sysfs.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_tile_sysfs.c b/drivers/gpu/drm/xe/xe_tile_sysfs.c
> index 16376607c68f..f354c8b2bfc6 100644
> --- a/drivers/gpu/drm/xe/xe_tile_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_tile_sysfs.c
> @@ -24,7 +24,8 @@ static ssize_t
> physical_vram_size_bytes_show(struct device *kdev, struct device_attribute *attr,
> char *buf)
> {
> - struct xe_tile *tile = kobj_to_tile(&kdev->kobj);
> + struct kobject *kobj = &kdev->kobj;
> + struct xe_tile *tile = kobj_to_tile(kobj->parent);
>
> return sysfs_emit(buf, "%llu\n", tile->mem.vram.actual_physical_size);
> }
> @@ -46,6 +47,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 +66,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");
>
next prev parent reply other threads:[~2023-11-27 10:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 12:27 [Intel-xe] [PATCH 0/2] Add memory sysfs directory and attributes Sujaritha Sundaresan
2023-11-24 12:27 ` [Intel-xe] [PATCH 1/2] drm/xe: Add a new memory direcory under tile Sujaritha Sundaresan
2023-11-27 10:48 ` Riana Tauro [this message]
2023-11-27 10:50 ` Sundaresan, Sujaritha
2023-11-24 12:27 ` [Intel-xe] [PATCH 2/2] drm/xe: Add vram frequency sysfs attributes Sujaritha Sundaresan
2023-11-27 10:00 ` Riana Tauro
2023-11-27 10:16 ` Sundaresan, Sujaritha
2023-11-27 10:20 ` Sundaresan, Sujaritha
2023-11-27 16:36 ` Dixit, Ashutosh
2023-11-28 3:23 ` Sundaresan, Sujaritha
2023-11-24 13:26 ` [Intel-xe] ✓ CI.Patch_applied: success for Add memory sysfs directory and attributes Patchwork
2023-11-24 13:26 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-11-24 13:27 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-11-24 13:34 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-24 13:35 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-24 13:36 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-24 14: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=196f822e-415b-4333-b4d3-e2245bd2bedc@intel.com \
--to=riana.tauro@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=sujaritha.sundaresan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox