From 8644c9630e744a1e551787a96f8c54b0efd2a029 Mon Sep 17 00:00:00 2001 From: Jack Pham Date: Tue, 22 Dec 2020 16:04:26 -0800 Subject: [PATCH] usb: f_gsi: Increase ADPL buffer depth to 30 During high embedded throughput workloads having ADPL enabled may impact performance as it becomes a bottleneck for IPA if log packets are not drained quickly enough. To alleviate this, increase the number of buffers allocated for the ADPL GSI pipe to 30 allow for the USB host to consume log packets from the ADPL endpoint as fast as possible. Change-Id: I33102608367e71a4e75837f8d2a396f20f386b7a Signed-off-by: Jack Pham --- drivers/usb/gadget/function/f_gsi.c | 4 ++-- drivers/usb/gadget/function/f_gsi.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/f_gsi.c b/drivers/usb/gadget/function/f_gsi.c index b7ee8994f7ec..c5715ff437a9 100644 --- a/drivers/usb/gadget/function/f_gsi.c +++ b/drivers/usb/gadget/function/f_gsi.c @@ -3153,8 +3153,8 @@ static int gsi_bind(struct usb_configuration *c, struct usb_function *f) info.ss_desc_hdr = qdss_gsi_ss_data_only_desc; info.in_epname = "gsi-epin"; info.out_epname = ""; - info.in_req_buf_len = 16384; - info.in_req_num_buf = GSI_NUM_IN_BUFFERS; + info.in_req_buf_len = GSI_IN_DPL_BUFF_SIZE; + info.in_req_num_buf = GSI_NUM_IN_DPL_BUFFERS; info.notify_buf_len = sizeof(struct usb_cdc_notification); break; case IPA_USB_GPS: diff --git a/drivers/usb/gadget/function/f_gsi.h b/drivers/usb/gadget/function/f_gsi.h index 11de421a6e18..0a63549d59fa 100644 --- a/drivers/usb/gadget/function/f_gsi.h +++ b/drivers/usb/gadget/function/f_gsi.h @@ -31,10 +31,12 @@ #define GSI_NUM_IN_RNDIS_BUFFERS 50 #define GSI_NUM_IN_RMNET_BUFFERS 50 +#define GSI_NUM_IN_DPL_BUFFERS 30 #define GSI_NUM_IN_BUFFERS 15 #define GSI_IN_BUFF_SIZE 2048 #define GSI_IN_RMNET_BUFF_SIZE 31744 #define GSI_IN_RNDIS_BUFF_SIZE 16384 +#define GSI_IN_DPL_BUFF_SIZE 16384 #define GSI_NUM_OUT_BUFFERS 14 #define GSI_OUT_AGGR_SIZE 24576