From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH v4 05/11] drm/xe/configfs: Rename struct xe_config_device
Date: Mon, 28 Jul 2025 15:54:38 -0400 [thread overview]
Message-ID: <aIfVfqGZenHMeJaO@intel.com> (raw)
In-Reply-To: <20250727172009.587-6-michal.wajdeczko@intel.com>
On Sun, Jul 27, 2025 at 07:20:02PM +0200, Michal Wajdeczko wrote:
> Rename it to struct xe_config_group_device to better match its
> purpose. It will also help us to reintroduce in the upcoming patch
> the same struct name but this time to hold only configuration data.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/xe/xe_configfs.c | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
> index e32517afae58..edd52b8f0543 100644
> --- a/drivers/gpu/drm/xe/xe_configfs.c
> +++ b/drivers/gpu/drm/xe/xe_configfs.c
> @@ -89,7 +89,7 @@
> * Use xe_configfs.su_mutex (also accessible from group.cg_subsys->su_mutex)
> * to protect configuration data.
> */
> -struct xe_config_device {
> +struct xe_config_group_device {
> struct config_group group;
>
> bool survivability_mode;
> @@ -114,21 +114,21 @@ static const struct engine_info engine_info[] = {
> { .cls = "gsccs", .mask = XE_HW_ENGINE_GSCCS_MASK },
> };
>
> -static struct xe_config_device *to_xe_config_device(struct config_item *item)
> +static struct xe_config_group_device *to_xe_config_group_device(struct config_item *item)
> {
> - return container_of(to_config_group(item), struct xe_config_device, group);
> + return container_of(to_config_group(item), struct xe_config_group_device, group);
> }
>
> static ssize_t survivability_mode_show(struct config_item *item, char *page)
> {
> - struct xe_config_device *dev = to_xe_config_device(item);
> + struct xe_config_group_device *dev = to_xe_config_group_device(item);
>
> return sprintf(page, "%d\n", dev->survivability_mode);
> }
>
> static ssize_t survivability_mode_store(struct config_item *item, const char *page, size_t len)
> {
> - struct xe_config_device *dev = to_xe_config_device(item);
> + struct xe_config_group_device *dev = to_xe_config_group_device(item);
> bool survivability_mode;
> int ret;
>
> @@ -144,7 +144,7 @@ static ssize_t survivability_mode_store(struct config_item *item, const char *pa
>
> static ssize_t engines_allowed_show(struct config_item *item, char *page)
> {
> - struct xe_config_device *dev = to_xe_config_device(item);
> + struct xe_config_group_device *dev = to_xe_config_group_device(item);
> char *p = page;
>
> for (size_t i = 0; i < ARRAY_SIZE(engine_info); i++) {
> @@ -199,7 +199,7 @@ static bool lookup_engine_mask(const char *pattern, u64 *mask)
> static ssize_t engines_allowed_store(struct config_item *item, const char *page,
> size_t len)
> {
> - struct xe_config_device *dev = to_xe_config_device(item);
> + struct xe_config_group_device *dev = to_xe_config_group_device(item);
> size_t patternlen, p;
> u64 mask, val = 0;
>
> @@ -236,7 +236,7 @@ static struct configfs_attribute *xe_config_device_attrs[] = {
>
> static void xe_config_device_release(struct config_item *item)
> {
> - struct xe_config_device *dev = to_xe_config_device(item);
> + struct xe_config_group_device *dev = to_xe_config_group_device(item);
>
> kfree(dev);
> }
> @@ -255,7 +255,7 @@ static struct config_group *xe_config_make_device_group(struct config_group *gro
> const char *name)
> {
> unsigned int domain, bus, slot, function;
> - struct xe_config_device *dev;
> + struct xe_config_group_device *dev;
> struct pci_dev *pdev;
> char canonical[16];
> int ret;
> @@ -305,7 +305,7 @@ static struct configfs_subsystem xe_configfs = {
> },
> };
>
> -static struct xe_config_device *configfs_find_group(struct pci_dev *pdev)
> +static struct xe_config_group_device *configfs_find_group(struct pci_dev *pdev)
> {
> guard(mutex)(&xe_configfs.su_mutex);
> struct config_item *item;
> @@ -314,7 +314,7 @@ static struct xe_config_device *configfs_find_group(struct pci_dev *pdev)
> if (!item)
> return NULL;
>
> - return to_xe_config_device(item);
> + return to_xe_config_group_device(item);
> }
>
> /**
> @@ -328,7 +328,7 @@ static struct xe_config_device *configfs_find_group(struct pci_dev *pdev)
> */
> bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
> {
> - struct xe_config_device *dev = configfs_find_group(pdev);
> + struct xe_config_group_device *dev = configfs_find_group(pdev);
> bool mode;
>
> if (!dev)
> @@ -349,7 +349,7 @@ bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
> */
> void xe_configfs_clear_survivability_mode(struct pci_dev *pdev)
> {
> - struct xe_config_device *dev = configfs_find_group(pdev);
> + struct xe_config_group_device *dev = configfs_find_group(pdev);
>
> if (!dev)
> return;
> @@ -371,7 +371,7 @@ void xe_configfs_clear_survivability_mode(struct pci_dev *pdev)
> */
> u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev)
> {
> - struct xe_config_device *dev = configfs_find_group(pdev);
> + struct xe_config_group_device *dev = configfs_find_group(pdev);
> u64 engines_allowed;
>
> if (!dev)
> --
> 2.47.1
>
next prev parent reply other threads:[~2025-07-28 19:55 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-27 17:19 [PATCH v4 00/11] Updates for drm/xe/configfs Michal Wajdeczko
2025-07-27 17:19 ` [PATCH v4 01/11] drm/xe: Simplify module initialization code Michal Wajdeczko
2025-07-28 19:35 ` Rodrigo Vivi
2025-07-28 19:47 ` Michal Wajdeczko
2025-07-28 20:00 ` Rodrigo Vivi
2025-07-28 23:52 ` John Harrison
2025-07-29 8:39 ` Michal Wajdeczko
2025-07-27 17:19 ` [PATCH v4 02/11] drm/xe: Print module init abort code Michal Wajdeczko
2025-07-28 19:39 ` Rodrigo Vivi
2025-07-28 19:51 ` Michal Wajdeczko
2025-07-28 19:59 ` Rodrigo Vivi
2025-07-27 17:20 ` [PATCH v4 03/11] drm/xe/configfs: Destroy xe_configfs.su_mutex on exit/error Michal Wajdeczko
2025-07-28 19:42 ` Rodrigo Vivi
2025-07-27 17:20 ` [PATCH v4 04/11] drm/xe/configfs: Use mutex from xe_configfs subsystem Michal Wajdeczko
2025-07-28 19:50 ` Rodrigo Vivi
2025-07-28 19:55 ` Michal Wajdeczko
2025-07-27 17:20 ` [PATCH v4 05/11] drm/xe/configfs: Rename struct xe_config_device Michal Wajdeczko
2025-07-28 19:54 ` Rodrigo Vivi [this message]
2025-07-27 17:20 ` [PATCH v4 06/11] drm/xe/configfs: Rename configfs_find_group() helper Michal Wajdeczko
2025-07-28 19:57 ` Rodrigo Vivi
2025-07-27 17:20 ` [PATCH v4 07/11] drm/xe/configfs: Reintroduce struct xe_config_device Michal Wajdeczko
2025-07-29 0:06 ` John Harrison
2025-07-27 17:20 ` [PATCH v4 08/11] drm/xe/configfs: Keep default device config settings together Michal Wajdeczko
2025-07-29 0:07 ` John Harrison
2025-07-27 17:20 ` [PATCH v4 09/11] drm/xe/configfs: Check if device was preconfigured Michal Wajdeczko
2025-07-29 0:11 ` John Harrison
2025-07-27 17:20 ` [PATCH v4 10/11] drm/xe/configfs: Only allow configurations for supported devices Michal Wajdeczko
2025-07-27 17:20 ` [PATCH v4 11/11] drm/xe/configfs: Allow adding configurations for future VFs Michal Wajdeczko
2025-07-27 17:28 ` ✓ CI.KUnit: success for Updates for drm/xe/configfs (rev5) Patchwork
2025-07-27 18:07 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-27 19:09 ` ✓ Xe.CI.Full: " 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=aIfVfqGZenHMeJaO@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=michal.wajdeczko@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.