[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87imhyk01i.fsf@collabora.com>
Date: Fri, 17 Apr 2020 11:07:37 +0300
From: Adrian Ratiu <adrian.ratiu@...labora.com>
To: Enric Balletbo Serra <eballetbo@...il.com>,
Adrian Ratiu <adrian.ratiu@...labora.com>
Cc: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Jernej Skrabec <jernej.skrabec@...l.net>,
Adrian Pop <pop.adrian61@...il.com>,
Jonas Karlman <jonas@...boo.se>,
linux-kernel <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Andrzej Hajda <a.hajda@...sung.com>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Arnaud Ferraris <arnaud.ferraris@...labora.com>,
Collabora Kernel ML <kernel@...labora.com>,
Ezequiel Garcia <ezequiel@...labora.com>,
linux-stm32@...md-mailman.stormreply.com,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-imx@....com
Subject: Re: [PATCH v6 1/8] drm: bridge: dw_mipi_dsi: add initial regmap
infrastructure
On Thu, 16 Apr 2020, Enric Balletbo Serra <eballetbo@...il.com>
wrote:
> 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?
There should be no real use-case (maybe malfunctioning HW), and we
could error out here to catch driver bugs ASAP, so I'll go this
route then :)
Thank you, much appreciated!
>
>> So I'll make this a warning in v7 and explicitely mention that
>> reads version == 0 can be caused by a disabled pclk.
>>
>
> -- Enric
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Powered by blists - more mailing lists