From patchwork Wed May 14 11:39:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 4174301 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9D1899F387 for ; Wed, 14 May 2014 11:42:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D346620127 for ; Wed, 14 May 2014 11:42:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DF3A20123 for ; Wed, 14 May 2014 11:42:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754697AbaENLmD (ORCPT ); Wed, 14 May 2014 07:42:03 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:42044 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754040AbaENLmB (ORCPT ); Wed, 14 May 2014 07:42:01 -0400 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 <0N5K00404B60MJ50@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 14 May 2014 20:42:00 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 4A.DC.11496.88653735; Wed, 14 May 2014 20:42:00 +0900 (KST) X-AuditID: cbfee691-b7f3e6d000002ce8-e7-53735688bd92 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 11.38.25708.78653735; Wed, 14 May 2014 20:41:59 +0900 (KST) Received: from chnaveen-ubuntu.sisodomain.com ([107.108.83.161]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5K00F5OB5NDD70@mmp1.samsung.com>; Wed, 14 May 2014 20:41:59 +0900 (KST) From: Naveen Krishna Chatradhi To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: seanpaul@chromium.org, inki.dae@samsung.com, naveenkrishna.ch@gmail.com Subject: [PATCH] drm/exynos: Make exynos_drm_init() call late during the bootup Date: Wed, 14 May 2014 17:09:45 +0530 Message-id: <1400067585-31236-1-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrELMWRmVeSWpSXmKPExsWyRsSkVrcjrDjYYPMRdosrX9+zWUy6P4HF Ysb5fUwWi7b9Z7a4u+EsowOrx+yGiyweO2fdZfe4332cyaNvyypGj8+b5AJYo7hsUlJzMstS i/TtErgyju/awVLwn79i3d01rA2M63i7GDk5JARMJCZPPs8EYYtJXLi3nq2LkYtDSGApo0T7 +lVMMEVrD39khkgsYpT42fyJBcLpZ5J4uOQTK0gVm4CZxMFFq9lBbBEBN4mmwzOB4hwczALe Ev8uMIOYwgL+En9/VoBUsAioSkxZNQ9sPq+Aq0Tfj5tgJRICChJzJtmATJcQ+M4m8WTyClaI egGJb5MPsUDUyEpsOsAMcZqkxMEVN1gmMAouYGRYxSiaWpBcUJyUXmSqV5yYW1yal66XnJ+7 iREYnqf/PZu4g/H+AetDjMlA4yYyS4km5wPDO68k3tDYzMjC1MTU2Mjc0ow0YSVx3vRHSUFC AumJJanZqakFqUXxRaU5qcWHGJk4OKUaGFf5VryOmNViadPzakZPDV+B9oMpZ5ZnaKv/NUsr nDwrvulsDtuC8uq2CYKCu62Zu6RO9p+9F/Dg9Ibndeo8J85/mFwtbc5g1uEfImdZclXg05ls 3cta8msMucw2tgW9UTw6jSV0Q/viCOVg+ajmFfUCDRXPPz87OXu6KG81052GZyZ5ActblViK MxINtZiLihMBg+aY3GUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsVy+t9jAd32sOJgg1vvbSyufH3PZjHp/gQW ixnn9zFZLNr2n9ni7oazjA6sHrMbLrJ47Jx1l93jfvdxJo++LasYPT5vkgtgjWpgtMlITUxJ LVJIzUvOT8nMS7dV8g6Od443NTMw1DW0tDBXUshLzE21VXLxCdB1y8wB2q6kUJaYUwoUCkgs LlbSt8M0ITTETdcCpjFC1zckCK7HyAANJKxhzDi+awdLwX/+inV317A2MK7j7WLk5JAQMJFY e/gjM4QtJnHh3nq2LkYuDiGBRYwSP5s/sUA4/UwSD5d8YgWpYhMwkzi4aDU7iC0i4CbRdHgm UJyDg1nAW+LfBWYQU1jAX+LvzwqQChYBVYkpq+Yxgdi8Aq4SfT9ugpVICChIzJlkM4GRewEj wypG0dSC5ILipPRcI73ixNzi0rx0veT83E2M4OB/Jr2DcVWDxSFGAQ5GJR7eG85FwUKsiWXF lbmHGCU4mJVEeBktioOFeFMSK6tSi/Lji0pzUosPMSYDLZ/ILCWanA+MzLySeENjE3NTY1NL EwsTM0vShJXEeQ+2WgcKCaQnlqRmp6YWpBbBbGHi4JRqYCzzmLD0uZPMzImpyVtnTT/2Y1Pi 0uz5/T/+rbTy2+MyZ1rhr1fp4izGzxZ7t8c/qV70ZJ/XtRYG+w2iRSrV/jM/f/fSS1/wyv3q ImHRowHW+/jFD8qkewjtvuN1/4Dju3QvI6sZIZMmnVzzofNCwi+R9U1S8lZy29arHisMfW2r OMdrKUMKk5MSS3FGoqEWc1FxIgCb4/BwwgIAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 exynos_drm_init() does probing of various drivers like dp_panel, hdmi, fimd, mixer, etc in an order and finally binds them together. Some of the drm devices (Eg: dp_panel) try to do regulator_get() and enable few supplies during their probe. Chances are that, these devices may get probed before the respective supply/PMIC is hooked. In such cases, dp_panel would continue with "dummy regulator". Which is not what the system wants. Lets give the core connectivity and regulators modules some time to hookup the supplies before Exynos DRM devices comes into picture. Signed-off-by: Naveen Krishna Chatradhi --- This change is proposed after 1. Discussing with I2C/SPI & DMA subsystem maintainers and Others @ https://lkml.org/lkml/2014/5/9/333 Trying to change the I2C, SPI and DMA drivers as subsys_initcall() Which was strictly opposed, as a flaw was found in DRM subsystem. 2. -EPROBE_DEFER won't work well with the current sequency of platform_driver_register()s in exynos_drm_init() 3. bridge_panel mechanism is under RFC and no conclusions were drawn yet. We should be able to probe each DRM device independently and let PROBE_DEFER take care of dependencies. But, this could cause lot of bootup time. late_initcall() of DRM works well and fixes all the above issues for now. Kindly suggest, if an alternative/better mechanism is out there. Thanks, drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 4cef88f..78c185a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -692,7 +692,7 @@ static void exynos_drm_exit(void) platform_driver_unregister(&exynos_drm_platform_driver); } -module_init(exynos_drm_init); +late_initcall(exynos_drm_init); module_exit(exynos_drm_exit); MODULE_AUTHOR("Inki Dae ");