From 5f82a720374c9c1caebb42bfbeea1f0cf8847d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 21 May 2015 15:46:32 +0900 Subject: present: Remove get_drmmode_crtc helper It was getting the drmmode_crtc_private_ptr in a roundabout way. Reviewed-by: Alex Deucher --- src/radeon_present.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/radeon_present.c b/src/radeon_present.c index 53819e09..26260446 100644 --- a/src/radeon_present.c +++ b/src/radeon_present.c @@ -202,22 +202,6 @@ radeon_present_flush(WindowPtr window) radeon_cs_flush_indirect(xf86ScreenToScrn(window->drawable.pScreen)); } -static drmmode_crtc_private_ptr -get_drmmode_crtc(ScrnInfoPtr scrn, RRCrtcPtr crtc) -{ - xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); - int i; - - for (i = 0; i < config->num_crtc; i++) { - xf86CrtcPtr xf86crtc = config->crtc[i]; - - if (xf86crtc->randr_crtc == crtc) - return xf86crtc->driver_private; - } - - return NULL; -} - static uint32_t radeon_present_get_pixmap_tiling_flags(RADEONInfoPtr info, PixmapPtr pixmap) { @@ -263,7 +247,8 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, return FALSE; if (crtc) { - drmmode_crtc_private_ptr drmmode_crtc = get_drmmode_crtc(scrn, crtc); + xf86CrtcPtr xf86_crtc = crtc->devPrivate; + drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private; if (!drmmode_crtc || drmmode_crtc->rotate.bo != NULL || -- cgit v1.2.3