All of lore.kernel.org
 help / color / mirror / Atom feed
* DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM
@ 2017-07-10 10:53 Noralf Trønnes
  2017-07-10 11:49 ` Benjamin Gaignard
  0 siblings, 1 reply; 5+ messages in thread
From: Noralf Trønnes @ 2017-07-10 10:53 UTC (permalink / raw)
  To: yannick.fertre; +Cc: DRI Development

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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM
  2017-07-10 10:53 DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM Noralf Trønnes
@ 2017-07-10 11:49 ` Benjamin Gaignard
  2017-07-10 12:23   ` Emil Velikov
  2017-07-10 16:58   ` Eric Anholt
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Gaignard @ 2017-07-10 11:49 UTC (permalink / raw)
  To: Noralf Trønnes; +Cc: Yannick Fertre, DRI Development

2017-07-10 12:53 GMT+02:00 Noralf Trønnes <noralf@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

>     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
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM
  2017-07-10 11:49 ` Benjamin Gaignard
@ 2017-07-10 12:23   ` Emil Velikov
  2017-07-10 15:00     ` Daniel Vetter
  2017-07-10 16:58   ` Eric Anholt
  1 sibling, 1 reply; 5+ messages in thread
From: Emil Velikov @ 2017-07-10 12:23 UTC (permalink / raw)
  To: Benjamin Gaignard; +Cc: Yannick Fertre, DRI Development

On 10 July 2017 at 12:49, Benjamin Gaignard
<benjamin.gaignard@linaro.org> wrote:
> 2017-07-10 12:53 GMT+02:00 Noralf Trønnes <noralf@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
>
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
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM
  2017-07-10 12:23   ` Emil Velikov
@ 2017-07-10 15:00     ` Daniel Vetter
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2017-07-10 15:00 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Yannick Fertre, DRI Development

On Mon, Jul 10, 2017 at 2:23 PM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> 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
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM
  2017-07-10 11:49 ` Benjamin Gaignard
  2017-07-10 12:23   ` Emil Velikov
@ 2017-07-10 16:58   ` Eric Anholt
  1 sibling, 0 replies; 5+ messages in thread
From: Eric Anholt @ 2017-07-10 16:58 UTC (permalink / raw)
  To: Benjamin Gaignard, Noralf Trønnes; +Cc: Yannick Fertre, DRI Development


[-- Attachment #1.1: Type: text/plain, Size: 1129 bytes --]

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

> 2017-07-10 12:53 GMT+02:00 Noralf Trønnes <noralf@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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-10 16:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 10:53 DRM_STM breaks fbdev mmap on ARCH_MULTIPLATFORM Noralf Trønnes
2017-07-10 11:49 ` Benjamin Gaignard
2017-07-10 12:23   ` Emil Velikov
2017-07-10 15:00     ` Daniel Vetter
2017-07-10 16:58   ` Eric Anholt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.