backend/drm: remove wlr_drm_crtc_state.mode

Replace it with drm_connector_state_mode, which computes the mode
from the wlr_output_state to be applied.
This commit is contained in:
Simon Ser 2021-04-06 17:29:07 +02:00 committed by Kenny Levinsen
parent dfea0ff31d
commit 31082a0554
4 changed files with 34 additions and 18 deletions

View file

@ -41,15 +41,9 @@ struct wlr_drm_plane {
union wlr_drm_plane_props props;
};
struct wlr_drm_crtc_state {
struct wlr_drm_mode *mode;
};
struct wlr_drm_crtc {
uint32_t id;
struct wlr_drm_crtc_state pending, current;
// Atomic modesetting only
uint32_t mode_id;
uint32_t gamma_lut;
@ -161,6 +155,8 @@ struct wlr_drm_fb *plane_get_next_fb(struct wlr_drm_plane *plane);
bool drm_connector_state_is_modeset(const struct wlr_output_state *state);
bool drm_connector_state_active(struct wlr_drm_connector *conn,
const struct wlr_output_state *state);
void drm_connector_state_mode(struct wlr_drm_connector *conn,
const struct wlr_output_state *state, drmModeModeInfo *mode);
#define wlr_drm_conn_log(conn, verb, fmt, ...) \
wlr_log(verb, "connector %s: " fmt, conn->name, ##__VA_ARGS__)