From nobody Tue May 21 05:24:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+91896+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91896+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1658935012; cv=none; d=zohomail.com; s=zohoarc; b=JpmATTT228NCAalSduryIduh3DujDY9h01EKRjJwlpeU0eNAj0MoyFlH3gKH700H45fRwwKNHjA+6vDAbYnmgmHMIVVsIFvtZV2OWGxKxwrotVCQkk5LB3BV6jGzVzXvD9w7GVIZoM9efsEua/XUQ/tM7ictgEB6dYtJFGGX5iI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658935012; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=b+g9qFKKJIvw0DmYAErjFIDMTnO2qRjiCfm5wmIVJHk=; b=CCxT/B0/BDORCdLb5ACKNKBNJxUeEWtTDfZaidmsPtH4w3J3w3lifojYBKiXTw0uAZF/xFeCMODof6a+Jl4ZO6jg/Y1z0RefqQB2DqS6r7Bzl11fKFzxpS0Va/C1o/pkRdsFY/bgLegGUH6o3aRC3OBz8u1TqtBHpGmWKMekxfw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91896+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1658935012424279.7159414568281; Wed, 27 Jul 2022 08:16:52 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id w8kYYY1788612xi1iyAPrbtK; Wed, 27 Jul 2022 08:16:52 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.20996.1658935010958728506 for ; Wed, 27 Jul 2022 08:16:51 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10421"; a="349968748" X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="349968748" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 08:14:20 -0700 X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="659242117" X-Received: from kalaiy1x-desk1.gar.corp.intel.com ([10.66.253.24]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 08:14:17 -0700 From: "KalaiyarasanX Thangaraj" To: devel@edk2.groups.io Cc: KalaiyarasanX Thangaraj , Dandan Bi , Liming Gao , Madhan Pethaiyan , Kathappan Esakkithevar , Madhusudhan Balaji Subject: [edk2-devel] [PATCH] VirtualKeyboardFeaturePkg: Pre OS virtual keyboard touch response are very slow with I2C touch panel Date: Wed, 27 Jul 2022 20:44:06 +0530 Message-Id: <20220727151406.1334-1-kalaiyarasanx.thangaraj@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,KalaiyarasanX.Thangaraj@intel.com X-Gm-Message-State: ZUClhwDa8fbyFK2JPe6l9KaWx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1658935012; bh=PVwas5vtOqc07nnhG409l/98GKlm2Md4NfKfnDG/Q6I=; h=Cc:Date:From:Reply-To:Subject:To; b=Hw3I1PI/IXe62Tfk+0TZN9a4nEfSQYbWRN+0O4zA5TcJMslwcRdxzTTqIbmJW/r5kJL emjmHQK+gb5wCjVb/D1g4lNkqwykFot7YX2OqyGSiHZW+VM94XiKJAl8vzGyANMQ4FQEa 4TiYstypjpdHLveKGu3mFQWfmrl+hMVGc8g= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1658935013750100001 Content-Type: text/plain; charset="utf-8" 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 key 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/VirtualKeyboar= dDxe/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 avoi= ds Key Press skips + // resulting due to faster key press and update only 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/VirtualKeyboar= dDxe/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 /// --=20 2.26.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91896): https://edk2.groups.io/g/devel/message/91896 Mute This Topic: https://groups.io/mt/92651285/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-