From patchwork Thu Apr 3 15:11:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rahul Sharma X-Patchwork-Id: 3932951 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 BB5789F38C for ; Thu, 3 Apr 2014 15:13:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9F8520270 for ; Thu, 3 Apr 2014 15:13:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E73A52021B for ; Thu, 3 Apr 2014 15:13:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752524AbaDCPMg (ORCPT ); Thu, 3 Apr 2014 11:12:36 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:10258 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752545AbaDCPMS (ORCPT ); Thu, 3 Apr 2014 11:12:18 -0400 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N3G00GJ2NKG5JC0@mailout2.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 04 Apr 2014 00:12:16 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.125]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 81.9B.09028.05A7D335; Fri, 04 Apr 2014 00:12:16 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-64-533d7a50a9cc Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 29.B2.29263.05A7D335; Fri, 04 Apr 2014 00:12:16 +0900 (KST) Received: from localhost.localdomain ([107.108.83.245]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N3G00IVZNJBV460@mmp2.samsung.com>; Fri, 04 Apr 2014 00:12:16 +0900 (KST) From: Rahul Sharma To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: inki.dae@samsung.com, r.sh.open@gmail.com, joshi@samsung.com, Sean Paul , Rahul Sharma Subject: [PATCH 6/7] drm/exynos: Read hpd gpio in is_connected callback Date: Thu, 03 Apr 2014 20:41:03 +0530 Message-id: <1396537864-29291-7-git-send-email-rahul.sharma@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1396537864-29291-1-git-send-email-rahul.sharma@samsung.com> References: <1396537864-29291-1-git-send-email-rahul.sharma@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRmVeSWpSXmKPExsWyRsSkVjegyjbY4PETE4srX9+zWUy6P4HF 4vuuL+wWM87vY7JY+CLeYsqiw6wWdzecZXRg95jdcJHFY+esu+we97uPM3n0bVnF6PF5k1wA axSXTUpqTmZZapG+XQJXxvUb+1kL+jkqPq65ytLA+J6ti5GTQ0LAROLvqh+sELaYxIV764Hi XBxCAksZJXY1f2aCKTpy7ScjRGI6o8SW5begqtqZJHp6t7CDVLEJ6ErMPviMEcQWEXCTaDo8 kxWkiFmgj1Gi/+JnsISwgLvEqe27mbsYOThYBFQlzm/kAAnzCnhItL2dygoSlhBQkJgzyQYk zCngKfHl8yewTiGgkp/7DrGDjJQQmMcusffPYmaQBIuAgMS3yYdYIHplJTYdYIY4WlLi4Iob LBMYhRcwMqxiFE0tSC4oTkovMtIrTswtLs1L10vOz93ECAzy0/+e9e1gvHnA+hBjMtC4icxS osn5wCjJK4k3NDYzsjA1MTU2Mrc0I01YSZx30cOkICGB9MSS1OzU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fm4a/+rTd3bFUw3tC0rZI15rebIpsRRnJBpqMRcVJwIA1Wf0s+UC AAA= 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 From: Sean Paul This patch adds a gpio read of hpd during the is_connected callback. This fixes the case where hdmi is off going into suspend and the cable is plugged in while suspended. In this case, the hpd interrupt does not fire and is_connected will return false. Signed-off-by: Sean Paul Signed-off-by: Rahul Sharma --- drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index b2cbf43..fce2f7b 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1031,6 +1031,8 @@ static enum drm_connector_status hdmi_detect(struct drm_connector *connector, { struct hdmi_context *hdata = ctx_from_connector(connector); + hdata->hpd = gpio_get_value(hdata->hpd_gpio); + return hdata->hpd ? connector_status_connected : connector_status_disconnected; }