aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_mode.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-11-14 17:51:27 -0500
committerDave Airlie <airlied@redhat.com>2011-11-15 14:53:10 -0500
commit8cf5c9177151537e73ff1816540e4ba24b174391 (patch)
tree0b805659ef5b68550b37166c5d98319c4fde5639 /include/drm/drm_mode.h
parente08e96de986ceb2c6b683df0bd0c4ddd4f91dcfd (diff)
drm: add plane support v3
Planes are a bit like half-CRTCs. They have a location and fb, but don't drive outputs directly. Add support for handling them to the core KMS code. v2: fix ABI of get_plane - move format_type_ptr to the end v3: add 'flags' field for interlaced support (from Ville) Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Reviewed-by: Rob Clark <rob.clark@linaro.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm_mode.h')
-rw-r--r--include/drm/drm_mode.h47
1 files changed, 42 insertions, 5 deletions
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index d30bedfeb7ef..44576a54dc3b 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -120,11 +120,48 @@ struct drm_mode_crtc {
120 struct drm_mode_modeinfo mode; 120 struct drm_mode_modeinfo mode;
121}; 121};
122 122
123#define DRM_MODE_ENCODER_NONE 0 123#define DRM_MODE_PRESENT_TOP_FIELD (1<<0)
124#define DRM_MODE_ENCODER_DAC 1 124#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1)
125#define DRM_MODE_ENCODER_TMDS 2 125
126#define DRM_MODE_ENCODER_LVDS 3 126/* Planes blend with or override other bits on the CRTC */
127#define DRM_MODE_ENCODER_TVDAC 4 127struct drm_mode_set_plane {
128 __u32 plane_id;
129 __u32 crtc_id;
130 __u32 fb_id; /* fb object contains surface format type */
131 __u32 flags; /* see above flags */
132
133 /* Signed dest location allows it to be partially off screen */
134 __s32 crtc_x, crtc_y;
135 __u32 crtc_w, crtc_h;
136
137 /* Source values are 16.16 fixed point */
138 __u32 src_x, src_y;
139 __u32 src_h, src_w;
140};
141
142struct drm_mode_get_plane {
143 __u32 plane_id;
144
145 __u32 crtc_id;
146 __u32 fb_id;
147
148 __u32 possible_crtcs;
149 __u32 gamma_size;
150
151 __u32 count_format_types;
152 __u64 format_type_ptr;
153};
154
155struct drm_mode_get_plane_res {
156 __u64 plane_id_ptr;
157 __u32 count_planes;
158};
159
160#define DRM_MODE_ENCODER_NONE 0
161#define DRM_MODE_ENCODER_DAC 1
162#define DRM_MODE_ENCODER_TMDS 2
163#define DRM_MODE_ENCODER_LVDS 3
164#define DRM_MODE_ENCODER_TVDAC 4
128#define DRM_MODE_ENCODER_VIRTUAL 5 165#define DRM_MODE_ENCODER_VIRTUAL 5
129 166
130struct drm_mode_get_encoder { 167struct drm_mode_get_encoder {