Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp649528pxx; Thu, 29 Oct 2020 11:02:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdaaAaegw9N/GANGOHouUwQfG/pdInDzHmY5WYqSjk+EOUj3v6g8j4Za97RH8w9piduwle X-Received: by 2002:a05:6402:1586:: with SMTP id c6mr5412948edv.84.1603994541698; Thu, 29 Oct 2020 11:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603994541; cv=none; d=google.com; s=arc-20160816; b=0tV3ptM5QhiS1x7mRhiOnQKi0os3z21DIaFHpzey/dLpDRsuM/XNaU4xjeobzIWqWA wvmZJzeXQcgG169CKajjIY7yAc37TGRDm81nEWyxJPc0zwBXgx8Z1eU5UUTp/hPuaZbK V9Ti3pJOOJ7zvmqQqmb4jHOEPnq40DZzKBJxPXQGveNuMO+Vi2no1I99Kb9gWz8Sz8GY ejuecWnjZVrczF/173ohZ/7gawRP2GDmBnZQwG9P8mSRfDQlpZxOz3smwlgLCEV5XI8x L+6v88xvXuk+9of+bUpjHhOIsPI4zr9LDfYtUiXAed3sJomVhthFhvFRKirX+6dcFxm4 GPiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=AZhOU2W6PRWrW++sUwojyV8r0hQKprOKEkuphmHahJo=; b=OCXRW7sOLALFed4SUPwSkgzTCONl2l7iAuxVohDk6GnKY9BDxH7lcRwyrhEKPGqGcR MmNut3BGJrURPnL+5izT/fS5ZZrvpi/fLO44b6im5cZkzr20khkUzJvv3hr+DGcbKeVk NZxm9FlMvPmzLKjc2/LVIoTJDiSG8l4AK8H/hO+3q6HWa6+Z/5EeJFi1cghOGiq+WqVl ZnVS/0IcGgDfK3+pjFXz1T3OLHC+fggz1ZXZg77G1KOiuxqVsdm5mXWTOpIb2q+wRBpl L9QsvNIaqgm6+7Z8hKtMD+JyRgOtYPDNbLJr3fif4v/GtKpYhnj4/VVCuTdG6Ykgu385 xlWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pIEzdSBl; 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 ay12si2347857ejb.431.2020.10.29.11.01.56; Thu, 29 Oct 2020 11:02:21 -0700 (PDT) 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=default header.b=pIEzdSBl; 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 S1725766AbgJ2SAG (ORCPT + 99 others); Thu, 29 Oct 2020 14:00:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:53434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725613AbgJ2R7v (ORCPT ); Thu, 29 Oct 2020 13:59:51 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 85B6F20790; Thu, 29 Oct 2020 17:59:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603994390; bh=AZhOU2W6PRWrW++sUwojyV8r0hQKprOKEkuphmHahJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pIEzdSBlrcWxEoEuNilbOwp5u8kO4Q26+P+M2ItJj0B4B0jOS8vPB+rK7f2uCMBqP E3CxhD3RUIbUpQkg5ZEUJwilewx80cqkLghXR+y/A1dSSuVeWgjXf2lgGqjSyDk52y C9cxJ8EjkUqHMLg6YkSrTj7sn2nNt4mOikajvZsA= Date: Thu, 29 Oct 2020 17:59:43 +0000 From: Mark Brown To: Ezequiel Garcia Cc: Robin Murphy , Adrian Ratiu , Philipp Zabel , Fruehberger Peter , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, kuhanh.murugasen.krishnan@intel.com, Daniel Vetter , kernel@collabora.com, linux-media@vger.kernel.org Subject: Re: [PATCH 00/18] Add Hantro regmap and VC8000 h264 decode support Message-ID: <20201029175943.GE5042@sirena.org.uk> References: <20201012205957.889185-1-adrian.ratiu@collabora.com> <0dd9fb9d-3f33-b9b0-a7a8-6d3111e92d64@arm.com> <5a653c86f887bf8f3d34c4d620471300b612a4d8.camel@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Rgf3q3z9SdmXC6oT" Content-Disposition: inline In-Reply-To: <5a653c86f887bf8f3d34c4d620471300b612a4d8.camel@collabora.com> X-Cookie: Monotheism is a gift from the gods. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Rgf3q3z9SdmXC6oT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 29, 2020 at 01:27:08PM -0300, Ezequiel Garcia wrote: > On Thu, 2020-10-29 at 14:15 +0000, Robin Murphy wrote: > > Or maybe the regmap API itself deserves extending with a "deferred"=20 > > operating mode where updates to the cached state can be separated from= =20 > > committing that state to the underlying hardware. > > ...which, after a brief code search out of curiosity, apparently alread= y=20 > > exists in the form of regcache_cache_only()/regcache_sync(), so there's= =20 > > probably no need to reinvent it :) > To be fair, and despite it could seem an anti-pattern, this particular > wheel is so tiny and trivial, that I'm starting to seriously consider > reinventing it. > I've been thinking long about this but just can't seem to see exactly > what benefit we're getting from using MMIO regmaps here, > as opposed to just a simple macro with an index, a mask, and an offset. As a rule of thumb if you're not using a cache or fitting into some other higher level framework stuff that uses regmap then I wouldn't bother for MMIO devices. --Rgf3q3z9SdmXC6oT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl+bAw4ACgkQJNaLcl1U h9BrSAf/dmEzyzrzFZNPwE6FzIAV8o45wj261p4lQVkPR6Vl5CvsVKpC+h8d9ArY t3plejxUu4tD6bQxgr4Z8hH21CstLRRfTBvMxw3B30qRx+WjCcoUp3ITBvQ4un9G wUQsSkBqR9sbYFROEenraceUC4digdUJ4zUF+UKtmLcOH/qmrio1PSBsJyOugFRd KHp5PxSUG18I93T1S/MLSuxpi11ZTvgXp3g41eDRia+joSz7OAHbTkeMsn8vkLYy rMJpJDOC/UN+lOMqM7XLaD6nuY3jVDVoJqRPFDHOij/tPaDOmScjK4RRvWQwyNR3 OV4/0EqCGUf6z5RAwF6t6yedKSYzSQ== =uxou -----END PGP SIGNATURE----- --Rgf3q3z9SdmXC6oT--