[PATCH] drm/lima: fix build on MMU-less platform

Qiang Yu yuq825 at gmail.com
Mon Apr 8 11:26:59 UTC 2019


Feedback from kbuild robot:
config: sh-allyesconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
lima_gem.c:(.text+0x6c): undefined reference to `vmf_insert_mixed'

Cc: Randy Dunlap <rdunlap at infradead.org>
Signed-off-by: Qiang Yu <yuq825 at gmail.com>
---
 drivers/gpu/drm/lima/Kconfig    | 2 ++
 drivers/gpu/drm/lima/lima_gem.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/lima/Kconfig b/drivers/gpu/drm/lima/Kconfig
index f11314448093..fed2b0863287 100644
--- a/drivers/gpu/drm/lima/Kconfig
+++ b/drivers/gpu/drm/lima/Kconfig
@@ -5,6 +5,8 @@ config DRM_LIMA
        tristate "LIMA (DRM support for ARM Mali 400/450 GPU)"
        depends on DRM
        depends on ARM || ARM64 || COMPILE_TEST
+       depends on MMU
+       depends on COMMON_CLK
        select DRM_SCHED
        help
          DRM driver for ARM Mali 400/450 GPUs.
diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c
index 2d3cf96f6c58..1d69498bc17e 100644
--- a/drivers/gpu/drm/lima/lima_gem.c
+++ b/drivers/gpu/drm/lima/lima_gem.c
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0 OR MIT
 /* Copyright 2017-2019 Qiang Yu <yuq825 at gmail.com> */
 
+#include <linux/mm.h>
 #include <linux/sync_file.h>
 #include <linux/pfn_t.h>
 
-- 
2.17.1



More information about the dri-devel mailing list