From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D4512C81 for ; Mon, 18 Oct 2021 08:30:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634545809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lR6lHYfqRurTTNb2hz8P0iYHasRUVyst8KmFnIo9LRo=; b=GBqLHUdx8g4cQSbDXTDDlvXzbJ88wtoaeR7IX9Bu5ucNZwRfG/XzzaVtG/IAmIa77HATcS H4XgJAKiRELg4w3+Auo40zIbcuMThDSlDuzWvNGdrA8JH+tpr+rwbR/nAsGXARu2fJY6Pp ro5RSpErSq19vR0FROUsj5EKV5L0Ibs= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-KNY0PHYJND-u26rl0_hBeg-1; Mon, 18 Oct 2021 04:30:06 -0400 X-MC-Unique: KNY0PHYJND-u26rl0_hBeg-1 Received: by mail-ed1-f69.google.com with SMTP id d3-20020a056402516300b003db863a248eso13626497ede.16 for ; Mon, 18 Oct 2021 01:30:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=lR6lHYfqRurTTNb2hz8P0iYHasRUVyst8KmFnIo9LRo=; b=c6tHWD22o1+fnaPn5kHgepYum9NDLP8psKKxAnYuWK1/io94wRL2TUO92V7NysxIkJ 06Zl/lpRZ8ClS8k2YjUGdnmKbxrZ5vgLjAqV4HBFuzQ5AoDJU0zOsWDELCjYeIBHa0SM DW/0H8hmZt3dSIzbHPsP/wmlEsToqNuvDtOkcHA54Zamw0OmDAaL+McMQvvpYWg/Nw1d wsDO+Sz4IDMfhg6nlQXM2A8L4nP1/ka3/PU/YMX5XuXAdAsIQaFlP7Nvlbts5SDWJLVS SNXk/gP2riKQJ+Y3SDsgaolVRs2bfdbX511va2I1RmrqWlIVeIlzf87sbVHUD7ZMQBYn TETA== X-Gm-Message-State: AOAM531RB/d9ol0ZufuiZBKOOUFZydXayfEzynREw5QvmmX6sgCN9FnE 98IxOqh29zb3t8zJHaAmPXZ0bmS4BITm59O2i8oU0upLJYI3p1XlKayNlmCX3UHxjNbSOiJA7K/ EWnGv1VpkttuWvX/fD0PZTh1EUw== X-Received: by 2002:a50:fc17:: with SMTP id i23mr41133541edr.213.1634545805609; Mon, 18 Oct 2021 01:30:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrMhc7vcU2jV67qg01VSMajYU77IH44uhxXbXszh8rSXTGCseftvgmQJ1sKU52iD4gsvpnIg== X-Received: by 2002:a50:fc17:: with SMTP id i23mr41133507edr.213.1634545805463; Mon, 18 Oct 2021 01:30:05 -0700 (PDT) Received: from [10.40.1.223] ([81.30.35.201]) by smtp.gmail.com with ESMTPSA id q23sm8925974ejr.0.2021.10.18.01.30.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Oct 2021 01:30:05 -0700 (PDT) Message-ID: <103b5438-9f7c-7e89-28b9-29fe11eb818c@redhat.com> Date: Mon, 18 Oct 2021 10:30:04 +0200 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [BUG 5/5] [BUG] media: atomisp: atomisp causes touchscreen to stop working on Microsoft Surface 3 To: Tsuchiya Yuto Cc: Patrik Gfeller , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman , Peter Zijlstra , Ingo Molnar , Kaixu Xia , Dan Carpenter , Arnd Bergmann , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20211017162337.44860-1-kitakar@gmail.com> <20211017162337.44860-6-kitakar@gmail.com> From: Hans de Goede In-Reply-To: <20211017162337.44860-6-kitakar@gmail.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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