Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panthor: Fix undefined panthor_device_suspend/resume symbol issue

panthor_device_resume/suspend() are only compiled when CONFIG_PM is
enabled but panthro_drv.c doesn't use the pm_ptr() macro to conditionally
discard resume/suspend assignments, which causes undefined symbol
errors at link time when !PM.

We could fix that by using pm_ptr(), but supporting the !PM case makes
little sense (the whole point of these embedded GPUs is to be low power,
so proper PM is a basic requirement in that case). So let's just enforce
the presence of CONFIG_PM with a Kconfig dependency instead.

If someone needs to relax this dependency, it can be done in a follow-up.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403031944.EOimQ8WK-lkp@intel.com/
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240304090812.3941084-4-boris.brezillon@collabora.com

+1 -2
+1
drivers/gpu/drm/panthor/Kconfig
··· 6 6 depends on ARM || ARM64 || COMPILE_TEST 7 7 depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE 8 8 depends on MMU 9 + depends on PM 9 10 select DEVFREQ_GOV_SIMPLE_ONDEMAND 10 11 select DRM_EXEC 11 12 select DRM_GEM_SHMEM_HELPER
-2
drivers/gpu/drm/panthor/panthor_device.c
··· 402 402 return 0; 403 403 } 404 404 405 - #ifdef CONFIG_PM 406 405 int panthor_device_resume(struct device *dev) 407 406 { 408 407 struct panthor_device *ptdev = dev_get_drvdata(dev); ··· 546 547 mutex_unlock(&ptdev->pm.mmio_lock); 547 548 return ret; 548 549 } 549 - #endif