From patchwork Mon Nov 5 07:43:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 1695301 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 19E01DF2AB for ; Mon, 5 Nov 2012 07:43:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752226Ab2KEHng (ORCPT ); Mon, 5 Nov 2012 02:43:36 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:40412 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752138Ab2KEHnf (ORCPT ); Mon, 5 Nov 2012 02:43:35 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD000HH582TZ0R0@mailout1.samsung.com> for linux-fbdev@vger.kernel.org; Mon, 05 Nov 2012 16:43:34 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.47]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BC.53.12699.62E67905; Mon, 05 Nov 2012 16:43:34 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-99-50976e2645c3 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 5C.53.12699.62E67905; Mon, 05 Nov 2012 16:43:34 +0900 (KST) Received: from DOJG1HAN02 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD00035I84M7N00@mmp1.samsung.com> for linux-fbdev@vger.kernel.org; Mon, 05 Nov 2012 16:43:34 +0900 (KST) From: Jingoo Han To: 'Florian Tobias Schandinat' Cc: linux-fbdev@vger.kernel.org, 'Ajay Kumar' , 'Jingoo Han' Subject: [PATCH v3 1/2] video: exynos_dp: Reset and initialize DP before requesting irq Date: Mon, 05 Nov 2012 16:43:33 +0900 Message-id: <003301cdbb29$421e2ee0$c65a8ca0$%han@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac27KUIAmX/J1rmES6qj/A5auPWLMg== Content-language: ko DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDIsWRmVeSWpSXmKPExsVy+t8zfV21vOkBBl8WSFqc6PvA6sDo8XmT XABjFJdNSmpOZllqkb5dAlfGt65TTAXnuSvO93xjb2A8x9nFyMkhIWAisWH1TBYIW0ziwr31 bF2MXBxCAssYJT7PecQMU/S/9wAjRGIRo8SMKQ1MEM4sJonfT/6xg1SxCahJfPlyGMjm4BAR sJLYtFUTxGQWyJN48U8FpEJYIFLiRPskJpAwi4CqxJN9SiBhXgFbiY1X7jBD2IISPybfA7uH WUBLYv3O40wQtrzE5jVvmUFaJQTUJR791QUJiwjoSSz6vpENokREYt+Ld4wgNouAgMS3yYdY IMplJTYdYAa5V0KgnV2i8eJ+RoivJCUOrrjBMoFRbBaSzbOQbJ6FZPMsJCsWMLKsYhRNLUgu KE5KzzXSK07MLS7NS9dLzs/dxAiJEukdjKsaLA4xCnAwKvHwfpKYHiDEmlhWXJl7iFGCg1lJ hJeDASjEm5JYWZValB9fVJqTWnyI0Qfo8onMUqLJ+cAIziuJNzQ2NjEzMTUxtzQ1N8UhrCTO 2+yREiAkkJ5YkpqdmlqQWgQzjomDU6qBMW/zkTRGH4lLRyX+/hHf8LctcbnbG+l0/TQjr2dB 5+xXRKV9WJ2aO8ugv9aSrdnh3+r1unx5p+1br5glvHL/sVh2FaOva37vhrfNDu/LeQ9/+qg4 2zd67UvtZwkT/wa8dQxRd174dro7z+V7O3VbVrd4tqRylWlsyRdePSHmUWdN4c6ZOUYsSizF GYmGWsxFxYkAXruZOb8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNIsWRmVeSWpSXmKPExsVy+t9jAV21vOkBBl1TRC1O9H1gdWD0+LxJ LoAxqoHRJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwdo qpJCWWJOKVAoILG4WEnfDtOE0BA3XQuYxghd35AguB4jAzSQsI4x41vXKaaC89wV53u+sTcw nuPsYuTkkBAwkfjfe4ARwhaTuHBvPVsXIxeHkMAiRokZUxqYIJxZTBK/n/xjB6liE1CT+PLl MJDNwSEiYCWxaasmiMkskCfx4p8KSIWwQKTEifZJTCBhFgFViSf7lEDCvAK2Ehuv3GGGsAUl fky+xwJiMwtoSazfeZwJwpaX2LzmLTNIq4SAusSjv7ogYREBPYlF3zeyQZSISOx78Y5xAqPA LCSTZiGZNAvJpFlIWhYwsqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECI7BZ9I7GFc1WBxi FOBgVOLh/SQxPUCINbGsuDL3EKMEB7OSCC8HA1CINyWxsiq1KD++qDQntfgQow/QnxOZpUST 84HpIa8k3tDYxMzI0sjMwsjE3ByHsJI4b7NHSoCQQHpiSWp2ampBahHMOCYOTqkGRq8SsZXB 7/YXCyikcedyNbZyx/lUZL+47rPk54X3jExn/h87d6tzgkqJp4tLwfGC1K8ljzhzU63eN+8p WpvM/M7nS/o38T/ROs5fIpP+1L1QectemDT1JdfRY5UHezwVtkvcDj7Is6+qOcvXcq35Ud9X FZ/fWOy7dcdvRsv2u/cPG6Use344QImlOCPRUIu5qDgRAAfxzoLuAgAA 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 Signed-off-by: Jingoo Han --- Tested with Exynos5250 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");