summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2015-05-21 15:46:32 +0900
committerMichel Dänzer <michel@daenzer.net>2015-05-21 16:57:31 +0900
commit5f82a720374c9c1caebb42bfbeea1f0cf8847d28 (patch)
treec1c7b04e8d48402f8787d649be75140ff0395a79
parentd64a13ebe0ecd241ee3260dbffd8f4a01e254183 (diff)
present: Remove get_drmmode_crtc helper
It was getting the drmmode_crtc_private_ptr in a roundabout way. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon_present.c19
1 files 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 ||