From patchwork Sun Apr 20 12:32:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 4021571 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0E6C9C0DA2 for ; Sun, 20 Apr 2014 15:04:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 412912018B for ; Sun, 20 Apr 2014 15:04:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id EBCE12021B for ; Sun, 20 Apr 2014 15:04:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 007916E1AE; Sun, 20 Apr 2014 08:04:18 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 6043A6E191 for ; Sun, 20 Apr 2014 05:32:57 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4B00BGQXIVA850@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Sun, 20 Apr 2014 21:32:55 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 97.61.11496.77EB3535; Sun, 20 Apr 2014 21:32:55 +0900 (KST) X-AuditID: cbfee691-b7f3e6d000002ce8-f2-5353be779285 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 70.E9.27725.77EB3535; Sun, 20 Apr 2014 21:32:55 +0900 (KST) Received: from localhost.localdomain ([107.108.83.245]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4B00GJ0XIK5U30@mmp2.samsung.com>; Sun, 20 Apr 2014 21:32:55 +0900 (KST) From: Rahul Sharma To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] drm/exynos: enable fimd clocks in probe before accessing fimd registers Date: Sun, 20 Apr 2014 18:02:13 +0530 Message-id: <1397997133-22477-1-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsWyRsSkTrd8X3CwwZXf0hZXvr5ns5h0fwKL xfddX9gtZpzfx2Sx8EW8xZRFh1kd2Dx2zrrL7nG/+ziTR9+WVYwenzfJBbBEcdmkpOZklqUW 6dslcGVsmFFSsJKzouvNJcYGxhfsXYycHBICJhL339xnhbDFJC7cW8/WxcjFISSwlFHixtEJ jDBFcyffYoZITGeU2PnmAzuE084kcW5qE9goNgFdidkHn4F1iAi4STQdngk2llkgW+LwgZdg cWGBKIkZ71eC2SwCqhIfVu8G6+UV8JCY1r2DpYuRA2ibgsScSTYg8yUE3rNJzHnwlBmiXkDi 2+RDUDWyEpsOMEMcJylxcMUNlgmMggsYGVYxiqYWJBcUJ6UXmeoVJ+YWl+al6yXn525iBIbn 6X/PJu5gvH/A+hBjMtC4icxSosn5wPDOK4k3NDYzsjA1MTU2Mrc0I01YSZw3/VFSkJBAemJJ anZqakFqUXxRaU5q8SFGJg5OqQZGMRePHw1XXuXd2vBm6spvDisPB+xYeeOQ/qWVKSfl7p0T v3du6TSlnRo90n7Rl0wfZVvItrecmPDhgx6j+ILiBqPyTmG39W+nxvYtiH2vWDbZq4lj8ZOP y42/fRIy5Pq18k/y38kKtwztjpeZT/LVnm+u8VHJNuuauWdv6OUZUVMZJ50ya9sVp8RSnJFo qMVcVJwIADcrVddlAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsVy+t9jQd3yfcHBBr/+Cllc+fqezWLS/Qks Ft93fWG3mHF+H5PFwhfxFlMWHWZ1YPPYOesuu8f97uNMHn1bVjF6fN4kF8AS1cBok5GamJJa pJCal5yfkpmXbqvkHRzvHG9qZmCoa2hpYa6kkJeYm2qr5OIToOuWmQO0XEmhLDGnFCgUkFhc rKRvh2lCaIibrgVMY4Sub0gQXI+RARpIWMOYsWFGScFKzoquN5cYGxhfsHcxcnJICJhIzJ18 ixnCFpO4cG89WxcjF4eQwHRGiZ1vPrBDOO1MEuemNoF1sAnoSsw++IwRxBYRcJNoOjyTFcRm FsiWOHzgJVhcWCBKYsb7lWA2i4CqxIfVu8F6eQU8JKZ172DpYuQA2qYgMWeSzQRG7gWMDKsY RVMLkguKk9JzDfWKE3OLS/PS9ZLzczcxgoP/mdQOxpUNFocYBTgYlXh4d6wPDhZiTSwrrsw9 xCjBwawkwps8DyjEm5JYWZValB9fVJqTWnyIMRlo+URmKdHkfGBk5pXEGxqbmJsam1qaWJiY WZImrCTOe6DVOlBIID2xJDU7NbUgtQhmCxMHp1QDY2f8K79vun+SdPd3nD/AmfRUVsT95oSF Yl//ZV6cXG3HU9J/KU4mSTrz/OXH9vPktkxwNpBYqrD+fODeuwylgb1v4xYvVQsPXLBqWp4q 88TVpa73r3EZfLnMs0Vu65KjqtuM799KYI5I7LJ616yZmbTqfTbbdAl/XtdLQYlfr3m8n33e 5vXbdCWW4oxEQy3mouJEAGg+nrXCAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Sun, 20 Apr 2014 08:04:17 -0700 Cc: joshi@samsung.com, Rahul Sharma X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rahul Sharma Fimd probe is accessing fimd Registers without enabling the fimd gate clocks. This hangs the system at boot time. This issue got surfaced when verifying with sysmmu enabled. Probe of fimd Sysmmu enables the master clock before accessing sysmmu regs and then disables. Later fimd probe tries to read the reegister without enabling the clock which is wrong and hangs the system. Signed-off-by: Rahul Sharma --- drivers/gpu/drm/exynos/exynos_drm_fimd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 40fd6cc..8706fde 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -916,9 +916,15 @@ static int fimd_probe(struct platform_device *pdev) pm_runtime_enable(dev); + clk_prepare_enable(ctx->bus_clk); + clk_prepare_enable(ctx->lcd_clk); + for (win = 0; win < WINDOWS_NR; win++) fimd_clear_win(ctx, win); + clk_disable_unprepare(ctx->lcd_clk); + clk_disable_unprepare(ctx->bus_clk); + return 0; }