You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.4 KiB
68 lines
1.4 KiB
7 years ago
|
#ifndef BACKEND_DRM_PROPERTIES_H
|
||
|
#define BACKEND_DRM_PROPERTIES_H
|
||
8 years ago
|
|
||
|
#include <stdbool.h>
|
||
|
#include <stdint.h>
|
||
|
|
||
|
/*
|
||
|
* These types contain the property ids for several DRM objects.
|
||
8 years ago
|
* See https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms.html#kms-properties
|
||
8 years ago
|
* for more details.
|
||
|
*/
|
||
|
|
||
|
union wlr_drm_connector_props {
|
||
|
struct {
|
||
|
uint32_t edid;
|
||
|
uint32_t dpms;
|
||
|
|
||
|
// atomic-modesetting only
|
||
|
|
||
|
uint32_t crtc_id;
|
||
|
};
|
||
|
uint32_t props[3];
|
||
|
};
|
||
|
|
||
|
union wlr_drm_crtc_props {
|
||
|
struct {
|
||
|
// Neither of these are guranteed to exist
|
||
|
uint32_t rotation;
|
||
|
uint32_t scaling_mode;
|
||
7 years ago
|
|
||
|
// atomic-modesetting only
|
||
|
|
||
|
uint32_t active;
|
||
|
uint32_t mode_id;
|
||
8 years ago
|
};
|
||
7 years ago
|
uint32_t props[4];
|
||
8 years ago
|
};
|
||
|
|
||
|
union wlr_drm_plane_props {
|
||
|
struct {
|
||
|
uint32_t type;
|
||
|
uint32_t rotation; // Not guranteed to exist
|
||
|
|
||
|
// atomic-modesetting only
|
||
|
|
||
|
uint32_t src_x;
|
||
|
uint32_t src_y;
|
||
|
uint32_t src_w;
|
||
|
uint32_t src_h;
|
||
|
uint32_t crtc_x;
|
||
|
uint32_t crtc_y;
|
||
|
uint32_t crtc_w;
|
||
|
uint32_t crtc_h;
|
||
|
uint32_t fb_id;
|
||
|
uint32_t crtc_id;
|
||
|
};
|
||
|
uint32_t props[12];
|
||
|
};
|
||
|
|
||
|
bool wlr_drm_get_connector_props(int fd, uint32_t id, union wlr_drm_connector_props *out);
|
||
|
bool wlr_drm_get_crtc_props(int fd, uint32_t id, union wlr_drm_crtc_props *out);
|
||
|
bool wlr_drm_get_plane_props(int fd, uint32_t id, union wlr_drm_plane_props *out);
|
||
|
|
||
8 years ago
|
bool wlr_drm_get_prop(int fd, uint32_t obj, uint32_t prop, uint64_t *ret);
|
||
|
void *wlr_drm_get_prop_blob(int fd, uint32_t obj, uint32_t prop, size_t *ret_len);
|
||
|
|
||
8 years ago
|
#endif
|