* [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation
@ 2014-02-06 11:42 Gerd Hoffmann
2014-02-06 11:42 ` [Qemu-devel] [PATCH 2/2] xhci iso: allow for some latency Gerd Hoffmann
2014-02-07 14:38 ` [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation Hans de Goede
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2014-02-06 11:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Frameid specifies frames not microframes, so we
need to shift it to get the microframe index.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 44964f4..2c54b86 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1974,8 +1974,8 @@ static void xhci_calc_iso_kick(XHCIState *xhci, XHCITransfer *xfer,
xfer->mfindex_kick = asap;
}
} else {
- xfer->mfindex_kick = (xfer->trbs[0].control >> TRB_TR_FRAMEID_SHIFT)
- & TRB_TR_FRAMEID_MASK;
+ xfer->mfindex_kick = ((xfer->trbs[0].control >> TRB_TR_FRAMEID_SHIFT)
+ & TRB_TR_FRAMEID_MASK) << 3;
xfer->mfindex_kick |= mfindex & ~0x3fff;
if (xfer->mfindex_kick < mfindex) {
xfer->mfindex_kick += 0x4000;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Qemu-devel] [PATCH 2/2] xhci iso: allow for some latency
2014-02-06 11:42 [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation Gerd Hoffmann
@ 2014-02-06 11:42 ` Gerd Hoffmann
2014-02-07 14:38 ` [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2014-02-06 11:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Allow the scheduled transfer time be a bit behind, to
compensate for latencies. Without this xhci will wait
way to often for the mfindex wraparound, assuming the
scheduled time is in the future just because qemu is
a bit behind in processing the iso transfer requests.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-xhci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 2c54b86..6188e77 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -1977,7 +1977,7 @@ static void xhci_calc_iso_kick(XHCIState *xhci, XHCITransfer *xfer,
xfer->mfindex_kick = ((xfer->trbs[0].control >> TRB_TR_FRAMEID_SHIFT)
& TRB_TR_FRAMEID_MASK) << 3;
xfer->mfindex_kick |= mfindex & ~0x3fff;
- if (xfer->mfindex_kick < mfindex) {
+ if (xfer->mfindex_kick + 0x100 < mfindex) {
xfer->mfindex_kick += 0x4000;
}
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation
2014-02-06 11:42 [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation Gerd Hoffmann
2014-02-06 11:42 ` [Qemu-devel] [PATCH 2/2] xhci iso: allow for some latency Gerd Hoffmann
@ 2014-02-07 14:38 ` Hans de Goede
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2014-02-07 14:38 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Hi,
Looks good, ack series.
Regards,
Hans
On 02/06/2014 12:42 PM, Gerd Hoffmann wrote:
> Frameid specifies frames not microframes, so we
> need to shift it to get the microframe index.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/usb/hcd-xhci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
> index 44964f4..2c54b86 100644
> --- a/hw/usb/hcd-xhci.c
> +++ b/hw/usb/hcd-xhci.c
> @@ -1974,8 +1974,8 @@ static void xhci_calc_iso_kick(XHCIState *xhci, XHCITransfer *xfer,
> xfer->mfindex_kick = asap;
> }
> } else {
> - xfer->mfindex_kick = (xfer->trbs[0].control >> TRB_TR_FRAMEID_SHIFT)
> - & TRB_TR_FRAMEID_MASK;
> + xfer->mfindex_kick = ((xfer->trbs[0].control >> TRB_TR_FRAMEID_SHIFT)
> + & TRB_TR_FRAMEID_MASK) << 3;
> xfer->mfindex_kick |= mfindex & ~0x3fff;
> if (xfer->mfindex_kick < mfindex) {
> xfer->mfindex_kick += 0x4000;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-07 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-06 11:42 [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation Gerd Hoffmann
2014-02-06 11:42 ` [Qemu-devel] [PATCH 2/2] xhci iso: allow for some latency Gerd Hoffmann
2014-02-07 14:38 ` [Qemu-devel] [PATCH 1/2] xhci iso: fix time calculation Hans de Goede
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.