lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 20 Jul 2017 14:46:13 +0200
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     Philippe CORNU <philippe.cornu@...com>
Cc:     Archit Taneja <architt@...eaurora.org>,
        Andrzej Hajda <a.hajda@...sung.com>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        David Airlie <airlied@...ux.ie>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Yannick Fertre <yannick.fertre@...com>,
        Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        Vincent Abriou <vincent.abriou@...com>,
        Alexandre Torgue <alexandre.torgue@...com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Gabriel Fernandez <gabriel.fernandez@...com>,
        Ludovic Barre <ludovic.barre@...com>,
        Fabien Dessenne <fabien.dessenne@...com>,
        Mickael Reulier <mickael.reulier@...com>
Subject: Re: [PATCH v2 3/3] drm/bridge/synopsys: dsi: explicitly request
 exclusive reset control

Hi Philippe,

On Thu, 2017-07-20 at 14:19 +0200, Philippe CORNU wrote:
> Based on patch "Convert drivers to explicit reset API" from Philipp Zabel
> 
> Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
> reset lines") started to transition the reset control request API calls
> to explicitly state whether the driver needs exclusive or shared reset
> control behavior. Convert all drivers requesting exclusive resets to the
> explicit API call so the temporary transition helpers can be removed.
> 
> No functional changes.
> 
> Cc: Philipp Zabel <p.zabel@...gutronix.de>
> Signed-off-by: Philippe CORNU <philippe.cornu@...com>

This reset control indeed has to be exclusive, as the driver depends on
the reset assertion to have an effect.

Acked-by: Philipp Zabel <p.zabel@...gutronix.de>

Again, the reset seems to be optional, though. I would suggest to change
this as follows:

> ---
>  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> index 781340d..bb0bfa8 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> @@ -885,7 +885,7 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge)
>  	 * Note that the reset was not defined in the initial device tree, so
>  	 * we have to be prepared for it not being found.
>  	 */
> -	apb_rst = devm_reset_control_get(dev, "apb");
> +	apb_rst = devm_reset_control_get_exclusive(dev, "apb");
>  	if (IS_ERR(apb_rst)) {
>  		ret = PTR_ERR(apb_rst);
>  		if (ret == -ENOENT) {

-	apb_rst = devm_reset_control_get(dev, "apb");
+	apb_rst = devm_reset_control_get_optional_exclusive(dev, "apb");
 	if (IS_ERR(apb_rst)) {
 		ret = PTR_ERR(apb_rst);
-		if (ret == -ENOENT) {
-			apb_rst = NULL;
-		} else {
-			dev_err(dev, "Unable to get reset control: %d\n", ret);
-			return ERR_PTR(ret);
-		}
+		dev_err(dev, "Unable to get reset control: %d\n", ret);
+		return ERR_PTR(ret);
 	}

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ