summaryrefslogtreecommitdiff
path: root/hw/usb/hcd-ehci.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-11-17 12:47:17 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-12-04 14:41:54 +0100
commit8082624099bce56a3139e6b9f72016c00fd10227 (patch)
tree09b3245dee39323e0b5d8d288fe63d89535f86b1 /hw/usb/hcd-ehci.h
parent386ab487ebc25d780ddfc4a9aea0b21c4a9aaa94 (diff)
downloadqemu-8082624099bce56a3139e6b9f72016c00fd10227.tar.gz
ehci: Lower timer freq when the periodic schedule is idle
Lower the timer freq if no iso schedule packets complete for 64 frames in a row. We can safely do this, without adding latency, because: 1) If there is isoc traffic this will never trigger 2) For async handled interrupt packets (only usb-host), the completion handler will immediately schedule the frame_timer from a bh 3) All devices using NAK to signal no data for interrupt endpoints now use wakeup, which will immediately schedule the frame_timer from a bh The advantage of this is that when we only have interrupt packets in the periodic schedule, async_stepdown can do its work and significantly lower the frequency at which the frame_timer runs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-ehci.h')
-rw-r--r--hw/usb/hcd-ehci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h
index d8078f4555..772870b727 100644
--- a/hw/usb/hcd-ehci.h
+++ b/hw/usb/hcd-ehci.h
@@ -311,6 +311,7 @@ struct EHCIState {
uint64_t last_run_ns;
uint32_t async_stepdown;
+ uint32_t periodic_sched_active;
bool int_req_by_async;
};