Re: [RFC PATCH] drm: Add new DIRTY fb flags to pass interlaced alternate fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).

> 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.
> 
> 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.
> 
> Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xxxxxxxxxx>
> ---
>  include/uapi/drm/drm_mode.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
> index ce7efe2..40fef85 100644
> --- a/include/uapi/drm/drm_mode.h
> +++ b/include/uapi/drm/drm_mode.h
> @@ -428,7 +428,9 @@ struct drm_mode_fb_cmd2 {
>  
>  #define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01
>  #define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02
> -#define DRM_MODE_FB_DIRTY_FLAGS         0x03
> +#define DRM_MODE_FB_DIRTY_TOP_FIELD     0x03
> +#define DRM_MODE_FB_DIRTY_BOTTOM_FIELD  0x04
> +#define DRM_MODE_FB_DIRTY_FLAGS         0x07
>  
>  #define DRM_MODE_FB_DIRTY_MAX_CLIPS     256
>  
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux