From: Maxime Ripard Subject: Re: [PATCH] drm/sun4i: tcon: Unconditionally reset the TCON Date: Fri, 8 Sep 2017 08:42:18 +0200 Message-ID: <20170908064218.kjo5clk2dpeunwwo@flea.lan> References: <20170908041545.14198-1-wens@csie.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1826202452==" Return-path: Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 6CF5B6EA87 for ; Fri, 8 Sep 2017 06:42:30 +0000 (UTC) In-Reply-To: <20170908041545.14198-1-wens@csie.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Chen-Yu Tsai Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1826202452== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lqqjjghkrptzevsk" Content-Disposition: inline --lqqjjghkrptzevsk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Sep 08, 2017 at 12:15:45PM +0800, Chen-Yu Tsai wrote: > When binding the TCON, we were checking the reset control status and > asserting reset if it wasn't in reset. The check failed to account for > the reset control API returning error codes if the status callback was > not implemented. >=20 > Since we want the TCON to be reset in all cases, and re-asserting the > reset control does no harm, just assert the reset unconditionally. >=20 > Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") > Signed-off-by: Chen-Yu Tsai > --- > drivers/gpu/drm/sun4i/sun4i_tcon.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/s= un4i_tcon.c > index d9791292553e..eb32676d5b01 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c > +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c > @@ -530,8 +530,7 @@ static int sun4i_tcon_bind(struct device *dev, struct= device *master, > } > =20 > /* Make sure our TCON is reset */ > - if (!reset_control_status(tcon->lcd_rst)) > - reset_control_assert(tcon->lcd_rst); > + reset_control_assert(tcon->lcd_rst); That doesn't really reset it if it was already de-asserted. In that case, the TCON will not be reset, unlike what your commit log says. Maybe you wanted to use reset_control_reset? Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --lqqjjghkrptzevsk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJZsjvKAAoJEBx+YmzsjxAgewMP/3TzlmJWLw4XFDiimB54bs4m lIeusF2Lp20LtHeGo3CpouOxosQ4/qyPdTryZoLl/J3ge5TP1IM966k+nLz/A8EI Gmdy2EunwOe/95rqBoIxqGZ1hHtZ5EtlIP8g4+ytvoMC+qG/lrlpxCg7vylQWjQu o/bcpfwiPkGde5UbooG44+sDCmT1kfdXqNm1g2ipBfussN5RJwFb9WsYfl5ZSH9v 6leetY/cvC40aAAEyYcticpH/sMhAcksn6NWNYbQ8IrOhArlzEFL0MGinuF/6fkZ tbF/BltHlDUXj2HGuyUJC1wJL4E5RkUaRiDYCIQtJaE3QogGvm6frCZs0pu+ctNx AOHjq1CaP8PZAswBy5yoaJylNW79rXcD47sIQoVDvbKai6CuFegLeB92d5IOXHYE IO8yTQ2gm9esPMyX3zOvPMLCsO6mOf/iu5z6Fa97FbHSn7vYXshCWOea6tLioi2O t8bQZrnQ57UtjRuGlCKfWjjXHW588li3e5LxgIWqPPonfGjOhZm4X+UL1RQoLwJJ pXWcg0y9Y8D5jm3SDs6A6Bng7Hx79onRWSmEqX3DeI9gzl5hdjnWcXYsxx/56UAS GmBqCI8n0+CEGtEhRxY0+x0yrp3XFISEp79t7Zh6ZaDXoooX8heR/I4IF9/hYiKT gFJ8IVB6gXhAST+3Zbag =WWb7 -----END PGP SIGNATURE----- --lqqjjghkrptzevsk-- --===============1826202452== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1826202452==--