From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: "Linaro Kernel Mailman List" <linaro-kernel@lists.linaro.org>,
"Michel Dänzer" <michel@daenzer.net>,
"Philippe Cornu" <philippe.cornu@st.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"Yannick Fertre" <yannick.fertre@st.com>,
"Dave Airlie" <airlied@redhat.com>
Subject: Re: [RFC v3 1/3] fbmem: add default get_fb_unmapped_area function
Date: Thu, 01 Dec 2016 10:42:20 +0200 [thread overview]
Message-ID: <2627736.H8rOrhhv2K@avalon> (raw)
In-Reply-To: <CA+M3ks4xWf0ijaDnmFLhWJbTm9jM21NaqEcG7bcR5tOFM24o3Q@mail.gmail.com>
On Thursday 01 Dec 2016 08:27:58 Benjamin Gaignard wrote:
> 2016-12-01 3:31 GMT+01:00 Michel Dänzer <michel@daenzer.net>:
> > On 01/12/16 04:46 AM, Benjamin Gaignard wrote:
> >> 2016-11-30 20:39 GMT+01:00 Laurent Pinchart:
> >>> On Wednesday 30 Nov 2016 20:34:17 Benjamin Gaignard wrote:
> >>>> If HAVE_ARCH_FB_UNMAPPED_AREA is set and get_fb_unmapped_area
> >>>> function not defined in platform architecture let use a default
> >>>> function.
> >>>>
> >>>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> >>>> ---
> >>>>
> >>>> drivers/video/fbdev/core/fbmem.c | 15 +++++++++++++++
> >>>> 1 file changed, 15 insertions(+)
> >>>>
> >>>> diff --git a/drivers/video/fbdev/core/fbmem.c
> >>>> b/drivers/video/fbdev/core/fbmem.c index 76c1ad9..54488ee 100644
> >>>> --- a/drivers/video/fbdev/core/fbmem.c
> >>>> +++ b/drivers/video/fbdev/core/fbmem.c
> >>>> @@ -1492,6 +1492,21 @@ static long fb_compat_ioctl(struct file *file,
> >>>> unsigned int cmd, return 0;
> >>>>
> >>>> }
> >>>>
> >>>> +#if defined(HAVE_ARCH_FB_UNMAPPED_AREA) &&
> >>>> !defined(get_fb_unmapped_area)
> >>>
> >>> I think I've asked this twice already, how is that possible ?
> >>
> >> As you said before only sparc and blackfin architectures have define
> >> HAVE_ARCH_FB_UNMAPPED_AREA
> >> and get_fb_unmapped_area().
> >> For stm32f4 (ARMv7m) I plan to only add HAVE_ARCH_FB_UNMAPPED_AREA and
> >> use this default function
> >
> > Note that the preprocessor only considers defined(get_fb_unmapped_area)
> > true if get_fb_unmapped_area is defined as a macro, not if it's a normal
> > function. Since AFAICT get_fb_unmapped_area is a normal function on
> > sparc and blackfin, this default function will be compiled on those
> > architectures as well.
>
> Since only sparc and blackfin have this function already, I will
> change the condition to:
> #ifdef HAVE_ARCH_FB_UNMAPPED_AREA
> #ifndef CONFIG_SPARC
> #ifndef CONFIG_BLACKFIN
No, that's really hackish. HAVE_ARCH_FB_UNMAPPED_AREA means that the
architecture provides the function. The generic version should not be provided
when that macro is defined.
Please try to see if you can't share the implementation with at least
blackfin, and possibly sparc. If sparc requires its own version, you need a
different mechanism to decide whether to provide the generic one.
> so this function won't be compiled for those architectures
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-12-01 8:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 19:34 [RFC v3 0/3] Hello, Benjamin Gaignard
2016-11-30 19:34 ` [RFC v3 1/3] fbmem: add default get_fb_unmapped_area function Benjamin Gaignard
2016-11-30 19:39 ` Laurent Pinchart
2016-11-30 19:46 ` Benjamin Gaignard
2016-12-01 1:13 ` Laurent Pinchart
2016-12-01 7:24 ` Benjamin Gaignard
2016-12-01 8:38 ` Laurent Pinchart
2016-12-01 2:31 ` Michel Dänzer
2016-12-01 7:27 ` Benjamin Gaignard
2016-12-01 8:42 ` Laurent Pinchart [this message]
2016-11-30 19:34 ` [RFC v3 2/3] drm: compile drm_vm.c only when needed Benjamin Gaignard
2016-11-30 19:40 ` Laurent Pinchart
2016-11-30 19:34 ` [RFC v3 3/3] drm: allow to use mmuless SoC Benjamin Gaignard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2627736.H8rOrhhv2K@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@redhat.com \
--cc=benjamin.gaignard@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=michel@daenzer.net \
--cc=philippe.cornu@st.com \
--cc=yannick.fertre@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.