From patchwork Sat Nov 3 07:06:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 1691291 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 43D8ADFB7B for ; Sat, 3 Nov 2012 06:47:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393Ab2KCGq7 (ORCPT ); Sat, 3 Nov 2012 02:46:59 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:36424 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751002Ab2KCGq6 (ORCPT ); Sat, 3 Nov 2012 02:46:58 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MCW00LQPG5DJDC0@mailout3.samsung.com> for linux-fbdev@vger.kernel.org; Sat, 03 Nov 2012 15:46:56 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 9B.B7.01231.0EDB4905; Sat, 03 Nov 2012 15:46:56 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-7c-5094bde0e2fd Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5B.B7.01231.0EDB4905; Sat, 03 Nov 2012 15:46:56 +0900 (KST) Received: from localhost.localdomain ([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 <0MCW00IESG60MA00@mmp2.samsung.com> for linux-fbdev@vger.kernel.org; Sat, 03 Nov 2012 15:46:56 +0900 (KST) From: Ajay Kumar To: linux-fbdev@vger.kernel.org, jg1.han@samsung.com Cc: FlorianSchandinat@gmx.de Subject: video: exynos_dp: Reset and initialize DP before requesting irq Date: Sat, 03 Nov 2012 12:36:41 +0530 Message-id: <1351926402-25484-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+NgFjrILMWRmVeSWpSXmKPExsWyRsSkTvfB3ikBBm0XdSxO9H1gdWD0+LxJ LoAxissmJTUnsyy1SN8ugStj54klrAUt3BUPjis0ME7g7GLk5JAQMJE4uOkFM4QtJnHh3nq2 LkYuDiGBpYwS3WueATkcYEXzH/NCxKczSlxZfYIVwlnOJNGwsIsdpJtNQFti2/SbLCC2CFDD 1L/X2UBsZgEZiTfzFzCB2MICHhJnDy0Bq2cRUJU4dXk7mM0LFL909xw7xBUKEq3LDkHVCEh8 m3yIBeIIWYlNB6AO3cIm8bXZG8KWlDi44gbLBEbBBYwMqxhFUwuSC4qT0nMN9YoTc4tL89L1 kvNzNzECw+n0v2dSOxhXNlgcYhTgYFTi4b3ANyVAiDWxrLgy9xCjBAezkghvlztQiDclsbIq tSg/vqg0J7X4EKMP0CETmaVEk/OBoZ5XEm9obGJuamxqaWRkZmqKQ1hJnLfZIyVASCA9sSQ1 OzW1ILUIZhwTB6dUA2OVa+EJ3kvxSYzzrx5a3Wqfrmw7pyt6ccyjxtdOX6f8bjhVs3J6kM1f noNzNs8vubV3U2jb7juHH2o9mVPEvP+Rz5+S87tP3TqsfHqypG1aUnTo9yWnjs2/Lbiy5ujN becF+D9cEuozqRd/deFqzbrzuxoN8v5/z7X2Xr6+sedx2j8Ozh2XGb7uVmIpzkg01GIuKk4E AFxQ+zVUAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsVy+t9jQd0He6cEGDQeUbQ40feB1YHR4/Mm uQDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwhrGjJ0nlrAWtHBXPDiu0MA4 gbOLkYNDQsBEYv5j3i5GTiBTTOLCvfVsXYxcHEIC0xklrqw+wQrhLGeSaFjYxQ5SxSagLbFt +k0WEFsEqHnq3+tsIDazgIzEm/kLmEBsYQEPibOHloDVswioSpy6vB3M5gWKX7p7jh1im4JE 67JD7BMYuRcwMqxiFE0tSC4oTkrPNdQrTswtLs1L10vOz93ECA7XZ1I7GFc2WBxiFOBgVOLh vcA3JUCINbGsuDL3EKMEB7OSCG+XO1CINyWxsiq1KD++qDQntfgQow/Q9onMUqLJ+cBYyiuJ NzQ2MTc1NrU0sTAxs8QhrCTO2+yREiAkkJ5YkpqdmlqQWgQzjomDU6qBMX9yfuoFhrv7im/f TCgI/N2nM4OD/VJEaKJq3hTzV4cOvzDkqJ7xdaPpUqtTTjxrpy1LPff/jT37p0ZJnmK38/7Z s/YKBl0RrOa3sneuYvpUI/bB3/GF/Ketm26u7FE8X+Kx0qdtPsdjyetbBCXs167f7i/16UHd y+zPv5h7/58rPNTauDLVX4mlOCPRUIu5qDgRANCVAGGEAgAA 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");