Enable parsing of TILE info for DRM backend

This commit is contained in:
Christian Kröner 2021-06-09 22:35:35 +02:00
parent 3a685b10b6
commit 21fecd6015
6 changed files with 59 additions and 1 deletions

View file

@ -20,12 +20,13 @@ union wlr_drm_connector_props {
uint32_t subconnector; // not guaranteed to exist
uint32_t non_desktop;
uint32_t panel_orientation; // not guaranteed to exist
uint32_t tile;
// atomic-modesetting only
uint32_t crtc_id;
};
uint32_t props[4];
uint32_t props[8];
};
union wlr_drm_crtc_props {

View file

@ -11,6 +11,9 @@ int32_t calculate_refresh_rate(const drmModeModeInfo *mode);
// Populates the make/model/phys_{width,height} of output from the edid data
void parse_edid(struct wlr_output *restrict output, size_t len,
const uint8_t *data);
// Parses the TILE property
void parse_tile(struct wlr_output *restrict output, size_t len,
const uint8_t *data);
// Returns the string representation of a DRM output type
const char *conn_get_name(uint32_t type_id);

View file

@ -46,6 +46,17 @@ struct wlr_output_cursor {
} events;
};
struct wlr_output_tile_info {
uint32_t group_id;
uint32_t tile_is_single_monitor;
uint32_t num_h_tile;
uint32_t num_v_tile;
uint32_t tile_h_loc;
uint32_t tile_v_loc;
uint32_t tile_h_size;
uint32_t tile_v_size;
};
enum wlr_output_adaptive_sync_status {
WLR_OUTPUT_ADAPTIVE_SYNC_DISABLED,
WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED,
@ -122,6 +133,7 @@ struct wlr_output {
char model[16];
char serial[16];
int32_t phys_width, phys_height; // mm
struct wlr_output_tile_info tile_info;
// Note: some backends may have zero modes
struct wl_list modes; // wlr_output_mode::link