Stereo 3D v3
Subsystems (2)
v2 was:
http://lists.freedesktop.org/archives/dri-devel/2013-September/045354.html
Only one change, the stereo part for the flags is now an enum instead of being a bit field.
The kernel series has been pushed to drm-intel, the libdrm patches should follow if there isn't any objection.
Signature · 1 line
Damien
PATCH 1/3 drm: Synchronize the stereo 3D mode flags from the kernel headers
v2: stereo layouts are now an enum (Daniel Vetter)
--- include/drm/drm_mode.h | 39 +++++++++++++++++++++++++-------------- xf86drmMode.h | 38 ++++++++++++++++++++++++-------------- 2 files changed, 49 insertions(+), 28 deletions(-)
include/drm/drm_mode.h +25 -14
@@ -42,20 +42,31 @@/* Video mode flags */ /* bit compatible with the xorg definitions. */ -#define DRM_MODE_FLAG_PHSYNC (1<<0) -#define DRM_MODE_FLAG_NHSYNC (1<<1) -#define DRM_MODE_FLAG_PVSYNC (1<<2) -#define DRM_MODE_FLAG_NVSYNC (1<<3) -#define DRM_MODE_FLAG_INTERLACE (1<<4) -#define DRM_MODE_FLAG_DBLSCAN (1<<5) -#define DRM_MODE_FLAG_CSYNC (1<<6) -#define DRM_MODE_FLAG_PCSYNC (1<<7) -#define DRM_MODE_FLAG_NCSYNC (1<<8) -#define DRM_MODE_FLAG_HSKEW (1<<9)/* hskew provided */ -#define DRM_MODE_FLAG_BCAST (1<<10) -#define DRM_MODE_FLAG_PIXMUX (1<<11) -#define DRM_MODE_FLAG_DBLCLK (1<<12) -#define DRM_MODE_FLAG_CLKDIV2 (1<<13) +#define DRM_MODE_FLAG_PHSYNC (1<<0) +#define DRM_MODE_FLAG_NHSYNC (1<<1) +#define DRM_MODE_FLAG_PVSYNC (1<<2) +#define DRM_MODE_FLAG_NVSYNC (1<<3) +#define DRM_MODE_FLAG_INTERLACE (1<<4) +#define DRM_MODE_FLAG_DBLSCAN (1<<5) +#define DRM_MODE_FLAG_CSYNC (1<<6) +#define DRM_MODE_FLAG_PCSYNC (1<<7) +#define DRM_MODE_FLAG_NCSYNC (1<<8) +#define DRM_MODE_FLAG_HSKEW (1<<9)/* hskew provided */ +#define DRM_MODE_FLAG_BCAST (1<<10) +#define DRM_MODE_FLAG_PIXMUX (1<<11) +#define DRM_MODE_FLAG_DBLCLK (1<<12) +#define DRM_MODE_FLAG_CLKDIV2 (1<<13) +#define DRM_MODE_FLAG_3D_MASK (0x1f<<14) +#define DRM_MODE_FLAG_3D_NONE (0<<14) +#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14) +#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14) +#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14) +#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4<<14) +#define DRM_MODE_FLAG_3D_L_DEPTH (5<<14) +#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14) +#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14) +#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14) +/* DPMS flags */ /* bit compatible with the xorg definitions. */
xf86drmMode.h +24 -14
@@ -81,20 +81,30 @@ extern "C" {/* Video mode flags */ /* bit compatible with the xorg definitions. */ -#define DRM_MODE_FLAG_PHSYNC (1<<0) -#define DRM_MODE_FLAG_NHSYNC (1<<1) -#define DRM_MODE_FLAG_PVSYNC (1<<2) -#define DRM_MODE_FLAG_NVSYNC (1<<3) -#define DRM_MODE_FLAG_INTERLACE (1<<4) -#define DRM_MODE_FLAG_DBLSCAN (1<<5) -#define DRM_MODE_FLAG_CSYNC (1<<6) -#define DRM_MODE_FLAG_PCSYNC (1<<7) -#define DRM_MODE_FLAG_NCSYNC (1<<8) -#define DRM_MODE_FLAG_HSKEW (1<<9)/* hskew provided */ -#define DRM_MODE_FLAG_BCAST (1<<10) -#define DRM_MODE_FLAG_PIXMUX (1<<11) -#define DRM_MODE_FLAG_DBLCLK (1<<12) -#define DRM_MODE_FLAG_CLKDIV2 (1<<13) +#define DRM_MODE_FLAG_PHSYNC (1<<0) +#define DRM_MODE_FLAG_NHSYNC (1<<1) +#define DRM_MODE_FLAG_PVSYNC (1<<2) +#define DRM_MODE_FLAG_NVSYNC (1<<3) +#define DRM_MODE_FLAG_INTERLACE (1<<4) +#define DRM_MODE_FLAG_DBLSCAN (1<<5) +#define DRM_MODE_FLAG_CSYNC (1<<6) +#define DRM_MODE_FLAG_PCSYNC (1<<7) +#define DRM_MODE_FLAG_NCSYNC (1<<8) +#define DRM_MODE_FLAG_HSKEW (1<<9)/* hskew provided */ +#define DRM_MODE_FLAG_BCAST (1<<10) +#define DRM_MODE_FLAG_PIXMUX (1<<11) +#define DRM_MODE_FLAG_DBLCLK (1<<12) +#define DRM_MODE_FLAG_CLKDIV2 (1<<13) +#define DRM_MODE_FLAG_3D_MASK (0x1f<<14) +#define DRM_MODE_FLAG_3D_NONE (0<<14) +#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14) +#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14) +#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14) +#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4<<14) +#define DRM_MODE_FLAG_3D_L_DEPTH (5<<14) +#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6<<14) +#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14) +#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14)/* DPMS flags */ /* bit compatible with the xorg definitions. */
Signature · 1 line
1.8.3.1
PATCH 2/3 drm: Sync the DRM_SET_CLIENT_CAP ioctl definition
In reply to Damien Lespiauv2: SET_CAP -> SET_CLIENT_CAP renaming
--- include/drm/drm.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
include/drm/drm.h +16 -0
@@ -618,6 +618,21 @@ struct drm_get_cap {__u64 value; }; +/** +* DRM_CLIENT_CAP_STEREO_3D +* +* if set to 1, the DRM core will expose the stereo 3D capabilities of the +* monitor by advertising the supported 3D layouts in the flags of struct +* drm_mode_modeinfo. +*/ +#define DRM_CLIENT_CAP_STEREO_3D 1 + +/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ +struct drm_set_client_cap { +__u64 capability; +__u64 value; +}; +#define DRM_CLOEXEC O_CLOEXECstruct drm_prime_handle {__u32 handle;
@@ -650,6 +665,7 @@ struct drm_prime_handle {#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink)#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open)#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) +#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap)#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
Signature · 1 line
1.8.3.1
PATCH 3/3 drm: Introduce a drmSetClientCap() wrapper
In reply to Damien LespiauThat wraps around the new DRM_SET_CLIENT_CAP ioctl.
v2: SET_CAP -> SET_CLIENT_CAP renaming
--- xf86drm.c | 7 +++++++ xf86drm.h | 2 ++ 2 files changed, 9 insertions(+)
xf86drm.c +7 -0
@@ -823,6 +823,13 @@ int drmGetCap(int fd, uint64_t capability, uint64_t *value)return 0 ; } +int drmSetClientCap (int fd,uint64_t capability,uint64_t value) +{ +struct drm_set_client_cap cap = { capability, value }; + +return drmIoctl (fd,DRM_IOCTL_SET_CLIENT_CAP , &cap); +} +/** * Free the bus ID information. *
xf86drm.h +2 -0
@@ -609,6 +609,8 @@ extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle, unsigned int num, void *data);extern int drmCtlInstHandler (int fd,int irq);extern int drmCtlUninstHandler (int fd); +extern int drmSetClientCap (int fd,uint64_t capability, +uint64_t value);/* General user-level programmer's API: authenticated client and/or X */ extern int drmMap(int fd,
Signature · 1 line
1.8.3.1
Quoted 2 lines · Damien Lespiau
The kernel series has been pushed to drm-intel, the libdrm patches should follow if there isn't any objection.
Swiftly pushed.
Signature · 1 line
Damien