[PATCH 02/11] DRI2: make populate_vbl_request_type external

Ilija Hadzic ilijahadzic at gmail.com
Sun Apr 28 13:07:47 PDT 2013


We'll need to use this function in other .c files so
remove static annotation from it. Also, add radeon_
prefix because this function is now part of global namespace,
so it would be nice to know where it is coming from.

Signed-off-by: Ilija Hadzic <ihadzic at research.bell-labs.com>
---
 src/radeon.h      |  2 ++
 src/radeon_dri2.c | 16 ++++++++--------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/radeon.h b/src/radeon.h
index 1cbeef6..63433fe 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -518,6 +518,8 @@ extern void radeon_ddx_cs_start(ScrnInfoPtr pScrn,
 				const char *func, int line);
 void radeon_kms_update_vram_limit(ScrnInfoPtr pScrn, int new_fb_size);
 
+drmVBlankSeqType radeon_populate_vbl_request_type(xf86CrtcPtr crtc);
+
 #if XF86_CRTC_VERSION >= 5
 #define RADEON_PIXMAP_SHARING 1
 #endif
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 391483c..78d069b 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -851,7 +851,7 @@ cleanup:
     free(event);
 }
 
-static drmVBlankSeqType populate_vbl_request_type(xf86CrtcPtr crtc)
+drmVBlankSeqType radeon_populate_vbl_request_type(xf86CrtcPtr crtc)
 {
     drmVBlankSeqType type = 0;
     int crtc_id = drmmode_get_crtc_id(crtc);
@@ -891,7 +891,7 @@ static int radeon_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
         return TRUE;
     }
     vbl.request.type = DRM_VBLANK_RELATIVE;
-    vbl.request.type |= populate_vbl_request_type(crtc);
+    vbl.request.type |= radeon_populate_vbl_request_type(crtc);
     vbl.request.sequence = 0;
 
     ret = drmWaitVBlank(info->dri2.drm_fd, &vbl);
@@ -955,7 +955,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
 
     /* Get current count */
     vbl.request.type = DRM_VBLANK_RELATIVE;
-    vbl.request.type |= populate_vbl_request_type(crtc);
+    vbl.request.type |= radeon_populate_vbl_request_type(crtc);
     vbl.request.sequence = 0;
     ret = drmWaitVBlank(info->dri2.drm_fd, &vbl);
     if (ret) {
@@ -981,7 +981,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
         if (current_msc >= target_msc)
             target_msc = current_msc;
         vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT;
-	vbl.request.type |= populate_vbl_request_type(crtc);
+	vbl.request.type |= radeon_populate_vbl_request_type(crtc);
         vbl.request.sequence = target_msc;
         vbl.request.signal = (unsigned long)wait_info;
         ret = drmWaitVBlank(info->dri2.drm_fd, &vbl);
@@ -1001,7 +1001,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
      * so we queue an event that will satisfy the divisor/remainder equation.
      */
     vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT;
-    vbl.request.type |= populate_vbl_request_type(crtc);
+    vbl.request.type |= radeon_populate_vbl_request_type(crtc);
 
     vbl.request.sequence = current_msc - (current_msc % divisor) +
         remainder;
@@ -1186,7 +1186,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
 
     /* Get current count */
     vbl.request.type = DRM_VBLANK_RELATIVE;
-    vbl.request.type |= populate_vbl_request_type(crtc);
+    vbl.request.type |= radeon_populate_vbl_request_type(crtc);
     vbl.request.sequence = 0;
     ret = drmWaitVBlank(info->dri2.drm_fd, &vbl);
     if (ret) {
@@ -1229,7 +1229,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
          */
         if (flip == 0)
             vbl.request.type |= DRM_VBLANK_NEXTONMISS;
-	vbl.request.type |= populate_vbl_request_type(crtc);
+	vbl.request.type |= radeon_populate_vbl_request_type(crtc);
 
         /* If target_msc already reached or passed, set it to
          * current_msc to ensure we return a reasonable value back
@@ -1265,7 +1265,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
     vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT;
     if (flip == 0)
         vbl.request.type |= DRM_VBLANK_NEXTONMISS;
-    vbl.request.type |= populate_vbl_request_type(crtc);
+    vbl.request.type |= radeon_populate_vbl_request_type(crtc);
 
     vbl.request.sequence = current_msc - (current_msc % divisor) +
         remainder;
-- 
1.8.1.5



More information about the xorg-driver-ati mailing list