aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-18 12:25:55 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-26 23:34:37 +0200
commitd6cc7184729029a4d8e9dc5e306a17fe9bb7e342 (patch)
tree884ffc36a5cfadfcc40bedc2480b74e815bfa47a /backend/drm
parent61095f4a12461944a400094be6cfa677da7c9928 (diff)
backend/drm: nuke retry_pageflip
retry_pageflip is now dead code, since drm_connector_start_renderer isn't called anymore. It was previously called when enabling an output. The name "retry_pageflip" was a little confusing because the function retried a modeset and the timer wasn't set up while performing a simple page-flip. Let's just remove this altogether for now. We can discuss whether it's worth it to bring it back. Should we only do it on failed page-flips? Should we only do it on EBUSY?
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 630a7532..62a94ae0 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -671,26 +671,6 @@ static bool drm_connector_pageflip_renderer(struct wlr_drm_connector *conn) {
return drm_crtc_page_flip(conn);
}
-static void drm_connector_start_renderer(struct wlr_drm_connector *conn) {
- struct wlr_drm_crtc *crtc = conn->crtc;
-
- if (conn->state != WLR_DRM_CONN_CONNECTED) {
- return;
- }
-
- wlr_log(WLR_DEBUG, "Starting renderer on output '%s'", conn->output.name);
-
- struct wlr_drm_mode *mode = (struct wlr_drm_mode *)conn->output.current_mode;
- memcpy(&crtc->mode, &mode->drm_mode, sizeof(drmModeModeInfo));
- crtc->active = true;
- crtc->pending |= WLR_DRM_CRTC_MODE;
-
- if (!drm_connector_pageflip_renderer(conn)) {
- wl_event_source_timer_update(conn->retry_pageflip,
- 1000000.0f / conn->output.current_mode->refresh);
- }
-}
-
static bool drm_connector_init_renderer(struct wlr_drm_connector *conn,
struct wlr_drm_mode *mode) {
struct wlr_drm_backend *drm =
@@ -1014,7 +994,6 @@ static void drm_connector_destroy(struct wlr_output *output) {
struct wlr_drm_connector *conn = get_drm_connector_from_output(output);
drm_connector_cleanup(conn);
drmModeFreeCrtc(conn->old_crtc);
- wl_event_source_remove(conn->retry_pageflip);
wl_list_remove(&conn->link);
free(conn);
}
@@ -1035,13 +1014,6 @@ bool wlr_output_is_drm(struct wlr_output *output) {
return output->impl == &output_impl;
}
-static int retry_pageflip(void *data) {
- struct wlr_drm_connector *conn = data;
- wlr_log(WLR_INFO, "%s: Retrying pageflip", conn->output.name);
- drm_connector_start_renderer(conn);
- return 0;
-}
-
static const int32_t subpixel_map[] = {
[DRM_MODE_SUBPIXEL_UNKNOWN] = WL_OUTPUT_SUBPIXEL_UNKNOWN,
[DRM_MODE_SUBPIXEL_HORIZONTAL_RGB] = WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB,
@@ -1294,10 +1266,6 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
wlr_output_init(&wlr_conn->output, &drm->backend, &output_impl,
drm->display);
- struct wl_event_loop *ev = wl_display_get_event_loop(drm->display);
- wlr_conn->retry_pageflip = wl_event_loop_add_timer(ev, retry_pageflip,
- wlr_conn);
-
wlr_conn->state = WLR_DRM_CONN_DISCONNECTED;
wlr_conn->id = drm_conn->connector_id;