Hi Satish,

On Fri, 7 Sep 2018 at 23:04, Satish Nagireddy
<satish.nagired...@gmail.com> 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?

Yes, if the driver implements it. No in-tree driver implements it, and
the core does not pass along or even check the flags, so you would
have to modify the DRM core in order to implement this. This makes the
userspace depend on a specific driver, but this is already the case
for setplane, as the pre-atomic interface is hopelessly underspecified
wrt timing etc, which differs massively between drivers. We recommend
not using it.

> But in case if urrent frame out of display range, application
> will invoke DRM_IOCTL_MODE_PAGE_FLIP ioctl. So, it is not guaranteed
> that application will always call setplane(), it may also call page_flip().
> Then we will have to introduce two more flags to pass with page_flip()
> ioctl, which is complicating things.

Yes, that's correct.

> Background of DRM_IOCTL_MODE_DIRTYFB ioctl: This ioctl is defined, so
> that userspace can notify the driver that an area of framebuffer has
> changed and should be flushed to display hardware.
>
> The proposed solution is to introduce new dirty fb flags, so that userspace
> can pass them with every alternate field buffer and the same is reached
> display hardware. This patch adds new dirty framebuffer flags, so that
> application can pass interlaced alternate field information to driver.

If you're adding two new flags anyway, why not just add them to
pageflip? DirtyFB is not required when pageflipping, and is mostly
only intended for single-buffered usecases, which this is not. It is
not required to be used in pageflipping pipelines, and making people
use DirtyFB in order to specify frame order is quite strange.

Another place where you could specify the field order would be in
AddFB, which was discussed in this thread:
https://lists.freedesktop.org/archives/dri-devel/2016-March/thread.html#102161

In any case, I would very much recommend using atomic modesetting both
within your driver and also within GStreamer, as this solves many
other issues at the same time.

Cheers,
Daniel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to