From: Daniel Vetter <daniel@ffwll.ch>
To: Satish Kumar Nagireddy <SATISHNA@xilinx.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC PATCH] drm: Add new fb flags to pass interlaced alternate field
Date: Mon, 1 Oct 2018 09:19:13 +0200 [thread overview]
Message-ID: <20181001071913.GK11082@phenom.ffwll.local> (raw)
In-Reply-To: <BYAPR02MB4070D2B6750FDC60ADC77CD4AC170@BYAPR02MB4070.namprd02.prod.outlook.com>
On Mon, Sep 24, 2018 at 06:54:02PM +0000, Satish Kumar Nagireddy wrote:
> This patch adds two new framebuffer flags, so that application can
> communicate alternate interlaced field information to DRM.
>
> This patch also modifies the validation of framebuffer flags in DRM
> core framework. This is to ensure that application is setting the
> right framebuffer flags.
>
> Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
Yeah as a draft this seems more reasonable. What we now need is fleshing
out the full stack:
- Full kernel-side implementation, including driver code.
- igt testcase to validate all the corner-cases, e.g. how exactly does
this interact with FB_INTERLACED? What happens if the client fails to
supply the next field?
- Userspace compositor/app driving this. See
https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements
for full details.
Cheers, Daniel
> ---
> drivers/gpu/drm/drm_framebuffer.c | 3 ++-
> include/uapi/drm/drm_mode.h | 2 ++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
> index 28a0108..d330256 100644
> --- a/drivers/gpu/drm/drm_framebuffer.c
> +++ b/drivers/gpu/drm/drm_framebuffer.c
> @@ -241,7 +241,8 @@ drm_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_ALTERNATE_TOP | DRM_MODE_FB_ALTERNATE_BOTTOM)) {
> 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 ce7efe2..b857ed4 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -388,6 +388,8 @@ 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_ALTERNATE_TOP (1<<2) /* for alternate top field */
> +#define DRM_MODE_FB_ALTERNATE_BOTTOM (1<<3) /* for alternate bottom field */
>
> struct drm_mode_fb_cmd2 {
> __u32 fb_id;
> --
> 2.7.4
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-10-01 7:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 18:54 [RFC PATCH] drm: Add new fb flags to pass interlaced alternate field Satish Kumar Nagireddy
2018-10-01 7:19 ` Daniel Vetter [this message]
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=20181001071913.GK11082@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=SATISHNA@xilinx.com \
--cc=dri-devel@lists.freedesktop.org \
/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;
as well as URLs for NNTP newsgroup(s).