From patchwork Wed Jun 11 18:26:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 4338921 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 46D0DBEEAA for ; Thu, 12 Jun 2014 00:23:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81965202DD for ; Thu, 12 Jun 2014 00:23:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 85C6B2016C for ; Thu, 12 Jun 2014 00:23:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 45D7D6E3FF; Wed, 11 Jun 2014 17:23:24 -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 98A2C6E896 for ; Wed, 11 Jun 2014 11:29:40 -0700 (PDT) Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N7000A88OOFSV30@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 12 Jun 2014 03:29:03 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 69.A4.13369.EEF98935; Thu, 12 Jun 2014 03:29:02 +0900 (KST) X-AuditID: cbfee690-b7fb56d000003439-58-53989fee254f Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 6C.73.08203.EEF98935; Thu, 12 Jun 2014 03:29:02 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N70000F9OO6ED50@mmp2.samsung.com>; Thu, 12 Jun 2014 03:29:02 +0900 (KST) From: Ajay Kumar To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH V4 01/10] drm/exynos: Move DP setup out of hotplug workqueue Date: Wed, 11 Jun 2014 23:56:59 +0530 Message-id: <1402511228-18945-2-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1402511228-18945-1-git-send-email-ajaykumar.rs@samsung.com> References: <1402511228-18945-1-git-send-email-ajaykumar.rs@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFIsWRmVeSWpSXmKPExsWyRsSkVvfd/BnBBr0vrC0OvD/IYrHhzUJm i4UP7zJbzD9yjtXiytf3bBaT7k9gsfi+6wu7xYzz+5gs5h36zWix6vAGdovnC38wW8w9mGvx c9c8Fgdej9kNF1k89n5bwOKxc9Zddo8Fm0o97ncfZ/Lo27KK0ePzJrkA9igum5TUnMyy1CJ9 uwSujIc71rEXnOSu+H3hFWsD41XOLkZODgkBE4n79w4wQdhiEhfurWcDsYUEljJK9K9Ig6mZ /vg4UJwLKD6dUeLD1afsEM4EJokfk6czg1SxCWhLbJt+k6WLkYNDRCBF4vlfPpAaZoHvjBLb Dz8EqxEW8JGYv6oBzGYRUJVYdL2fEcTmFfCQmPC/mxmkV0JAQWLOJBsQk1PAU2L37kCIezwk /s5rYAEZKSFwjV1i/vevrBBjBCS+TT7EAtEqK7HpADPEzZISB1fcYJnAKLyAkWEVo2hqQXJB cVJ6kYlecWJucWleul5yfu4mRmC8nP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sTg8Wlv/0S/HWi64CL8Eb2X2zBnhvU JlY0HFQ49K+Xd27Tu2eSS/LNPv6d+UyvcJO/8ML2wP0bnXo3hs2z/MWX68VTqZVqzRx4x2F6 d6vthKnqk1y2NbhF/9ea+PiR+zw32yv2SizFGYmGWsxFxYkAK9YBbAsDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Mailman-Approved-At: Wed, 11 Jun 2014 17:23:23 -0700 Cc: seanpaul@google.com, daniel.vetter@ffwll.ch, joshi@samsung.com, ajaynumb@gmail.com, marcheu@chromium.org, prashanth.g@samsung.com, Ajay Kumar 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 Move the DP training and video enable from the hotplug handler into a seperate function and call the same during dpms ON. With existing code, DP HPD should be generated just few ms before calling enable_irq in dp_poweron. This patch removes that stringent time constraint. Signed-off-by: Ajay Kumar --- drivers/gpu/drm/exynos/exynos_dp_core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c index 5e05dbc..96b4e82 100644 --- a/drivers/gpu/drm/exynos/exynos_dp_core.c +++ b/drivers/gpu/drm/exynos/exynos_dp_core.c @@ -875,10 +875,18 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void *arg) static void exynos_dp_hotplug(struct work_struct *work) { struct exynos_dp_device *dp; - int ret; dp = container_of(work, struct exynos_dp_device, hotplug_work); + if (dp->drm_dev) + drm_helper_hpd_irq_event(dp->drm_dev); +} + +static void exynos_dp_setup(void *in_ctx) +{ + struct exynos_dp_device *dp = in_ctx; + int ret; + ret = exynos_dp_detect_hpd(dp); if (ret) { /* Cable has been disconnected, we're done */ @@ -1059,6 +1067,7 @@ static void exynos_dp_poweron(struct exynos_dp_device *dp) exynos_dp_phy_init(dp); exynos_dp_init_dp(dp); enable_irq(dp->irq); + exynos_dp_setup(dp); } static void exynos_dp_poweroff(struct exynos_dp_device *dp)