From: Andi Shyti <andi.shyti@linux.intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>
Cc: linux-hwmon@vger.kernel.org, intel-xe@lists.freedesktop.org,
linux@roeck-us.net
Subject: Re: [Intel-xe] [PATCH v2 5/6] drm/xe/hwmon: Expose hwmon energy attribute
Date: Thu, 29 Jun 2023 17:09:51 +0200 [thread overview]
Message-ID: <ZJ2ev5QkGFt/b6bq@ashyti-mobl2.lan> (raw)
In-Reply-To: <20230627183043.2024530-6-badal.nilawar@intel.com>
Hi Badal,
[...]
> @@ -614,12 +793,22 @@ void xe_hwmon_register(struct xe_device *xe)
>
> /* primary GT to access device level properties */
> ddat->gt = xe->tiles[0].primary_gt;
> +// ddat->gt = &xe->gt[0];
please clean it up before sending
> + ddat->gt_n = -1;
>
> ddat->hwmon = hwmon;
> snprintf(ddat->name, sizeof(ddat->name), "xe");
>
> init_waitqueue_head(&ddat->waitq);
>
> + for_each_gt(gt, xe, id) {
> + ddat_tile = hwmon->ddat_tile + id;
> + ddat_tile->hwmon = hwmon;
> + ddat_tile->gt = gt;
> + snprintf(ddat_tile->name, sizeof(ddat_tile->name), "xe_tile%u", id);
> + ddat_tile->gt_n = id;
> + }
> +
> hwm_get_preregistration_info(ddat);
>
> drm_dbg(&xe->drm, "Register xe hwmon interface\n");
> @@ -637,6 +826,23 @@ void xe_hwmon_register(struct xe_device *xe)
> }
>
> ddat->hwmon_dev = hwmon_dev;
> +
> + for_each_gt(gt, xe, id) {
you could eventually make a for_each_hwmon_gt()
Andi
> + ddat_tile = hwmon->ddat_tile + id;
> + /*
> + * Create per-gt directories only if a per-gt attribute is
> + * visible. Currently this is only energy
> + */
> + if (!hwm_gt_is_visible(ddat_tile, hwmon_energy, hwmon_energy_input, 0))
> + continue;
> +
> + hwmon_dev = devm_hwmon_device_register_with_info(dev, ddat_tile->name,
> + ddat_tile,
> + &hwm_gt_chip_info,
> + NULL);
> + if (!IS_ERR(hwmon_dev))
> + ddat_tile->hwmon_dev = hwmon_dev;
> + }
next prev parent reply other threads:[~2023-06-29 15:10 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 18:30 [Intel-xe] [PATCH v2 0/6] Add HWMON support for DGFX Badal Nilawar
2023-06-27 18:27 ` [Intel-xe] ✓ CI.Patch_applied: success for Add HWMON support for DGFX (rev2) Patchwork
2023-06-27 18:27 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-06-27 18:29 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-06-27 18:30 ` [Intel-xe] [PATCH v2 1/6] drm/xe/hwmon: Add HWMON infrastructure Badal Nilawar
2023-06-28 22:50 ` Matthew Brost
2023-07-05 18:30 ` Nilawar, Badal
2023-06-29 13:49 ` Andi Shyti
2023-07-07 14:23 ` Nilawar, Badal
2023-06-27 18:30 ` [Intel-xe] [PATCH v2 2/6] drm/xe/hwmon: Expose power attributes Badal Nilawar
2023-06-29 0:18 ` Matthew Brost
2023-06-29 14:09 ` Andi Shyti
2023-08-15 23:20 ` Dixit, Ashutosh
2023-08-18 4:03 ` Nilawar, Badal
2023-08-18 13:55 ` Andi Shyti
2023-07-06 10:36 ` Nilawar, Badal
2023-06-27 18:30 ` [Intel-xe] [PATCH v2 3/6] drm/xe/hwmon: Expose card reactive critical power Badal Nilawar
2023-06-28 15:52 ` Nilawar, Badal
2023-06-29 14:40 ` Andi Shyti
2023-07-06 19:05 ` Dixit, Ashutosh
2023-06-27 18:30 ` [Intel-xe] [PATCH v2 4/6] drm/xe/hwmon: Expose input voltage attribute Badal Nilawar
2023-06-29 14:58 ` Andi Shyti
2023-06-27 18:30 ` [Intel-xe] [PATCH v2 5/6] drm/xe/hwmon: Expose hwmon energy attribute Badal Nilawar
2023-06-29 15:09 ` Andi Shyti [this message]
2023-06-27 18:30 ` [Intel-xe] [PATCH v2 6/6] drm/xe/hwmon: Expose power1_max_interval Badal Nilawar
2023-06-27 18:32 ` [Intel-xe] ✓ CI.Build: success for Add HWMON support for DGFX (rev2) Patchwork
2023-06-27 18:33 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-07-02 1:31 ` [Intel-xe] [PATCH v2 0/6] Add HWMON support for DGFX Dixit, Ashutosh
2023-07-02 3:02 ` Guenter Roeck
2023-07-02 15:57 ` Dixit, Ashutosh
2023-07-02 17:01 ` Guenter Roeck
2023-07-02 20:29 ` Dixit, Ashutosh
2023-07-02 20:51 ` Guenter Roeck
2023-07-03 1:48 ` Dixit, Ashutosh
2023-07-03 2:37 ` Guenter Roeck
2023-07-14 20:21 ` Rodrigo Vivi
2023-07-14 22:26 ` Guenter Roeck
2023-07-19 17:01 ` Rodrigo Vivi
2023-07-03 8:55 ` Andi Shyti
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=ZJ2ev5QkGFt/b6bq@ashyti-mobl2.lan \
--to=andi.shyti@linux.intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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