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

Satish Kumar Nagireddy satish.nagireddy.nagireddy at xilinx.com
Fri Sep 7 21:46:21 UTC 2018


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?
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 at xilinx.com>
---
 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



More information about the dri-devel mailing list