summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlija Hadzic <ilijahadzic@gmail.com>2013-05-08 22:39:37 -0400
committerMichel Dänzer <michel@daenzer.net>2013-05-29 13:06:40 +0200
commit006fbbd1d38a089b50ab3197d32815689ed249fa (patch)
tree5d41787f2db06132aea48ed4613bc4cfd16df484
parent34660d8757ff16acd1686ff2872f4600d92a68bf (diff)
DRI2: make populate_vbl_request_type external
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@research.bell-labs.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon.h2
-rw-r--r--src/radeon_dri2.c16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/radeon.h b/src/radeon.h
index 8dc3d124..77fdd6ea 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 8c4be4c6..10ea0f7e 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -854,7 +854,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);
@@ -894,7 +894,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);
@@ -958,7 +958,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) {
@@ -984,7 +984,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);
@@ -1004,7 +1004,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;
@@ -1189,7 +1189,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) {
@@ -1232,7 +1232,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
@@ -1268,7 +1268,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;