From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm: shmob_drm: Check clk_prepare_enable() return value Date: Wed, 4 Dec 2013 16:59:22 +0100 Message-ID: <20131204155920.GB21833@ulmo.nvidia.com> References: <1385945540-20710-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <37481163.oH5TkQcYhz@avalon> <20131204100106.GS19943@ulmo.nvidia.com> <10119917.mgvmrMaWhg@avalon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1328583064==" Return-path: Received: from mail-bk0-f42.google.com (mail-bk0-f42.google.com [209.85.214.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 765B0FB66D for ; Wed, 4 Dec 2013 08:00:21 -0800 (PST) Received: by mail-bk0-f42.google.com with SMTP id w11so6758686bkz.29 for ; Wed, 04 Dec 2013 08:00:20 -0800 (PST) In-Reply-To: <10119917.mgvmrMaWhg@avalon> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1328583064== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oC1+HKm2/end4ao3" Content-Disposition: inline --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 04, 2013 at 03:37:48PM +0100, Laurent Pinchart wrote: > Hi Thierry, >=20 > On Wednesday 04 December 2013 11:01:07 Thierry Reding wrote: > > On Wed, Dec 04, 2013 at 02:38:21AM +0100, Laurent Pinchart wrote: > > > On Tuesday 03 December 2013 10:59:24 Thierry Reding wrote: > > > > On Mon, Dec 02, 2013 at 01:52:20AM +0100, Laurent Pinchart wrote: > > > > [...] > > > >=20 > > > > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > > > > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > > >=20 > > > > [...] > > > >=20 > > > > > @@ -170,7 +178,9 @@ static void shmob_drm_crtc_start(struct > > > > > shmob_drm_crtc > > > > > *scrtc) > > > > >=20 > > > > > return; > > > > > =09 > > > > > /* Enable clocks before accessing the hardware. */ > > > > >=20 > > > > > - shmob_drm_clk_on(sdev); > > > > > + ret =3D shmob_drm_clk_on(sdev); > > > > > + if (ret < 0) > > > > > + return; > > > >=20 > > > > Perhaps this should be printing an error or using WARN_ON()? Otherw= ise > > > > it might be very difficult to diagnose what's going wrong. > > >=20 > > > That's a good point. In practice, as the driver always uses a Renesas= SoC > > > MSTP clock, the clock code will print a message to the kernel log tho= ugh, > > > so I'm not sure whether we should duplicate that here. If you think we > > > should I'll submit a new patch. > >=20 > > Is that one of the clocks implemented in drivers/sh/clk? >=20 > Correct, and in drivers/clk/shmobile/clk-mstp.c when=20 > http://www.spinics.net/lists/devicetree/msg12696.html will be merged. >=20 > > There don't seem to be any error messages in the clk_enable() > > implementation. >=20 > There will be one when http://www.spinics.net/lists/linux-sh/msg25650.htm= l=20 > will get merged :-) Before that enabling the clock never failed, with the= =20 > patch applied the failure is logged. Alright, Reviewed-by: Thierry Reding --oC1+HKm2/end4ao3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSn1FYAAoJEN0jrNd/PrOhuu4P/1TFra+uCPGtTX7RmjhLyYy7 7kBchjFx7bBoF0TYfpQJwNyktCZYvw9UN1Dqh7uqQt1Yu4tYoWAm3VphUjEhiIke CW6qBSTGdOrlELAm2COkRO1U+wzAwPKKbQsQlgUwQd7ottoULjFQFI4PqCv7Is6H MhdbGkjDPCVpcuwhqFHHeV9TB4bYjvgjrtDoK5sHoAxXkFZmVy4ocRRmeU/QaHex wlrW/C4SnlvmigvWDZrK20qF011v4aV17H5gF0BjUKOoJ0i4lxfBUSHMaJUaT/5a tCU1lZzHSJ3YQe5FDVdtj+1D2c+Ao6MatTSWSU8R88/jD963GuzPaw6/dwsS61uV +yfWkGsYblq9ORCVZJm3nReerDDASgAcCAP9oGXZ7tbtTL0dwpw/ZzHcOT0jtidN 73SBwcHjscIZgD0lONsPSBI8jl3BhMnhnrMa5t1m1ZDBW7SR5pcueWAyaQCNeRV/ ODWlkp6rZNugGQ09YoHdcTe17BUqvVA5/8PZxz2+rW8NwBDikLAWmggn7BQIvqO+ VTV0vmCmeY5FXCOBsnFldEsTvOm+ejBtQg/3u2nLgON2bet34sxyL/TrtoG5VqKR DzGX2tYdssW1P4r2zQmA3+zYCcYXOkl3E6mOdYIFvCUWxUrNuYeNOmrBqubq3L0m ExoWtLkkUdLH3aEltFuw =G4lz -----END PGP SIGNATURE----- --oC1+HKm2/end4ao3-- --===============1328583064== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1328583064==--