Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1877091rwb; Thu, 17 Nov 2022 03:27:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ZFen5ttFx1HJnlfQO/Abtv6zwpVvoMi8Zw3Uu3EEcmmlsixsZvd2y9/1y9dpzTIeS/JbO X-Received: by 2002:a17:902:ab0d:b0:186:acb0:e93c with SMTP id ik13-20020a170902ab0d00b00186acb0e93cmr2158822plb.141.1668684475430; Thu, 17 Nov 2022 03:27:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668684475; cv=none; d=google.com; s=arc-20160816; b=yQBTq38cOcEHP5WtOo/C0wyYYlxhr4+oB4yswv5Et5QD2PZs/LJAr8jpzx1++vS03h sJP5DncsnCfyvEVgAAwSCrMlaFK3QAYnF9b1gcEgGZxDDxxRXxBiYgjZ7LCQ0XViFJkK tAOqDsGvdjMtwn8I5FoIRXr5yLfYkO1cIhYwhZSFfnQke+PBGUYp+elL2gSjY01JQMB+ 84o1W74zTVE6yQrunvovZ+u0vL4zuXGM+XWyPELOmwW8RpIEycgRU9X4eV9kfHJM/55X C2ig7KzX5W0jsOX+VwPmQpATdkV2gxtB3XBXK8EgrTdf9DMG3JrWzXHtBOeSLZfmwfGl Uqfw== 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=M71Nu9XefuRscbqY2E5sVPVbBVPPe3LADmVOxrCky40=; b=ZtJB7qhtGx0TU4572MmNks/rcXT8uwKpR3pl1DAN514HFSYVoJphf3WUlMOOCp6jKt 17mrpoWTLsg58004LcIYicTVUtptwu/mmXIlWKe/0Kigw/oGMy3lBjcxmIZ8EYr42MId XR7oz86Ivmg9daoeMcquRNfu3hiP85nOgEb/RzaERrmijolANbqUH1FwrezXQwY435oh VBy/CzgC3EKSsUmhXIWUTfMK8uxi4xYDFC239gPtPr5b2d+edtBhUZLAgR5hcM9n7bom vCeirKWNxbfKHu+2PQonGRiv8c3hnt61hAOpBv+pQ8OfmuxnP3SkmEdXn1NrOgA0IRoT mxwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="W3x/iGCb"; 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 l9-20020a170903120900b0018890a7e9c5si773715plh.509.2022.11.17.03.27.43; Thu, 17 Nov 2022 03:27:55 -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="W3x/iGCb"; 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 S239519AbiKQLLG (ORCPT + 92 others); Thu, 17 Nov 2022 06:11:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239939AbiKQLKk (ORCPT ); Thu, 17 Nov 2022 06:10:40 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B93676E572; Thu, 17 Nov 2022 03:09:46 -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 64219B81FF8; Thu, 17 Nov 2022 11:09:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3A05C433D6; Thu, 17 Nov 2022 11:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668683384; bh=rlMFnUfQu8GJbpUZVcINUpGICn6p1+U5R0s89aqiluY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W3x/iGCbNuMvys+UHPYxXfBNEAjRTHTA7o32s2r636M+YBziRU2SonABy/5UU1DnQ 3YSZBpbLlV16b0wTYkkbOka0EYaToulvwQQ6YLZf1ROtwkCUY/mYWSKCusjvL5vfl5 GtXRdaGwEu5jajg8VLb3TOuqu8rtnFdEm4Xr02tIqPUgI6oDOyw0ISkleOPBWQv1Uh Q4l5z6Y53UO3FFCyK7OG8Af7IuGHk5lPUop3+BjBi3gh4Pw65qxsKsd9Ug2shYBllT zLwERhd4dFhs4bctzw0za1HB8NQRl6Qh5d7eU+rxh+CyqFs4sAk8zNQCSfWflRXOXM +GanqHZNquZlw== Date: Thu, 17 Nov 2022 11:09:41 +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="LQcIBCJXd6N58uwP" Content-Disposition: inline In-Reply-To: <20221116-s905x_spi_ili9486-v1-2-630401cb62d5@baylibre.com> 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 --LQcIBCJXd6N58uwP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 17, 2022 at 09:47:40AM +0100, Carlo Caione wrote: > The ILI9486 driver is wrongly assuming that the SPI panel is interfaced > only with 8-bit SPI controllers and consequently that the pixel data > passed by the MIPI DBI subsystem are already swapped before being sent > over SPI using 8 bits-per-word. >=20 > This is not always true for all the SPI controllers. >=20 > Make the command function more general to not only support 8-bit only > SPI controllers and support sending un-swapped data over SPI using 16 > bits-per-word when dealing with pixel data. I don't understand what the commit log is saying here. The meson-spicc driver advertises support for 8 bit words, if the driver is sending data formatted as a byte stream everything should be fine. It may be that there is some optimisation available from taking advantage of the hardware's ability to handle larger word sizes but there should be no data corruption issue. > + /* > + * Check whether pixel data bytes needs to be swapped or not > + */ > + if (*cmd =3D=3D MIPI_DCS_WRITE_MEMORY_START && !mipi->swap_bytes) > + bpw =3D 16; > + You should check the SPI controller compatibility here. --LQcIBCJXd6N58uwP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmN2FnQACgkQJNaLcl1U h9DkAQf/ZO81DRjufOHQCe4TT3YQX0I4BQbc6tjxpvEJsPkgTRL6r1vfxKJOjA6j gBJqo8B7TdFYzqzWf4hJwieTLgUKdg4pWERfMQ5O/g9bHsc0BwLUTzg6asgynPqk ZdxyCvC5QTA/b9ZIWdKPRN9com67mNQRrebpkwcRjFQ1alJxlLDi2P+yrsCE+WOj Q77RLUtE3cVmxP1tFERDaS6TTTxc51nqK/HT0t6x3LURP6nnPdp5o8s2+AU88Vfv QoJDmpltiUw2lUScF9jTJjc3ATKhvXAY2NuY1xpVOUMfd4noH1MX5L97UPVedrY2 24k3w5zahZP+JTUtK7epT6eO/eckVg== =opWd -----END PGP SIGNATURE----- --LQcIBCJXd6N58uwP--