Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 55D92C7EE22 for ; Mon, 15 May 2023 15:00:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 29273865DB; Mon, 15 May 2023 17:00:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="hTv3xin3"; dkim=pass (1024-bit key; unprotected) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="dRhIdbbC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C201F8637B; Mon, 15 May 2023 17:00:37 +0200 (CEST) Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 06CDC8637B for ; Mon, 15 May 2023 17:00:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=filip.zaludek@oracle.com Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34FD9ULa006986; Mon, 15 May 2023 15:00:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=pTJIG10RLe/y7YZzIYDDqPtt/HXK993QBi8GYOiJMuo=; b=hTv3xin374cWcknmDry4rtmXKbsX77ISV//FwjFmA+PSI34lc3vGAkZOkndzmbbN3Ba/ TwKXDg3Ye649JHVrUuoW74HvenukctPO/RX7HMJDHoQNZR21WbeyL26760m4HLYr3k08 QU6fimjrShsIB1HHsUgpGcyCC575HtkUFDWy1wuoT90inXH5jlOItaNE8uoIgkbmIbfw e8DsJDq3tF8NYjAxXGE0wajalwnvCNfB4O86vBVnxPLwZHUGRrvB2u4qCGR/RjzQPA8L rR/c7EjJsNZsF2Oq2B2nq5P3zoDV7foR4a8xXH1zV3zo/GWlwcFvWWFILyMRoe9AJFqP kg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qj2eayv53-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 May 2023 15:00:24 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34FDcm1T017920; Mon, 15 May 2023 15:00:23 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2105.outbound.protection.outlook.com [104.47.55.105]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qj10391s4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 15 May 2023 15:00:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UEWnLyWuAl95M0VaaLqlh3OTJ2N0XP0WSrpaIG6+3fZf5bPur4XUnmSjxHfdJ9yJdqNWUzoS0nRN2z2wFADdZMwcGJxc8nwjOOjd8M1mXwcq0qChHODOBgo7VBBc8YZzv2y4niaRa1r0QAu16rnpViNuEIzkiP6t8Xp/SZRc68G5HKrlGLq1sOxpPi8PQLX99e0DHen6wNKwNylpMRC934ttHl6qmSFJ6ODQw0r9J1h/929MbhMkK/8JYJxEijskPSo3CncXXunbAVmqHP+MBr9rXRMSeXJkcJRlipuI6zcwbkrMqLWErj4IzYj0Kvd7vI2dWIvM+QRQPcTKmqIyRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pTJIG10RLe/y7YZzIYDDqPtt/HXK993QBi8GYOiJMuo=; b=GV43IiGbN9ZT6cwCPi6S03tjRuiAN8LuhMIaTWz1k1n3f+08qdqQajoPbC4Sy8mDOBP80DbEWh5uZ7T9hRHXS4Y42Ng3L279qVclvzYcgtieUXFM5bCNDD5FPcYvbh6UbQ3Dtzy881j/5Xgx4W5utrwP6WYT6v9CZpYpu0i8aY71mo7CV7UsT8BPNTZBTFvloedIUIs8n0o/UX4GlDlAQ+6IEWGxIbG1n3sXjezXn+QU86kQLpeZGqt39F8ZPa48gM6mz0y/0QW6C6YISAlnl2PiyZ6TKf6gA9wATGIhu+veSp8iom3tVYETOGt+5SLt2BSDwkfDo7r8eo8YSFj3tg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pTJIG10RLe/y7YZzIYDDqPtt/HXK993QBi8GYOiJMuo=; b=dRhIdbbC9vQHcca/9RZ0+Wg8lNQsEmYMytN3Uu0365pLioc4/DQgSM6z8TBabr6trlJ6mdGngGljIRJDJTtHJSHKsWUd8vZ5M8ZjEf7VM+Z4H94qa6iHzB7brx0bQqZNfUs9drlnPPq/UvR+n9Mchq0pdk61cv/zQW/KDdAOM64= Received: from PH8PR10MB6501.namprd10.prod.outlook.com (2603:10b6:510:22b::18) by BL3PR10MB6163.namprd10.prod.outlook.com (2603:10b6:208:3be::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Mon, 15 May 2023 15:00:20 +0000 Received: from PH8PR10MB6501.namprd10.prod.outlook.com ([fe80::36e:74a5:8768:50b5]) by PH8PR10MB6501.namprd10.prod.outlook.com ([fe80::36e:74a5:8768:50b5%3]) with mapi id 15.20.6387.030; Mon, 15 May 2023 15:00:20 +0000 Message-ID: <16047b33-0be9-549a-67da-118888bcc849@oracle.com> Date: Mon, 15 May 2023 17:00:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: [PATCH v3] console: usb: kbd: Limit poll frequency to improve performance Content-Language: en-US To: Simon Glass Cc: =?UTF-8?Q?Michal_Such=c3=a1nek?= , marex@denx.de, Mark Kettenis , u-boot@lists.denx.de, twatson52@icloud.com References: <6434bd15-88e5-c5af-6267-77d504d7cf49@oracle.com> <20230117184611.GK16547@kitsune.suse.cz> <20230208184536.GU19419@kitsune.suse.cz> <875yccvv62.fsf@bloch.sibelius.xs4all.nl> <97d9f665-10ea-7018-68eb-fbfad8d5d47f@oracle.com> <191ece3f-7ef1-a54f-5545-d027addbb94d@oracle.com> From: =?UTF-8?Q?Filip_=c5=bdaludek?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0459.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::14) To PH8PR10MB6501.namprd10.prod.outlook.com (2603:10b6:510:22b::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR10MB6501:EE_|BL3PR10MB6163:EE_ X-MS-Office365-Filtering-Correlation-Id: f4b7e9dc-6d89-46ff-aaed-08db55551a54 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QDINQakNqcy5lAK3rkp6Ad9HiPasBy1jN7oOVHxn+u3CEnW0aAVDuyQ91GdB5z5x+Ptcx+Bf4SC0qLEoFbXfovI56rYpszPHtrqnWVHlpDV/9sb3mUpbMT4TBe2tA09afCtA0SKq06GmkIfxwcImRK4D5bpF+yx9aXYJienAW/3Hq6Jsmnv26Xgw1xJ77ugZhvNauA2rL2AYpjy9TRzueUWN9lnXaPl3VvVf+Jgo3BnDF5h/G+1lxnBT1E/10IS9Grgw5hwYEYItQNYhOEgx3M7pRGwVk1WmAqsy1/BELn86zCybquCmXeqcIi38LtCF90jUElTNt4OIW8fU8Dk2w9PlE2cRWQ0D2I0CHysUxIRa3orKvBaVCgGQowmfQKko+VTDTgTZU7zER+36BPN9Um81HNxGwkkZpjxbwQfuumDDfYpwxySQtwz5ZopNRzarsTm/SuUHiFsFvJEV+nkJXI+0rIAk+lnW+spHjThwHh6CefV/pla2ZuWyimsw09VIuJoWIrysv0T7vT+u7978vcu4Z4lwwPI8SHvAAjqft3o0McwssZcyBUAcBwhfMeKdpRDaNy6p7Faqg81s1sAbbLUjpM7BpTGdO1G2Pu8HDst6tboYusN5eCwRVRzzSGCEZa21S/MdsSbsLU7rWypPKw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH8PR10MB6501.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(346002)(376002)(396003)(366004)(39860400002)(451199021)(66574015)(83380400001)(66476007)(66556008)(66946007)(2616005)(6486002)(6506007)(53546011)(6512007)(478600001)(54906003)(6666004)(186003)(30864003)(86362001)(8676002)(8936002)(5660300002)(2906002)(31696002)(36756003)(41300700001)(4326008)(6916009)(316002)(38100700002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VFVpV1R4NDNqTnlNU1lIbDFOWjhQWWJWUmNiNjVtVE5UWjcxVWxGekczbzM3?= =?utf-8?B?a1dHa0NLbnFmeUJIM1VmSFBMYnVwbStVTWNPN09wMFkwNFhVeUY2NTVYMDR2?= =?utf-8?B?VGR3L0kxQTZGeUszckE0aHhXSCtFRmE3bHh2dkgwWDZuWlZqNGI3bC9ndk8r?= =?utf-8?B?dUcvelV3TDZIRFArZ2YzN2xGd1N0UUVFSDRYTHJOTGthY2pqTlVhWUplQ2Fm?= =?utf-8?B?ZEtMZWt2ZFIxazFSNEd3Yzc2MjNXSFFWcU9mSmVwZGxYQkRuT0V0cCtJOGsr?= =?utf-8?B?WmNmTzNEWmRqazBZNEJsR29QM3Y0ckg5QkMyVGFFT011c1dTVVlCSklucXRD?= =?utf-8?B?QVBtcnZDY0g5YUNLTTBoampVS3ZibUE2TnVxTVFiVm1XS0h3aEdMWDBndkVj?= =?utf-8?B?Y0RNZ2E0LzNDakcxYmgxbFY4MXFVS3RXVndHclIvMVlucDlKZlhCOTFzSVlt?= =?utf-8?B?RFdpa1h3Tmo2d3p1eVM2TTV5Ynd1WjNHdWNpTTZTSjBuZm5lcUlpdHRodTJR?= =?utf-8?B?c1gxaWR1d2pZV2h2U3B5ZE1LRk5hYmx1d0hZY0VFenphU3hFOStPMEwzZDQw?= =?utf-8?B?aEx1aGdVazZET0xMWXcvRUhQTWdqNkZ6MGd0bjZVdDBsb2R6NnJpVGpaSEZK?= =?utf-8?B?VWFvMHJWNTlXOW9yMTBhSjVSc1VLTlNSalJ0UVNnUTJMamtDL2VWZ3lZcTRi?= =?utf-8?B?UGFmQ3IvelZ5T09kVjdzd0Vzdi9kd0kzNk5BT0hrTFhvZkJ4WGR2UnhFRVU5?= =?utf-8?B?OTJzTGNwOVo4bzg5Sks4cVRhdVhleTNOL3pMUEc3bm1ib0pWNENBUDcvOFFw?= =?utf-8?B?ZEdTODJWeGN2VkVOYnV6bklQdXJjanR4N29Fd3hDdUpxakpLdCtvRVZTSXk0?= =?utf-8?B?QUNKUG9ncSswc2QzQThSVVhkWmlueWJOUWMzTG91RUkwcXIzNHE2LzluczYv?= =?utf-8?B?L2IvL2JUK3BFT0d3OXhyLy9TNkdTbGRMYXhiQkJzcENyRkNqZnBnL1JvNE5k?= =?utf-8?B?KzVYbTJlSXF6eG4vS2pFMCs1Q0luVEhGZzVQOVFTbnRrRENHK0NCeEVKU2NQ?= =?utf-8?B?OU1teDVPQnJ5eHp0QjRGNnVKWFFINVdxWURRWjhJMFJQc2dBWG9ZWEorM2xz?= =?utf-8?B?c3Mrdm12MkhLTXdEd2tsU2hsT2EvRnRQSzkrYy9lUjBJN3VUK1BjeDd4Sitz?= =?utf-8?B?eEJkT3Z5QnpTczZZTHBVSjUxT0N2L1BNNnhqVU1Zem1NbFJ2Rld0ZUhtRllF?= =?utf-8?B?dDExWEpPdUs5QTJ1cnRkVWF6K2N5K29KZGR5aHpiaUlsWnRBMlR3UVVGd21W?= =?utf-8?B?eHBHd1M1aVdQQUZqYytDakNhOVE0MmtBZ2FZNy9ZUFVTYW9oY1ljWnZtWGpr?= =?utf-8?B?Y0tLaFg3T2lodHRoVlJJZVJ1ZmdvN21vNDhUMjJ3Um5xc0VET1RpZGRXaWl4?= =?utf-8?B?dmJhVkg4aUl5R2xPelkzOEFTdDBDekw2VXc3MUZ3QUltQ3EwVnh4WVBKOTNn?= =?utf-8?B?bTBmdDJyY3pDQUI2WTRpZk1Fd1ozb2s3Ylhxa2twT2luMFQzOWRzYmdFbG1X?= =?utf-8?B?QkFVTHowUmhXVDJkMkNENUk2K3lzQWx2U0swQ1VEN0tiYTgzbzNka1NrTG9z?= =?utf-8?B?blNKbjlOVkRUUExjbytiMW1RZFJ0VXdNYjlwZHFDeTRiakR2MHFKVTlyeVFx?= =?utf-8?B?U1luZG1HOU1XQU12NGhWU0plZkYyeGxjYTlsV0s5NURYOFU5elN6aU5Db3oz?= =?utf-8?B?dGNacG4rT09YdVFPcWl6c0JKaENMMVBCdnRFdkRlSXlRa3VYNmR5ZW85YUJD?= =?utf-8?B?cjFtU3ZrQWJzZmltOTd6VEFkdkhaa3BueWo4WlJ4RE1YWHZJdEs0K3g5WHdM?= =?utf-8?B?TWRCTXpqd3hiVzRvaFVzczRraUhXYm53dXZjWTJrZUYxZUlrTlZIajg1WCtN?= =?utf-8?B?cTJJOHZyZlUvR1U3MUJlcHJOVUVaL1krTGU4bFExSG50NTVMejgxZEd4OFdP?= =?utf-8?B?V0hhZnZ0cEc0SUp2R0hDc1pSVnM5R3c1eUU2VDBYYmtHQVlXWGNEZU1hRkVE?= =?utf-8?B?QlhzdExVWVpQR1lxU1krVTRpY0graWJlSzZta1U5SDJHUzVlUHdUSHZwUE1o?= =?utf-8?B?R0pxazZQYlVoQWh3N0tPK1Eyb2ZBTDkrekM4anpzcWozZVRxYSt6ZGNEQWM3?= =?utf-8?Q?4NBAoWDcPWhkb0kiWHJLqrI=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: DcMhJQxskMaq42yTUQCHb7P4c45cqOvDFJ/j4c52AeOpPGDJmAkuXNdsEKpfAdDo8/zEkfWPLHT71/AXWzMZ8eAON3jBCmai0K33y0gnv1WKIQ7a52/5GJUrevmXOQ913yF8nh/7y8w8OwER2daGRt5Vzv+og1nykHPKDaiUHpek3fGjGsUEwYFDFRUIV9l3aFdH1cyTnmEisXHzZEbT0LQ6tgK3KEj9nwodtR/5sgLLT+yKfn64TC46m/42OVOyhYYr4fIv3JpQ2nL/knKFlbHXAwPnF2X1eLRiw5YhiAMbXrpe4smVMxYL4QsyxKT6c9RFiw7ZbekAKO86pwOs4lMB9lJojJr4FCNTInPs4efBviUl8DwgnK+7ndja0tIeD+mHPNOp5PUCLBQ1yCyRJ6EfcGns0h1jmbI1r9XGt29YwkyeuCOlj9uk3t+g9QLmz/d0ZuEsBbaakzDsmOEf3O8jPFs+u5M0DjXUDtO5nvgdwsrYqnJnBQGDmdf3lJMCclZnWE3xMrtXLJ2bt9C/WgKFnDYXvZEQNH9EvUVDdf5/DkJyjyk7gWj7JU/9qS9yMZ1KGglSEImh4QOblJOyRjxiwAHbbytpIAwOPahVGBDZIuL6UulP816mYjjBTClBWxw+AAWcR9Ion811ZA610t3gjpT6ZiJ3/9op8y1kmJG0ZPfAvF3p3ZUf1fIFsefFW48RZ3uSLMhn3rpV3o5v3rP2fL1jtqcHVShLwEQQss3T6A58GVDb1Z51dVcgW9j2JM5nn8dua6CvPhguvprVpGky8fyO/uJf8CacjoGQYw18Z0qfIFeTQVPuyG9sLwoYnezAClgUWBn+8hmuBLdLDKPjtsx9MiTe4ECnXuLHcGDUWdktkWLEAxrcY/k/7g/pDUbQkPfd4lzuE/0+z0tHMw== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4b7e9dc-6d89-46ff-aaed-08db55551a54 X-MS-Exchange-CrossTenant-AuthSource: PH8PR10MB6501.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2023 15:00:20.7144 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gBAxU1Ikc8noU7gMKaSdEXWwu8qLAtjAGWTxkm7bVfy6Y6NoWEHTlgYq+R0mv/x1BYVmcxaubF7dV1ipDFRy99IEUO2fTxyugKnLLYKNp70= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR10MB6163 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-15_11,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 phishscore=0 spamscore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305150123 X-Proofpoint-GUID: 3GGppT67N1EXr7iM03teM-dai3JMV5nd X-Proofpoint-ORIG-GUID: 3GGppT67N1EXr7iM03teM-dai3JMV5nd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Hi Simon, On 5/3/23 03:28, Simon Glass wrote: > Hi Filip, > > On Tue, 2 May 2023 at 12:43, Filip Žaludek wrote: >> >> >> >> Hi Simon, Michal, Marek, >> >> >> >> On 4/26/23 03:04, Simon Glass wrote: >>> Hi Filip, >>> >>> On Tue, 25 Apr 2023 at 06:36, Filip Žaludek wrote: >>>> >>>> >>>> >>>> Hi Simon, >>>> >>>> >>>> On 4/19/23 03:49, Simon Glass wrote: >>>>> Hi Filip, >>>>> >>>>> On Tue, 11 Apr 2023 at 14:24, Filip Žaludek wrote: >>>>>> >>>>>> >>>>>> >>>>>> On 2/8/23 20:01, Mark Kettenis wrote: >>>>>>>> Date: Wed, 8 Feb 2023 19:45:36 +0100 >>>>>>>> From: Michal Suchánek >>>>>>>> >>>>>>>> Hello, >>>>>>>> >>>>>>>> On Wed, Jan 18, 2023 at 05:01:12PM +0100, Filip Žaludek wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> Hi Michal, >>>>>>>>> >>>>>>>>> thanks for testing! Do you consider keyboard as working once it is detected without >>>>>>>>> 'usb_kbd usb_kbd: Timeout poll on interrupt endpoint', or judging from subsequent >>>>>>>>> typing? Note that issue is reproducible only in about 20% of reboots. >>>>>>>> >>>>>>>> I rely on keyboard input to boot so if it was 20% broken I would notice. >>>>>>>> I don't use the rPi all that much so if it was broken only a few >>>>>>>> % of the time there is a chance I would miss it. >>>>>>>> >>>>>>>> However, for me not typing on the keyboard during usb detection it is >>>>>>>> 100% not detected, typing on it during usb detection it is 100% >>>>>>>> detected. >>>>>>>> >>>>>>>> The timeout is limitation of the dwc2 controller handling of usb hubs. >>>>>>>> >>>>>>>> There might be a possibility to improve the driver so that it handles >>>>>>>> the condition but it might be that the Linux driver relies on a separate >>>>>>>> thread handling the controller which is not acceptable for u-boot. >>>>>>>> >>>>>>>> I am not usb expert and definitely not dwc2 expert so I cannot do more >>>>>>>> than workaround the current driver limitation. >>>>>>>> >>>>>>>>> For me I can always enter 'U-Boot>' shell, but then keyboard usually does not work. >>>>>>>>> And yes, resetting the usb controller with pressing a key afterwards will >>>>>>>>> finally break the keyboard. ('usb reset' typed from keyboard) >>>>>>>>> If you are Prague located I am ready to demonstrate what I am talking about. >>>>>>>>> >>>>>>>>> Simon's keyboard detection is somewhat interfered by 'SanDisk USB Extreme Pro' detection, >>>>>>>>> printed complaints but keyboard still works.. >>>>>>>>> 'usb_kbd usb_kbd: Timeout poll on interrupt endpoint' and 'Failed to get keyboard state from device 0c40:8000' >>>>>>>>> Btw. why from 0c40:8000 (ELMCU 2.4GHz receiver) when wired keyboard is 046d:c31c (Logitech Keyboard K120)? >>>>>>>>> >>>>>>>>> What is supposed scenario for RPi3/u-boot/grub usb keyboard equipped users wanting to boot non-default? >>>>>>>>> Enter 'U-Boot>' shell to detect keyboard; type boot; select desired grub entry..? >>>>>>>>> >>>>>>>>> Reverting either from the two makes it non issue for me: >>>>>>>>> 'dwc2: use the nonblock argument in submit_int_msg' >>>>>>>>> commit 9dcab2c4d2cb50ab1864c818b82a72393c160236 >>>>>>>> >>>>>>>> Without this booting from USB is not feasible because reading every >>>>>>>> block from the USB drive waits for the keyboard to time out. >>>>>>>> >>>>>>>>> 'console: usb: kbd: Limit poll frequency to improve performance' >>>>>>>>> commit 96991e652f541323a03c5b7e075d54a117091618 >>>>>>>> >>>>>>>> No idea about this one, for me it doea not give any substantial >>>>>>>> difference in behavior. >>>>>>> >>>>>>> Reverting that commit leads to a significant slowdown loading a kernel >>>>>>> from disk with a usb keyboard connected. The slowdown is somewhat >>>>>>> hardware dependent but on some systems loading the OpenBSD/arm64 >>>>>>> kernel would take minutes instead of seconds. >> >> >> >> More updates to usb keyboard/RPi3/dwc2 controller issue: >> >> I was following my former observation about printing characters from semi >> random places [usb.c, usb_hub.c, device.c, usb-uclass.c, dwc2.c] what >> works as workaround. I realized this is only when printing to vidconsole, >> not to serial. After disabling video_sync() and/or flush_dcache_range() >> from corresponding vidconsole print functions, printing is no longer >> workaround. This behavior seem to be due to cache coherency. >> >> >> >> Do you have any objections against elephant in porcelain proposal? >> Not able to narrow it down more to single source code line. >> With this keyboard works for me even when touching it only during 15s grub timeout. >> It is not for sure that cache coherency problem is from dwc2, but afaik there >> are no other complaints to usb keyboard. >> Performance degradation not observed.. >> >> >> %< ------------------------------------------------------------- >> diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c >> index 23060fc369..f95314ff1b 100644 >> --- a/drivers/usb/host/dwc2.c >> +++ b/drivers/usb/host/dwc2.c >> @@ -814,6 +814,7 @@ static int dwc_otg_submit_rh_msg(struct dwc2_priv *priv, struct usb_device *dev, >> else >> stat = dwc_otg_submit_rh_msg_out(priv, dev, buffer, txlen, cmd); >> >> + flush_dcache_all(); >> mdelay(1); > > We have dma_map_single() and dma_unmap_single() which are designed for > this. If you put these into the two functions that are called > immediately above, perhaps that will solve the problem. > After more experiments I finally concluded issue is not due to cache coherency at all. Workaround actually profited from side effect, time spent cleaning&invalidating dcache. Flushing dcache works for 512M but not for 256M regardless of target address. flush_dcache_range(random_addr, random_addr + 256M); // ~45us flush_dcache_range(random_addr, random_addr + 512M); // ~75us flush_dcache_all(); // ~115us Please see.. '[PATCH] usb: kbd: dwc2: Increase wait for dwc2 controller reset by 125us' >> >> return stat; >> %< ------------------------------------------------------------- >> >> >> >> >> >>>>>> >>>>>> >>>>>> Hello, >>>>>> I am about to dig more into this issue with proper tools, but failed to >>>>>> configure/compile trace functionality on RPi3 due to missing references >>>>>> to timer_early_get_count() and timer_early_get_rate(). >>>>> >>>>> You could implement a proper timer driver for rpi. >>>>> >>>>>> >>>>>> Is it possible/feasible to implement calls in CONFIG_SYS_ARCH_TIMER >>>>>> and/or CONFIG_SP804_TIMER? >>>>> >>>>> Yes >>>> >>>> >>>> I am little bit missing here secret sauce, timer_early_get_count() and timer_early_get_rate() >>>> are not supposed to be implemented in arch/arm/cpu/armv8/generic_timer.c? But predestined for >>>> drivers/timer/sp804_timer.c? >>>> >>>> TIMER is required for common/board_f.c and common/board_r.c but it disables generic_timer.. >>>> %< ----------------------------------------- >>>> ifndef CONFIG_$(SPL_TPL_)TIMER >>>> obj-$(CONFIG_SYS_ARCH_TIMER) += generic_timer.o >>>> endif >>>> %< ----------------------------------------- >>>> And obviously multiple definition of get_tbclk and get_ticks when forced to compile/link. >>> >>> It seems from the above that if TIMER is enabled for a particular >>> U-Boot build phase, then generic_timer is not, and vice versa. I >>> suppose that is fair enough. >> >> >> Sorry, it was imprecisely formulated question from me. I was expecting answer >> confirming and advocating sp804 is superior to System Timer. Implementing >> EARLY_TIMER for System Timer is trivial, sp804 requires research from my side. >> Skimming TF-A project sp804 seems superior. > > Yes, implementing that as a timer driver seems fine to me. But we > often have multiple drivers so I suppose some people will use the > generic one if sp804 is not available. > Simon, could you please outline proper approach how to implement early timer for RPi, as all current timer_early_get_*() functions are implemented in 'drivers/timer/', and early timer functionality still rely on dm_timer_init? 1/ Implement timer_early_get_*() in drivers/timer/sp804_timer.c once underestood superior sp804? 2a/ Implement dm version of System Timer, extending arch/arm/cpu/armv8/generic_timer.c? 2b/ Re-implement dm version of System Timer in drivers/timer/? >>>>>> >>>>>> I would be grateful even for trace to generate function traces without >>>>>> timestamps. Is such nasty hack without timestamping supposed to work? >>>>>> Basically my intention is to trace 'usb reset'. >>>>>> >>>>>> Appreciate any hints/outlines how to proceed. >>>>> >>>>> I assume you mean CONFIG_TRACE. Yes, you could update it to support >>>>> writing a zero timestamp. See the add_ftrace() function. >>>>> >>>>> But better to add a driver if you can. It should not be difficult. >>>>> >>>>> Regards, >>>>> Simon >>>> >>>> I am already happily timestamp tracing with borrowed functionality from generic_timer.c, >>>> albeit bypassing kbuild mechanism. It did not yet answered my usb polling questions, >>>> tracing report is polluted/overfilled. >>>> >>>> >>>> >>>> Instrumenting code thoughts: >>>> * It would be handy to -finstrument-functions only for desired objects. >>> >>> The compiler probably doesn't support that, or at least we don't >>> support passing different compiler args to each file in U-Boot, other >>> than by manually hacking the Makefiles. >>> >>> But I wonder if we could have a list of wildcards to match against the >>> function names? >>> >>>> * It would be handy to have macro inverse to 'notrace' to mark only desired functions. Feasible? >>>> * gcc -finstrument-functions-exclude-file-list still pollutes tracing buffer. >>> >>> I wonder why? You could check whether the filename includes a full >>> path, or something like that, so that it doesn't match. There will be >>> a reason. >>> >> >> >> Please take my Instrumenting code comments with grain of salt, only as user report. >> Some doc pages track suggestions and whishlists how to make life easier.. > > Sure...people using a feature are always going to have ways to tidy it > up / improve it. So I encourage you to take a look. > >>>> >>>> More Tracing in U-Boot thoughts: >>>> * There is proftool options discrepancy, documented {-c, -f, -m, -o, -t, -v}, implemented {-m, -p, -t, -v}. >>>> * Both types FUNCF_ENTRY and FUNCF_EXIT are marked as " <- " by proftool. >>> >>> Yes, please send a patch or two to clean these up. >>> >>> Regards, >>> Simon >> >> >> I will try to allocate spare time cycles to work on this, albeit with low priority. > > OK > Regards, Filip