summaryrefslogtreecommitdiff
path: root/drm-atomic.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2017-05-02 21:01:53 -0700
committerBen Widawsky <ben@bwidawsk.net>2017-05-02 21:20:43 -0700
commit4d322e94f08c567a5ff467e21f5b41dab4160bdb (patch)
tree262871d0dffb81d71d5b1e397490a74fff310563 /drm-atomic.c
parent592a67706c22cedd45057a6cffa47612458049fe (diff)
downloadkmscube-4d322e94f08c567a5ff467e21f5b41dab4160bdb.tar.gz
drm-atomic: Fix the slashes, dammit
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'drm-atomic.c')
-rw-r--r--drm-atomic.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/drm-atomic.c b/drm-atomic.c
index bd4f3a8..2548979 100644
--- a/drm-atomic.c
+++ b/drm-atomic.c
@@ -367,36 +367,35 @@ const struct drm * init_drm_atomic(const char *device)
drm.connector = calloc(1, sizeof(*drm.connector));
#define get_resource(type, Type, id) do { \
- drm.type->type = drmModeGet##Type(drm.fd, id); \
- if (!drm.type->type) { \
- printf("could not get %s %i: %s\n", \
- #type, id, strerror(errno)); \
- return NULL; \
- } \
+ drm.type->type = drmModeGet##Type(drm.fd, id); \
+ if (!drm.type->type) { \
+ printf("could not get %s %i: %s\n", \
+ #type, id, strerror(errno)); \
+ return NULL; \
+ } \
} while (0)
get_resource(plane, Plane, plane_id);
get_resource(crtc, Crtc, drm.crtc_id);
get_resource(connector, Connector, drm.connector_id);
-#define get_properties(type, TYPE, id) do { \
- uint32_t i; \
- drm.type->props = drmModeObjectGetProperties(drm.fd, \
- id, DRM_MODE_OBJECT_##TYPE); \
- if (!drm.type->props) { \
- printf("could not get %s %u properties: %s\n", \
- #type, id, strerror(errno)); \
- return NULL; \
- } \
- drm.type->props_info = calloc(drm.type->props->count_props, \
- sizeof(drm.type->props_info)); \
- for (i = 0; i < drm.type->props->count_props; i++) { \
- drm.type->props_info[i] = drmModeGetProperty(drm.fd,\
- drm.type->props->props[i]); \
- } \
+#define get_properties(type, TYPE, id) do { \
+ uint32_t i; \
+ drm.type->props = drmModeObjectGetProperties(drm.fd, \
+ id, DRM_MODE_OBJECT_##TYPE); \
+ if (!drm.type->props) { \
+ printf("could not get %s %u properties: %s\n", \
+ #type, id, strerror(errno)); \
+ return NULL; \
+ } \
+ drm.type->props_info = calloc(drm.type->props->count_props, \
+ sizeof(drm.type->props_info)); \
+ for (i = 0; i < drm.type->props->count_props; i++) { \
+ drm.type->props_info[i] = drmModeGetProperty(drm.fd, \
+ drm.type->props->props[i]); \
+ } \
} while (0)
-
get_properties(plane, PLANE, plane_id);
get_properties(crtc, CRTC, drm.crtc_id);
get_properties(connector, CONNECTOR, drm.connector_id);