* [PATCH v2 0/2] drm/xe: xe with/without kunit
@ 2025-06-27 20:30 Lucas De Marchi
2025-06-27 20:30 ` [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols Lucas De Marchi
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Lucas De Marchi @ 2025-06-27 20:30 UTC (permalink / raw)
To: intel-xe
Cc: Lucas De Marchi, Randy Dunlap, Jani Nikula, Harry Austen,
Thomas Hellström, Jani Nikula, Maarten Lankhorst
For the second patch, original version is from
https://lore.kernel.org/intel-xe/20250516104210.17969-1-hpausten@protonmail.com/
I took that and kept only the kunit part as mentioned there.
First patch fixes the bug reported when building with
CONFIG_DRM_XE=y
CONFIG_DRM_I915=y
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
Changes in v2:
- First patch should be good enough fix, so reword it accordingly
- Link to v1: https://lore.kernel.org/r/20250626-xe-kunit-v1-0-2440e6d9a4b5@intel.com
---
Harry Austen (1):
drm/xe: Allow dropping kunit dependency as built-in
Lucas De Marchi (1):
drm/xe: Fix conflicting intel_pcode_* symbols
drivers/gpu/drm/xe/Kconfig | 3 ++-
drivers/gpu/drm/xe/xe_pcode.c | 6 +++++-
2 files changed, 7 insertions(+), 2 deletions(-)
base-commit: 98f015a92833e2d04fda89e1657a13d7290403e8
change-id: 20250626-xe-kunit-20c0199723b2
Lucas De Marchi
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols 2025-06-27 20:30 [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi @ 2025-06-27 20:30 ` Lucas De Marchi 2025-06-27 21:24 ` Rodrigo Vivi 2025-06-28 2:55 ` Randy Dunlap 2025-06-27 20:30 ` [PATCH v2 2/2] drm/xe: Allow dropping kunit dependency as built-in Lucas De Marchi 2025-06-28 14:33 ` [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi 2 siblings, 2 replies; 7+ messages in thread From: Lucas De Marchi @ 2025-06-27 20:30 UTC (permalink / raw) To: intel-xe; +Cc: Lucas De Marchi, Randy Dunlap, Jani Nikula, Harry Austen If CONFIG_DRM_XE_DISPLAY is set, the xe module can only be built as module to avoid duplicate symbols from i915. The interface for pcode was added without considering that, so the build breaks if both xe and i915 are built-in. Since the intel_pcode_* functions should only be called from the display side (xe side should call the xe interface directly) and there's already a protection in Kconfig to avoid the problematic configuration, ifdef it out in case CONFIG_DRM_XE_DISPLAY is disabled. Closes: https://lore.kernel.org/r/3667a992-a24b-4e49-aab2-5ca73f2c0a56@infradead.org Fixes: d9465cc8ac2d ("drm/xe/pcode: add struct drm_device based interface") Acked-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> --- drivers/gpu/drm/xe/xe_pcode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c index 87323ad0cbbb2..6a7ddb9005f99 100644 --- a/drivers/gpu/drm/xe/xe_pcode.c +++ b/drivers/gpu/drm/xe/xe_pcode.c @@ -337,7 +337,9 @@ int xe_pcode_probe_early(struct xe_device *xe) } ALLOW_ERROR_INJECTION(xe_pcode_probe_early, ERRNO); /* See xe_pci_probe */ -/* Helpers with drm device */ +/* Helpers with drm device. These should only be called by the display side */ +#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY) + int intel_pcode_read(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1) { struct xe_device *xe = to_xe_device(drm); @@ -362,3 +364,5 @@ int intel_pcode_request(struct drm_device *drm, u32 mbox, u32 request, return xe_pcode_request(tile, mbox, request, reply_mask, reply, timeout_base_ms); } + +#endif -- 2.49.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols 2025-06-27 20:30 ` [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols Lucas De Marchi @ 2025-06-27 21:24 ` Rodrigo Vivi 2025-06-28 2:55 ` Randy Dunlap 1 sibling, 0 replies; 7+ messages in thread From: Rodrigo Vivi @ 2025-06-27 21:24 UTC (permalink / raw) To: Lucas De Marchi; +Cc: intel-xe, Randy Dunlap, Jani Nikula, Harry Austen On Fri, Jun 27, 2025 at 01:30:34PM -0700, Lucas De Marchi wrote: > If CONFIG_DRM_XE_DISPLAY is set, the xe module can only be built as > module to avoid duplicate symbols from i915. The interface for pcode was > added without considering that, so the build breaks if both xe and i915 > are built-in. > > Since the intel_pcode_* functions should only be called from the display > side (xe side should call the xe interface directly) and there's already > a protection in Kconfig to avoid the problematic configuration, ifdef it > out in case CONFIG_DRM_XE_DISPLAY is disabled. > > Closes: https://lore.kernel.org/r/3667a992-a24b-4e49-aab2-5ca73f2c0a56@infradead.org > Fixes: d9465cc8ac2d ("drm/xe/pcode: add struct drm_device based interface") > Acked-by: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> > --- > drivers/gpu/drm/xe/xe_pcode.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c > index 87323ad0cbbb2..6a7ddb9005f99 100644 > --- a/drivers/gpu/drm/xe/xe_pcode.c > +++ b/drivers/gpu/drm/xe/xe_pcode.c > @@ -337,7 +337,9 @@ int xe_pcode_probe_early(struct xe_device *xe) > } > ALLOW_ERROR_INJECTION(xe_pcode_probe_early, ERRNO); /* See xe_pci_probe */ > > -/* Helpers with drm device */ > +/* Helpers with drm device. These should only be called by the display side */ > +#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY) > + > int intel_pcode_read(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1) > { > struct xe_device *xe = to_xe_device(drm); > @@ -362,3 +364,5 @@ int intel_pcode_request(struct drm_device *drm, u32 mbox, u32 request, > > return xe_pcode_request(tile, mbox, request, reply_mask, reply, timeout_base_ms); > } > + > +#endif > > -- > 2.49.0 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols 2025-06-27 20:30 ` [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols Lucas De Marchi 2025-06-27 21:24 ` Rodrigo Vivi @ 2025-06-28 2:55 ` Randy Dunlap 1 sibling, 0 replies; 7+ messages in thread From: Randy Dunlap @ 2025-06-28 2:55 UTC (permalink / raw) To: Lucas De Marchi, intel-xe; +Cc: Jani Nikula, Harry Austen On 6/27/25 1:30 PM, Lucas De Marchi wrote: > If CONFIG_DRM_XE_DISPLAY is set, the xe module can only be built as > module to avoid duplicate symbols from i915. The interface for pcode was > added without considering that, so the build breaks if both xe and i915 > are built-in. > > Since the intel_pcode_* functions should only be called from the display > side (xe side should call the xe interface directly) and there's already > a protection in Kconfig to avoid the problematic configuration, ifdef it > out in case CONFIG_DRM_XE_DISPLAY is disabled. > > Closes: https://lore.kernel.org/r/3667a992-a24b-4e49-aab2-5ca73f2c0a56@infradead.org > Fixes: d9465cc8ac2d ("drm/xe/pcode: add struct drm_device based interface") > Acked-by: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Thanks. > --- > drivers/gpu/drm/xe/xe_pcode.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c > index 87323ad0cbbb2..6a7ddb9005f99 100644 > --- a/drivers/gpu/drm/xe/xe_pcode.c > +++ b/drivers/gpu/drm/xe/xe_pcode.c > @@ -337,7 +337,9 @@ int xe_pcode_probe_early(struct xe_device *xe) > } > ALLOW_ERROR_INJECTION(xe_pcode_probe_early, ERRNO); /* See xe_pci_probe */ > > -/* Helpers with drm device */ > +/* Helpers with drm device. These should only be called by the display side */ > +#if IS_ENABLED(CONFIG_DRM_XE_DISPLAY) > + > int intel_pcode_read(struct drm_device *drm, u32 mbox, u32 *val, u32 *val1) > { > struct xe_device *xe = to_xe_device(drm); > @@ -362,3 +364,5 @@ int intel_pcode_request(struct drm_device *drm, u32 mbox, u32 request, > > return xe_pcode_request(tile, mbox, request, reply_mask, reply, timeout_base_ms); > } > + > +#endif > -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] drm/xe: Allow dropping kunit dependency as built-in 2025-06-27 20:30 [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi 2025-06-27 20:30 ` [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols Lucas De Marchi @ 2025-06-27 20:30 ` Lucas De Marchi 2025-06-28 2:56 ` Randy Dunlap 2025-06-28 14:33 ` [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi 2 siblings, 1 reply; 7+ messages in thread From: Lucas De Marchi @ 2025-06-27 20:30 UTC (permalink / raw) To: intel-xe Cc: Lucas De Marchi, Randy Dunlap, Jani Nikula, Harry Austen, Thomas Hellström, Jani Nikula, Maarten Lankhorst From: Harry Austen <hpausten@protonmail.com> Fix Kconfig symbol dependency on KUNIT, which isn't actually required for XE to be built-in. However, if KUNIT is enabled, it must be built-in too. Fixes: 08987a8b6820 ("drm/xe: Fix build with KUNIT=m") Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Harry Austen <hpausten@protonmail.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> --- drivers/gpu/drm/xe/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig index 553c29e1030b1..827bc75b8b48f 100644 --- a/drivers/gpu/drm/xe/Kconfig +++ b/drivers/gpu/drm/xe/Kconfig @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_XE tristate "Intel Xe2 Graphics" - depends on DRM && PCI && (m || (y && KUNIT=y)) + depends on DRM && PCI + depends on KUNIT || !KUNIT depends on INTEL_VSEC || !INTEL_VSEC depends on X86_PLATFORM_DEVICES || !(X86 && ACPI) select INTERVAL_TREE -- 2.49.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] drm/xe: Allow dropping kunit dependency as built-in 2025-06-27 20:30 ` [PATCH v2 2/2] drm/xe: Allow dropping kunit dependency as built-in Lucas De Marchi @ 2025-06-28 2:56 ` Randy Dunlap 0 siblings, 0 replies; 7+ messages in thread From: Randy Dunlap @ 2025-06-28 2:56 UTC (permalink / raw) To: Lucas De Marchi, intel-xe Cc: Jani Nikula, Harry Austen, Thomas Hellström, Jani Nikula, Maarten Lankhorst On 6/27/25 1:30 PM, Lucas De Marchi wrote: > From: Harry Austen <hpausten@protonmail.com> > > Fix Kconfig symbol dependency on KUNIT, which isn't actually required > for XE to be built-in. However, if KUNIT is enabled, it must be built-in > too. > > Fixes: 08987a8b6820 ("drm/xe: Fix build with KUNIT=m") > Cc: Lucas De Marchi <lucas.demarchi@intel.com> > Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> > Cc: Jani Nikula <jani.nikula@linux.intel.com> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Signed-off-by: Harry Austen <hpausten@protonmail.com> > Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> > Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Thanks. > --- > drivers/gpu/drm/xe/Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig > index 553c29e1030b1..827bc75b8b48f 100644 > --- a/drivers/gpu/drm/xe/Kconfig > +++ b/drivers/gpu/drm/xe/Kconfig > @@ -1,7 +1,8 @@ > # SPDX-License-Identifier: GPL-2.0-only > config DRM_XE > tristate "Intel Xe2 Graphics" > - depends on DRM && PCI && (m || (y && KUNIT=y)) > + depends on DRM && PCI > + depends on KUNIT || !KUNIT > depends on INTEL_VSEC || !INTEL_VSEC > depends on X86_PLATFORM_DEVICES || !(X86 && ACPI) > select INTERVAL_TREE > -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/2] drm/xe: xe with/without kunit 2025-06-27 20:30 [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi 2025-06-27 20:30 ` [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols Lucas De Marchi 2025-06-27 20:30 ` [PATCH v2 2/2] drm/xe: Allow dropping kunit dependency as built-in Lucas De Marchi @ 2025-06-28 14:33 ` Lucas De Marchi 2 siblings, 0 replies; 7+ messages in thread From: Lucas De Marchi @ 2025-06-28 14:33 UTC (permalink / raw) To: intel-xe Cc: Randy Dunlap, Jani Nikula, Harry Austen, Thomas Hellström, Jani Nikula, Maarten Lankhorst On Fri, Jun 27, 2025 at 01:30:33PM -0700, Lucas De Marchi wrote: >For the second patch, original version is from >https://lore.kernel.org/intel-xe/20250516104210.17969-1-hpausten@protonmail.com/ > >I took that and kept only the kunit part as mentioned there. > >First patch fixes the bug reported when building with > > CONFIG_DRM_XE=y > CONFIG_DRM_I915=y > >Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> >--- >Changes in v2: >- First patch should be good enough fix, so reword it accordingly >- Link to v1: https://lore.kernel.org/r/20250626-xe-kunit-v1-0-2440e6d9a4b5@intel.com >--- >Harry Austen (1): > drm/xe: Allow dropping kunit dependency as built-in > >Lucas De Marchi (1): > drm/xe: Fix conflicting intel_pcode_* symbols Applied the first patch to drm-intel-next and the second to drm-xe-next. Thanks Lucas De Marchi > > drivers/gpu/drm/xe/Kconfig | 3 ++- > drivers/gpu/drm/xe/xe_pcode.c | 6 +++++- > 2 files changed, 7 insertions(+), 2 deletions(-) > >base-commit: 98f015a92833e2d04fda89e1657a13d7290403e8 >change-id: 20250626-xe-kunit-20c0199723b2 > >Lucas De Marchi > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-28 14:34 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-06-27 20:30 [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi 2025-06-27 20:30 ` [PATCH v2 1/2] drm/xe: Fix conflicting intel_pcode_* symbols Lucas De Marchi 2025-06-27 21:24 ` Rodrigo Vivi 2025-06-28 2:55 ` Randy Dunlap 2025-06-27 20:30 ` [PATCH v2 2/2] drm/xe: Allow dropping kunit dependency as built-in Lucas De Marchi 2025-06-28 2:56 ` Randy Dunlap 2025-06-28 14:33 ` [PATCH v2 0/2] drm/xe: xe with/without kunit Lucas De Marchi
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.