From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBAEDC2B9F4 for ; Mon, 28 Jun 2021 12:43:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55AF561C72 for ; Mon, 28 Jun 2021 12:43:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55AF561C72 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82C296E44B; Mon, 28 Jun 2021 12:43:05 +0000 (UTC) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5403A6E44B for ; Mon, 28 Jun 2021 12:43:04 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id C46A7580500; Mon, 28 Jun 2021 08:43:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 28 Jun 2021 08:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=d1cVQ0LxAMAyJ nyzxDwgjfC8fCmMvT2orOgAt0w6ISY=; b=WBC92/WnNTMznzvkJKMgehGHX2Rm/ 8JIapVtYWSkCTiOEiUwl+D8SGwtmUrjCpJagTIVVE2RutKSqd2LmK0SW8yk9agPb omCpQ23MNmUs7N8SkOzhEKVqNdtbFSjyGeDiGRhv6EH+qtss37JpsirwlkCc2EKw zZ5Dk9j9IWjZDkdvHk1zrt6bFV700Osur/ZV7niZtXBSMT//wfZCd/xRK5vo49G5 YgyuAWLmS3SNIw+72TIcKKAvfmM7YZibReRj7sLWnXLY0b3yP/ibCj4ekOoX4nE+ fLgGXBjTvpiSjcrUmjLcLYge8ZD1TOJxz1L+SbA9vFeSpnuOEkQDJDPvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=d1cVQ0LxAMAyJnyzxDwgjfC8fCmMvT2orOgAt0w6ISY=; b=OrOohehL Wo5w2uEmtxjp5MLxnV2fOkTWQTIqJ7YeMD/6z5ixI4bpEiHCVpDrAjmFLRtkQg0D bXrQzdodGGJmzqsvMiKYHwzB1oDObqJNWxa8Fm8RVd5lYkyy0974BvtATzk9ACcB /acvdgjxsjLhUYchytwz4c3U0p0ijf8r2fZTYa19ysTrfk5rcIx5ErJkGgxjiTD5 3y3LSgxEWfoqbHZmnzrZukV/LtBxYd0C2SBx9qLfjgJkmcKOY0jEX5qed34qtLxU 8CPZlKnuFpxmCIilaR7AoY5kX5e5Df+X4KL49aGgtwXPLqOOkHN+JeJmimtPZEyE s7fAmqO6BpGmaQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeehgedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Jun 2021 08:43:03 -0400 (EDT) From: Maxime Ripard To: Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH v5 01/10] drm/vc4: hdmi: Remove the DDC probing for status detection Date: Mon, 28 Jun 2021 14:42:48 +0200 Message-Id: <20210628124257.140453-2-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628124257.140453-1-maxime@cerno.tech> References: <20210628124257.140453-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Saenz Julienne , Dom Cobley , Tim Gover , Dave Stevenson , linux-kernel@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Emma Anholt , Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Commit 9d44abbbb8d5 ("drm/vc4: Fall back to using an EDID probe in the absence of a GPIO.") added some code to read the EDID through DDC in the HDMI driver detect hook since the Pi3 had no HPD GPIO back then. However, commit b1b8f45b3130 ("ARM: dts: bcm2837: Add missing GPIOs of Expander") changed that a couple of years later. This causes an issue though since some TV (like the LG 55C8) when it comes out of standy will deassert the HPD line, but the EDID will remain readable. It causes an issues nn platforms without an HPD GPIO, like the Pi4, where the DDC probing will be our primary mean to detect a display, and thus we will never detect the HPD pulse. This was fine before since the pulse was small enough that we would never detect it, and we also didn't have anything (like the scrambler) that needed to be set up in the display. However, now that we have both, the display during the HPD pulse will clear its scrambler status, and since we won't detect the disconnect/reconnect cycle we will never enable the scrambler back. As our main reason for that DDC probing is gone, let's just remove it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 4ebe216b10a9..b8b371abf3d7 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -170,8 +170,6 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) if (vc4_hdmi->hpd_gpio && gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) { connected = true; - } else if (drm_probe_ddc(vc4_hdmi->ddc)) { - connected = true; } else if (HDMI_READ(HDMI_HOTPLUG) & VC4_HDMI_HOTPLUG_CONNECTED) { connected = true; } -- 2.31.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E556C2B9F4 for ; Mon, 28 Jun 2021 12:43:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3738F61C76 for ; Mon, 28 Jun 2021 12:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233007AbhF1Mpd (ORCPT ); Mon, 28 Jun 2021 08:45:33 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:53295 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232556AbhF1Mp3 (ORCPT ); Mon, 28 Jun 2021 08:45:29 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id C46A7580500; Mon, 28 Jun 2021 08:43:03 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 28 Jun 2021 08:43:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=d1cVQ0LxAMAyJ nyzxDwgjfC8fCmMvT2orOgAt0w6ISY=; b=WBC92/WnNTMznzvkJKMgehGHX2Rm/ 8JIapVtYWSkCTiOEiUwl+D8SGwtmUrjCpJagTIVVE2RutKSqd2LmK0SW8yk9agPb omCpQ23MNmUs7N8SkOzhEKVqNdtbFSjyGeDiGRhv6EH+qtss37JpsirwlkCc2EKw zZ5Dk9j9IWjZDkdvHk1zrt6bFV700Osur/ZV7niZtXBSMT//wfZCd/xRK5vo49G5 YgyuAWLmS3SNIw+72TIcKKAvfmM7YZibReRj7sLWnXLY0b3yP/ibCj4ekOoX4nE+ fLgGXBjTvpiSjcrUmjLcLYge8ZD1TOJxz1L+SbA9vFeSpnuOEkQDJDPvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=d1cVQ0LxAMAyJnyzxDwgjfC8fCmMvT2orOgAt0w6ISY=; b=OrOohehL Wo5w2uEmtxjp5MLxnV2fOkTWQTIqJ7YeMD/6z5ixI4bpEiHCVpDrAjmFLRtkQg0D bXrQzdodGGJmzqsvMiKYHwzB1oDObqJNWxa8Fm8RVd5lYkyy0974BvtATzk9ACcB /acvdgjxsjLhUYchytwz4c3U0p0ijf8r2fZTYa19ysTrfk5rcIx5ErJkGgxjiTD5 3y3LSgxEWfoqbHZmnzrZukV/LtBxYd0C2SBx9qLfjgJkmcKOY0jEX5qed34qtLxU 8CPZlKnuFpxmCIilaR7AoY5kX5e5Df+X4KL49aGgtwXPLqOOkHN+JeJmimtPZEyE s7fAmqO6BpGmaQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeehgedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Jun 2021 08:43:03 -0400 (EDT) From: Maxime Ripard To: Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-rpi-kernel@lists.infradead.org, Maxime Ripard , Emma Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Eric Anholt , linux-kernel@vger.kernel.org Subject: [PATCH v5 01/10] drm/vc4: hdmi: Remove the DDC probing for status detection Date: Mon, 28 Jun 2021 14:42:48 +0200 Message-Id: <20210628124257.140453-2-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628124257.140453-1-maxime@cerno.tech> References: <20210628124257.140453-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 9d44abbbb8d5 ("drm/vc4: Fall back to using an EDID probe in the absence of a GPIO.") added some code to read the EDID through DDC in the HDMI driver detect hook since the Pi3 had no HPD GPIO back then. However, commit b1b8f45b3130 ("ARM: dts: bcm2837: Add missing GPIOs of Expander") changed that a couple of years later. This causes an issue though since some TV (like the LG 55C8) when it comes out of standy will deassert the HPD line, but the EDID will remain readable. It causes an issues nn platforms without an HPD GPIO, like the Pi4, where the DDC probing will be our primary mean to detect a display, and thus we will never detect the HPD pulse. This was fine before since the pulse was small enough that we would never detect it, and we also didn't have anything (like the scrambler) that needed to be set up in the display. However, now that we have both, the display during the HPD pulse will clear its scrambler status, and since we won't detect the disconnect/reconnect cycle we will never enable the scrambler back. As our main reason for that DDC probing is gone, let's just remove it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 4ebe216b10a9..b8b371abf3d7 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -170,8 +170,6 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) if (vc4_hdmi->hpd_gpio && gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio)) { connected = true; - } else if (drm_probe_ddc(vc4_hdmi->ddc)) { - connected = true; } else if (HDMI_READ(HDMI_HOTPLUG) & VC4_HDMI_HOTPLUG_CONNECTED) { connected = true; } -- 2.31.1