Patch "accel: fix CONFIG_DRM dependencies" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    accel: fix CONFIG_DRM dependencies

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     accel-fix-config_drm-dependencies.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a87efc225684584ee40cc5ac4050c11359e98c56
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Fri Jan 27 23:14:55 2023 +0100

    accel: fix CONFIG_DRM dependencies
    
    [ Upstream commit 9f20c9f4b1e17e83e9ccc247cfdc0b61041bff3d ]
    
    At the moment, accel drivers can be built-in even with CONFIG_DRM=m,
    but this causes a link failure:
    
    x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_dev_init':
    ivpu_drv.c:(.text+0x1535): undefined reference to `drmm_kmalloc'
    x86_64-linux-ld: ivpu_drv.c:(.text+0x1562): undefined reference to `drmm_kmalloc'
    x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_remove':
    ivpu_drv.c:(.text+0x1faa): undefined reference to `drm_dev_unregister'
    x86_64-linux-ld: drivers/accel/ivpu/ivpu_drv.o: in function `ivpu_probe':
    ivpu_drv.c:(.text+0x1fef): undefined reference to `__devm_drm_dev_alloc'
    
    The problem is that DRM_ACCEL is a 'bool' symbol, so driver that
    only depend on DRM_ACCEL but not also on DRM do not see the restriction
    to =m configs.
    
    To ensure that each accel driver has an implied dependency on CONFIG_DRM,
    enclose the entire Kconfig file in an if/endif check.
    
    Fixes: 8bf4889762a8 ("drivers/accel: define kconfig and register a new major")
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@xxxxxxxxxxxxxxx>
    Reviewed-by: Jeffrey Hugo <quic_jhugo@xxxxxxxxxxx>
    Reviewed-by: Oded Gabbay <ogabbay@xxxxxxxxxx>
    Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@xxxxxxxxxxxxxxx>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230127221504.2522909-1-arnd@xxxxxxxxxx
    (cherry picked from commit 3524c96a121952f214271622bb372661ced86101)
    Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/accel/Kconfig b/drivers/accel/Kconfig
index c9ce849b2984a..c8177ae415b8b 100644
--- a/drivers/accel/Kconfig
+++ b/drivers/accel/Kconfig
@@ -6,9 +6,10 @@
 # as, but not limited to, Machine-Learning and Deep-Learning acceleration
 # devices
 #
+if DRM
+
 menuconfig DRM_ACCEL
 	bool "Compute Acceleration Framework"
-	depends on DRM
 	help
 	  Framework for device drivers of compute acceleration devices, such
 	  as, but not limited to, Machine-Learning and Deep-Learning
@@ -22,3 +23,5 @@ menuconfig DRM_ACCEL
 	  major number than GPUs, and will be exposed to user-space using
 	  different device files, called accel/accel* (in /dev, sysfs
 	  and debugfs).
+
+endif



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux