backend/drm: use plural form for possible_crtcs

Make it clearer that this is a bitmask of CRTC indices.
This commit is contained in:
Simon Ser 2020-12-23 12:14:36 +01:00
parent 2de400a541
commit 54ec17ff64
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
2 changed files with 5 additions and 5 deletions

View File

@ -1014,7 +1014,7 @@ static void drm_connector_destroy_output(struct wlr_output *output) {
conn->state = WLR_DRM_CONN_DISCONNECTED; conn->state = WLR_DRM_CONN_DISCONNECTED;
conn->desired_enabled = false; conn->desired_enabled = false;
conn->desired_mode = NULL; conn->desired_mode = NULL;
conn->possible_crtc = 0; conn->possible_crtcs = 0;
conn->pageflip_pending = false; conn->pageflip_pending = false;
struct wlr_drm_mode *mode, *mode_tmp; struct wlr_drm_mode *mode, *mode_tmp;
@ -1113,7 +1113,7 @@ static void realloc_crtcs(struct wlr_drm_backend *drm) {
if ((conn->state == WLR_DRM_CONN_CONNECTED || if ((conn->state == WLR_DRM_CONN_CONNECTED ||
conn->state == WLR_DRM_CONN_NEEDS_MODESET) && conn->state == WLR_DRM_CONN_NEEDS_MODESET) &&
conn->desired_enabled) { conn->desired_enabled) {
connector_constraints[i] = conn->possible_crtc; connector_constraints[i] = conn->possible_crtcs;
} else { } else {
// Will always fail to match anything // Will always fail to match anything
connector_constraints[i] = 0; connector_constraints[i] = 0;
@ -1381,8 +1381,8 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
wl_list_insert(&wlr_conn->output.modes, &mode->wlr_mode.link); wl_list_insert(&wlr_conn->output.modes, &mode->wlr_mode.link);
} }
wlr_conn->possible_crtc = get_possible_crtcs(drm->fd, res, drm_conn); wlr_conn->possible_crtcs = get_possible_crtcs(drm->fd, res, drm_conn);
if (wlr_conn->possible_crtc == 0) { if (wlr_conn->possible_crtcs == 0) {
wlr_drm_conn_log(wlr_conn, WLR_ERROR, "No CRTC possible"); wlr_drm_conn_log(wlr_conn, WLR_ERROR, "No CRTC possible");
} }

View File

@ -119,7 +119,7 @@ struct wlr_drm_connector {
uint32_t id; uint32_t id;
struct wlr_drm_crtc *crtc; struct wlr_drm_crtc *crtc;
uint32_t possible_crtc; uint32_t possible_crtcs;
union wlr_drm_connector_props props; union wlr_drm_connector_props props;