Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4437677pxb; Tue, 2 Nov 2021 09:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzB/xI+Sytr470p90Y/fQGmJ+xsTlQZwaT+pOI4I6ZPymAvUQu4afC9O8aqLO7RomtjfErJ X-Received: by 2002:a05:6e02:20c9:: with SMTP id 9mr320448ilq.43.1635871355422; Tue, 02 Nov 2021 09:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635871355; cv=none; d=google.com; s=arc-20160816; b=IIckpDiu5Ajs+ssx1HCGRutpL8Xj4u3ljhGi5haot7DbwQt2d0vVGcqx39/Kogv2CV VQhIDR8tmv0Bq8a1u44hiuTq34xzLVUBmHyQdoHD1yQKmSSMnvk8bKAbFbtcCbrSMldJ 6nqAiVoX9/WgF81Z1Q88ZT7/0Ha0QDwe2ughGbt7Q5FnaUdGDbZAI/jiOhAc5nH69MLg berJL6hMizbkiW6usK8QssQbVtWL/Y4gacM0ILLwA+eYYutfh5bIkkdFT0f/zxAwGBCD c7wDM8iYm2CrYCyU2zF4Zuo1IPhjUXJBWSrrvyZMIA+PhjqqtJC7OQeD/0raDrn1tC+g 9kdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Dk7gtJZIf8x3vKhtXKZKHOEj4aweMrUNlA9C44Zf6nU=; b=AjPSuUm4COP8Jo7l0igGqkUPbjdNcOjASmA2jIvNlxlP2VThfvo2PC/VhlvTqASlEZ Cwz/G9pT9CGSPGCWgkoQOmYcBn43RlRUQsZkQr3utrDNULgFXt5Z5Cv5qZuPuuMyiJrg DfbF3pZWU6+4+6teBVbL1/dx1kSxWYKxWfkp/nic6zWLiUOjUpukiFyB/qjKHLzNQMF1 ZHCb1XTHEkGPdLtJdPAZYfaR3mkeF8HFg9fZ8K5Tc4XeCqvgyWkZ1Uf1zynoQTz/1fVA 7r1CpM/BKZ/p2PBYkObKg3XXzc6/JM4HEOG01qicZYZkL2DErpVaSfKVr+oeLKxcWc6+ jLxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=cqWMTY5M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=raspberrypi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si5769259jaj.6.2021.11.02.09.42.22; Tue, 02 Nov 2021 09:42:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=cqWMTY5M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234662AbhKBQmZ (ORCPT + 99 others); Tue, 2 Nov 2021 12:42:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234665AbhKBQmP (ORCPT ); Tue, 2 Nov 2021 12:42:15 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D3F6C079785 for ; Tue, 2 Nov 2021 09:16:17 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id c71-20020a1c9a4a000000b0032cdcc8cbafso2493275wme.3 for ; Tue, 02 Nov 2021 09:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Dk7gtJZIf8x3vKhtXKZKHOEj4aweMrUNlA9C44Zf6nU=; b=cqWMTY5MJJwXi/lOFXC3vCIcbszW5fflGtz43DsvZLPKsdSxiqApa0wwvoK2yKSz/F DPRrWb9YZesKfdQf2/Oyp85SNhzZ69Zi5I+LTrFuVolojhuwmLKazUyFbavizDyrt0TL rlMXQgBiu1uHFBnyyuD9IKomgFj0gJvT0NuSf8pSJW4ZYPDW/0l4freXzseSVgiWVIEg riqGJ7kWwyy/ZRo1S56rfZ8fulGudesmBjcoamz204qznCs1TVnezaagmlqO1oPJ1XaT 1ggUgUSkHgGxfyyvGuSxLu7z/HsNXlh8KLhbP3d9qKCI9pAYdXS3X419gt/dkAoINcvB D5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Dk7gtJZIf8x3vKhtXKZKHOEj4aweMrUNlA9C44Zf6nU=; b=qvx8NkERdTc7JrTG46dePvD7EJ1apjJllybdFUWaLJgEJQa2TsfCyquF4u8srHXI/i OqCPD1ZMbIhSnOcQE8sS6ktTGOtPYdpt/tE7Ztjkvc90gYT796GGKWEaUMQ2i9BSXAai z0RYMWZK7DMhMTC3KkzGPec8uuDSI4GMC7wi6vnf03+NTJxhdwv+mwIf5a0ewjRnXlBB thZT5Glp5LaDSMd4cNjvPxKEpWcgXspVYkRoVOe6zY60R030hvcNdRrEbsoVJEpcSGBo q2xq5mD23E3Rbn+3blQLjqufx9DqB/7GpUS/ak9v2dN54uM0ytbAcJ2Z9btUhNWhJCvr XIig== X-Gm-Message-State: AOAM531rgLtoQLFpWjdzLYJ+qDcwyIlmM8/dnCNw0VPI/p5N4bhBF8Sh NvjXI5qyGmT48ks5crO3021ro7JyEJyY0YYF+b4r3A== X-Received: by 2002:a1c:2507:: with SMTP id l7mr8374133wml.144.1635869775698; Tue, 02 Nov 2021 09:16:15 -0700 (PDT) MIME-Version: 1.0 References: <20211025152903.1088803-1-maxime@cerno.tech> <20211025152903.1088803-3-maxime@cerno.tech> In-Reply-To: <20211025152903.1088803-3-maxime@cerno.tech> From: Dave Stevenson Date: Tue, 2 Nov 2021 16:15:59 +0000 Message-ID: Subject: Re: [PATCH v8 02/10] drm/vc4: hdmi: Fix HPD GPIO detection To: Maxime Ripard Cc: DRI Development , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , linux-rpi-kernel@lists.infradead.org, LKML , Maxime Ripard , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, Emma Anholt , Phil Elwell , Tim Gover , Dom Cobley Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Oct 2021 at 16:29, Maxime Ripard wrote: > > Prior to commit 6800234ceee0 ("drm/vc4: hdmi: Convert to gpiod"), in the > detect hook, if we had an HPD GPIO we would only rely on it and return > whatever state it was in. > > However, that commit changed that by mistake to only consider the case > where we have a GPIO and it returns a logical high, and would fall back > to the other methods otherwise. > > Since we can read the EDIDs when the HPD signal is low on some displays, > we changed the detection status from disconnected to connected, and we > would ignore an HPD pulse. > > Fixes: 6800234ceee0 ("drm/vc4: hdmi: Convert to gpiod") > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index 338968275724..dde67b991ae7 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -190,9 +190,9 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) > > WARN_ON(pm_runtime_resume_and_get(&vc4_hdmi->pdev->dev)); > > - if (vc4_hdmi->hpd_gpio && > - gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) { > - connected = true; > + if (vc4_hdmi->hpd_gpio) { > + if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) > + connected = true; > } else { > unsigned long flags; > u32 hotplug; > -- > 2.31.1 >