From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: [PATCH] drm: shmob_drm: Check clk_prepare_enable() return value Date: Wed, 04 Dec 2013 17:45:16 +0100 Message-ID: <19804411.jfcfDHoE2V@avalon> References: <1385945540-20710-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <10119917.mgvmrMaWhg@avalon> <20131204155920.GB21833@ulmo.nvidia.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0291436160==" Return-path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A82BFAD9F for ; Wed, 4 Dec 2013 08:45:16 -0800 (PST) In-Reply-To: <20131204155920.GB21833@ulmo.nvidia.com> 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: Thierry Reding Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0291436160== Content-Type: multipart/signed; boundary="nextPart2607497.ZE3jcDeCcS"; micalg="pgp-sha1"; protocol="application/pgp-signature" --nextPart2607497.ZE3jcDeCcS Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hello, On Wednesday 04 December 2013 16:59:22 Thierry Reding wrote: > On Wed, Dec 04, 2013 at 03:37:48PM +0100, Laurent Pinchart wrote: > > 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: > > > > > [...] > > > > > > > > > > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > > > > > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > > > > > > > > > [...] > > > > > > > > > > > @@ -170,7 +178,9 @@ static void shmob_drm_crtc_start(struct > > > > > > shmob_drm_crtc *scrtc) > > > > > > return; > > > > > > > > > > > > /* Enable clocks before accessing the hardware. */ > > > > > > - shmob_drm_clk_on(sdev); > > > > > > + ret = shmob_drm_clk_on(sdev); > > > > > > + if (ret < 0) > > > > > > + return; > > > > > > > > > > Perhaps this should be printing an error or using WARN_ON()? > > > > > Otherwise it might be very difficult to diagnose what's going wrong. > > > > > > > > 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 > > > > though, so I'm not sure whether we should duplicate that here. If you > > > > think we should I'll submit a new patch. > > > > > > Is that one of the clocks implemented in drivers/sh/clk? > > > > Correct, and in drivers/clk/shmobile/clk-mstp.c when > > http://www.spinics.net/lists/devicetree/msg12696.html will be merged. > > > > > There don't seem to be any error messages in the clk_enable() > > > implementation. > > > > There will be one when http://www.spinics.net/lists/linux-sh/msg25650.html > > will get merged :-) Before that enabling the clock never failed, with the > > patch applied the failure is logged. > > Alright, > > Reviewed-by: Thierry Reding Thank you. Dave, could you please pick this patch up for v3.14 ? -- Regards, Laurent Pinchart --nextPart2607497.ZE3jcDeCcS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJSn1wiAAoJEIkPb2GL7hl1rc8H/0iNqH+IF9MK5Q//EmZaFi4l 6S21is0jKwOmn/DyS4RQMdL+lGT6LkdmzfTh7TO2X4cAvEMGf83Jcofi/Hy4ZxUz 6upg3Dc9VnxrJuqopdPur8XgMTW3dpMkuHwFg5WqWRk13+unB5ZqPrtKziW5Cfv8 kaIsuC9Xa14WQG4AiQzgKVNmZNOZO0vziMjIzXJj/qKBtTPB8DAQWsKotdalMdIQ U3ASbwrO/T0W2MS+niXAh63P/tOYwEpjtd89wzS/4pYbx+gEm9TQxG4OI3OAEWE6 U+Bs9Li/ytkW0O1u+CtpLQwN0f+0qstknERezze5UAuXmGfB1WDCZbtIDVwrtdg= =cfD4 -----END PGP SIGNATURE----- --nextPart2607497.ZE3jcDeCcS-- --===============0291436160== 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 --===============0291436160==--