summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dix/dispatch.c22
-rw-r--r--hw/xfree86/modes/xf86Rotate.c2
-rw-r--r--include/dix.h6
3 files changed, 29 insertions, 1 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 31c69612b..414bd0404 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -244,2 +244,3 @@ long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE;
long SmartScheduleTime;
+int SmartScheduleLatencyLimited = 0;
static ClientPtr SmartLastClient;
@@ -314,3 +315,3 @@ SmartScheduleClient (int *clientReady, int nready)
*/
- if (nready == 1)
+ if (nready == 1 && SmartScheduleLatencyLimited == 0)
{
@@ -334,2 +335,19 @@ SmartScheduleClient (int *clientReady, int nready)
+void
+EnableLimitedSchedulingLatency(void)
+{
+ ++SmartScheduleLatencyLimited;
+ SmartScheduleSlice = SmartScheduleInterval;
+}
+
+void
+DisableLimitedSchedulingLatency(void)
+{
+ --SmartScheduleLatencyLimited;
+
+ /* protect against bugs */
+ if (SmartScheduleLatencyLimited < 0)
+ SmartScheduleLatencyLimited = 0;
+}
+
#define MAJOROP ((xReq *)client->requestBuffer)->reqType
@@ -353,2 +371,3 @@ Dispatch(void)
+ SmartScheduleSlice = SmartScheduleInterval;
while (!dispatchException)
@@ -457,2 +476,3 @@ Dispatch(void)
dispatchException &= ~DE_RESET;
+ SmartScheduleLatencyLimited = 0;
}
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index e0ea274a2..d9face1cb 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -230,2 +230,3 @@ xf86RotatePrepare (ScreenPtr pScreen)
xf86_config->rotation_damage_registered = TRUE;
+ EnableLimitedSchedulingLatency();
}
@@ -340,2 +341,3 @@ xf86RotateDestroy (xf86CrtcPtr crtc)
xf86_config->rotation_damage_registered = FALSE;
+ DisableLimitedSchedulingLatency();
}
diff --git a/include/dix.h b/include/dix.h
index e2db6b655..49dfe3774 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -231,2 +231,8 @@ extern _X_EXPORT void WakeupHandler(
+void
+EnableLimitedSchedulingLatency(void);
+
+void
+DisableLimitedSchedulingLatency(void);
+
typedef void (* WakeupHandlerProcPtr)(