Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6113528pxb; Mon, 8 Nov 2021 03:26:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCKKbGcAsxEbbt1vLGNeqgtXDMHo8qQD/V26uMTw3sIdKxeQcUU54ue7B14vid7YRwqfZL X-Received: by 2002:a17:907:96a9:: with SMTP id hd41mr621893ejc.413.1636370813172; Mon, 08 Nov 2021 03:26:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636370813; cv=none; d=google.com; s=arc-20160816; b=Bq1q1NUojrxl4YgxcpgFvWyoGCdh4U4Kome33DqibRNyWlEfC02FRwVupzfXfuEye9 VK/qBhJ6yIsR9qMa216u9T5QW5VpJrhy6RapzK0i7R4Pb75KK6qqIgaSaHu3EO1lcHCS zs9Nh2LfshEcGFAPC7gwuQh3VzsemesPLNNQICB0w7GuBccF0yz1iDGEC4cs6snPR91y hKZ/qlOdgI6mpvVlqM9DPdErFPOC9za+rxxT65jqWG+8Oxtgyx/eHqRZaZtdRFewbeyB A3mfa23c/XNfOxa2MimHRsWMv4AN4iZH0Sn30V3O9tBv8I6fGa8bLztPFzYK3WOReSY1 J9IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=FolqODpMIG3oQDtzDZP/vwNRKACZMEcAXoCoBeuw020=; b=kOcrA1TAEdll+SeQ5EO+Lwg+xXMH+2w6qzJkemTDVzMTjXvWQrZU6yURFALK2LyqpA sqEHLaMXEJPw1+3Iy0xZYKYtybQosfjgGfcSbpNvC+teeVYIN7urQIgfpZzan5NkEUiZ SuByh7/+ZPCqlMuvkFKZBH+IF2k1u3uLU9f3Zlw4aljzcfkjmMTnp+ndYDmUxTKrkNs5 dgKrwTDgb2F1sN2gaCRcXWzXYWMNXVr3IdU7cFW67EL2hVXFMbiE7My578d99YLkDR3Q HQ9DIVRFdpjN6gPDfrVfVMKhhJxCXupDCmGUoC5kd1in81MTYG/Jxr2KkJB2DfFmLru5 8nMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bM8tPKMT; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si24395911edt.48.2021.11.08.03.26.28; Mon, 08 Nov 2021 03:26:53 -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=@kernel.org header.s=k20201202 header.b=bM8tPKMT; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236155AbhKHHny (ORCPT + 99 others); Mon, 8 Nov 2021 02:43:54 -0500 Received: from mail.kernel.org ([198.145.29.99]:38054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235686AbhKHHnv (ORCPT ); Mon, 8 Nov 2021 02:43:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B096761075; Mon, 8 Nov 2021 07:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636357267; bh=RVK8iyvJlzFHPZCKRlsINEQUkjxXHKinu7hv/cU6no0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bM8tPKMTXtOzLT0n0JcaF3/bbzalw0dSy3V/uc5oZokrGrRNrrnGhV7RdDP/yckuR /mOMdXhPbvwRV39Ha+TLmMZr5y4s5HMBGMxL6utF7UckT/SUoRoZaMCxCaqHuGq5DM 1Qjvu+VAA/z8RGhDFGetpnOTbiph1AsYJ5lOAw9/hazTiOLmYN/FCRyrQBYJhKXkZs jcOWUi8v7OOHobJYEj6fSlnRVlkqbP5deoOVHsUwdm3KFD4EYGSkIH1mm+gghpkpYI t+jzr2ik91r/jMqNSCBp/is61wzQKLZ9v+vzY3FnpjUVmudPSn5+HwbTfQzaMg9HAM iHu1v9eWS8G+A== Date: Mon, 8 Nov 2021 07:41:01 +0000 From: Mauro Carvalho Chehab To: Hans de Goede 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 Subject: Re: [BUG 5/5] [BUG] media: atomisp: atomisp causes touchscreen to stop working on Microsoft Surface 3 Message-ID: <20211108074101.033af4c5@sal.lan> In-Reply-To: <310ace44-93d5-99a3-bb4c-371b0a13462d@redhat.com> 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> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, 8 Nov 2021 00:39:38 +0100 Hans de Goede escreveu: > Hi, >=20 > On 10/21/21 11:52, Tsuchiya Yuto wrote: > > Thank you for your comment :-) > >=20 > > 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. > >=20 > > What causes this issue is rather, loading sensor drivers (as well as its > > dependency, atomisp_gmin_platform). > >=20 > > 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. =20 >=20 > 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. >=20 > I have not had time to investigate this further. >=20 > I used media-staging + your sensor drivers from: > https://github.com/kitakar5525/surface3-atomisp-cameras.git >=20 > Which was enough to figure this out, but I've not actually gotten > either of the cameras working :| I get: >=20 > [user@fedora nvt]$ ./atomisp-test.sh=20 > 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: $ v4l2-ctl -D -d /dev/video0|grep Name Name : ATOMISP ISP PREVIEW output $ v4l2-ctl -D -d /dev/video2|grep Name Name : ATOMISP ISP VIEWFINDER output On Asus T101HA, I'm also getting this if I use /dev/video2 with nvt: ioctl(3, _IOC(_IOC_WRITE, 0x76, 0xe0, 0x1f0), 0x7ffcf08fe030) =3D -1 EINVA= L (Argumento inv=C3=A1lido) p0: ./v4l2n: ATOMISP_IOC_S_PARAMETERS failed on fd 3: Invalid argument (22) p0: CLOSED video device Regards, Mauro