From: Jani Nikula <jani.nikula@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>,
intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [Intel-xe] [PATCH 2/2] drm/xe: Fix build with KUNIT=m
Date: Mon, 13 Nov 2023 12:04:32 +0200 [thread overview]
Message-ID: <87v8a6ufyn.fsf@intel.com> (raw)
In-Reply-To: <20231109175132.3084142-3-lucas.demarchi@intel.com>
On Thu, 09 Nov 2023, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> Due to the current integration between "live" xe kunit tests and kunit,
> it's not possible to have a build with the following combination:
>
> CONFIG_DRM_XE=y
> CONFIG_KUNIT=m
>
> ... even if kconfig doesn't block it. The reason for the failure is that
> some compilation units are pulled in xe.ko:
>
> drivers/gpu/drm/xe/xe_bo.c:#include "tests/xe_bo.c"
> drivers/gpu/drm/xe/xe_dma_buf.c:#include "tests/xe_dma_buf.c"
> drivers/gpu/drm/xe/xe_migrate.c:#include "tests/xe_migrate.c"
> drivers/gpu/drm/xe/xe_pci.c:#include "tests/xe_pci.c"
>
> Those files shouldn't use symbols from kunit, which should be reserved
> to the tests/*_test.c files. Detangling this dependency doesn't seem
> very straightforward, so fix the immediate issue instructing kconfig to
> block the problematic configuration.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/xe/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
> index 2fa2d6dacb96..5b3da06e7ba3 100644
> --- a/drivers/gpu/drm/xe/Kconfig
> +++ b/drivers/gpu/drm/xe/Kconfig
> @@ -1,7 +1,7 @@
> # SPDX-License-Identifier: GPL-2.0-only
> config DRM_XE
> tristate "Intel Xe Graphics"
> - depends on DRM && PCI && MMU
> + depends on DRM && PCI && MMU && (m || (y && KUNIT=y))
What do plain m and y mean here?
BR,
Jani.
> select INTERVAL_TREE
> # we need shmfs for the swappable backing store, and in particular
> # the shmem_readpage() which depends upon tmpfs
--
Jani Nikula, Intel
next prev parent reply other threads:[~2023-11-13 10:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 17:51 [Intel-xe] [PATCH 0/2] Fix builtin vs module configuration Lucas De Marchi
2023-11-09 17:51 ` [Intel-xe] [PATCH 1/2] fixup! drm/xe/display: Implement display support Lucas De Marchi
2023-11-09 18:58 ` Rodrigo Vivi
2023-11-09 17:51 ` [Intel-xe] [PATCH 2/2] drm/xe: Fix build with KUNIT=m Lucas De Marchi
2023-11-09 18:58 ` Rodrigo Vivi
2023-11-13 10:04 ` Jani Nikula [this message]
2023-11-13 13:47 ` Lucas De Marchi
2023-11-13 15:04 ` Jani Nikula
2023-11-09 20:57 ` [Intel-xe] ✓ CI.Patch_applied: success for Fix builtin vs module configuration Patchwork
2023-11-09 20:57 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-11-09 20:58 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-11-09 21:08 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-09 21:08 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-09 21:09 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-11 16:22 ` [Intel-xe] ✓ CI.Patch_applied: success for Fix builtin vs module configuration (rev2) Patchwork
2023-11-11 16:22 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-11-11 16:23 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-11-11 16:30 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-11-11 16:31 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-11-11 16:32 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-11-11 17:01 ` [Intel-xe] ✓ CI.BAT: " 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=87v8a6ufyn.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@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