Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1685576 > unrolled thread

[PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU

Started byBenjamin Gaignard <benjamin.gaignard@linaro.org>
First post2017-07-12 09:50 +0200
Last post2017-07-12 18:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU Benjamin Gaignard <benjamin.gaignard@linaro.org> - 2017-07-12 09:50 +0200
    Re: [PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU Daniel Vetter <daniel@ffwll.ch> - 2017-07-12 10:20 +0200
    Re: [PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-07-12 18:40 +0200

#1685576 — [PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU

FromBenjamin Gaignard <benjamin.gaignard@linaro.org>
Date2017-07-12 09:50 +0200
Subject[PATCH v2] fbdev: make get_fb_unmapped_area depends of !MMU
Message-ID<u2kzf-5ja-7@gated-at.bofh.it>
Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected
do not compile and use get_fb_unmapped_area() if CONFIG_MMU is
also set. This will avoid mmap errors when compiling multi
architectures at same time.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
version 2:
- remove duplicated "\"

 drivers/video/fbdev/core/fbmem.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 069fe79..f20c5d2 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1492,7 +1492,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd,
 	return 0;
 }
 
-#ifdef CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA
+#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU)
 unsigned long get_fb_unmapped_area(struct file *filp,
 				   unsigned long addr, unsigned long len,
 				   unsigned long pgoff, unsigned long flags)
@@ -1519,7 +1519,8 @@ unsigned long get_fb_unmapped_area(struct file *filp,
 	.open =		fb_open,
 	.release =	fb_release,
 #if defined(HAVE_ARCH_FB_UNMAPPED_AREA) || \
-    defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA)
+	(defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && \
+	 !defined(CONFIG_MMU))
 	.get_unmapped_area = get_fb_unmapped_area,
 #endif
 #ifdef CONFIG_FB_DEFERRED_IO
-- 
1.9.1

[toc] | [next] | [standalone]


#1685620

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-07-12 10:20 +0200
Message-ID<u2l2i-5IN-31@gated-at.bofh.it>
In reply to#1685576
On Wed, Jul 12, 2017 at 09:43:07AM +0200, Benjamin Gaignard wrote:
> Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected
> do not compile and use get_fb_unmapped_area() if CONFIG_MMU is
> also set. This will avoid mmap errors when compiling multi
> architectures at same time.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>

Yeah we have the same CONFIG_MMU check on the gem side for
get_unmapped_area.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
> version 2:
> - remove duplicated "\"
> 
>  drivers/video/fbdev/core/fbmem.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
> index 069fe79..f20c5d2 100644
> --- a/drivers/video/fbdev/core/fbmem.c
> +++ b/drivers/video/fbdev/core/fbmem.c
> @@ -1492,7 +1492,7 @@ static long fb_compat_ioctl(struct file *file, unsigned int cmd,
>  	return 0;
>  }
>  
> -#ifdef CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA
> +#if defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && !defined(CONFIG_MMU)
>  unsigned long get_fb_unmapped_area(struct file *filp,
>  				   unsigned long addr, unsigned long len,
>  				   unsigned long pgoff, unsigned long flags)
> @@ -1519,7 +1519,8 @@ unsigned long get_fb_unmapped_area(struct file *filp,
>  	.open =		fb_open,
>  	.release =	fb_release,
>  #if defined(HAVE_ARCH_FB_UNMAPPED_AREA) || \
> -    defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA)
> +	(defined(CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA) && \
> +	 !defined(CONFIG_MMU))
>  	.get_unmapped_area = get_fb_unmapped_area,
>  #endif
>  #ifdef CONFIG_FB_DEFERRED_IO
> -- 
> 1.9.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1685901

FromBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date2017-07-12 18:40 +0200
Message-ID<u2sQa-28X-31@gated-at.bofh.it>
In reply to#1685576
On Wednesday, July 12, 2017 09:43:07 AM Benjamin Gaignard wrote:
> Even if CONFIG_FB_PROVIDE_GET_FB_UNMAPPED_AREA flag is selected
> do not compile and use get_fb_unmapped_area() if CONFIG_MMU is
> also set. This will avoid mmap errors when compiling multi
> architectures at same time.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>

Patch queued for 4.13, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web