From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.30043.1658994239420903101 for ; Thu, 28 Jul 2022 00:43:59 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=hhYrmStv; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: madhusudhan.balaji@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658994239; x=1690530239; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ejN/7vOKQkBQsTWHU78uVFj0tgZhNXmfKgUDpjeYfRk=; b=hhYrmStvThgYiHfGEcerwK6NKUoYjWJm086kUrw60yINTz+rBNNybZkO K2wyRtgSKndwBnL4A8CROlxZ8nTDk0yNYjZSswwx6K8TxrQSf3aGnIcP1 S8raC4l8lBebtKhtPAmKbeGMHNzr8DwLtaKa4VfyKAIfy2dUw+9XEalWc fGBm866VshRWABR3hgEL6LfAEJ3sO6hDJMNUP7wywhpnDPauBpDqxbBEy HcslZsQq9AEdhvGcYzWfc6Cz/ErLP+ySN+YA62hB+XERzUb6S4Arj7VYq Vx/R4QdDHF87ydEh5+eFfGvTncWAXi4PG6zT0p9+Jq4vE84p9e8ATJwFt Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="352443347" X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="352443347" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2022 00:43:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,196,1654585200"; d="scan'208";a="846594685" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga006.fm.intel.com with ESMTP; 28 Jul 2022 00:43:32 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 28 Jul 2022 00:43:31 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Thu, 28 Jul 2022 00:43:31 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.42) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Thu, 28 Jul 2022 00:43:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GEycnLmzSFSIiz5348SYF0fML4ZZoFirVE57kCRbo/vwdEj0dJA44pe8qeilR7tN0+fbO1Jk7hCzwTraQI88A+Vg29bL6CxQMmM/8AF7yEoKLduHQ+NuavNs013tq3k+8d7kQ/jTFJuMyIJFEpnVVVGiSl28XU84zJ162BVTGJG/Z+dg0NVZUDICeY4jFgAR73pMm9LymFKl/+gc91cK/z3mNs9HpkBNd1qtVg0Hws43dbuKVB/73jkyQ4cRs2ueZVq68+R6C9lS/YBnwJO5Y8UftEXllJlO4mPlcTGhja8185lvGijWYVFKYK32T0p9gOztlx/f2pWei89ypsSemQ== 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=SqmD6TQp63pr69tiEDI/e6zoe8j1xorFkjHQkxbav3A=; b=lvzgWt4uSA46EZgkDCmebg+NriK2k+MFlJLSqQpJHrFTiPBJXOHK95fevRS3FLSL1Vn+TSAW8DXPdlxRySVUIJ0hvuD0DA52BtLQPmoQZfB8YzWIUxvYqOVsOZ9TVtI7XPkaR24zkx8Ct6F9R1ymbX3GVykSBaBsF/xTcdAQNNV01ldwPbtGHq7kQQQkAcDFZkvx5NUM8UT4UKUx6CETHbs15xHvxUXcbqFD1zDT3k2FxcwZQfwdI2aX1R1EBwKzSJjwQGRS6BrzgzeiA9ahzRp9QjEGUjAO++uEqctJB0HOPSeZDDut1fjGsS13xPIliQqLXqCMZ3EjgYTiHbKLew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BL1PR11MB5302.namprd11.prod.outlook.com (2603:10b6:208:312::7) by DM6PR11MB4170.namprd11.prod.outlook.com (2603:10b6:5:19a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.20; Thu, 28 Jul 2022 07:43:28 +0000 Received: from BL1PR11MB5302.namprd11.prod.outlook.com ([fe80::5d51:470a:442b:ee50]) by BL1PR11MB5302.namprd11.prod.outlook.com ([fe80::5d51:470a:442b:ee50%7]) with mapi id 15.20.5458.025; Thu, 28 Jul 2022 07:43:27 +0000 From: "Balaji, Madhusudhan" To: "Thangaraj, KalaiyarasanX" , "devel@edk2.groups.io" CC: "Bi, Dandan" , "Gao, Liming" , "Pethaiyan, Madhan" , "Esakkithevar, Kathappan" , "Balaji, Madhusudhan" Subject: Re: [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel Thread-Topic: [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel Thread-Index: AQHYocuSGM1piihJm0G/7YglChx4Pa2TZ5NQ Date: Thu, 28 Jul 2022 07:43:27 +0000 Message-ID: References: <20220727151406.1334-1-kalaiyarasanx.thangaraj@intel.com> In-Reply-To: <20220727151406.1334-1-kalaiyarasanx.thangaraj@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bc0df9a7-0f3a-425f-a808-08da706cdc26 x-ms-traffictypediagnostic: DM6PR11MB4170:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: t1rOIQrynldSKrHnC0dX6xxmfcJNxVwtn7W67yaGDhr6XX97ZnERVa19Rf/p0tiRdHJdsEzRdb07JtkmTMzpH7rty4SBPbys4WsCy9xN/QhZ7EJKGnhLzuLJlRHFSxfigHQZ98RAVtJjGNXg7wz1vOpGyqgNZMkFgo8upMpOr5bciS5CLxKmY+VqiFTpuiU1nHhL52bgIbObe4m9Tx6YQUwf7DiIPbi7lt6YMYvFiDLLBO4kS53szbHEhNBOmDMr+Pqdt1Yt6PoPMFii+7EFShtvI0chgtjx+KmG/xes5afFGOox4l15BQPuAglHiGEfvNzpPMc31JVU6MLx91v4XeZ8wxPmowVx7Y/f6/NU7f+YofKc/m/CxJUI0KQTjpj0pwlG/szPBF5egsPlV2HWz/s+JYJtp3cP1prxkrV4rn+dFFxtcOn7B7Zway16x6EzldXt5TG4jwPJpOFWp9s8UbOA2XO6Ak77sV3OWSRwL9WO/szOoarIk9WqJTGepZyOhm1P5VjFqOl4vC1nJG38Mx9awzSsqICsAUnfMRBNefOS5c6JotFHue/LfHxXV+0SJh4dpsPUmL26MNiT9coc0TKNHqMx4mGTMrFLZB2fOkbyhnHvEfGXB/1WJgzSz4GCgjEIYjjBU8WFoTXdQquo01dn25JozeM9TUna6jEGrB4yU7bkHGcq23q90Xh9B7I25HXXMfpsbF+jfTfj13jzq3uTqt1rlTCVdWyL/kVuXV6VcIv6ObYKQq9JbfvYeQ7hHCDROLab564rUAYW79ivUCi9vIqoDs1i8qNFJIdk3dUr2+/yIuph75/30G6mBNkv x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5302.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(376002)(346002)(136003)(39860400002)(366004)(55016003)(52536014)(66556008)(316002)(53546011)(107886003)(122000001)(71200400001)(8936002)(5660300002)(41300700001)(54906003)(38100700002)(2906002)(478600001)(66446008)(83380400001)(66476007)(26005)(6506007)(7696005)(110136005)(9686003)(33656002)(86362001)(186003)(66946007)(38070700005)(4326008)(76116006)(64756008)(82960400001)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?88S2Jvb/6tZ1KZdKf4CMb+oUciStf12nOyjKnNDJJLuqGITZPK57H8Y9oWPQ?= =?us-ascii?Q?5TS3go9lvswetQwWoPDpl/0xJp7FhlAumZOlucK01Gj3wbncm8rl6V/4wMWu?= =?us-ascii?Q?xJH6I5aQ/rd7NXaMiA/Hf37ntKfIduf5ehsXBhPjrGSKt06t4yLWjSIfS0+r?= =?us-ascii?Q?5CCmB9sF/V3QzrQ3FGN7bQEbHv8uH3AM6AMsZN5M2M/9o81yCMORMHlVqqPD?= =?us-ascii?Q?4O1Zn/En9BhLo/6QTr/0LEExJa4fzSlW5WVweYVHA01gQE8jQK+ebEK2XU16?= =?us-ascii?Q?MV0+aEd/Osb1l1ikSOT0HHXIj0RxMKhjwneDPWfsm6we8nwjtORkNzz9uI3K?= =?us-ascii?Q?WCsqa132714MmeCewVEIb3AocbVYCpRLiHHdrJYV7yy2auKduB/p7ORTuw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3fhDD48yT6iRVcKDuY8komA3vdBuXb?= =?us-ascii?Q?cauv2WK4pgegZSKptljzubljwqpqFgCvodo9s5lc8GIiE7clGEHwvawTpnqM?= =?us-ascii?Q?1wx7X2S/BsMkuavtv6hO/uvDNvfFqoT3xAbfoKRNxff7ycAaZDIyVnhkt/lM?= =?us-ascii?Q?dLnWJ+4sq9KL3c0fF1sFSQP6IZzG3Ixw/PsGOK2vrscC9aetQvNj0A9M2Jc3?= =?us-ascii?Q?0H5b3LZAWSOe2x6oulbC+CoBTk/6O8T6iQnThm3qn1kJ5+s6AZQQzgkfSCQw?= =?us-ascii?Q?dH0gmIadBj6Ym3rVU+cJ/GLDqKfzgxd04qZ6ElXojXOnlf5OUEgmXZJXV7Tc?= =?us-ascii?Q?+Q=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5302.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc0df9a7-0f3a-425f-a808-08da706cdc26 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2022 07:43:27.8333 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LiijmCMoxdi0UJnc3ys9gFwtDIQjplidaLrHPbwrsWXaYdWpw4/b6pZwUU8nr7gLzRTs2eEUlZdHqttYoh251nl0yA59gQIeFHnhMjEZciw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4170 Return-Path: madhusudhan.balaji@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable -----Original Message----- From: Thangaraj, KalaiyarasanX =20 Sent: Wednesday, July 27, 2022 8:44 PM To: devel@edk2.groups.io Cc: Thangaraj, KalaiyarasanX ; Bi, Danda= n ; Gao, Liming ; Pethaiyan,= Madhan ; Esakkithevar, Kathappan ; Balaji, Madhusudhan Subject: [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch r= esponse are very slow with I2C touch panel On one Touch, multiple Reads happend and this reads varying based on Key P= ress time. Resulting in Multiple key press update on screen. This condition avoids Key= Pressed skips resulting due to faster key press and update only on valid ke= y press. Cc: Dandan Bi Cc: Liming Gao Cc: Madhan Pethaiyan Cc: Kathappan Esakkithevar Cc: Madhusudhan Balaji Signed-off-by: KalaiyarasanX Thangaraj Reviewed-by: Madhusudhan Balaji --- Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/= Keyboard.c | 12 ++++++++++++ Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboardDxe/= VirtualKeyboard.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/Keyboard.c b/Features/Intel/UserInterface/VirtualKeyboardFeatur= ePkg/VirtualKeyboardDxe/Keyboard.c index 2b1216746b..aa4bfe3baa 100644 --- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/Keyboard.c +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyb +++ oardDxe/Keyboard.c @@ -512,6 +512,18 @@ VkTimer ( if (!VkContext->TouchActive) { VkContext->KeyPressed =3D FALSE; } + + // + // On one Touch, multiple Reads happend and this reads varying based on= Key Press time. + // Resulting in Multiple key press update on screen. This condition=20 + avoids Key Press skips // resulting due to faster key press and update o= nly on valid key press. + // + if ((Point.CurrentX !=3D PreviousX) || (Point.CurrentY !=3D PreviousY)) = { + VkContext->KeyPressed =3D FALSE; + } + PreviousX =3D Point.CurrentX; + PreviousY =3D Point.CurrentY; + ConvertCoordinate (VkContext, Point, &TouchX, &TouchY); =20 if (!VkContext->KeyPressed && diff --git a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/Virtual= KeyboardDxe/VirtualKeyboard.h b/Features/Intel/UserInterface/VirtualKeyboar= dFeaturePkg/VirtualKeyboardDxe/VirtualKeyboard.h index 14a50fa5af..11e045f894 100644 --- a/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyboar= dDxe/VirtualKeyboard.h +++ b/Features/Intel/UserInterface/VirtualKeyboardFeaturePkg/VirtualKeyb +++ oardDxe/VirtualKeyboard.h @@ -37,6 +37,9 @@ extern EFI_DRIVER_BINDING_PROTOCOL gVirtualKeyboardDriv= erBinding; extern EFI_COMPONENT_NAME_PROTOCOL gVirtualKeyboardComponentName; extern EFI_COMPONENT_NAME2_PROTOCOL gVirtualKeyboardComponentName2; =20 +GLOBAL_REMOVE_IF_UNREFERENCED UINTN PreviousX; +GLOBAL_REMOVE_IF_UNREFERENCED UINTN PreviousY; + /// /// Debug raw data points /// -- 2.26.2.windows.1