All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v6 06/11] drm/xe/configfs: Rename configfs_find_group() helper
Date: Tue, 5 Aug 2025 16:30:14 +0200	[thread overview]
Message-ID: <c352ab94-58be-4e5c-8bf6-76444b34cff3@intel.com> (raw)
In-Reply-To: <auhnqzxjtfo2pnczckmzuhk5b3ydpuwyayroxsa4s6ydkg4vzk@l7fp3c7pf4b5>



On 8/5/2025 3:14 PM, Lucas De Marchi wrote:
> On Thu, Jul 31, 2025 at 09:33:34PM +0200, Michal Wajdeczko wrote:
>> This helper name shouldn't suggest that it iss a part of the core
>> configfs API family. While around switch to use different helper
>> to release a reference.
>>
>> 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 | 14 +++++++-------
>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
>> index d69b5f248e59..acdee616d118 100644
>> --- a/drivers/gpu/drm/xe/xe_configfs.c
>> +++ b/drivers/gpu/drm/xe/xe_configfs.c
>> @@ -309,7 +309,7 @@ static struct configfs_subsystem xe_configfs = {
>>     },
>> };
>>
>> -static struct xe_config_group_device *configfs_find_group(struct pci_dev *pdev)
>> +static struct xe_config_group_device *find_xe_config_group_device(struct pci_dev *pdev)
>> {
>>     struct config_item *item;
>>
>> @@ -334,14 +334,14 @@ static struct xe_config_group_device *configfs_find_group(struct pci_dev *pdev)
>>  */
>> bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
>> {
>> -    struct xe_config_group_device *dev = configfs_find_group(pdev);
>> +    struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
> 
> looking at this now, I think it would make more sense to call them,
> differently, which would affect the previous patches too:
> 
>     struct xe_config_group *grp = find_xe_config_group(pdev);
> 
> and:
> 
>     struct xe_config_group {
>         struct config_group base;
>         ...
>     };

I was assuming that one day we would like to add some config
groups that will target "tile" or "GT", unlike simple "device"
as it was introduced today, so we would have 

* xe_device <-> xe_device_config <-> xe_device_config_group
* xe_tile   <-> xe_tile_config   <-> xe_tile_config_group
* xe_gt     <-> xe_gt_config     <-> xe_gt_config_group

but I guess simplified name works too

* xe_device <-> xe_config        <-> xe_config_group

(I can rename, but no earlier than 2w from now)

> 
> but I'm ok with what you did here.
> 
> Lucas De Marchi
> 
>>     bool mode;
>>
>>     if (!dev)
>>         return false;
>>
>>     mode = dev->survivability_mode;
>> -    config_item_put(&dev->group.cg_item);
>> +    config_group_put(&dev->group);
>>
>>     return mode;
>> }
>> @@ -355,7 +355,7 @@ bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
>>  */
>> void xe_configfs_clear_survivability_mode(struct pci_dev *pdev)
>> {
>> -    struct xe_config_group_device *dev = configfs_find_group(pdev);
>> +    struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
>>
>>     if (!dev)
>>         return;
>> @@ -364,7 +364,7 @@ void xe_configfs_clear_survivability_mode(struct pci_dev *pdev)
>>     dev->survivability_mode = 0;
>>     mutex_unlock(&dev->lock);
>>
>> -    config_item_put(&dev->group.cg_item);
>> +    config_group_put(&dev->group);
>> }
>>
>> /**
>> @@ -378,14 +378,14 @@ void xe_configfs_clear_survivability_mode(struct pci_dev *pdev)
>>  */
>> u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev)
>> {
>> -    struct xe_config_group_device *dev = configfs_find_group(pdev);
>> +    struct xe_config_group_device *dev = find_xe_config_group_device(pdev);
>>     u64 engines_allowed;
>>
>>     if (!dev)
>>         return U64_MAX;
>>
>>     engines_allowed = dev->engines_allowed;
>> -    config_item_put(&dev->group.cg_item);
>> +    config_group_put(&dev->group);
>>
>>     return engines_allowed;
>> }
>> -- 
>> 2.47.1
>>


  reply	other threads:[~2025-08-05 14:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31 19:33 [PATCH v6 00/11] Updates for drm/xe/configfs Michal Wajdeczko
2025-07-31 19:33 ` [PATCH v6 01/11] drm/xe: Simplify module initialization code Michal Wajdeczko
2025-07-31 19:33 ` [PATCH v6 02/11] drm/xe: Print module init abort code Michal Wajdeczko
2025-07-31 19:33 ` [PATCH v6 03/11] drm/xe/configfs: Destroy xe_configfs.su_mutex on exit/error Michal Wajdeczko
2025-07-31 19:33 ` [PATCH v6 04/11] drm/xe/configfs: Drop redundant init() error message Michal Wajdeczko
2025-07-31 19:33 ` [PATCH v6 05/11] drm/xe/configfs: Rename struct xe_config_device Michal Wajdeczko
2025-07-31 19:33 ` [PATCH v6 06/11] drm/xe/configfs: Rename configfs_find_group() helper Michal Wajdeczko
2025-08-05 13:14   ` Lucas De Marchi
2025-08-05 14:30     ` Michal Wajdeczko [this message]
2025-07-31 19:33 ` [PATCH v6 07/11] drm/xe/configfs: Reintroduce struct xe_config_device Michal Wajdeczko
2025-07-31 19:33 ` [PATCH v6 08/11] drm/xe/configfs: Keep default device config settings together Michal Wajdeczko
2025-08-05 13:28   ` Lucas De Marchi
2025-08-05 15:09     ` Michal Wajdeczko
2025-08-06 14:29       ` Lucas De Marchi
2025-07-31 19:33 ` [PATCH v6 09/11] drm/xe/configfs: Check if device was preconfigured Michal Wajdeczko
2025-08-05 19:30   ` Lucas De Marchi
2025-08-05 23:14     ` John Harrison
2025-08-06 14:49       ` Lucas De Marchi
2025-07-31 19:33 ` [PATCH v6 10/11] drm/xe/configfs: Only allow configurations for supported devices Michal Wajdeczko
2025-07-31 20:35   ` Rodrigo Vivi
2025-07-31 19:33 ` [PATCH v6 11/11] drm/xe/configfs: Allow adding configurations for future VFs Michal Wajdeczko
2025-07-31 20:37   ` Rodrigo Vivi
2025-07-31 21:21   ` [PATCH v7 " Michal Wajdeczko
2025-08-01  0:05 ` ✓ CI.KUnit: success for Updates for drm/xe/configfs (rev8) Patchwork
2025-08-01  1:08 ` ✓ Xe.CI.BAT: " Patchwork
2025-08-01  2:31 ` ✓ Xe.CI.Full: " Patchwork
2025-08-05 19:44 ` [PATCH v6 00/11] Updates for drm/xe/configfs Lucas De Marchi

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=c352ab94-58be-4e5c-8bf6-76444b34cff3@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@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.