Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp323712ybg; Mon, 1 Jun 2020 02:17:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZLBzw34joHD+hTT5898UemR0sumujye196IcBS4e7cal/EpwRa6XOsrp2OvWK2xH+Mqtr X-Received: by 2002:a50:f387:: with SMTP id g7mr4492060edm.185.1591003024114; Mon, 01 Jun 2020 02:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591003024; cv=none; d=google.com; s=arc-20160816; b=kHXiOQ/gJ4XRdUxt6Eamlc957w9TeiyYEvbHw7w8rd/CxiGR7FtfBjH6Ubina2u2tS TyPIeELQDAPWVYlIqrNu+AkqnEhzVPg7d7jkJ4cFmpq3GfZpTG15anVteSxr+rEJOkji 937yzbgohachxTl6LkitIym+7sy9/J5LeLPzEn7S37JFPSgAgatGTQyoXKTdyid0lgQy UFjs/EpI2igDjobh2s6n3cFf1J6z4p+XpeK0pgEn7oFBYOckkNH0uMwh1jTWexqWbCeG /smLBP48/EKsvmweFsU0W5umYwv3Mqsk+OP5oiqtgPnWwDc3iW4Ic1jJlo/UowWzrelR HGPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=cPc75KnJ/cn4sTyKasxBaODROzfZhZnVDnHHJcby2uo=; b=U1GxQpe4SXbCOYickfJroUyYes0lzXodhY0dO96g7lOgfFFWNl+tHf21UE+KqNS4PP yVV9jzB8zBTxuNsKrR8mGl8sFkzsGLYMR9dFR1HXLNhGMGqZHgpSS9PvMV605oAE5I93 ECvltwFELMW+lsJgwlX6cohlSZshCC0sSKsFjwGy60sz1zsz8vb5NgMUKfW6YLNHOnPq oapp5BCdLuvxOoIsoA8dx4W7ewa7Ab4G6P2+U6qES1zyBnPPS/h7laoDawJB6XXuUtF3 e6LcGARYL2eKnON7AOc/AX4awTJ1gYBv2EgFGJ8W5qMAph5Z4BUu/PipT5PhFuCPfb+l bPsA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si2125469ejh.342.2020.06.01.02.16.41; Mon, 01 Jun 2020 02:17:04 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727770AbgFAJOD (ORCPT + 99 others); Mon, 1 Jun 2020 05:14:03 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:36560 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727068AbgFAJOB (ORCPT ); Mon, 1 Jun 2020 05:14:01 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 52E552A1629 From: Adrian Ratiu To: Philippe CORNU , Adrian Ratiu , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-rockchip@lists.infradead.org" , Laurent Pinchart Cc: Jernej Skrabec , Heiko Stuebner , Adrian Pop , Jonas Karlman , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , Andrzej Hajda , "linux-imx@nxp.com" , "kernel@collabora.com" , "linux-stm32@st-md-mailman.stormreply.com" , Arnaud Ferraris , Yannick FERTRE , Benjamin GAIGNARD Subject: Re: [Linux-stm32] [PATCH v8 08/10] drm: stm: dw-mipi-dsi: let the bridge handle the HW version check In-Reply-To: <4acc09e8-0610-01f6-b18d-3ffc390c45a3@st.com> References: <20200427081952.3536741-1-adrian.ratiu@collabora.com> <20200427081952.3536741-9-adrian.ratiu@collabora.com> <4acc09e8-0610-01f6-b18d-3ffc390c45a3@st.com> Date: Mon, 01 Jun 2020 12:15:02 +0300 Message-ID: <87blm387vt.fsf@iwork.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 May 2020, Philippe CORNU wrote: > Hi Adrian, and thank you very much for the patchset. Thank you > also for having tested it on STM32F769 and STM32MP1. Sorry for > the late response, Yannick and I will review it as soon as > possible and we will keep you posted. Note: Do not hesitate to > put us in copy for the next version (philippe.cornu@st.com, > yannick.fertre@st.com) Regards, Philippe :-) Hi Philippe, Thank you very much for your previous and future STM testing, really appreciate it! I've CC'd Yannick until now but I'll also CC you sure :) It's been over a month since I posted v8 and I was just gearing up to address all feedback, rebase & retest to prepare v9 but I'll wait a little longer, no problem, it's no rush. Have an awesome day, Adrian > > > On 4/27/20 10:19 AM, Adrian Ratiu wrote: >> The stm mipi-dsi platform driver added a version test in >> commit fa6251a747b7 ("drm/stm: dsi: check hardware version") >> so that HW revisions other than v1.3x get rejected. The rockchip >> driver had no such check and just assumed register layouts are >> v1.3x compatible. >> >> Having such tests was a good idea because only v130/v131 layouts >> were supported at the time, however since adding multiple layout >> support in the bridge, the version is automatically checked for >> all drivers, compatible layouts get picked and unsupported HW is >> automatically rejected by the bridge, so there's no use keeping >> the test in the stm driver. >> >> The main reason prompting this change is that the stm driver >> test immediately disabled the peripheral clock after reading >> the version, making the bridge read version 0x0 immediately >> after in its own probe(), so we move the clock disabling after >> the bridge does the version test. >> >> Tested on STM32F769 and STM32MP1. >> >> Cc: linux-stm32@st-md-mailman.stormreply.com >> Reported-by: Adrian Pop >> Tested-by: Adrian Pop >> Tested-by: Arnaud Ferraris >> Signed-off-by: Adrian Ratiu >> --- >> New in v6. >> --- >> drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 12 +++--------- >> 1 file changed, 3 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c >> index 2e1f2664495d0..7218e405d7e2b 100644 >> --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c >> +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c >> @@ -402,15 +402,6 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev) >> goto err_dsi_probe; >> } >> >> - dsi->hw_version = dsi_read(dsi, DSI_VERSION) & VERSION; >> - clk_disable_unprepare(pclk); >> - >> - if (dsi->hw_version != HWVER_130 && dsi->hw_version != HWVER_131) { >> - ret = -ENODEV; >> - DRM_ERROR("bad dsi hardware version\n"); >> - goto err_dsi_probe; >> - } >> - >> dw_mipi_dsi_stm_plat_data.base = dsi->base; >> dw_mipi_dsi_stm_plat_data.priv_data = dsi; >> >> @@ -423,6 +414,9 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev) >> goto err_dsi_probe; >> } >> >> + dsi->hw_version = dsi_read(dsi, DSI_VERSION) & VERSION; >> + clk_disable_unprepare(pclk); >> + >> return 0; >> >> err_dsi_probe: >>