Skip to contentSkip to conversation

drm/xe: Make xe build dependent on STAGING.

PATCH In review Rodrigo Vivi 4 participants 5 messages May 9, 2023 – May 10, 2023

Subsystems (3)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/1 drm/xe: Make xe build dependent on STAGING.

As documented in drivers/staging/Kconfig:

STAGING means "that these drivers are under heavy development" and "may contain userspace interfaces that most likely will be changed in the near future."

As explained in Documentation/gpu/rfc/xe.rst:

"
Xe driver will be protected with both STAGING Kconfig and force_probe. Changes in the uAPI are expected while the driver is behind these protections. STAGING will be removed when the driver uAPI gets to a mature state where we can guarantee the ‘no regression’ rule. Then force_probe will be lifted only for future platforms that will be productized with Xe driver, but not with i915.
"

Cc Mauro Carvalho Chehab <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Radoslaw Szwichtenberg <[email protected]>
Cc Maciej Ramotowski <[email protected]>
Cc Kamil Konieczny <[email protected]>
---
 drivers/gpu/drm/xe/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/xe/Kconfig +1 -0
index f6f3b491d162..1a410edd38e4 100644
@@ -2,6 +2,7 @@
 config DRM_XE
 	tristate "Intel Xe Graphics"
 	depends on DRM && PCI && MMU
+	depends on STAGING
 	select INTERVAL_TREE
 	# we need shmfs for the swappable backing store, and in particular
 	# the shmem_readpage() which depends upon tmpfs
Signature · 1 line
2.39.2
#1 lore raw

[Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Make xe build dependent on STAGING.

== Series Details ==

== Series Details ==

Series: drm/xe: Make xe build dependent on STAGING.
URL : https://patchwork.freedesktop.org/series/117521/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-xe-next' with base: === Base commit: b99d11e80 drm/xe: destroy clients engine and vm xarrays on close === git am output follows ===
Applying: drm/xe: Make xe build dependent on STAGING.

#2 lore raw

[Intel-xe] ✗ CI.KUnit: failure for drm/xe: Make xe build dependent on STAGING.

In reply to Rodrigo Vivi
== Series Details ==

== Series Details ==

Series: drm/xe: Make xe build dependent on STAGING.
URL : https://patchwork.freedesktop.org/series/117521/
State : failure

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config.
This is probably due to unsatisfied dependencies.
Missing: CONFIG_DRM_XE=y, CONFIG_DRM_FBDEV_EMULATION=y, CONFIG_DRM_KMS_HELPER=y, CONFIG_DRM_XE_KUNIT_TEST=y
Note: many Kconfig options aren't available on UML. You can try running on a different architecture with something like "--arch=x86_64". [15:13:19] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:

$ make ARCH=um O=.kunit olddefconfig
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
#3 lore raw
In reply to Rodrigo Vivi
Quoted 17 lines · Rodrigo Vivi

As documented in drivers/staging/Kconfig:

STAGING means "that these drivers are under heavy development" and "may contain userspace interfaces that most likely will be changed in the near future."

As explained in Documentation/gpu/rfc/xe.rst:

"
Xe driver will be protected with both STAGING Kconfig and force_probe. Changes in the uAPI are expected while the driver is behind these protections. STAGING will be removed when the driver uAPI gets to a mature state where we can guarantee the ‘no regression’ rule. Then force_probe will be lifted only for future platforms that will be productized with Xe driver, but not with i915.
"

Quoted 6 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Radoslaw Szwichtenberg <[email protected]>
Cc Maciej Ramotowski <[email protected]>
Cc Kamil Konieczny <[email protected]>

I agree with the idea, but I was expecting a few more hits:

	$ git grep "\bSTAGING\b" -- '*Kconfig'
	drivers/gpu/drm/nouveau/Kconfig:        depends on STAGING
	drivers/gpu/drm/tegra/Kconfig:  depends on STAGING
	drivers/staging/Kconfig:menuconfig STAGING
	drivers/staging/Kconfig:if STAGING
	drivers/staging/Kconfig:endif # STAGING
	drivers/staging/vme_user/Kconfig:       depends on STAGING && PCI
	drivers/staging/vme_user/Kconfig:       depends on STAGING && VME_BUS

Are we doing something wrong here? Documentation/process/2.Process.rst talks about drivers under staging/ directory rather than drivers depending on CONFIG_STAGING.

Lucas De Marchi

Quoted 19 lines

---
drivers/gpu/drm/xe/Kconfig | 1 +

1 file changed, 1 insertion(+)
drivers/gpu/drm/xe/Kconfig +0 -0
index f6f3b491d162..1a410edd38e4 100644
@@ -2,6 +2,7 @@

config DRM_XE

	tristate "Intel Xe Graphics"
	depends on DRM && PCI && MMU
drivers/gpu/drm/xe/Kconfig +1 -0
+	depends on STAGING

select INTERVAL_TREE
# we need shmfs for the swappable backing store, and in particular # the shmem_readpage() which depends upon tmpfs

Signature · 1 line
2.39.2
#4 lore raw
Quoted 36 lines · Lucas De Marchi
Quoted 17 lines · Rodrigo Vivi

As documented in drivers/staging/Kconfig:

STAGING means "that these drivers are under heavy development" and "may contain userspace interfaces that most likely will be changed in the near future."

As explained in Documentation/gpu/rfc/xe.rst:

"
Xe driver will be protected with both STAGING Kconfig and force_probe. Changes in the uAPI are expected while the driver is behind these protections. STAGING will be removed when the driver uAPI gets to a mature state where we can guarantee the ‘no regression’ rule. Then force_probe will be lifted only for future platforms that will be productized with Xe driver, but not with i915.
"

Quoted 6 lines
Cc Mauro Carvalho Chehab <[email protected]>
Cc Lucas De Marchi <[email protected]>
Cc Radoslaw Szwichtenberg <[email protected]>
Cc Maciej Ramotowski <[email protected]>
Cc Kamil Konieczny <[email protected]>

I agree with the idea, but I was expecting a few more hits:

	$ git grep "\bSTAGING\b" -- '*Kconfig'
	drivers/gpu/drm/nouveau/Kconfig:        depends on STAGING
	drivers/gpu/drm/tegra/Kconfig:  depends on STAGING
	drivers/staging/Kconfig:menuconfig STAGING
	drivers/staging/Kconfig:if STAGING
	drivers/staging/Kconfig:endif # STAGING
	drivers/staging/vme_user/Kconfig:       depends on STAGING && PCI
	drivers/staging/vme_user/Kconfig:       depends on STAGING && VME_BUS
Quoted 3 lines

Are we doing something wrong here? Documentation/process/2.Process.rst talks about drivers under staging/ directory rather than drivers depending on CONFIG_STAGING.

Yes, you are doing something wrong here :)

CONFIG_STAGING is only to be used for drivers/staging/. But I will not take drm drivers into that directory as the DRM developers don't want me to (and that's wonderful, no objection from me).

If you just use the CONFIG dependancy here you will not get the taint flag set properly if they are out of that directory (and you want that taint flag, TAINT_CRAP is there for that reason.)

But hey, it's your subsystem, if you want to depend on this random config variable, wonderful! But realize that it means nothing, and has nothing to do with user/kernel api stability issues at all.

thanks,

greg k-h