mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
usb: dwc3: gadget: Fix ISO transfer performance
Commit08a36b5438
("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()") caused a small change in the way ISO transfer is handled in the case when XferInProgress event happens on Isoc EP with an active transfer. This caused a performance degradation of 50%. e.g. using g_webcam on DUT and luvcview on host the video frame rate dropped from 16fps to 8fps @high-speed. Make the ISO transfer handling equivalent to that prior to that commit to get back the original ISO performance numbers. Fixes:08a36b5438
("usb: dwc3: gadget: simplify __dwc3_gadget_ep_queue()") Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
682179592e
commit
f1d6826cae
1 changed files with 11 additions and 1 deletions
|
@ -1261,14 +1261,24 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
|
||||||
__dwc3_gadget_start_isoc(dwc, dep, cur_uf);
|
__dwc3_gadget_start_isoc(dwc, dep, cur_uf);
|
||||||
dep->flags &= ~DWC3_EP_PENDING_REQUEST;
|
dep->flags &= ~DWC3_EP_PENDING_REQUEST;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
|
if ((dep->flags & DWC3_EP_BUSY) &&
|
||||||
|
!(dep->flags & DWC3_EP_MISSED_ISOC)) {
|
||||||
|
WARN_ON_ONCE(!dep->resource_index);
|
||||||
|
ret = __dwc3_gadget_kick_transfer(dep,
|
||||||
|
dep->resource_index);
|
||||||
|
}
|
||||||
|
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dwc3_calc_trbs_left(dep))
|
if (!dwc3_calc_trbs_left(dep))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = __dwc3_gadget_kick_transfer(dep, 0);
|
ret = __dwc3_gadget_kick_transfer(dep, 0);
|
||||||
|
out:
|
||||||
if (ret == -EBUSY)
|
if (ret == -EBUSY)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue