diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2024-03-04 10:08:12 +0100 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@collabora.com> | 2024-03-11 10:50:37 +0100 |
commit | 674dc7f61aefea81901c21402946074927e63f1a (patch) | |
tree | c9c1fe424523d6ba645c92756e4370cccce58780 /drivers/gpu/drm/panthor | |
parent | eb1dc10a6ee3559310436ab62db93b72310a2a18 (diff) | |
download | lwn-674dc7f61aefea81901c21402946074927e63f1a.tar.gz lwn-674dc7f61aefea81901c21402946074927e63f1a.zip |
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
Diffstat (limited to 'drivers/gpu/drm/panthor')
-rw-r--r-- | drivers/gpu/drm/panthor/Kconfig | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/panthor/panthor_device.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panthor/Kconfig b/drivers/gpu/drm/panthor/Kconfig index 55b40ad07f3b..fdce7c1b2310 100644 --- a/drivers/gpu/drm/panthor/Kconfig +++ b/drivers/gpu/drm/panthor/Kconfig @@ -6,6 +6,7 @@ config DRM_PANTHOR depends on ARM || ARM64 || COMPILE_TEST depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE depends on MMU + depends on PM select DEVFREQ_GOV_SIMPLE_ONDEMAND select DRM_EXEC select DRM_GEM_SHMEM_HELPER diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index 69deb8e17778..083888b48591 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -402,7 +402,6 @@ int panthor_device_mmap_io(struct panthor_device *ptdev, struct vm_area_struct * return 0; } -#ifdef CONFIG_PM int panthor_device_resume(struct device *dev) { struct panthor_device *ptdev = dev_get_drvdata(dev); @@ -547,4 +546,3 @@ err_set_active: mutex_unlock(&ptdev->pm.mmio_lock); return ret; } -#endif |