From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5CC6C4332F for ; Tue, 14 Nov 2023 09:13:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35FFE10E1E2; Tue, 14 Nov 2023 09:13:33 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72E3210E1E2 for ; Tue, 14 Nov 2023 09:13:31 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id AF65360006; Tue, 14 Nov 2023 09:13:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1699953209; 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=ZXmsKLNlIkRZMpVqTBmk5kgsfULJhH/NpiCWOxqXxtY=; b=cnhAecl47Pph553zwzCpGbMzCwKPl4F+Aqw9i6T5ZgP9NEYIDf1z1phS/tErjuIK6MPb0H dOo15Y2zyGDmq66Y9BvE+eTm+3AesXDFfGevrIT6dLX8seutsVB9tOU/0UpyhTy62RE2tr cLdWlgZXg9rk0uGRB+DmEtv+sC4Orw9vfbAmeoESiaMhBsfJYL8slJArKgBuoLo4aPxCkA ASQ9/GvIGOzYqAA98R9hcbobLAecCFqxZaH5YqUN/ryCeGuJS+eW9nmZReTG9IvV/5yIsh 2tBer13nDxMyqAkHcHHEGGF+HZqbeDo0c5Pl6xKePWaTa6VAnh/nOyMxt0lhHg== Date: Tue, 14 Nov 2023 10:13:24 +0100 From: Miquel Raynal To: "Usyskin, Alexander" Message-ID: <20231114101324.39569e96@xps-13> In-Reply-To: References: <20230910123949.1251964-1-alexander.usyskin@intel.com> <20230910123949.1251964-7-alexander.usyskin@intel.com> <20231016103939.67445bee@xps-13> <20231017155544.6cceb6a6@xps-13> <20231017164615.5b58fcc6@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Subject: Re: [Intel-gfx] [PATCH 06/10] drm/i915/spi: spi register with mtd X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vignesh Raghavendra , Richard Weinberger , "intel-gfx@lists.freedesktop.org" , "De Marchi, Lucas" , Tudor Ambarus , Michael Walle , "linux-mtd@lists.infradead.org" , "Vivi, Rodrigo" , "Winkler, Tomas" , "Lubart, Vitaly" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Alexander, + Michael and Tudor Folks, any interesting thought about the below discussion? alexander.usyskin@intel.com wrote on Tue, 14 Nov 2023 08:47:34 +0000: > > =20 > > > > > > > + spi->mtd.writesize =3D SZ_1; /* 1 byte granularity */ =20 > > > > > > > > > > > > You say writesize should be aligned with 4 in your next patch? = =20 > > > > > > > > > > We support unaligned write by reading aligned 4bytes, > > > > > replacing changed bytes there and writing whole 4bytes back. > > > > > Is there any problem with this approach? =20 > > > > > > > > Is there a reason to do that manually rather than letting the core > > > > handle the complexity? > > > > =20 > > > I was not aware that core can do this. The core implements above logic > > > if I put SZ_4 here and caller try to write, say, one byte? > > > And sync multiple writers? > > > If so, I can remove manual work, I think, and make the patches smalle= r. =20 > >=20 > > I haven't checked in detail but I would expect this yes. Please have a > > round of tests and if it works, please simplify this part. > >=20 > > Thanks, > > Miqu=C3=A8l =20 >=20 > When I put SZ_4 here the "mtd_debug info /dev/mtd0" prints "mtd.writesize= =3D 4", > but "mtd_debug write /dev/mtd0 128 1 c" passes one byte to > i915_spi_write (mtd._write callback). > I suppose that mtd subsystem do not support this. > Or I did something wrong? >=20 Thanks, Miqu=C3=A8l