summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2016-01-28 00:52:56 +0000
committerRussell King <rmk@arm.linux.org.uk>2016-01-28 15:27:24 +0000
commit48cb1763e9701ce0698eacd0457c40689b744ed3 (patch)
tree862fa8f7e5c54c398970e990d4df22abe43e710b
parentc6b0e2d894eaa3d5c4db6116a4c43caa1b197977 (diff)
src: dri2: move GetMSC() undisplayed drawable to common_drm_get_msc()
Move the handling of an undisplayed drawable into common_drm_get_msc() where we can (eventually) be better at handling this situation. For now, just move the code. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--src/common_drm.c7
-rw-r--r--src/common_drm_dri2.c7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/common_drm.c b/src/common_drm.c
index b8c2250..8cf277e 100644
--- a/src/common_drm.c
+++ b/src/common_drm.c
@@ -1443,6 +1443,13 @@ _X_EXPORT
int common_drm_get_drawable_msc(xf86CrtcPtr crtc, DrawablePtr pDraw,
uint64_t *ust, uint64_t *msc)
{
+ /* Drawable not displayed, make up a value */
+ if (!crtc) {
+ *ust = 0;
+ *msc = 0;
+ return Success;
+ }
+
return common_drm_get_msc(crtc, ust, msc);
}
diff --git a/src/common_drm_dri2.c b/src/common_drm_dri2.c
index dcf019e..6368016 100644
--- a/src/common_drm_dri2.c
+++ b/src/common_drm_dri2.c
@@ -271,13 +271,6 @@ int common_dri2_GetMSC(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
{
xf86CrtcPtr crtc = common_drm_drawable_covering_crtc(draw);
- /* Drawable not displayed, make up a value */
- if (!crtc) {
- *ust = 0;
- *msc = 0;
- return TRUE;
- }
-
return common_drm_get_drawable_msc(crtc, draw, ust, msc) == Success;
}