From patchwork Mon Nov 5 07:42:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 1695261 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B46173FCA5 for ; Mon, 5 Nov 2012 07:23:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751210Ab2KEHXZ (ORCPT ); Mon, 5 Nov 2012 02:23:25 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:36868 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107Ab2KEHXY (ORCPT ); Mon, 5 Nov 2012 02:23:24 -0500 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD000GPR769WIT0@mailout1.samsung.com> for linux-fbdev@vger.kernel.org; Mon, 05 Nov 2012 16:23:23 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id E9.5F.01231.B6967905; Mon, 05 Nov 2012 16:23:23 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-2c-5097696beda2 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D7.5F.01231.B6967905; Mon, 05 Nov 2012 16:23:23 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD0001Q375OQO40@mmp1.samsung.com> for linux-fbdev@vger.kernel.org; Mon, 05 Nov 2012 16:23:23 +0900 (KST) From: Ajay Kumar To: linux-fbdev@vger.kernel.org, jg1.han@samsung.com Cc: FlorianSchandinat@gmx.de Subject: [PATCH V2] video: exynos_dp: Reset and initialize DP before requesting irq Date: Mon, 05 Nov 2012 13:12:57 +0530 Message-id: <1352101378-11560-1-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.0.4 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsWyRsSkTjc7c3qAQftsIYsTfR9YHRg9Pm+S C2CM4rJJSc3JLEst0rdL4Mo40FhfsIG7Yuvcb0wNjNs5uxg5OCQETCSuNjt1MXICmWISF+6t Z+ti5OIQEljKKLHuyW1GiISJxI6bs1khEosYJTrPHmCGcJYzSZzYd4cVpIpNQFti2/SbLCC2 CFDH1L/X2UBsZgEZiTfzFzCB2MICoRLbFk0Cq2cRUJVYeqYBrJ5XwENi5/8XTBDbFCRalx1i h6gRkPg2+RALxKWyEpsg9koIbGGTeDt5CStEvaTEwRU3WCYwCi5gZFjFKJpakFxQnJSea6hX nJhbXJqXrpecn7uJERhQp/89k9rBuLLB4hCjAAejEg/vTLHpAUKsiWXFlbmHGCU4mJVEeDkY gEK8KYmVValF+fFFpTmpxYcYfYAumcgsJZqcDwz2vJJ4Q2MTc1NjU0sjIzNTUxzCSuK8zR4p AUIC6YklqdmpqQWpRTDjmDg4pRoYLX2lDgTbKu3507+wyqXVOY+X68eZeQdnpefrKB2eYO/7 yzajymmHY+vFcx8dJ7R+qv8xtXtChuezuRu8Pom32If1vd7dIyIiNfudxdVVX5onhDPfrdmT xrT3RW5Z/6Y5OrKhJ30al24+d6WfLaBlCbNEoIEFx7nQyndVXjUMR3+d5iljq85UYinOSDTU Yi4qTgQAAU1SO1UCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrELMWRmVeSWpSXmKPExsVy+t9jAd3szOkBBnPucVmc6PvA6sDo8XmT XABjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYQ1jxoHG+oIN3BVb535jamDc ztnFyMkhIWAisePmbFYIW0ziwr31bF2MXBxCAosYJTrPHmCGcJYzSZzYdwesik1AW2Lb9Jss ILYIUPfUv9fZQGxmARmJN/MXMIHYwgKhEtsWTQKrZxFQlVh6pgGsnlfAQ2Ln/xdMENsUJFqX HWKfwMi9gJFhFaNoakFyQXFSeq6hXnFibnFpXrpecn7uJkZwwD6T2sG4ssHiEKMAB6MSD+9M sekBQqyJZcWVuYcYJTiYlUR4ORiAQrwpiZVVqUX58UWlOanFhxh9gLZPZJYSTc4HRlNeSbyh sYm5qbGppYmFiZklDmElcd5mj5QAIYH0xJLU7NTUgtQimHFMHJxSDYxiSfmqf2cGy/Yx3ljO 819PWsbjvLaR4sntvt7fcmx3dIt/+ya+pC/ktldvgnYP74JrPEJ/Hj7aqVtY/PDif9HdJ3IW nZ2d9GndRc/zEY3Nk7wyth9sizy9mLuZzSCCT6R+0bPd7gdcZhfejjYU1J3AO+/AVPvLpedN 4s+Hr5qsn8SrVmnb3qPEUpyRaKjFXFScCADW3jUohQIAAA== X-CFilter-Loop: Reflected Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org If DP is not reset properly before kernel bootup(in bootloader code), there can be few pending interrupts, and sometimes they invoke DP irq handler as soon as the irq handler is registered in DP probe. So, we make the DP driver more robust by resetting and initializing DP at the earliest and then registering the irq handler. Signed-off-by: Ajay Kumar Acked-by: Jingoo Han --- drivers/video/exynos/exynos_dp_core.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index d55470e..d241fd3 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -901,6 +901,12 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev) return -ENODEV; } + dp->video_info = pdata->video_info; + if (pdata->phy_init) + pdata->phy_init(); + + exynos_dp_init_dp(dp); + ret = devm_request_irq(&pdev->dev, dp->irq, exynos_dp_irq_handler, 0, "exynos-dp", dp); if (ret) { @@ -908,12 +914,6 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev) return ret; } - dp->video_info = pdata->video_info; - if (pdata->phy_init) - pdata->phy_init(); - - exynos_dp_init_dp(dp); - ret = exynos_dp_detect_hpd(dp); if (ret) { dev_err(&pdev->dev, "unable to detect hpd\n");