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 DIRTY fb flags to pass interlaced alternate fields
Date: Tue, 11 Sep 2018 09:32:09 +0200 [thread overview]
Message-ID: <20180911073209.GF19774@phenom.ffwll.local> (raw)
In-Reply-To: <BYAPR02MB4070CBD08F5C3064B5F644EAAC040@BYAPR02MB4070.namprd02.prod.outlook.com>
On Tue, Sep 11, 2018 at 02:54:22AM +0000, Satish Kumar Nagireddy wrote:
> Hi Ville, Daniel,
>
> Thanks a lot for the reply. Some comments below.
>
> > -----Original Message-----
> > From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
> > Sent: Monday, September 10, 2018 1:28 PM
> > To: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Satish Kumar Nagireddy <SATISHNA@xilinx.com>; dri-
> > devel@lists.freedesktop.org
> > Subject: Re: [RFC PATCH] drm: Add new DIRTY fb flags to pass interlaced
> > alternate fields
> >
> > On Mon, Sep 10, 2018 at 03:02:16PM +0300, Ville Syrjälä wrote:
> > > On Fri, Sep 07, 2018 at 02:46:21PM -0700, Satish Kumar Nagireddy wrote:
> > > > The requirement is to render interlaced alternate buffers. In case
> > > > of alternate, top field and bottom field are in two different buffers.
> > > >
> > > > The question is, can we pass existing flags
> > > > DRM_MODE_PRESENT_TOP_FIELD and DRM_MODE_PRESENT_TOP_FIELD
> > to DRM_IOCTL_MODE_SETPLANE ioctl?
> > >
> > > The original idea with those flags was bob deinterlacing type of stuff.
> > >
> > > For fbs with non-interleaved fields I think we'd have to extend addfb
> > > somewhat to allow passing a separate buffer for each field. The
> > > problem with that is that we only have 4 buffers in addfb, so we'd run
> > > out for three plane formats. So we'd have to increase the number of
> > > buffers in addfb, or add some kind of implicit assumption on how the
> > > fields are stored in the single bo (which I presume might not even be
> > > possible on some crazy hardware).
> >
> > Yeah given that an fb is supposed to stick around potentially forever, I think
> > we need to have both fields in one logical framebuffer object. But I have no
> > idea how exactly we'd best go about for this, at least for true interlaced.
> > Doubling up the drm_mode_fb_cmd2 structure (including fourcc and
> > modifiers, or not?) is probably simplest.
> > -Daniel
>
> [satish] As you know In alternate interlaced case each field buffer size
> is 1920x540 (1920x1080i video resolution) and I have to submit fields
> one after the other. I don't need to give them together for display.
> Most of the modern interlaced displays are constructing a frame from a
> field (by pixel interpolation).
>
> Imagine a capture and display use case: Where 1920x540 buffers are
> captured, top field followed by bottom filed so on... There are chances
> that some fields can be dropped from capture device. Then userspace will
> have to communicate DRM with every field buffer if it is top or bottom.
> Addfb2() will be called only once which cannot be called
> throughout rendering lifecycle. So I have chosen DIRTY framebuffer
> ioctl, where some area of fb is changing with every buffer.
DRM doesn't work like this, you need to be able to keep showing the same
framebuffer forever. That means you need a framebuffer with both fields.
So only specifying the field on every flip (dirty fb doesn't do what you
want to do here at all) isn't good enough. This is a huge difference in
drm compared to v4l, where there's a queue of one-shot buffers.
And you can just call addfb for every flip, the overhead is tiny for that.
-Daniel
--
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-09-11 7:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-07 21:46 [RFC PATCH] drm: Add new DIRTY fb flags to pass interlaced alternate fields Satish Kumar Nagireddy
2018-09-10 12:02 ` Ville Syrjälä
2018-09-10 20:28 ` Daniel Vetter
2018-09-11 2:54 ` Satish Kumar Nagireddy
2018-09-11 7:32 ` 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=20180911073209.GF19774@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 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.