DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM
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
default y
help
Enable support for the on-chip display controller on STMicroelectronics STM32 MCUs.
To compile this driver as a module, choose M here: the module will be called stm-drm.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
2017-07-10 12:53 GMT+02:00 Noralf Trønnes <[email protected]>:
Quoted 11 lines
Hi
DRM_STMis 'default y' onARCH_MULTIPLATFORMand it selectsFB_PROVIDE_GET_FB_UNMAPPED_AREA. This breaks fbdev mmap for me on Raspberry Pi. mmap returns-ENOMEM.Disabling
DRM_STMgives me working mmap.Noralf.
Quoted 9 lines
config
DRM_STM
tristate "DRM Support for STMicroelectronics SoC Series" depends on DRM && (ARCH_STM32||ARCH_MULTIPLATFORM) selectDRM_KMS_HELPER
selectDRM_GEM_CMA_HELPER
selectDRM_KMS_CMA_HELPER
selectDRM_PANEL
selectVIDEOMODE_HELPERS
selectFB_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
Quoted 9 lines
default y
help
Enable support for the on-chip display controller on STMicroelectronics STM32 MCUs.
To compile this driver as a module, choose M here: the module will be called stm-drm.
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 22 lines · Benjamin Gaignard
2017-07-10 12:53 GMT+02:00 Noralf Trønnes <[email protected]>:
Quoted 11 lines
Hi
DRM_STMis 'default y' onARCH_MULTIPLATFORMand it selectsFB_PROVIDE_GET_FB_UNMAPPED_AREA. This breaks fbdev mmap for me on Raspberry Pi. mmap returns-ENOMEM.Disabling
DRM_STMgives me working mmap.Noralf.
Quoted 9 lines
config
DRM_STM
tristate "DRM Support for STMicroelectronics SoC Series" depends on DRM && (ARCH_STM32||ARCH_MULTIPLATFORM) selectDRM_KMS_HELPER
selectDRM_GEM_CMA_HELPER
selectDRM_KMS_CMA_HELPER
selectDRM_PANEL
selectVIDEOMODE_HELPERS
selectFB_PROVIDE_GET_FB_UNMAPPED_AREA
Quoted 5 lines
I think to two solutions:
- add "if !MMU" afterFB_PROVIDE_GET_FB_UNMAPPED_AREAin thisKconfigbut other drivers could do the same.
- add !MMU whenFB_PROVIDE_GET_FB_UNMAPPED_AREAis used infbmen.c
In parallel to the actual fix - perhaps one should drop the default line? From a quick look, I cannot see another DRM driver that sets it.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 2 lines · Emil Velikov
In parallel to the actual fix - perhaps one should drop the default line? From a quick look, I cannot see another DRM driver that sets it.
Yes, default y is considered very much not cool. Default for drivers should always be n, including sub-driver options. There's yet again a massive rant about that ongoing on lkml ...
Please fix this.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 22 lines · Benjamin Gaignard
2017-07-10 12:53 GMT+02:00 Noralf Trønnes <[email protected]>:
Quoted 11 lines
Hi
DRM_STMis 'default y' onARCH_MULTIPLATFORMand it selectsFB_PROVIDE_GET_FB_UNMAPPED_AREA. This breaks fbdev mmap for me on Raspberry Pi. mmap returns-ENOMEM.Disabling
DRM_STMgives me working mmap.Noralf.
Quoted 9 lines
config
DRM_STM
tristate "DRM Support for STMicroelectronics SoC Series" depends on DRM && (ARCH_STM32||ARCH_MULTIPLATFORM) selectDRM_KMS_HELPER
selectDRM_GEM_CMA_HELPER
selectDRM_KMS_CMA_HELPER
selectDRM_PANEL
selectVIDEOMODE_HELPERS
selectFB_PROVIDE_GET_FB_UNMAPPED_AREA
Quoted 6 lines
I think to two solutions:
- add "if !MMU" afterFB_PROVIDE_GET_FB_UNMAPPED_AREAin thisKconfigbut other drivers could do the same.- add !MMU when
FB_PROVIDE_GET_FB_UNMAPPED_AREAis used infbmen.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.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel