From patchwork Wed Aug 2 08:54:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 9876383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24D4360360 for ; Wed, 2 Aug 2017 08:55:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 164ED2878E for ; Wed, 2 Aug 2017 08:55:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B4C128799; Wed, 2 Aug 2017 08:55:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C43D5287A0 for ; Wed, 2 Aug 2017 08:54:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2799E6F004; Wed, 2 Aug 2017 08:54:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lb3-smtp-cloud7.xs4all.net (lb3-smtp-cloud7.xs4all.net [194.109.24.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7DAB26EFF7 for ; Wed, 2 Aug 2017 08:54:13 +0000 (UTC) Received: from tschai.fritz.box ([212.251.195.8]) by smtp-cloud7.xs4all.net with ESMTPA id cpPsdNkFmZNWkcpPwdABWx; Wed, 02 Aug 2017 10:54:12 +0200 From: Hans Verkuil To: linux-media@vger.kernel.org Subject: [PATCHv2 1/9] omapdrm: encoder-tpd12s015: keep ls_oe_gpio high Date: Wed, 2 Aug 2017 10:54:00 +0200 Message-Id: <20170802085408.16204-2-hverkuil@xs4all.nl> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170802085408.16204-1-hverkuil@xs4all.nl> References: <20170802085408.16204-1-hverkuil@xs4all.nl> X-CMAE-Envelope: MS4wfIpihmQ/b+paMsBvTYeSwtp6sq7ihh6Ki0Ujpa9jbpS/hXG8y0As74/cumm5uBTaE0k+Oik6qu1iBkicM0NRA1ZPeieRTxMAdxM0WZx5RX7+PyFTxZn8 40C9LMCV4veFPZtj4UQaNsr24wnz9bGDBWJkEbAXk15qmrI6E6XXNrr/261GAT71dgMIg5tYmfch4/dY0rXtZPvoa/Q2tfZ7WQBRQUZLWXOfZ9qk3EnPBPuD mAhDjMz8RkK+u58r80UuSQiUBtHxVGZhMNMSFAil3vQ= Cc: Tomi Valkeinen , Hans Verkuil , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil For OMAP4 CEC support the CEC pin should always be on. So keep ls_oe_gpio high all the time in order to support CEC. Background: even if the HPD is low it should still be possible to use CEC. Some displays will set the HPD low when they go into standby or when they switch to another input, but CEC is still available and able to wake up/change input for such a display. This is explicitly allowed by the CEC standard. Signed-off-by: Hans Verkuil --- drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c index a9e9d667c55e..293b8fd07cfc 100644 --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c @@ -51,6 +51,8 @@ static int tpd_connect(struct omap_dss_device *dssdev, dssdev->dst = dst; gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 1); + gpiod_set_value_cansleep(ddata->ls_oe_gpio, 1); + /* DC-DC converter needs at max 300us to get to 90% of 5V */ udelay(300); @@ -69,6 +71,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev, return; gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0); + gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0); dst->src = NULL; dssdev->dst = NULL; @@ -146,18 +149,11 @@ static int tpd_read_edid(struct omap_dss_device *dssdev, { struct panel_drv_data *ddata = to_panel_data(dssdev); struct omap_dss_device *in = ddata->in; - int r; if (!gpiod_get_value_cansleep(ddata->hpd_gpio)) return -ENODEV; - gpiod_set_value_cansleep(ddata->ls_oe_gpio, 1); - - r = in->ops.hdmi->read_edid(in, edid, len); - - gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0); - - return r; + return in->ops.hdmi->read_edid(in, edid, len); } static bool tpd_detect(struct omap_dss_device *dssdev)