[PATCH 1/2] drm: fix drm_vm for NOMMU builds

Daniel Vetter daniel at ffwll.ch
Wed Jan 11 16:36:41 UTC 2017


On Wed, Jan 11, 2017 at 5:33 PM, Arnd Bergmann <arnd at arndb.de> wrote:
> On Wednesday, January 11, 2017 5:27:13 PM CET Daniel Vetter wrote:
>> On Wed, Jan 11, 2017 at 02:33:34PM +0100, Arnd Bergmann wrote:
>> > When building DRM without an MMU, we run into a compile-time error because
>> > pte_wrprotect() is not defined:
>> >
>> > drivers/gpu/drm/drm_vm.c: In function 'drm_mmap_dma':
>> > drivers/gpu/drm/drm_vm.c:496:9: error: implicit declaration of function 'pte_wrprotect' [-Werror=implicit-function-declaration]
>> >
>> > The line is not meaningful here, so we can simply add another
>> > compile-time check around it.
>> >
>> > Fixes: 62a0d98a188c ("drm: allow to use mmuless SoC")
>> > Signed-off-by: Arnd Bergmann <arnd at arndb.de>
>>
>> We don't need drm_vm.c on modern drivers, and the idea was to simply not
>> compile it when not needed. See:
>>
>> commit 99c48e1e38f0aeaa107ad67c8d91f6c9d9d567a9
>> Author: Benjamin Gaignard <benjamin.gaignard at linaro.org>
>> Date:   Wed Jan 4 10:12:56 2017 +0100
>>
>>     drm: compile drm_vm.c only when needed
>>
>>
>> How did you manage to enable this stuff?
>> -Daniel
>
> This was a randconfig build, the DRM specific symbols here are
>
> CONFIG_DRM=y
> CONFIG_DRM_MIPI_DSI=y
> # CONFIG_DRM_DP_AUX_CHARDEV is not set
> # CONFIG_DRM_DEBUG_MM is not set
> # CONFIG_DRM_DEBUG_MM_SELFTEST is not set
> CONFIG_DRM_KMS_HELPER=y
> CONFIG_DRM_KMS_FB_HELPER=y
> # CONFIG_DRM_FBDEV_EMULATION is not set
> CONFIG_DRM_LOAD_EDID_FIRMWARE=y
> CONFIG_DRM_GEM_CMA_HELPER=y
> CONFIG_DRM_KMS_CMA_HELPER=y
> CONFIG_DRM_VM=y

Does randconfig just set this for fun, despite that it's a hidden
Kconfig symbol? Should we add a depends !NOMMU to it to make sure it
never gets enabled when it shouldn't be?

tbh I have no idea how Kconfig works, I'm just really good at breaking it :(
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list