Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/5] drm/xe: Keep all defaults in single header
Date: Tue, 3 Feb 2026 15:58:25 +0100	[thread overview]
Message-ID: <b1008074-df70-4267-9c98-91fb7957d1df@intel.com> (raw)
In-Reply-To: <716600dcc0dd91626f45eed2faadc6d80d456de9@intel.com>



On 2/3/2026 12:13 PM, Jani Nikula wrote:
> On Wed, 21 Jan 2026, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
>> We already have most of Xe defaults defined in xe_module.c,
>> where we use them for the modparam initializations, but some
>> were defined elsewhere, which breaks the consistency.
>>
>> Introduce xe_defaults.h file, that will act as a placeholder
>> for all our default values, and can be used from other places.
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> ---
>>  drivers/gpu/drm/xe/xe_defaults.h     | 25 +++++++++++++++++
>>  drivers/gpu/drm/xe/xe_device.c       |  3 +-
>>  drivers/gpu/drm/xe/xe_device_types.h |  3 --
>>  drivers/gpu/drm/xe/xe_module.c       | 42 ++++++++++------------------
>>  4 files changed, 41 insertions(+), 32 deletions(-)
>>  create mode 100644 drivers/gpu/drm/xe/xe_defaults.h
>>
>> diff --git a/drivers/gpu/drm/xe/xe_defaults.h b/drivers/gpu/drm/xe/xe_defaults.h
>> new file mode 100644
>> index 000000000000..9183d05b96e1
>> --- /dev/null
>> +++ b/drivers/gpu/drm/xe/xe_defaults.h
>> @@ -0,0 +1,25 @@
>> +/* SPDX-License-Identifier: MIT */
>> +/*
>> + * Copyright © 2026 Intel Corporation
>> + */
>> +#ifndef _XE_DEFAULTS_H_
>> +#define _XE_DEFAULTS_H_
>> +
>> +#include "xe_device_types.h"
> 
> What part of this header depends on xe_device_types.h?

enumerator XE_WEDGED_MODE_UPON_CRITICAL_ERROR

and yes, since it is used inside define, in theory we can skip this include

but then it will be a responsibility of XE_DEFAULT_WEDGED_MODE user to include separately
to avoid that I decided to have explicit include here

note that I plan to do some refactoring of the wedge related code, see [1]
so this might go away, or be replaced, in the near future

[1] https://patchwork.freedesktop.org/patch/694454/?series=148214&rev=11#comment_1278190

> 
>> +
>> +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
>> +#define XE_DEFAULT_GUC_LOG_LEVEL		3
>> +#else
>> +#define XE_DEFAULT_GUC_LOG_LEVEL		1
>> +#endif
>> +
>> +#define XE_DEFAULT_PROBE_DISPLAY		true
>> +#define XE_DEFAULT_VRAM_BAR_SIZE		0
>> +#define XE_DEFAULT_FORCE_PROBE			CONFIG_DRM_XE_FORCE_PROBE
>> +#define XE_DEFAULT_MAX_VFS			~0
>> +#define XE_DEFAULT_MAX_VFS_STR			"unlimited"
>> +#define XE_DEFAULT_WEDGED_MODE			XE_WEDGED_MODE_UPON_CRITICAL_ERROR
>> +#define XE_DEFAULT_WEDGED_MODE_STR		"upon-critical-error"
>> +#define XE_DEFAULT_SVM_NOTIFIER_SIZE		512
>> +
>> +#endif

  reply	other threads:[~2026-02-03 14:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 21:42 [PATCH 0/5] drm/xe/configfs: Add sriov.admin_only_pf attribute Michal Wajdeczko
2026-01-21 21:42 ` [PATCH 1/5] drm/xe: Keep all defaults in single header Michal Wajdeczko
2026-01-23 10:29   ` Piotr Piórkowski
2026-02-03  0:11   ` Rodrigo Vivi
2026-02-03 11:13   ` Jani Nikula
2026-02-03 14:58     ` Michal Wajdeczko [this message]
2026-01-21 21:42 ` [PATCH 2/5] drm/xe/configfs: Use proper notation for local include Michal Wajdeczko
2026-01-23 10:29   ` Piotr Piórkowski
2026-01-21 21:42 ` [PATCH 3/5] drm/xe/configfs: Always return consistent max_vfs value Michal Wajdeczko
2026-01-28 15:51   ` Piotr Piórkowski
2026-01-21 21:42 ` [PATCH 4/5] drm/xe/pf: Define admin_only as real flag Michal Wajdeczko
2026-01-27 21:05   ` [PATCH v2 " Michal Wajdeczko
2026-01-28 15:56     ` Piotr Piórkowski
2026-01-21 21:42 ` [PATCH 5/5] drm/xe/configfs: Add sriov.admin_only_pf attribute Michal Wajdeczko
2026-01-28 16:35   ` Piotr Piórkowski
2026-01-28 23:42     ` Michal Wajdeczko
2026-01-21 22:25 ` ✗ CI.checkpatch: warning for " Patchwork
2026-01-21 22:26 ` ✗ CI.KUnit: failure " Patchwork
2026-01-27 21:34 ` ✗ CI.checkpatch: warning for drm/xe/configfs: Add sriov.admin_only_pf attribute (rev2) Patchwork
2026-01-27 21:35 ` ✓ CI.KUnit: success " Patchwork
2026-01-27 22:33 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-28  6:46 ` ✓ 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=b1008074-df70-4267-9c98-91fb7957d1df@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.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