aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/drm.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-18 12:19:53 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-26 23:34:37 +0200
commit61095f4a12461944a400094be6cfa677da7c9928 (patch)
tree216ad0469aaeb6a567ec483e12aaf6dfb3b9015f /backend/drm/drm.c
parent445750aa9a5b6d1e9e275fa9a533cee0e502febb (diff)
backend/drm: make drm_connector_set_mode take a wlr_drm_connector
Since this is an internal DRM backend function, there's no reason we need to take a generic wlr_output.
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r--backend/drm/drm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index b5f3a7b9..630a7532 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -564,7 +564,7 @@ static bool drm_connector_commit(struct wlr_output *output) {
}
}
- if (!drm_connector_set_mode(output, wlr_mode)) {
+ if (!drm_connector_set_mode(conn, wlr_mode)) {
return false;
}
}
@@ -770,17 +770,17 @@ static void attempt_enable_needs_modeset(struct wlr_drm_backend *drm) {
conn->desired_enabled) {
wlr_log(WLR_DEBUG, "Output %s has a desired mode and a CRTC, "
"attempting a modeset", conn->output.name);
- drm_connector_set_mode(&conn->output, conn->desired_mode);
+ drm_connector_set_mode(conn, conn->desired_mode);
}
}
}
static void drm_connector_cleanup(struct wlr_drm_connector *conn);
-bool drm_connector_set_mode(struct wlr_output *output,
+bool drm_connector_set_mode(struct wlr_drm_connector *conn,
struct wlr_output_mode *wlr_mode) {
- struct wlr_drm_connector *conn = get_drm_connector_from_output(output);
- struct wlr_drm_backend *drm = get_drm_backend_from_backend(output->backend);
+ struct wlr_drm_backend *drm =
+ get_drm_backend_from_backend(conn->output.backend);
conn->desired_enabled = wlr_mode != NULL;
conn->desired_mode = wlr_mode;
@@ -1061,7 +1061,7 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) {
wlr_log(WLR_DEBUG, "De-allocating CRTC %zu for output '%s'",
conn->crtc - drm->crtcs, conn->output.name);
- drm_connector_set_mode(&conn->output, NULL);
+ drm_connector_set_mode(conn, NULL);
drm_plane_finish_surface(conn->crtc->primary);
drm_plane_finish_surface(conn->crtc->cursor);
if (conn->crtc->cursor != NULL) {