From: John Harrison <john.c.harrison@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [PATCH v4 08/11] drm/xe/configfs: Keep default device config settings together
Date: Mon, 28 Jul 2025 17:07:58 -0700 [thread overview]
Message-ID: <93a0db14-148a-4ab0-9f9f-7e07dfd80d16@intel.com> (raw)
In-Reply-To: <20250727172009.587-9-michal.wajdeczko@intel.com>
On 7/27/2025 10:20 AM, Michal Wajdeczko wrote:
> For easier maintenance add a placeholder where we can keep all
> default device configuration settings in one place.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
> ---
> drivers/gpu/drm/xe/xe_configfs.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c
> index a5f13dd779c7..60d89d3ef656 100644
> --- a/drivers/gpu/drm/xe/xe_configfs.c
> +++ b/drivers/gpu/drm/xe/xe_configfs.c
> @@ -98,6 +98,16 @@ struct xe_config_group_device {
> } config;
> };
>
> +static struct xe_config_device device_defaults = {
> + .survivability_mode = false,
> + .engines_allowed = U64_MAX,
> +};
> +
> +static void set_device_defaults(struct xe_config_device *config)
> +{
> + *config = device_defaults;
> +}
> +
> struct engine_info {
> const char *cls;
> u64 mask;
> @@ -286,8 +296,7 @@ static struct config_group *xe_config_make_device_group(struct config_group *gro
> if (!dev)
> return ERR_PTR(-ENOMEM);
>
> - /* Default values */
> - dev->config.engines_allowed = U64_MAX;
> + set_device_defaults(&dev->config);
>
> config_group_init_type_name(&dev->group, name, &xe_config_device_type);
>
> @@ -339,7 +348,7 @@ bool xe_configfs_get_survivability_mode(struct pci_dev *pdev)
> bool mode;
>
> if (!dev)
> - return false;
> + return device_defaults.survivability_mode;
>
> mode = dev->config.survivability_mode;
> config_group_put(&dev->group);
> @@ -382,7 +391,7 @@ u64 xe_configfs_get_engines_allowed(struct pci_dev *pdev)
> u64 engines_allowed;
>
> if (!dev)
> - return U64_MAX;
> + return device_defaults.engines_allowed;
>
> engines_allowed = dev->config.engines_allowed;
> config_group_put(&dev->group);
next prev parent reply other threads:[~2025-07-29 0:08 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
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 [this message]
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=93a0db14-148a-4ab0-9f9f-7e07dfd80d16@intel.com \
--to=john.c.harrison@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.