Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5968627yba; Thu, 11 Apr 2019 09:19:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQ31E/FSfVYdUOVrwvrHPjsxxoL1EHP8Bx8EZwBa/M7esV8fI5QwXBNuQpWC3dES+tawpd X-Received: by 2002:a17:902:b191:: with SMTP id s17mr49574769plr.70.1554999547465; Thu, 11 Apr 2019 09:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554999547; cv=none; d=google.com; s=arc-20160816; b=YMimUghQU+QGsQGza0wfbvbNYQFKZEbvhvHKiw6N+wiYv/++bnv6BvK/pxMJPmUGDx 8Qorsvpmd4uHkhA+ZTRRafpOoYMc/H9ezPdZ41wVxRC8NjyvuVQ6yzUlpoDD6BWi9PzQ 8HiKiW4rFvewCu4n+j3MKkf+vlWy2mBw+UfYdPoW0MCaILf1C9WYaJ57eLrwAVu/B6IS EUSB8cNyuumQtilWLoq3ycazetGpgmecF3H8tPNK57EUIOkA5CgRb0ElX6gjTJ/olVI4 Nui+VdDaA91KDb3lUWcOG5ydE/I2wJYSThfcGqnjhooKoslS1jreUAQrAR5UD6KEJeA5 EjKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=pdshwTx/pfd5OCAw4/o5Jg8UfEuVpurlXeHPmIBSah0=; b=tCb4NAUpNz6AnUjxRVDGpj1cKZVOgdWz7qTBWe7QkOjb5iZwke2rbuXR7z1WDrR5qy RSTs3kIePkHaZ5ZF6Lp0c82+5XEhfFJNgfXStTq8VooJA96kLpO4GcC51hf3dJbfwnez 9sxiks1NiZya4CxLJcHnoNvE4/Vy2Z/UGtCZamIFLEKVR0dyT/nbXT9h1t+mfeCTTH8L nwQn76Ub8vr7xAMFoI78pYoTw7rkgFp+ikn60g9ctQCytZQxE2eYepUDgIL12w6qmjSH 3WRhUEoEB97mwFTgQwbsYofbuh5lDAnuyE8V0WFEWxapl1sMQzwyLi1MiD7H/eiqZ9zb NLeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u70si24685692pgu.119.2019.04.11.09.18.50; Thu, 11 Apr 2019 09:19:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726640AbfDKQSC (ORCPT + 99 others); Thu, 11 Apr 2019 12:18:02 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57744 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbfDKQSC (ORCPT ); Thu, 11 Apr 2019 12:18:02 -0400 Received: from mail-pl1-f197.google.com ([209.85.214.197]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hEcOl-00029w-EL for linux-kernel@vger.kernel.org; Thu, 11 Apr 2019 16:17:59 +0000 Received: by mail-pl1-f197.google.com with SMTP id v5so4391105plo.4 for ; Thu, 11 Apr 2019 09:17:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=pdshwTx/pfd5OCAw4/o5Jg8UfEuVpurlXeHPmIBSah0=; b=Rs5jaDUepQg3HTzmQB8tNF26IDRjwdKkI6Z8tBQKMEZJSC5Jat48jfv0cvLWWtxwq1 6YKavGFwFCewPS8ik4svOdN7tJNzh+m03znqkVqRP1ohmByj0bKM8KU12NB4EThdRz8f DB0YYKkcpOJjak+UXdaxNHa8yp+8Zh4FufqMqSeZqEmNAlceUe19XugTVgRpGo6FifQn UYdNxA9ixEdZCt5zTJwmMq2cgNVlJhSKoivk6SnsHMl6ClH9oC1IcMloX3IUCyL7pncp KY4GWlf0pND6Qdg/ghV0M80OjZ5Tkepbx+40d/AtYpOyYIRHJfQ9+zNIEksaQNEx0FpY 6rmg== X-Gm-Message-State: APjAAAXWPU2yw5a3C4qLGbv5kB0id0Jl3XAjQ8rajpYbAKiDTwGInCSw D3WxILJxNSToFVaOBMTrtt8WEatDlIofS0WFTEKBoma5OIaMrx+9eXx2GSKIjgKAvUnzbDZVSsb v754Z7OmVNTkjnWOjaCA8Yc4Ph7r2sI6FLecay/2SGg== X-Received: by 2002:a63:2a8f:: with SMTP id q137mr46818674pgq.31.1554999477503; Thu, 11 Apr 2019 09:17:57 -0700 (PDT) X-Received: by 2002:a63:2a8f:: with SMTP id q137mr46818624pgq.31.1554999477106; Thu, 11 Apr 2019 09:17:57 -0700 (PDT) Received: from 2001-b011-380f-14b9-e18e-6428-b232-8eaa.dynamic-ip6.hinet.net (2001-b011-380f-14b9-e18e-6428-b232-8eaa.dynamic-ip6.hinet.net. [2001:b011:380f:14b9:e18e:6428:b232:8eaa]) by smtp.gmail.com with ESMTPSA id j19sm28512252pfr.155.2019.04.11.09.17.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Apr 2019 09:17:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: [PATCH] ELAN touchpad i2c_hid bugs fix From: Kai-Heng Feng In-Reply-To: Date: Fri, 12 Apr 2019 00:17:52 +0800 Cc: Hans de Goede , Dmitry Torokhov , Vladislav Dalechyn , Benjamin Tissoires , Jiri Kosina , Swboyd , Bigeasy , "open list:HID CORE LAYER" , lkml Content-Transfer-Encoding: 8bit Message-Id: References: <20190325125704.6585-1-hotwater438@tutanota.com> To: hotwater438@tutanota.com X-Mailer: Apple Mail (2.3445.104.8) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, at 05:18, wrote: > Hi. > > 1) Run "cat /proc/interrupts | grep ELAN" , note down the value > 2) Very quickly/briefly touch the touchpad once > 3) Run "cat /proc/interrupts | grep ELAN" , note down the value again > 4) Subtract result from 1. from result from 3, this difference is > the value we are interested in. E.g. my testing got 254 and 257, so > a difference of 3. > I've tested that, main diffs are 30, 24, 16 (the most frequent), 2 (the > least frequent). > > I was using 4.19.13 kernel, because I use ParrotOS (which happens to be > Debian distribution). > But I've installed experimental 5.0.0 kernel and I can't say right now if > suspend problem is resolved (i have to rebuild latest kernel with patch). Can you try below fix? This can solve what commit 1475af255e18 ("HID: i2c-hid: Ignore input report if there's no data present on Elan touchpanels”) tries to workaround. diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index c19a4c45f7bb..30e3664f1ae5 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -957,6 +957,10 @@ static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask) reg = community->regs + community->ie_offset + gpp * 4; raw_spin_lock_irqsave(&pctrl->lock, flags); + + if (!mask) + writel(BIT(gpp_offset), community->regs + community->is_offset + gpp * 4); + value = readl(reg); if (mask) value &= ~BIT(gpp_offset); > > Regards, > Vladislav. > > Apr 3, 2019, 2:18 PM by hdegoede@redhat.com: > Hi, > > On 31-03-19 11:50, hotwater438@tutanota.com wrote: > Hi. I've done everything you said, here are results: > > Vladislav can you check the output of /cat/interrupts on a kernel > without the patch and while *not* using the touchpad; and check > if the amount of touchpads-interrupts still keeps increasing in this > case? > > IWI or IRQ work interrupts keep increasing with speed at least 3 > interrupts/s. > > I'm really only interested in the touchpad related IRQs, so e.g. the line > about "intel-gpio 129 ELAN1200:00", if you're seeing 3 interrupts/s on > some others that is fine, so I take it the ELAN1200:00 interrupt count > does not increase on an *unpatched* kernel, unless you use the touchpad? > Also when I am moving touchpad IR-IO-APIC 14-fasteoi INT345D:00 get's > triggered and increased. > > That is the GPIO controller interrupt, so that one increasing is normal. > > If I understand things correctly then this all means that the IRQ indeed > is a normal level IRQ and Dmitry is likely correct that there is an > pinctrl / gpiochip driver problem here. > > Can you try the following with an *unpatched* kernel? : > > 1) Run "cat /proc/interrupts | grep ELAN" , note down the value > 2) Very quickly/briefly touch the touchpad once > 3) Run "cat /proc/interrupts | grep ELAN" , note down the value again > 4) Subtract result from 1. from result from 3, this difference is > the value we are interested in. E.g. my testing got 254 and 257, so > a difference of 3. > > The goal here is to get an as low as possible difference. Feel free > to repeat this a couple of times. > > On an Apollo Lake laptop with an I2C hid mt touchpad I can get the > amount of interrupts triggered for a single touch down to 3, > given the huge interrupt counts of 130000+ reported in: > https://bugzilla.redhat.com/show_bug.cgi?id=1543769 > > I expect you to get a much bigger smallest possible difference > between 2 "cat /proc/interrupts | grep ELAN" commands, note a > difference of 0 means your touch did not register. > > Assuming you indeed see much more interrupts for a very quick > touch + release, then we indeed have an interrupt handling problem > we need to investigate further. > I don't know if it's important or not, but for some reason these > interrupts keep popping only on CPU2 (i have 4cpu processor). > > That does not matter. > 1) Suspending the machine by selecting suspend from a menu in your > desktop environment, or by briefly pressing the power-button, do > not close the lid > 2) As soon as the system starts suspending and while it is suspended, move > your finger around the touchpad > 3) Wake the system up with the powerbutton while moving your finger around > 4) Check if the touchpad still works after this > > It works, but as it seems, looses edge. JournalCTL is being flooded with > i2c_hid_get_input: incomplete report (16/65535) > > That is probably a different issue. If you loose the edge IRQ, then the > touchpad > would stop working without any messages. I believe that the suspend / > resume > issue may be fixed by: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=52cf93e63ee672a92f349edc6ddad86ec8808fd8 > > Does your kernel have this commit? (please always use the latest kernel > while > testing). > Also a thing to notice, that after manually removing and modprobing > i2c_hid module, it says next in journalctl: > > i2c_hid i2c-ELAN1200:00: i2c-ELAN1200:00 supply vdd not found, using > dummy regulator > i2c_hid i2c-ELAN1200:00: i2c-ELAN1200:00 supply vddl not found, using > dummy regulator > > Those messages can safely be ignored. > > Regards, > > Hans