From: Vincent ABRIOU <vincent.abriou@st.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Fabien DESSENNE <fabien.dessenne@st.com>
Subject: Re: [PATCH 1/2] drm: Add DRM_MODE_FB_BFF flag definition
Date: Mon, 29 Feb 2016 17:16:13 +0100 [thread overview]
Message-ID: <56D46ECD.3060103@st.com> (raw)
In-Reply-To: <20160229153208.GE32705@phenom.ffwll.local>
On 02/29/2016 04:32 PM, Daniel Vetter wrote:
> On Fri, Feb 26, 2016 at 11:33:08AM +0100, Vincent ABRIOU wrote:
>> Hi,
>>
>> Have you any comment for this proposal?
>
> I guess since we don't really have userspace that uses interlaced modes,
> much less actually bothers to get the fields correct I think just have
> some (open-source) userspace somewhere (does gstreamer care enough about
> this?) which needs this and it's good.
>
Hi Daniel,
At Gstreamer side, an interlaced GstBuffer could be tagged with flags:
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#GstVideoFrameFlags
GST_VIDEO_FRAME_FLAG_TFF is one of them and it is used to warn that the
buffer is interlaced with Top Field First (TFF).
At kernel side, we preferred to tag the interlaced buffer with Bottom
Field First (BFF) because most of the interlaced buffer are TFF and that
BFF are the exception.
Further, we made tests with weston to validate the full path and it is
working fine.
BR
Vincent
> Without userspace this is a hard sell.
>
> Thanks, Daniel
>
>>
>> BR
>> Vincent
>>
>> On 02/12/2016 10:26 AM, Vincent Abriou wrote:
>>> From: Fabien Dessenne <fabien.dessenne@st.com>
>>>
>>> If a buffer is interlaced, this "Bottom Field First" flag specifies
>>> which of the top or the bottom field shall be displayed first.
>>> When set, the bottom field shall be displayed first.
>>> When unset the top field shall be displayed first.
>>>
>>> Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
>>> ---
>>> drivers/gpu/drm/drm_crtc.c | 3 ++-
>>> include/uapi/drm/drm_mode.h | 1 +
>>> 2 files changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
>>> index d40bab2..64b4fdac 100644
>>> --- a/drivers/gpu/drm/drm_crtc.c
>>> +++ b/drivers/gpu/drm/drm_crtc.c
>>> @@ -3315,7 +3315,8 @@ internal_framebuffer_create(struct drm_device *dev,
>>> struct drm_framebuffer *fb;
>>> int ret;
>>>
>>> - if (r->flags & ~(DRM_MODE_FB_INTERLACED | DRM_MODE_FB_MODIFIERS)) {
>>> + if (r->flags & ~(DRM_MODE_FB_INTERLACED | DRM_MODE_FB_MODIFIERS
>>> + | DRM_MODE_FB_BFF)) {
>>> DRM_DEBUG_KMS("bad framebuffer flags 0x%08x\n", r->flags);
>>> return ERR_PTR(-EINVAL);
>>> }
>>> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
>>> index 50adb46..f7c9111 100644
>>> --- a/include/uapi/drm/drm_mode.h
>>> +++ b/include/uapi/drm/drm_mode.h
>>> @@ -354,6 +354,7 @@ struct drm_mode_fb_cmd {
>>>
>>> #define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
>>> #define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */
>>> +#define DRM_MODE_FB_BFF (1<<2) /* if interlaced, bottom field first */
>>>
>>> struct drm_mode_fb_cmd2 {
>>> __u32 fb_id;
>>>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-02-29 16:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 9:26 [PATCH 0/2] drm/sti: support of interlaced content with Bottom Field Vincent Abriou
2016-02-12 9:26 ` [PATCH 1/2] drm: Add DRM_MODE_FB_BFF flag definition Vincent Abriou
2016-02-26 10:33 ` Vincent ABRIOU
2016-02-29 15:32 ` Daniel Vetter
2016-02-29 16:16 ` Vincent ABRIOU [this message]
2016-02-29 16:37 ` Daniel Vetter
2016-02-12 9:26 ` [PATCH 2/2] drm/sti: support interlaced top / bottom field first Vincent Abriou
2016-02-29 20:41 ` [PATCH 0/2] drm/sti: support of interlaced content with Bottom Field Ville Syrjälä
2016-03-03 10:03 ` Fabien DESSENNE
2016-03-03 11:28 ` Ville Syrjälä
2016-03-03 13:28 ` Fabien DESSENNE
2016-03-03 13:33 ` Ville Syrjälä
2016-03-03 14:40 ` Fabien DESSENNE
2016-03-03 15:34 ` Ville Syrjälä
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=56D46ECD.3060103@st.com \
--to=vincent.abriou@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabien.dessenne@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.