Message ID | 1363779119-3255-1-git-send-email-vikas.sajjan@linaro.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1UIHFg-0008FV-7o; Wed, 20 Mar 2013 12:32:16 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp id 1UIHFf-0001LT-HS; Wed, 20 Mar 2013 12:32:15 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757842Ab3CTLcN (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Wed, 20 Mar 2013 07:32:13 -0400 Received: from mail-pb0-f42.google.com ([209.85.160.42]:37825 "EHLO mail-pb0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755824Ab3CTLcM (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 20 Mar 2013 07:32:12 -0400 Received: by mail-pb0-f42.google.com with SMTP id xb4so1283671pbc.29 for <linux-media@vger.kernel.org>; Wed, 20 Mar 2013 04:32:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=WIUNRJ8+d4VOHg73dSr7XfhkyMs59Exw0XebKfSwB7M=; b=mYXSn+RlE1PB1nQoL20AmWiD7jiDLotLTfC67XzG6A9mP28U43ZHsXm9de1q9Dquvo HBdEk+byuQW3qResIaha480PKcqAVTv+ynXzL8bSxZ7Cre7+bk8xpQAU1vyzperKco0y xLlI5udj2h/pqq+/crS55sq/ftU97hJDDjw1t/h7uI4SmVNeMEHZ8N+5FIWP3cI/yyzY iRyb5e+NRsy0dpgs57hplusF9R76qo2gX3bKJfygNW317MtfF1DbPLuMHigYKSBEECUO pWHQO0wgPU5qZpEM4TchqKRYhO9YJtA6TvmuHaQqEBPQFm96v5FlF+nkJnf42dZuQyu+ hOWw== X-Received: by 10.68.189.65 with SMTP id gg1mr8309869pbc.122.1363779132079; Wed, 20 Mar 2013 04:32:12 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id qa6sm1800145pbc.46.2013.03.20.04.32.07 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Mar 2013 04:32:10 -0700 (PDT) From: Vikas Sajjan <vikas.sajjan@linaro.org> To: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org, kgene.kim@samsung.com, inki.dae@samsung.com, linaro-kernel@lists.linaro.org, jy0922.shim@samsung.com, linux-samsung-soc@vger.kernel.org, thomas.abraham@linaro.org Subject: [PATCH v2] drm/exynos: enable FIMD clocks Date: Wed, 20 Mar 2013 17:01:59 +0530 Message-Id: <1363779119-3255-1-git-send-email-vikas.sajjan@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQn1Wt2JS7OimC+ZGRDBBS4OBpYcEwOMK/dIq5TAcpxcmQlWIm/5OivzG0LvzGG6psf02CbI Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.3.20.112119 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1900_1999 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_NOT_1 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' |
Commit Message
Vikas Sajjan
March 20, 2013, 11:31 a.m. UTC
While migrating to common clock framework (CCF), found that the FIMD clocks
were pulled down by the CCF.
If CCF finds any clock(s) which has NOT been claimed by any of the
drivers, then such clock(s) are PULLed low by CCF.
By calling clk_prepare_enable() for FIMD clocks fixes the issue.
this patch also replaces clk_disable() with clk_disable_unprepare()
during exit.
Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org>
---
Changes since v1:
- added error checking for clk_prepare_enable() and also replaced
clk_disable() with clk_disable_unprepare() during exit.
---
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
Comments
2013/3/20 Vikas Sajjan <vikas.sajjan@linaro.org>: > While migrating to common clock framework (CCF), found that the FIMD clocks > were pulled down by the CCF. > If CCF finds any clock(s) which has NOT been claimed by any of the > drivers, then such clock(s) are PULLed low by CCF. > > By calling clk_prepare_enable() for FIMD clocks fixes the issue. > > this patch also replaces clk_disable() with clk_disable_unprepare() > during exit. > > Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> > --- > Changes since v1: > - added error checking for clk_prepare_enable() and also replaced > clk_disable() with clk_disable_unprepare() during exit. > --- > drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c > index 9537761..014d750 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c > @@ -934,6 +934,19 @@ static int fimd_probe(struct platform_device *pdev) > return ret; > } > > + ret = clk_prepare_enable(ctx->lcd_clk); > + if (ret) { > + dev_err(dev, "failed to enable 'sclk_fimd' clock\n"); > + return ret; > + } > + > + ret = clk_prepare_enable(ctx->bus_clk); > + if (ret) { > + clk_disable_unprepare(ctx->lcd_clk); > + dev_err(dev, "failed to enable 'fimd' clock\n"); > + return ret; > + } > + Please remove the above two clk_prepare_enable function calls and use them in fimd_clock() instead of clk_enable/disable(). When probed, fimd clock will be enabled by runtime pm. Thanks, Inki Dae > ctx->vidcon0 = pdata->vidcon0; > ctx->vidcon1 = pdata->vidcon1; > ctx->default_win = pdata->default_win; > @@ -981,8 +994,8 @@ static int fimd_remove(struct platform_device *pdev) > if (ctx->suspended) > goto out; > > - clk_disable(ctx->lcd_clk); > - clk_disable(ctx->bus_clk); > + clk_disable_unprepare(ctx->lcd_clk); > + clk_disable_unprepare(ctx->bus_clk); > > pm_runtime_set_suspended(dev); > pm_runtime_put_sync(dev); > -- > 1.7.9.5 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, On 27 March 2013 15:53, Inki Dae <inki.dae@samsung.com> wrote: > 2013/3/20 Vikas Sajjan <vikas.sajjan@linaro.org>: >> While migrating to common clock framework (CCF), found that the FIMD clocks >> were pulled down by the CCF. >> If CCF finds any clock(s) which has NOT been claimed by any of the >> drivers, then such clock(s) are PULLed low by CCF. >> >> By calling clk_prepare_enable() for FIMD clocks fixes the issue. >> >> this patch also replaces clk_disable() with clk_disable_unprepare() >> during exit. >> >> Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> >> --- >> Changes since v1: >> - added error checking for clk_prepare_enable() and also replaced >> clk_disable() with clk_disable_unprepare() during exit. >> --- >> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 17 +++++++++++++++-- >> 1 file changed, 15 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >> index 9537761..014d750 100644 >> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c >> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c >> @@ -934,6 +934,19 @@ static int fimd_probe(struct platform_device *pdev) >> return ret; >> } >> >> + ret = clk_prepare_enable(ctx->lcd_clk); >> + if (ret) { >> + dev_err(dev, "failed to enable 'sclk_fimd' clock\n"); >> + return ret; >> + } >> + >> + ret = clk_prepare_enable(ctx->bus_clk); >> + if (ret) { >> + clk_disable_unprepare(ctx->lcd_clk); >> + dev_err(dev, "failed to enable 'fimd' clock\n"); >> + return ret; >> + } >> + > > Please remove the above two clk_prepare_enable function calls and use > them in fimd_clock() instead of clk_enable/disable(). When probed, > fimd clock will be enabled by runtime pm. > Sure, will modify and resend. > Thanks, > Inki Dae > >> ctx->vidcon0 = pdata->vidcon0; >> ctx->vidcon1 = pdata->vidcon1; >> ctx->default_win = pdata->default_win; >> @@ -981,8 +994,8 @@ static int fimd_remove(struct platform_device *pdev) >> if (ctx->suspended) >> goto out; >> >> - clk_disable(ctx->lcd_clk); >> - clk_disable(ctx->bus_clk); >> + clk_disable_unprepare(ctx->lcd_clk); >> + clk_disable_unprepare(ctx->bus_clk); >> >> pm_runtime_set_suspended(dev); >> pm_runtime_put_sync(dev); >> -- >> 1.7.9.5 >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 9537761..014d750 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -934,6 +934,19 @@ static int fimd_probe(struct platform_device *pdev) return ret; } + ret = clk_prepare_enable(ctx->lcd_clk); + if (ret) { + dev_err(dev, "failed to enable 'sclk_fimd' clock\n"); + return ret; + } + + ret = clk_prepare_enable(ctx->bus_clk); + if (ret) { + clk_disable_unprepare(ctx->lcd_clk); + dev_err(dev, "failed to enable 'fimd' clock\n"); + return ret; + } + ctx->vidcon0 = pdata->vidcon0; ctx->vidcon1 = pdata->vidcon1; ctx->default_win = pdata->default_win; @@ -981,8 +994,8 @@ static int fimd_remove(struct platform_device *pdev) if (ctx->suspended) goto out; - clk_disable(ctx->lcd_clk); - clk_disable(ctx->bus_clk); + clk_disable_unprepare(ctx->lcd_clk); + clk_disable_unprepare(ctx->bus_clk); pm_runtime_set_suspended(dev); pm_runtime_put_sync(dev);