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 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3E51C83006 for ; Tue, 28 Apr 2020 12:46:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7A727206D6 for ; Tue, 28 Apr 2020 12:46:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A727206D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7043289B9F; Tue, 28 Apr 2020 12:46:23 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD2C46E2EC for ; Mon, 27 Apr 2020 14:41:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 1C97F2A0C06 From: Enric Balletbo i Serra Subject: Re: [PATCH v8 01/10] drm: bridge: dw_mipi_dsi: add initial regmap infrastructure To: Adrian Ratiu , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, Laurent Pinchart References: <20200427081952.3536741-1-adrian.ratiu@collabora.com> <20200427081952.3536741-2-adrian.ratiu@collabora.com> Message-ID: <919f7573-dac8-d75f-eb2a-e164a177141d@collabora.com> Date: Mon, 27 Apr 2020 16:41:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200427081952.3536741-2-adrian.ratiu@collabora.com> Content-Language: en-US X-Mailman-Approved-At: Tue, 28 Apr 2020 12:46:22 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Adrian Pop , Jonas Karlman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrzej Hajda , linux-imx@nxp.com, kernel@collabora.com, Ezequiel Garcia , linux-stm32@st-md-mailman.stormreply.com, Arnaud Ferraris Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Adrian, Thank you for your patch and to apply the changes I requested On 27/4/20 10:19, Adrian Ratiu wrote: > In order to support multiple versions of the Synopsis MIPI DSI host > controller, which have different register layouts but almost identical > HW protocols, we add a regmap infrastructure which can abstract away > register accesses for platform drivers using the bridge. > > The controller HW revision is detected during bridge probe which will > be used in future commits to load the relevant register layout which > the bridge will use transparently to the platform drivers. > > Cc: Enric Balletbo Serra > Suggested-by: Ezequiel Garcia > Tested-by: Adrian Pop > Tested-by: Arnaud Ferraris > Signed-off-by: Adrian Ratiu Reviewed-by: Enric Balletbo i Serra > --- > Chnages since v7: > - Minor checkpatch line fix > > Changes since v6: > - Select REGMAP_MMIO in Kconfig (Enric) > - Drop unnecessary stack variable inits (Enric) > - Make bridge error ASAP after a bad revision read (Enric) > - Drop redundant read of hw_version in dphy_timing_config (Enric) > > New in v5. > --- > drivers/gpu/drm/bridge/synopsys/Kconfig | 1 + > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 210 ++++++++++-------- > 2 files changed, 121 insertions(+), 90 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/Kconfig b/drivers/gpu/drm/bridge/synopsys/Kconfig > index 21a1be3ced0f3..080146093b68e 100644 > --- a/drivers/gpu/drm/bridge/synopsys/Kconfig > +++ b/drivers/gpu/drm/bridge/synopsys/Kconfig > @@ -39,3 +39,4 @@ config DRM_DW_MIPI_DSI > select DRM_KMS_HELPER > select DRM_MIPI_DSI > select DRM_PANEL_BRIDGE > + select REGMAP_MMIO > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > index 5ef0f154aa7bd..34b8668ae24ea 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > > #include