diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-02-19 10:45:36 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-02-19 16:49:51 +0100 |
commit | 50011e7170d1d6a58a6b1e4997da6ce105180481 (patch) | |
tree | 70c95139675c92e5d968cd97898dd42524f5bfe1 /backend/drm/drm.c | |
parent | dcd05f67ab694c72e0f95b506a756471e2222fac (diff) |
backend/drm: fix modeset on drm fd resume
On DRM resume, such as switching back to a TTY, the output needs to be
modeset to the current mode. However, wlr_output_set_mode will return
early when attempting to set the mode to the current mode. This just
steps around wlr_output_set_mode and calls drm_connector_set_mode
directly.
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r-- | backend/drm/drm.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c index e0eed4c2..a7719727 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -392,9 +392,6 @@ static void drm_connector_start_renderer(struct wlr_drm_connector *conn) { } } -static bool drm_connector_set_mode(struct wlr_output *output, - struct wlr_output_mode *mode); - static void realloc_crtcs(struct wlr_drm_backend *drm, bool *changed_outputs); static void attempt_enable_needs_modeset(struct wlr_drm_backend *drm) { @@ -522,7 +519,7 @@ static void realloc_planes(struct wlr_drm_backend *drm, const uint32_t *crtc_in, static void drm_connector_cleanup(struct wlr_drm_connector *conn); -static bool drm_connector_set_mode(struct wlr_output *output, +bool drm_connector_set_mode(struct wlr_output *output, struct wlr_output_mode *mode) { struct wlr_drm_connector *conn = get_drm_connector_from_output(output); struct wlr_drm_backend *drm = get_drm_backend_from_backend(output->backend); |