From 025ed4573c9cb6483d9e4f3b64cd424172c82c44 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Tue, 14 Feb 2023 19:39:37 -0300 Subject: [PATCH] drm-backend: move aux function up to remove unnecessary declaration Simple cosmetic change. Signed-off-by: Leandro Ribeiro --- libweston/backend-drm/drm.c | 43 +++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index ca5ecdb5..f02f1f64 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -446,7 +446,26 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage) } static uint32_t -drm_connector_get_possible_crtcs_mask(struct drm_connector *connector); +drm_connector_get_possible_crtcs_mask(struct drm_connector *connector) +{ + struct drm_device *device = connector->device; + uint32_t possible_crtcs = 0; + drmModeConnector *conn = connector->conn; + drmModeEncoder *encoder; + int i; + + for (i = 0; i < conn->count_encoders; i++) { + encoder = drmModeGetEncoder(device->drm.fd, + conn->encoders[i]); + if (!encoder) + continue; + + possible_crtcs |= encoder->possible_crtcs; + drmModeFreeEncoder(encoder); + } + + return possible_crtcs; +} static struct drm_writeback * drm_output_find_compatible_writeback(struct drm_output *output) @@ -1665,28 +1684,6 @@ drm_output_init_gamma_size(struct drm_output *output) return 0; } -static uint32_t -drm_connector_get_possible_crtcs_mask(struct drm_connector *connector) -{ - struct drm_device *device = connector->device; - uint32_t possible_crtcs = 0; - drmModeConnector *conn = connector->conn; - drmModeEncoder *encoder; - int i; - - for (i = 0; i < conn->count_encoders; i++) { - encoder = drmModeGetEncoder(device->drm.fd, - conn->encoders[i]); - if (!encoder) - continue; - - possible_crtcs |= encoder->possible_crtcs; - drmModeFreeEncoder(encoder); - } - - return possible_crtcs; -} - enum writeback_screenshot_state drm_output_get_writeback_state(struct drm_output *output) {