All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Tsuchiya Yuto <kitakar@gmail.com>
Cc: Patrik Gfeller <patrik.gfeller@gmail.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>, Kaixu Xia <kaixuxia@tencent.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-media@vger.kernel.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG 5/5] [BUG] media: atomisp: atomisp causes touchscreen to stop working on Microsoft Surface 3
Date: Mon, 18 Oct 2021 10:30:04 +0200	[thread overview]
Message-ID: <103b5438-9f7c-7e89-28b9-29fe11eb818c@redhat.com> (raw)
In-Reply-To: <20211017162337.44860-6-kitakar@gmail.com>

Hi,

On 10/17/21 18:23, Tsuchiya Yuto wrote:
> Touchscreen input works fine before loading atomisp driver on Surface 3.
> 
> However, after loading atomisp driver, touchscreen works only when
> capturing images. This sounds like atomisp turns off something needed
> for touchscreen when atomisp is idle.
> 
> There is no useful kernel log. Just the touchscreen stops working
> with no log.
> 
> I'll update if I find something further. First of all, can someone
> reproduce this issue on the other devices?

My first bet would be some regulator getting turned off.

What you can do is:

1. ls -l /dev/bus/i2c/devices

And then write down the number of the i2c-bus to which the
CRC PMIC is connected, lets say it is number "4". Then:

2. Before loading the atomisp drivers run:
   "sudo i2cdump -y -f 4 0x6e > crc-regs-good"

3. After loading the atomisp drivers run:
   "sudo i2cdump -y -f 4 0x6e > crc-regs-bad

4. "diff -u crc-regs-good crc-regs-bad"

And see what changed.

There are 2 possible root causes here:

1. Some regulator is shared between the cameras and
touchscreen

2. The crc code in atomisp which you are using is
poking registers assuming the Bay Trail version of
the Crystal Cove PMIC (aka CRC PMIC) but your
Surface 3 has the Cherry Trail version and we know
that the regulators are add different register
addresses there, see the comment in:
drivers/acpi/pmic/intel_pmic_chtcrc.c
so it is possible that the atomisp code is simply
poking the wrong register for one of the regulators

I also wonder if this goes away if you do the

	hrv = 0x03;

Hack inside drivers/mfd/intel_soc_pmic_core.c ?

Without that we end up using the wrong PMIC
OpRegion driver which also uses the wrong
regulator addresses.

Regards,

Hans


p.s.

Here are the 2 different regulator drivers the
comment in drivers/acpi/pmic/intel_pmic_chtcrc.c
refers to:

https://github.com/Zenfone2-Dev/android_kernel_asus_moorefield-1/blob/stock/drivers/regulator/pmic_crystal_cove.c
https://github.com/Zenfone2-Dev/android_kernel_asus_moorefield-1/blob/stock/drivers/regulator/pmic_crystal_cove_plus.c


  reply	other threads:[~2021-10-18  8:30 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-17 16:23 [BUG 0/5] bug reports for atomisp to make it work Tsuchiya Yuto
2021-10-17 16:23 ` Tsuchiya Yuto
2021-10-17 16:23 ` [BUG/RFC PATCH 1/5] [BUG][RFC] media: atomisp: pci: assume run_mode is PREVIEW Tsuchiya Yuto
2021-10-17 16:23   ` Tsuchiya Yuto
2021-10-29  9:02   ` Mauro Carvalho Chehab
2021-11-11  8:00     ` Tsuchiya Yuto
2021-10-17 16:23 ` [BUG/RFC PATCH 2/5] [BUG][RFC] media: atomisp: pci: remove dummy_ptr NULL check to avoid duplicate active_bo Tsuchiya Yuto
2021-10-17 16:23   ` Tsuchiya Yuto
2022-02-08  6:19   ` Mauro Carvalho Chehab
2021-10-17 16:23 ` [BUG/RFC PATCH 3/5] [BUG][RFC] media: atomisp: pci: add NULL check for asd obtained from atomisp_video_pipe Tsuchiya Yuto
2021-10-17 16:23   ` Tsuchiya Yuto
2021-11-02 13:02   ` Dan Carpenter
2021-11-02 14:44     ` Andy Shevchenko
2021-11-02 14:45       ` Andy Shevchenko
2021-11-02 15:05         ` Dan Carpenter
2021-11-02 15:49           ` Andy Shevchenko
2021-11-02 22:52             ` Mauro Carvalho Chehab
2021-11-08 15:48     ` Tsuchiya Yuto
2021-10-17 16:23 ` [BUG 4/5] [BUG] media: atomisp: `modprobe -r` not working well (dup video4linux, ATOMISP_SUBDEV_{0,1}) Tsuchiya Yuto
2021-10-17 16:23   ` Tsuchiya Yuto
2021-10-17 16:23 ` [BUG 5/5] [BUG] media: atomisp: atomisp causes touchscreen to stop working on Microsoft Surface 3 Tsuchiya Yuto
2021-10-17 16:23   ` Tsuchiya Yuto
2021-10-18  8:30   ` Hans de Goede [this message]
2021-10-21  9:52     ` Tsuchiya Yuto
2021-10-24  8:32       ` Hans de Goede
2021-10-26  9:35         ` Tsuchiya Yuto
2021-10-26 15:41           ` Hans de Goede
2021-10-27 16:07             ` Tsuchiya Yuto
2021-11-07 23:39       ` Hans de Goede
2021-11-08  7:41         ` Mauro Carvalho Chehab
2021-11-08  7:55           ` Hans de Goede
2021-11-08  8:01             ` Mauro Carvalho Chehab
2021-11-09  4:18             ` Tsuchiya Yuto
2021-11-09  9:08               ` Mauro Carvalho Chehab
2021-11-09  4:15         ` Tsuchiya Yuto
2021-11-09  7:35           ` Mauro Carvalho Chehab
2021-10-18  7:50 ` [BUG 0/5] bug reports for atomisp to make it work Hans de Goede
2021-10-18  8:10   ` Andy Shevchenko
2021-10-19 12:58     ` Tsuchiya Yuto
2021-10-19 14:06       ` Andy Shevchenko
2021-10-20  6:48 ` Mauro Carvalho Chehab
2021-10-20 12:35   ` Tsuchiya Yuto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=103b5438-9f7c-7e89-28b9-29fe11eb818c@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=arnd@arndb.de \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kaixuxia@tencent.com \
    --cc=kitakar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=mingo@kernel.org \
    --cc=patrik.gfeller@gmail.com \
    --cc=peterz@infradead.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.