All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] drm: Add new DIRTY fb flags to pass interlaced alternate fields
@ 2018-09-07 21:46 Satish Kumar Nagireddy
  2018-09-10 12:02 ` Ville Syrjälä
  0 siblings, 1 reply; 5+ messages in thread
From: Satish Kumar Nagireddy @ 2018-09-07 21:46 UTC (permalink / raw)
  To: dri-devel; +Cc: Satish Kumar Nagireddy

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@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

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-11  7:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.