Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp798673rwb; Fri, 18 Nov 2022 08:22:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf7gikDkuyqrhF8qg7pqkP41mHNH9qNtwDgzTKPWmsLQPUonikCulewqSPyW9Mx4I/I+Gze3 X-Received: by 2002:a17:903:2609:b0:188:f0e1:ef4a with SMTP id jd9-20020a170903260900b00188f0e1ef4amr114098plb.159.1668788524620; Fri, 18 Nov 2022 08:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668788524; cv=none; d=google.com; s=arc-20160816; b=ACLFyAZ+rjBBhaDpA3Cehcy2NdStG1h7Bq9Pujg6E7guNABc4y4Hi0gip7snv/zRvk vjQUNLZLw7uGYKCSe65ZoxeLmfWOuqR/wUyMsL87bTN1OxeJxybCv4zodiUYtGuKctEZ 7etu/mVgxHCiAXToV40eI2rqRltRIMIVI9n0m41hefUpzZFLj95XK3Pfr3IlELnXFh3K XiQtLFwIDY05p0QUAKk24S8YkHatg7xqbuUmeTn84drYinwBD9msSJQPz7Pe08vM2IZS htwNgxEIv0XO2TTaw50o7tMgLHRzccavPk7xA+4Z0TQ7MDPI5cZFBSopAHm/127+0G6N 8ePQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lv3Ir6hqjWLfpj3JgMlunLddNrdnY2PDByb5xwuja2I=; b=WuyUR2GC5C2gZ7K6SlYb9cchBMlZnrW46otHLIG2b5o9BvEHY8DllzQnbwXt9rjxCH 8vifTPU3QrPh5H96x8kWhrg1bVcLejRc+veODh9RfLc9yKCl9+Fdi/qt1RH3d4qPqhfU X729EexRSgpnb/GJ4YEFA0oPWrt2yVpvoMsmubDudK7ZnJjvYNqFgHgzb5euUjm5e2Ga q35YYM2qHGnSlSshC/+KHvVYcyWcWvxetvNU1+qFro1dJTxzMZ646mJC8SQOjgBejm8q KihUp0c6/0ETcgX1daYltv69nfaZOrTPNOnXj5e+8PBEczdLaKbjtSi5WnQrPn21u8cy p+og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iznHYNVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a170902ee4200b00186f1c070f7si3730021plo.395.2022.11.18.08.21.52; Fri, 18 Nov 2022 08:22:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=iznHYNVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S242417AbiKRPop (ORCPT + 91 others); Fri, 18 Nov 2022 10:44:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242416AbiKRPok (ORCPT ); Fri, 18 Nov 2022 10:44:40 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC5447CBA4; Fri, 18 Nov 2022 07:44:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 62D80B82453; Fri, 18 Nov 2022 15:44:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D62CC433D6; Fri, 18 Nov 2022 15:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668786277; bh=lv3Ir6hqjWLfpj3JgMlunLddNrdnY2PDByb5xwuja2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iznHYNViEZbwr2lnpESQWX8uHtsVjn4Jt1zlsrs+3aV5nwHAPVKwwrM/dLos7JdaZ BjH6T8H5sJXbOKtZFK64UqLjW7SOpDP7qu6pAQoBNrsg6JCo5N6/UhCGFGSgSVi6+1 ZMwRUL4L4zXNJN21VljHkYflhgMvHvkQvQbUOMCFgTFJalMgr3QhZTMs48NGu6TA03 SwlhqVXP4+G0Mafp0OY8RW6cAHytuAnvjQf0CZYWiUpYE5lEDd7QbwfUuYsR2dPCjz WqDDdbEjq4y++xLS2WhjL6xoBIzWHbCxE2GiO4NcjcPpMDFNAGZy7nSzaT7Vg0QR8S 5jLXbt5JFCRDQ== Date: Fri, 18 Nov 2022 15:44:33 +0000 From: Mark Brown To: Carlo Caione Cc: Kamlesh Gurudasani , Neil Armstrong , Jerome Brunet , David Airlie , Martin Blumenstingl , Kevin Hilman , Daniel Vetter , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 2/3] drm/tiny: ili9486: Do not assume 8-bit only SPI controllers Message-ID: References: <20221116-s905x_spi_ili9486-v1-0-630401cb62d5@baylibre.com> <20221116-s905x_spi_ili9486-v1-2-630401cb62d5@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="REJnauToDoQdDoiz" Content-Disposition: inline In-Reply-To: X-Cookie: Ego sum ens omnipotens. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --REJnauToDoQdDoiz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 18, 2022 at 11:36:27AM +0100, Carlo Caione wrote: > On 17/11/2022 15:59, Mark Brown wrote: > > So this is an issue in the MIPI DBI code where the interpretation of the > > buffer passed in depends on both the a caller parameter and the > > capabilities of the underlying SPI controller, meaning that a driver can > > suddenly become buggy when used with a new controller? > The MIPI DBI code is fine, in fact it is doing the correct thing in the > mipi_dbi_typec3_command() function. The problem is that the ILI9486 > driver is hijacking that function installing its own hook that is wrong. Ah, I see - it's causing confusion because it peers into the internals of the underlying code. > The problem arrives when your controller does support 16-bits, so your > data is not swapped, but you still put the data on the bus with 8-bit > transfers. Why would you need to use 8 bit transfers if the controller supports 16 bits? --REJnauToDoQdDoiz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmN3qGAACgkQJNaLcl1U h9D2lAf+Ps2YiMRv04FkRIpnqcdeeVJ5f9fygu+kakEWfMNpqzc+qEbwovF9SZp6 gU8YaTS6ipuPAbf5Zv8ziwDe4wgbRcBHnmegTOmSHj451Oc3q0TBvKkganCwxHFd K1bB0cJYMmmpt4Y4OR+pyLTLoOMxJ3ADQ+yxqAZTGF5llQXxHw0/8UPhGIXLCAn3 0bTaruYqx9EATK199CVVj/oHzU31Ryj+H9pJOie8PoDBPO1eaykOAC5wiJHjU4M6 qgT29nXAt6XJw/gHnWZoKVLP0uJnJJQDEdL9Mp4y5yWoIFIXLTow1Lg+ZyadiLCm /DtnT4366TwxKlbjqYPYdT28DOAmBA== =URfB -----END PGP SIGNATURE----- --REJnauToDoQdDoiz--