dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Enric Balletbo Serra <eballetbo@gmail.com>
To: Adrian Ratiu <adrian.ratiu@collabora.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Adrian Pop <pop.adrian61@gmail.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Arnaud Ferraris <arnaud.ferraris@collabora.com>,
	Collabora Kernel ML <kernel@collabora.com>,
	Ezequiel Garcia <ezequiel@collabora.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	linux-imx@nxp.com
Subject: Re: [PATCH v6 1/8] drm: bridge: dw_mipi_dsi: add initial regmap infrastructure
Date: Thu, 16 Apr 2020 22:15:19 +0200	[thread overview]
Message-ID: <CAFqH_513KB+En_xbpXSBG6Q38kYxWCgw0KO3NVxCb6fqHDaKBA@mail.gmail.com> (raw)
In-Reply-To: <87lfmvjmt5.fsf@collabora.com>

Hi Adrian,

[snip]

> >>
> >> +static void dw_mipi_dsi_get_hw_version(struct dw_mipi_dsi
> >> *dsi) +{ +       regmap_read(dsi->regs, DSI_VERSION,
> >> &dsi->hw_version); +       dsi->hw_version &= VERSION; +
> >> if (!dsi->hw_version) +               dev_err(dsi->dev, "Failed
> >> to read DSI hw version register\n");
> >
> > Is this an error that should be ignored? If you can't get the HW
> > version, probably, there is something wrong with your hardware
> > so, don't you need to return an error?
> >
>
> After thinking a bit more about it, that error should be a
> warning.
>
> I added it because in some cases (for eg. if the peripheral clock
> is disabled) the reads can return 0 which is obviously an invalid
> version and the bridge will error in the next step when not
> finding a layout.
>

If you'll error anyway, why wait? IIUC at this point the clock *must*
be enabled, and if not, something is wrong with the driver, I don't
see any advantage on delay the error. do you have a use case where
this is called and peripheral clock disabled?

> So I'll make this a warning in v7 and explicitely mention that
> reads version == 0 can be caused by a disabled pclk.
>

-- Enric
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-04-16 20:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 15:19 [PATCH v6 0/8] Genericize DW MIPI DSI bridge and add i.MX 6 driver Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 1/8] drm: bridge: dw_mipi_dsi: add initial regmap infrastructure Adrian Ratiu
2020-04-15 15:53   ` Enric Balletbo Serra
2020-04-16 18:25     ` Adrian Ratiu
2020-04-16 18:41     ` Adrian Ratiu
2020-04-16 20:15       ` Enric Balletbo Serra [this message]
2020-04-17  8:07         ` Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 2/8] drm: bridge: dw_mipi_dsi: abstract register access using reg_fields Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 3/8] drm: bridge: synopsis: add dsi v1.01 support Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 4/8] drm: imx: Add i.MX 6 MIPI DSI host platform driver Adrian Ratiu
2020-04-15 17:26   ` Enric Balletbo Serra
2020-04-15 17:30     ` Laurent Pinchart
2020-04-17  9:56       ` Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 5/8] dt-bindings: display: add i.MX6 MIPI DSI host controller doc Adrian Ratiu
2020-04-14 20:42   ` Laurent Pinchart
2020-04-15 11:28     ` Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 6/8] drm: stm: dw-mipi-dsi: let the bridge handle the HW version check Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 7/8] drm: bridge: dw-mipi-dsi: split low power cfg register into fields Adrian Ratiu
2020-04-14 15:19 ` [PATCH v6 8/8] 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=CAFqH_513KB+En_xbpXSBG6Q38kYxWCgw0KO3NVxCb6fqHDaKBA@mail.gmail.com \
    --to=eballetbo@gmail.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=adrian.ratiu@collabora.com \
    --cc=arnaud.ferraris@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ezequiel@collabora.com \
    --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=pop.adrian61@gmail.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).