From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 05/12] drm: shmob_drm: Convert to clk_prepare/unprepare Date: Mon, 11 Nov 2013 09:55:24 +0100 Message-ID: <20131111085523.GC3884@ulmo.nvidia.com> References: <1383000569-8916-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <1383000569-8916-6-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <2959885.VdyEnllx0c@avalon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0813194806==" Return-path: Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by gabe.freedesktop.org (Postfix) with ESMTP id E1F80105753 for ; Mon, 11 Nov 2013 00:55:35 -0800 (PST) Received: by mail-bk0-f44.google.com with SMTP id mx12so620758bkb.17 for ; Mon, 11 Nov 2013 00:55:34 -0800 (PST) In-Reply-To: <2959885.VdyEnllx0c@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 --===============0813194806== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UFHRwCdBEJvubb2X" Content-Disposition: inline --UFHRwCdBEJvubb2X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 09, 2013 at 01:51:04PM +0100, Laurent Pinchart wrote: > Hi Dave, >=20 > Could you please pick this patch up ? >=20 > On Monday 28 October 2013 23:49:22 Laurent Pinchart wrote: > > Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and > > clk_disable_unprepare() to get ready for the migration to the common > > clock framework. > >=20 > > Cc: David Airlie > > Cc: dri-devel@lists.freedesktop.org > > Signed-off-by: Laurent Pinchart > > --- > > drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index 54bad98..562f9a4 1006= 44 > > --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > @@ -40,7 +40,7 @@ > > static void shmob_drm_clk_on(struct shmob_drm_device *sdev) > > { > > if (sdev->clock) > > - clk_enable(sdev->clock); > > + clk_prepare_enable(sdev->clock); Sorry for jumping in so late, but shouldn't this be split into two separate calls, clk_prepare() in .probe() and clk_enable() here? Also note that both clk_prepare() and clk_enable() (and therefore clk_prepare_enable() as well) can fail, so you should really check the return values here. > > #if 0 > > if (sdev->meram_dev && sdev->meram_dev->pdev) > > pm_runtime_get_sync(&sdev->meram_dev->pdev->dev); > > @@ -54,7 +54,7 @@ static void shmob_drm_clk_off(struct shmob_drm_device > > *sdev) pm_runtime_put_sync(&sdev->meram_dev->pdev->dev); > > #endif > > if (sdev->clock) > > - clk_disable(sdev->clock); > > + clk_disable_unprepare(sdev->clock); Similarily I'd expect this to be clk_disable() only, with the clk_unprepare() in .remove(). Or perhaps there's a very good reason to do both here? Thierry --UFHRwCdBEJvubb2X Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSgJt7AAoJEN0jrNd/PrOh/G4P/jwZDB4e+nzC9qp7rTarNV2A z+g/SwCS3u/cqjnFbTm7JlWMcUdmKolH/MPOrDCI+HgrkhY8gmGX3McyrHeHHZ1i RIKtFmgNmXScTH5teQN1r/G4dPhtsdQU6LwPU3BS9zIob6FAedTPdNxRV3ZKWPNo g8jEzwRXmILZZuVhLyUT9f5U0R4NPbOWBPW9b5M2cGmlA2e7AxTf34/ZT85DCpL7 VU4kdCDU0DyDkWPRfr2r1201GQmyretLycE3IffbYyFHt5O1vgoz5rJVkFn1I6pP pmEVoPHNECX/Btz8CvvVcno6VkzXVElDgb65iFEdUfUrqRp9XuGii+VAwjiELTtJ AxtxjT7f+q8UbSWJa/Qbq5dodp6nZl64tzATPJ8b/KkW2pQGreFX4AvR9QYOWb32 6D0gVcOMsJVza5W9IdNvgrX1f8ITuJpo07VrNGg+4S/QUWL5b5vgzwI7G6LSmI82 JiH/II05pzsAUv38z1Xn6YaI4r4Rv2M/Gr4CKwS3S8znUqZhB+DJpzdcdYUpYxiv 5PDPGGY7An6yeqlgbG3X/MPhWzXGCyhXM8Nqy2RiHKT988AjsKMKbwCXk4mWSErb IaQ/q4bfY0Ciav9wfbwCo7a0xTt5Cc+NNCUVkaur1tuC5ta6gCnsahqVikJzOshf ygcmbG0tuouumIA2qaSt =R68t -----END PGP SIGNATURE----- --UFHRwCdBEJvubb2X-- --===============0813194806== 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 --===============0813194806==--