devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Ratiu <adrian.ratiu@collabora.com>
To: Philippe CORNU <philippe.cornu@st.com>,
	Adrian Ratiu <adrian.ratiu@collabora.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-rockchip@lists.infradead.org" 
	<linux-rockchip@lists.infradead.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>,
	Heiko Stuebner <heiko@sntech.de>,
	Adrian Pop <pop.adrian61@gmail.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	"linux-imx@nxp.com" <linux-imx@nxp.com>,
	"kernel@collabora.com" <kernel@collabora.com>,
	"linux-stm32@st-md-mailman.stormreply.com" 
	<linux-stm32@st-md-mailman.stormreply.com>,
	Arnaud Ferraris <arnaud.ferraris@collabora.com>,
	Yannick FERTRE <yannick.fertre@st.com>,
	Benjamin GAIGNARD <benjamin.gaignard@st.com>
Subject: Re: [Linux-stm32] [PATCH v8 08/10] drm: stm: dw-mipi-dsi: let the bridge handle the HW version check
Date: Mon, 01 Jun 2020 12:15:02 +0300	[thread overview]
Message-ID: <87blm387vt.fsf@iwork.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <4acc09e8-0610-01f6-b18d-3ffc390c45a3@st.com>

On Fri, 29 May 2020, Philippe CORNU <philippe.cornu@st.com> 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 <pop.adrian61@gmail.com>
>> Tested-by: Adrian Pop <pop.adrian61@gmail.com>
>> Tested-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
>> Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
>> ---
>> 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:
>> 

  reply	other threads:[~2020-06-01  9:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27  8:19 [PATCH v8 00/10] Genericize DW MIPI DSI bridge and add i.MX 6 driver Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 01/10] drm: bridge: dw_mipi_dsi: add initial regmap infrastructure Adrian Ratiu
2020-04-27 14:41   ` Enric Balletbo i Serra
2020-04-27  8:19 ` [PATCH v8 02/10] drm: bridge: dw_mipi_dsi: abstract register access using reg_fields Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 03/10] drm: bridge: dw_mipi_dsi: add dsi v1.01 support Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 04/10] drm: bridge: dw_mipi_dsi: allow bridge daisy chaining Adrian Ratiu
2020-06-02 23:51   ` Laurent Pinchart
2020-06-03 12:03     ` Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 05/10] drm: imx: Add i.MX 6 MIPI DSI host platform driver Adrian Ratiu
2020-04-27 14:41   ` Enric Balletbo i Serra
2020-04-27 18:26     ` Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 06/10] ARM: dts: imx6qdl: add missing mipi dsi properties Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 07/10] dt-bindings: display: add i.MX6 MIPI DSI host controller doc Adrian Ratiu
2020-05-01 20:26   ` Rob Herring
2020-04-27  8:19 ` [PATCH v8 08/10] drm: stm: dw-mipi-dsi: let the bridge handle the HW version check Adrian Ratiu
2020-05-29 15:45   ` [Linux-stm32] " Philippe CORNU
2020-06-01  9:15     ` Adrian Ratiu [this message]
2020-06-02 12:53       ` Emil Velikov
2020-06-03 10:28         ` Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 09/10] drm: bridge: dw-mipi-dsi: split low power cfg register into fields Adrian Ratiu
2020-04-27  8:19 ` [PATCH v8 10/10] drm: bridge: dw-mipi-dsi: fix bad register field offsets Adrian Ratiu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blm387vt.fsf@iwork.i-did-not-set--mail-host-address--so-tickle-me \
    --to=adrian.ratiu@collabora.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=arnaud.ferraris@collabora.com \
    --cc=benjamin.gaignard@st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=philippe.cornu@st.com \
    --cc=pop.adrian61@gmail.com \
    --cc=yannick.fertre@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).