History

drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI

Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ defines to the UAPI as a convenience. Ideally the DRM_ROTATE_ and DRM_REFLECT_ property ids are looked up through the atomic API, but realizing that userspace is likely to take shortcuts and assume that the enum values are what is sent over the wire. As a result these defines are provided purely as a convenience to userspace applications. Changes since v3: - Switched away from past tense in comments - Add define name change to previously mis-spelled DRM_REFLECT_X comment - Improved the comment for the DRM_MODE_REFLECT_<axis> comment Changes since v2: - Changed define prefix from DRM_MODE_PROP_ to DRM_MODE_ - Fix compilation errors - Changed comment formatting - Deduplicated comment lines - Clarified DRM_MODE_PROP_REFLECT_ comment Changes since v1: - Moved defines from drm.h to drm_mode.h - Changed define prefix from DRM_ to DRM_MODE_PROP_ - Updated uses of the defines to the new prefix - Removed include from drm_rect.c - Stopped using the BIT() macro

Robert Foss committed 9 years ago

Commit c2c446a1 parent e8fa49b25 files · +202 −171Browse files

Showing the changes to include/uapi (1 of 25 files). Show all

Unified · Split

include/uapi/drm/drm_mode.h+48−1
@@ -75,7 +75,7 @@ extern "C" { · 74 unmodified lines
75 * (define not exposed to user space).75 * (define not exposed to user space).
76 */76 */
77#define DRM_MODE_FLAG_3D_MASK (0x1f<<14)77#define DRM_MODE_FLAG_3D_MASK (0x1f<<14)
78#define DRM_MODE_FLAG_3D_NONE (0<<14)78#define DRM_MODE_FLAG_3D_NONE (0<<14)
79#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14)79#define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14)
80#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14)80#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2<<14)
81#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14)81#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3<<14)
@@ -127,6 +127,53 @@ extern "C" { · 45 unmodified lines
127#define DRM_MODE_LINK_STATUS_GOOD 0127#define DRM_MODE_LINK_STATUS_GOOD 0
128#define DRM_MODE_LINK_STATUS_BAD 1128#define DRM_MODE_LINK_STATUS_BAD 1
129 129
130/*
131 * DRM_MODE_ROTATE_<degrees>
132 *
133 * Signals that a drm plane is been rotated <degrees> degrees in counter
134 * clockwise direction.
135 *
136 * This define is provided as a convenience, looking up the property id
137 * using the name->prop id lookup is the preferred method.
138 */
139#define DRM_MODE_ROTATE_0 (1<<0)
140#define DRM_MODE_ROTATE_90 (1<<1)
141#define DRM_MODE_ROTATE_180 (1<<2)
142#define DRM_MODE_ROTATE_270 (1<<3)
143
144/*
145 * DRM_MODE_ROTATE_MASK
146 *
147 * Bitmask used to look for drm plane rotations.
148 */
149#define DRM_MODE_ROTATE_MASK (\
150 DRM_MODE_ROTATE_0 | \
151 DRM_MODE_ROTATE_90 | \
152 DRM_MODE_ROTATE_180 | \
153 DRM_MODE_ROTATE_270)
154
155/*
156 * DRM_MODE_REFLECT_<axis>
157 *
158 * Signals that the contents of a drm plane is reflected in the <axis> axis,
159 * in the same way as mirroring.
160 *
161 * This define is provided as a convenience, looking up the property id
162 * using the name->prop id lookup is the preferred method.
163 */
164#define DRM_MODE_REFLECT_X (1<<4)
165#define DRM_MODE_REFLECT_Y (1<<5)
166
167/*
168 * DRM_MODE_REFLECT_MASK
169 *
170 * Bitmask used to look for drm plane reflections.
171 */
172#define DRM_MODE_REFLECT_MASK (\
173 DRM_MODE_REFLECT_X | \
174 DRM_MODE_REFLECT_Y)
175
176
130struct drm_mode_modeinfo {177struct drm_mode_modeinfo {
131 __u32 clock;178 __u32 clock;
132 __u16 hdisplay;179 __u16 hdisplay;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t