DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM

Eric Anholt eric at anholt.net
Mon Jul 10 16:58:22 UTC 2017


Benjamin Gaignard <benjamin.gaignard at linaro.org> writes:

> 2017-07-10 12:53 GMT+02:00 Noralf Trønnes <noralf at tronnes.org>:
>> Hi
>>
>> DRM_STM is 'default y' on ARCH_MULTIPLATFORM and it selects
>> FB_PROVIDE_GET_FB_UNMAPPED_AREA. This breaks fbdev mmap for me on
>> Raspberry Pi. mmap returns -ENOMEM.
>>
>> Disabling DRM_STM gives me working mmap.
>>
>> Noralf.
>>
>>
>> config DRM_STM
>>     tristate "DRM Support for STMicroelectronics SoC Series"
>>     depends on DRM && (ARCH_STM32 || ARCH_MULTIPLATFORM)
>>     select DRM_KMS_HELPER
>>     select DRM_GEM_CMA_HELPER
>>     select DRM_KMS_CMA_HELPER
>>     select DRM_PANEL
>>     select VIDEOMODE_HELPERS
>>     select FB_PROVIDE_GET_FB_UNMAPPED_AREA
>
> I think to two solutions:
> - add "if !MMU" after FB_PROVIDE_GET_FB_UNMAPPED_AREA in this Kconfig
> but other drivers could do the same.


> - add !MMU when FB_PROVIDE_GET_FB_UNMAPPED_AREA is used in fbmen.c

This is the most important fix, regardless of whether the driver is
default y or not.  The unmapped area helper getting filled in on MMU
platforms definitely breaks mmap.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170710/1f853ae3/attachment.sig>


More information about the dri-devel mailing list