From: Daniel Vetter <daniel@ffwll.ch>
To: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Cc: Yannick Fertre <yannick.fertre@st.com>,
Philippe Cornu <philippe.cornu@st.com>,
Benjamin GAIGNARD <benjamin.gaignard@st.com>,
Vincent Abriou <vincent.abriou@st.com>,
Gustavo Padovan <gustavo@padovan.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
sean@poorly.run, David Airlie <airlied@linux.ie>,
ML dri-devel <dri-devel@lists.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH v1 1/2] drm: Add missing flags for pixel clock & data enable
Date: Wed, 24 Oct 2018 10:16:58 +0200 [thread overview]
Message-ID: <20181024081658.GD324@phenom.ffwll.local> (raw)
In-Reply-To: <CA+M3ks5HWuUXHdKePT0MAU9G=4YkUdJZBXBasVW_X1A2YTSSoA@mail.gmail.com>
On Tue, Oct 23, 2018 at 04:50:19PM +0200, Benjamin Gaignard wrote:
> Le lun. 15 oct. 2018 à 13:15, Benjamin Gaignard
> <benjamin.gaignard@linaro.org> a écrit :
> >
> > Le lun. 24 sept. 2018 à 13:59, Yannick Fertré <yannick.fertre@st.com> a écrit :
> > >
> > > Add missing flags for pixel clock & data enable polarities.
> > > These flags are similar to other synchronization signals (hsync, vsync...).
> > >
> > > Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> >
> > Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
>
> Dave or Daniel could you give us your PoV on this patch ?
Does it work? Iirc we had some userspace chocking on new mode flags, and
needed explicit opt-in. If that looks good (check weston, -modesetting and
drm_hwc, that should have you covered I hope) then has my ack.
-Daniel
> Thanks
>
> >
> > > ---
> > > drivers/gpu/drm/drm_modes.c | 19 ++++++++++++++++++-
> > > include/uapi/drm/drm_mode.h | 6 ++++++
> > > 2 files changed, 24 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > > index 02db9ac..596f8b3 100644
> > > --- a/drivers/gpu/drm/drm_modes.c
> > > +++ b/drivers/gpu/drm/drm_modes.c
> > > @@ -130,7 +130,7 @@ EXPORT_SYMBOL(drm_mode_probed_add);
> > > * according to the hdisplay, vdisplay, vrefresh.
> > > * It is based from the VESA(TM) Coordinated Video Timing Generator by
> > > * Graham Loveridge April 9, 2003 available at
> > > - * http://www.elo.utfsm.cl/~elo212/docs/CVTd6r1.xls
> > > + * http://www.elo.utfsm.cl/~elo212/docs/CVTd6r1.xls
> > > *
> > > * And it is copied from xf86CVTmode in xserver/hw/xfree86/modes/xf86cvt.c.
> > > * What I have done is to translate it by using integer calculation.
> > > @@ -611,6 +611,15 @@ void drm_display_mode_from_videomode(const struct videomode *vm,
> > > dmode->flags |= DRM_MODE_FLAG_DBLSCAN;
> > > if (vm->flags & DISPLAY_FLAGS_DOUBLECLK)
> > > dmode->flags |= DRM_MODE_FLAG_DBLCLK;
> > > + if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
> > > + dmode->flags |= DRM_MODE_FLAG_PPIXCLK;
> > > + else if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
> > > + dmode->flags |= DRM_MODE_FLAG_NPIXCLK;
> > > + if (vm->flags & DISPLAY_FLAGS_DE_HIGH)
> > > + dmode->flags |= DRM_MODE_FLAG_PDATAEN;
> > > + else if (vm->flags & DISPLAY_FLAGS_DE_LOW)
> > > + dmode->flags |= DRM_MODE_FLAG_NDE;
> > > +
> > > drm_mode_set_name(dmode);
> > > }
> > > EXPORT_SYMBOL_GPL(drm_display_mode_from_videomode);
> > > @@ -652,6 +661,14 @@ void drm_display_mode_to_videomode(const struct drm_display_mode *dmode,
> > > vm->flags |= DISPLAY_FLAGS_DOUBLESCAN;
> > > if (dmode->flags & DRM_MODE_FLAG_DBLCLK)
> > > vm->flags |= DISPLAY_FLAGS_DOUBLECLK;
> > > + if (dmode->flags & DRM_MODE_FLAG_PPIXDATA)
> > > + vm->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
> > > + else if (dmode->flags & DRM_MODE_FLAG_NPIXDATA)
> > > + vm->flags |= DISPLAY_FLAGS_PIXDATA_NEGEDGE;
> > > + if (dmode->flags & DRM_MODE_FLAG_PDE)
> > > + vm->flags |= DISPLAY_FLAGS_DE_HIGH;
> > > + else if (dmode->flags & DRM_MODE_FLAG_NDE)
> > > + vm->flags |= DISPLAY_FLAGS_DE_LOW;
> > > }
> > > EXPORT_SYMBOL_GPL(drm_display_mode_to_videomode);
> > >
> > > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> > > index d3e0fe3..b335a17 100644
> > > --- a/include/uapi/drm/drm_mode.h
> > > +++ b/include/uapi/drm/drm_mode.h
> > > @@ -89,6 +89,12 @@ extern "C" {
> > > #define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14)
> > > #define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14)
> > >
> > > +/* flags for polarity clock & data enable polarities */
> > > +#define DRM_MODE_FLAG_PPIXDATA (1 << 19)
> > > +#define DRM_MODE_FLAG_NPIXDATA (1 << 20)
> > > +#define DRM_MODE_FLAG_PDE (1 << 21)
> > > +#define DRM_MODE_FLAG_NDE (1 << 22)
> > > +
> > > /* Picture aspect ratio options */
> > > #define DRM_MODE_PICTURE_ASPECT_NONE 0
> > > #define DRM_MODE_PICTURE_ASPECT_4_3 1
> > > --
> > > 2.7.4
> > >
> > > _______________________________________________
> > > dri-devel mailing list
> > > dri-devel@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
>
> --
> Benjamin Gaignard
>
> Graphic Study Group
>
> Linaro.org │ Open source software for ARM SoCs
>
> Follow Linaro: Facebook | Twitter | Blog
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2018-10-24 8:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 11:36 [PATCH v1 0/2] Manage pixel clock & data enable polarities Yannick Fertré
2018-09-24 11:36 ` [PATCH v1 1/2] drm: Add missing flags for pixel clock & data enable Yannick Fertré
2018-10-15 11:15 ` Benjamin Gaignard
2018-10-23 14:50 ` Benjamin Gaignard
2018-10-24 8:16 ` Daniel Vetter [this message]
2018-10-24 8:23 ` Lucas Stach
2018-09-24 11:36 ` [PATCH v1 2/2] drm/stm: ltdc: Solve issue on pixel clock & data enable polarity Yannick Fertré
2018-10-15 11:15 ` 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=20181024081658.GD324@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=benjamin.gaignard@linaro.org \
--cc=benjamin.gaignard@st.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=philippe.cornu@st.com \
--cc=sean@poorly.run \
--cc=vincent.abriou@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®