summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2015-05-21 16:01:16 +0900
committerMichel Dänzer <michel@daenzer.net>2015-06-01 16:27:47 +0900
commitd7c82731a8bf3d381bc571b94d80d9bb2dd6e40d (patch)
tree62642e6ffdada697ba71035f3125a95e9d87ce53 /src
parente58fc380ccf2a581d28f041fd74b963626ca5404 (diff)
DRI2: Fix handling of drmmode_crtc_get_ust_msc return code
Fixes regression introduced in commit 76c2923ac5c7230a8b2f9f8329c308d28b44d9c0 ("DRI2: Split out helper for getting UST and MSC of a specific CRTC"). Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/radeon_dri2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 6bb3dc6e..a1f01455 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -988,11 +988,11 @@ static int radeon_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
if (radeon_crtc_is_enabled(crtc)) {
/* CRTC is running, read vblank counter and timestamp */
ret = drmmode_crtc_get_ust_msc(crtc, ust, msc);
+ if (ret != Success)
+ return FALSE;
- if (ret != Success) {
- *msc += radeon_get_interpolated_vblanks(crtc);
- *msc &= 0xffffffff;
- }
+ *msc += radeon_get_interpolated_vblanks(crtc);
+ *msc &= 0xffffffff;
} else {
/* CRTC is not running, extrapolate MSC and timestamp */
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;