From patchwork Sat Jun 29 12:59:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 11024009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 245B31398 for ; Sat, 29 Jun 2019 13:03:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 154692838F for ; Sat, 29 Jun 2019 13:03:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 094DD287CE; Sat, 29 Jun 2019 13:03:28 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F8422838F for ; Sat, 29 Jun 2019 13:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SAzUdhWUIV7fYeXzfqmmQwz/cqGIftvjsADmef14cS4=; b=Frn3tUdrD8SASg Zkp5XSyK5puaJSx+U4KGhUu+ZTNg2QzFOxKAKHRb19AF8agUvcKqDx67YGxFxKdKEnRl5U0dxKknf xl1dDJdnA616MkNFD8bhTX5sPdnTdfvSVGne9wKaci/vidx6GJu5GDFhE+wWZTCuYxjShKypsgV1J QZJgL4+qsQIe8iiGzwVft7fm4FzVjhS1Gk7REeXRDXD151cwtQKXx83tEYaKEM6+ehZB3iKe5jBkX /IvkWHXWNb9lOaawVWhyG1eBkFIfs+SH/hx8HapbGYjysn1CVS1E4xiJy0YmTr42kFyOpoOuVJEGn qqjFwRoTyspBpKIRG8Gg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhD0n-0005vd-OS; Sat, 29 Jun 2019 13:03:25 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhCza-0004qo-93 for linux-arm-kernel@lists.infradead.org; Sat, 29 Jun 2019 13:02:12 +0000 Received: by mail-lf1-x144.google.com with SMTP id u10so5716819lfm.12 for ; Sat, 29 Jun 2019 06:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gUhHBzqpeqf9laCyRDqe0YTreYPsBAWIdDU1MBCLr1k=; b=BYavBGMBtik6r+A9tFdwUyOfHqHK+Yl4c7/OJSbz75XF2NUDjc4Jw7+6wvc3ssAnDF 9sq25tD60Ch3GCG0hM/5PRkqSgHcW/LYOm35ZiNdaPczwua7xlkaQTtJrqZOM9Tpv2HK ZvXChwFa1/VVDUg/f4Nyh3tUquPVnrg2zNpac70vRhAUi7CZ8hpGVSeRuy+q36Hhso+h Ks17fIaZ1Z+66/HbPp9dwbic5x4vw3gyVfV98DTntLs57UNkVYUKwuust+xKTjaLKoct 7zQUCFkufCWR85bg3HzsRWlJ42Nostw2IEcGdvH3kk5vn0kj3ZdmlMrn0Ij8qrwefETN THcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gUhHBzqpeqf9laCyRDqe0YTreYPsBAWIdDU1MBCLr1k=; b=l8OjbFv2EIzFcegmme0lfISSpJk74Xl38XDW84nuia6r968kmydrpCrKPT91Z2zuxD wp0X6Zv91fNR7DunXw1pgrNSHxcGVthD0xc/1WK064MWhF/EdG9ZCSsxgkw0Yu2IYCVZ tL5qi8J96A++zniQBH4mK9CXIJasxDNBd+4nWGcXxFIJQAIvN3qmah7yHZvcrmaWRqvj BWxbROD9I1QEY2s+FIPi9W/hP8h9QQaDCLYcajymfQNldWUd9IgydtGiuO/XBNOuQJQq 1QNeM0eFCxuMl3X1vFjM+XISbQ6txBsNZV5fXDgGLOG9cQ/TB2WYXveXzslyU0luaKE8 +vPw== X-Gm-Message-State: APjAAAWm7YHG5DQOiPu2WAOlDNmowYMmjHW8YziiiDm5O7+ugwYU7xKc hvoaPf1cX/L07CDcqXNX80uyVQ== X-Google-Smtp-Source: APXvYqwiKTo2KmlXB88B2iDxqXfGg+cPGIjxT3oac4t0Fb8IeqR1+G3z9dw+lnnW3Vr5Kl66Lss03g== X-Received: by 2002:ac2:4891:: with SMTP id x17mr7657045lfc.60.1561813328311; Sat, 29 Jun 2019 06:02:08 -0700 (PDT) Received: from localhost.localdomain (c-22cd225c.014-348-6c756e10.bbcust.telenor.se. [92.34.205.34]) by smtp.gmail.com with ESMTPSA id v2sm1354500lfi.52.2019.06.29.06.02.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 29 Jun 2019 06:02:07 -0700 (PDT) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Sean Paul Subject: [PATCH 7/7] RFT: drm/msm/hdmi: Do not initialize HPD line value Date: Sat, 29 Jun 2019 14:59:33 +0200 Message-Id: <20190629125933.679-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190629125933.679-1-linus.walleij@linaro.org> References: <20190629125933.679-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190629_060210_502421_7C9BFDC3 X-CRM114-Status: GOOD ( 15.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, Linus Walleij , freedreno@lists.freedesktop.org, Rob Clark , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP After untangling the MSM HDMI GPIO code we see that the code is deliberately setting the output value of the HPD (hot plug detect) line to high, even though it is being used as input which is of course the only viable use of a HPD pin. This seems dubious: GPIO lines set up as input will have high impedance (tristate) and the typical electronic construction involves this line being used with a pull-down resistor around 10KOhm to keep it low (this is sometimes part of a levelshifter component) and then an inserted connector will pull it up to VDD and this asserts the HPD signal, as can be seen from the code reading the HPD GPIO. Stop try driving a value to the HPD input GPIO. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Linus Walleij --- drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c index 89c64cc85027..ecbcd8638b66 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c @@ -87,7 +87,7 @@ static int gpio_config(struct hdmi *hdmi, bool on) struct hdmi_gpio_data gpio = config->gpios[i]; /* The value indicates the value for turning things on */ - if (gpio.gpiod) + if (gpio.gpiod && gpio.output) gpiod_set_value_cansleep(gpio.gpiod, gpio.value); }