Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6099956pxb; Mon, 8 Nov 2021 03:12:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxM9NBFjOgb8PUrIt2wFA6e8DiwDQ2gTlHMnxqkU0+b9EMYO1xpJOLwx6AaEx+RFdXppL2F X-Received: by 2002:a05:6e02:1546:: with SMTP id j6mr24136034ilu.223.1636369930033; Mon, 08 Nov 2021 03:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636369930; cv=none; d=google.com; s=arc-20160816; b=rfBOrocpm+Eh95U2kpzKiQ6+v1cQWWsXczVK7esbJT2HJR8XMVq4nS8DSVZVyaSuMd S2ZT1RscB8olaa7ai8pF5pWEesARzFIlMkukPhT8sW4QYkN7EU/ZSd0TRzn12phIgwoJ t6LBi+8sBldzW4BkslT6y174G6k3S0thYAwuj2S7WxPA5z5VO+WYbAGTGiAUIsTHYKcE +F1X0vx6QuwHBB3pu59r0R4sDj1sACYBpB/9NiLKAg7tjBjjH6RqH/huG6imQ34DSQRo /ZdiPfq4wNWOaWUJWkhvOgDmbwwHohMLcPlUyw4GOUahRth3Nc8EE5B5jvGbdzbBhapE +gpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CjpewFlfxhPfsY3uvMEpI7BolXPB22WmcqOM3sGRb1w=; b=oO6uquRN+gnII5P3lt70YSZoNYmF7KLn+oXB41344Hz5XjjdQUdrfaeicd1TMYdo+q yIIVFU5ATX3NgUXQAXy9OewP7l3YujLc7XyiVD0pOzTO4K8/6o7t/OnpMBCsB5LCG0+y /eYpXw/GODmHYl9+hjNGgvqwk3J4iCl/xZmkkuz+YCkE7TtKwSUwu7PquFxe8Oa0kImI SPjldLKsuBOTl+mDzfvMrffxej7JvLbz+Zn5LVyJlYxV4lXAZ2sHBpk6ZTJBAeZjunO4 BsIONEQdFW+deH7pJWav5OL5nG5YNbIqsX4zYvykS71jNMF5D1uR7awxxMICE+eEyYDF INag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ELgKe9jI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si35890077iov.52.2021.11.08.03.11.58; Mon, 08 Nov 2021 03:12:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ELgKe9jI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230372AbhKHH6m (ORCPT + 99 others); Mon, 8 Nov 2021 02:58:42 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22363 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhKHH6l (ORCPT ); Mon, 8 Nov 2021 02:58:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636358157; 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=CjpewFlfxhPfsY3uvMEpI7BolXPB22WmcqOM3sGRb1w=; b=ELgKe9jInuJAqVo9oPvWRZCKpiwNslFZwlR5Y+LZNLNEfMSdJ/UeauCbcpKwKIIyJA95wV p1/sIgSpdJgLXisPZkBlNGYlJeEwM/MJFkz/qWUL7EFKM+izrR2DKWYjW57veMK4nvQ1Jq js7B5L+QXTGZjJGogOv3/rTilXXtmvA= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-512-bYdSvozvOuqhxFJbT7sDPw-1; Mon, 08 Nov 2021 02:55:55 -0500 X-MC-Unique: bYdSvozvOuqhxFJbT7sDPw-1 Received: by mail-ed1-f70.google.com with SMTP id w12-20020aa7da4c000000b003e28acbf765so14125956eds.6 for ; Sun, 07 Nov 2021 23:55:55 -0800 (PST) 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=CjpewFlfxhPfsY3uvMEpI7BolXPB22WmcqOM3sGRb1w=; b=4a+eMWA4n/PqVSo1SbfMwZfGL1EmUC/o0H5tss9l3ZRrZZd5GOoPwFiZWmwPVCFjFH XhgVaR98wclNKuN+6+1sk/0gG3u4bIsU91cHm8VBGR9VBaNBV/0qw6hNqWAzYG3ztWBR 9x0+Jp5abAGjivwwWdF82KCfvburq+cSaIF6FAnc2RbKTszSHuinvWDQ21Gr+3vBm7AH iMAKB+nbyBsW/xPi2spBTpnQMT3Hnh6LXqWa0dT9QnbU94gEiBvlxv7DHDmU09Gql1Et AUzoNYxp+8eaE5vwe48sjho9KTJaOF1sI7xpNX9VGio8OZMZRBxVt1CQwwE4Lxm1AbzV qReg== X-Gm-Message-State: AOAM532XDZ1a6u8eONRjnzJIBEcQx25IQTmG1iIQ4FWb48hPCzuM+1C7 IwwdO50d0CyY0pWIykwwKCz/8XA4pocvcawy3z6vCG8y+nJVNihZSxvtrRQnEnu4xVT6221PFPF Obgx3LIMbLzvlpoMmA2ujPQ6S X-Received: by 2002:a17:907:6da9:: with SMTP id sb41mr30754529ejc.88.1636358154642; Sun, 07 Nov 2021 23:55:54 -0800 (PST) X-Received: by 2002:a17:907:6da9:: with SMTP id sb41mr30754510ejc.88.1636358154464; Sun, 07 Nov 2021 23:55:54 -0800 (PST) Received: from [10.40.1.223] ([81.30.35.201]) by smtp.gmail.com with ESMTPSA id hb36sm5217499ejc.73.2021.11.07.23.55.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 07 Nov 2021 23:55:54 -0800 (PST) Message-ID: <869d0e2c-b04a-ef35-cfe5-b372c646fce9@redhat.com> Date: Mon, 8 Nov 2021 08:55:53 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [BUG 5/5] [BUG] media: atomisp: atomisp causes touchscreen to stop working on Microsoft Surface 3 Content-Language: en-US To: Mauro Carvalho Chehab Cc: Tsuchiya Yuto , Patrik Gfeller , 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> <103b5438-9f7c-7e89-28b9-29fe11eb818c@redhat.com> <310ace44-93d5-99a3-bb4c-371b0a13462d@redhat.com> <20211108074101.033af4c5@sal.lan> From: Hans de Goede In-Reply-To: <20211108074101.033af4c5@sal.lan> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mauro, On 11/8/21 08:41, Mauro Carvalho Chehab wrote: > Em Mon, 8 Nov 2021 00:39:38 +0100 > Hans de Goede escreveu: > >> Hi, >> >> On 10/21/21 11:52, Tsuchiya Yuto wrote: >>> Thank you for your comment :-) >>> >>> First, I need to correct what I said in the previous mail. I later found >>> that loading only "atomisp" (as well as its dependency, >>> atomisp_gmin_platform) does not cause this issue. >>> >>> What causes this issue is rather, loading sensor drivers (as well as its >>> dependency, atomisp_gmin_platform). >>> >>> These sensor drivers for surface3 are both not upstream, but I made them >>> as similar as possible to the upstreamed ones. So, I guess this issue >>> can still be reproducible on some other devices. >> >> I've run some test on my own surface3 and the problem is the writing >> of 0x62 (which becomes just 0x02) to the 0x57 register of the PMIC, >> writing 0x00 to that after loading the sensor driver makes things work >> again. >> >> I have not had time to investigate this further. >> >> I used media-staging + your sensor drivers from: >> https://github.com/kitakar5525/surface3-atomisp-cameras.git >> >> Which was enough to figure this out, but I've not actually gotten >> either of the cameras working :| I get: >> >> [user@fedora nvt]$ ./atomisp-test.sh >> p0: OPEN video device `/dev/video2' > > After the patch that moved the output preview to be the first one, > you should probably use /dev/video0 here: Thanks for the hint, but I've not rebased my tree to those latest couple of patches yet, the same tree does work on the T101HA with /dev/video2 :) I think this may be a module load ordering issue, I believe that the sensor drivers need to be loaded before the atomisp driver itself and on the T101HA we are hitting this "sweet spot", where as on the surface I was loading the not yet merged sensor drivers manually, causing them to be loaded later. I still need to verify this theory, Tsuchiya can you perhaps confirm that the modules must be loaded in this order? Regards, Hans