RK3288 USB觸摸屏與USB攝像頭同時使用時觸摸卡頓


CPU:RK3288

系統:Android 5.1

 

當USB觸摸屏與USB攝像頭同時使用時,有時會出現觸摸卡頓,看似按鍵按下沒有彈起。

getevent 查看觸摸屏上報,只有 DOWN,沒有 UP,正常情況下是 DOWN 與 UP 成對出現。

出現此現象時,打下面補丁即可解決。

diff --git a/kernel/drivers/usb/dwc_otg_310/common_port/dwc_list.h b/kernel/drivers/usb/dwc_otg_310/common_port/dwc_list.h
index 46f1da3..62e00c5 100755
--- a/kernel/drivers/usb/dwc_otg_310/common_port/dwc_list.h
+++ b/kernel/drivers/usb/dwc_otg_310/common_port/dwc_list.h
@@ -565,6 +565,18 @@ struct {                                                           \
        (head)->cqh_last = (elm);                                       \
 } while (0)
 
+#define DWC_CIRCLEQ_INSERT_COM(head, listelm, elm, field, com) do {    \
+        DWC_CIRCLEQ_FOREACH(listelm, head, field) {        \
+            if ((elm)->com < (listelm)->com) {        \
+                DWC_CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field); \
+                break;                    \
+            } else                        \
+                continue;                \
+        }                            \
+        if (DWC_CIRCLEQ_PREV(listelm, field) != elm)        \
+            DWC_CIRCLEQ_INSERT_TAIL(head, elm, field);    \
+} while (0)
+       
 #define DWC_CIRCLEQ_REMOVE(head, elm, field) do {                      \
        if ((elm)->field.cqe_next == DWC_CIRCLEQ_END(head))             \
                (head)->cqh_last = (elm)->field.cqe_prev;               \
diff --git a/kernel/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c b/kernel/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c
index 0e05b13..a1a067f 100755
--- a/kernel/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c
+++ b/kernel/drivers/usb/dwc_otg_310/dwc_otg_hcd_intr.c
@@ -833,6 +833,7 @@ static void release_channel(dwc_otg_hcd_t *hcd,
        dwc_otg_transaction_type_e tr_type;
        int free_qtd;
        int continue_trans = 1;
+       dwc_hc_t *hc_tmp = NULL;
 
        DWC_DEBUGPL(DBG_HCDV, "  %s: channel %d, halt_status %d\n",
                    __func__, hc->hc_num, halt_status);
@@ -893,7 +894,7 @@ cleanup:
         * there's no need to clear the Channel Halted interrupt separately.
         */
        dwc_otg_hc_cleanup(hcd->core_if, hc);
-       DWC_CIRCLEQ_INSERT_TAIL(&hcd->free_hc_list, hc, hc_list_entry);
+       DWC_CIRCLEQ_INSERT_COM(&hcd->free_hc_list, hc_tmp, hc, hc_list_entry, hc_num);
 
        switch (hc->ep_type) {
        case DWC_OTG_EP_TYPE_CONTROL:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM