Received: by 2002:ab2:6816:0:b0:1f8:1780:a4ed with SMTP id t22csp33596lqo; Thu, 9 May 2024 10:24:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXn9uHXTxK9NYbOKSEU/8EfN1xAR2IShwVzTjlMNIEFGLeEy3+XcU+vi7r/gT17Zc5ST4410ow3gtTwxfwWdTu0Ay+NIR1btpFsko2rug== X-Google-Smtp-Source: AGHT+IF+OcQTbrQ3UGIGdvPKwLFaVVoHj5ZivIhJkr3EVKaC9ZoJ4Z4iOvAS3ZtUJWTQM/c+p8Ck X-Received: by 2002:a17:903:22c1:b0:1e2:a5db:30d1 with SMTP id d9443c01a7336-1ef42e6d9b5mr5227305ad.13.1715275469849; Thu, 09 May 2024 10:24:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715275469; cv=pass; d=google.com; s=arc-20160816; b=MHUrMGyAWpS/pzlTWXpKGAJoF8WqtPHir9lFuVl701Mmyud8leDLLzSQ+HeziE5Vbw 11Y/ah6AAe3CYb/9nx/TlUAQ5FKIupV3LPS06h+wBR78Wi78/PamIjemvRiyWIyT8y0x 3K0+gopN3Qas/Oj3pSr4qOVzCrP5JpLacteOqlgzt0SOgttSHuK9W1PgAmJfydVFplUT Vb7cIdKacJd+x1gnCfE24qDR6cEYT4QuXn0E7wQuIZGJDlGJHZ1rjmIqDtKWktCDaSsc k+79U2gftN9goiOmXwpznX4j+LztrOn0w8QpkBLQ4jvVrcHqyFNxf2QbAfuPoKbf4Jhh Ccow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=GJd+PuqR17Eq0A33REJzZo/D4RiASDpPnK9j9wlnmj0=; fh=g1hunpUYn7pglW+x76XclNZxsSYTg3QvOjYLdfuRHKM=; b=VaWzzE02hGsFnO/W7x1FxCmR/fzlHtU9hfkB21j0GrTpC7cYT3AxbfsvXS8ILCEYqO C/CD1UicKuZaLVr884Die/xYrtBwcYBXTPS4fMefu2W5GczAGgNTtw13Uy2fJc8qP8Xa enlDx/c4tA+QX6RGZ32TC/OukbA3GppPxtoeOLdnjiZjdnvQa+zd2B8UQ5aBYXED69cM JQOPUEN0CManUvE4qo9wvkMbP/Guo7Gq6TtS242nTVAraLTXbsfMpb9JekcUW5mpmv3f jBmMzjwi/98n0dBQYaZTmq1Uy/9NdXVSLmJeI6ou4QdoHrF78l0SA+pfMp8IiDRhW4gl 00iw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H4IDdgAB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-174728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c13f972si11217005ad.470.2024.05.09.10.24.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 10:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H4IDdgAB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-174728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id AE295B2165E for ; Thu, 9 May 2024 17:24:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 70F3610A3F; Thu, 9 May 2024 17:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H4IDdgAB" Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 62040111A2 for ; Thu, 9 May 2024 17:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715275459; cv=none; b=sAVDm7ADoJFKAW/SCpCU5gzNRUqtbsE9yiruP82zs+am2e55ebfb+vTYkzeQaaB7WQqTg2sRVvcsQP5T4Jc7kyK2+JXRwDL5G5Z4YAJKEuTBQAWY+H/qnpM71ANh7Q0FndGMxR9ah25sfZjxSTVdXabQwOi/ExEffodrSBBhboc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715275459; c=relaxed/simple; bh=wYTJaF8JxZfB6p9pfrZ9UzFnXVfNFMMSBvDLM2/Agrw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=q9LX9dtDPNdKQ0cIo0wEDGBj4GjMD6dB5AOsQmMQqQ7LzHY9cvkr1BGK0C1Tv8E6PAPrVEO+RDfRfXoAcwLufKfa+QKkZRiD/0Cs7S/mISQenZrWU9AGS/dLYGZZyUdMtpt05LsMrhbDm4Okmf5itlH6FnbBbDA1qxuBfVZcepg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=H4IDdgAB; arc=none smtp.client-ip=209.85.217.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-vs1-f42.google.com with SMTP id ada2fe7eead31-48071b76e48so291561137.0 for ; Thu, 09 May 2024 10:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715275455; x=1715880255; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GJd+PuqR17Eq0A33REJzZo/D4RiASDpPnK9j9wlnmj0=; b=H4IDdgABBN0yQ8EnKqAciIg5/9mM7CYvQTVg5E7K93Ijk4CA8wl7RT+ZjOP2Y0fxJr nk3TBLYmJoeK2etE5cTBZKvgG68jX4Eb3MbbTozJA+ooPX3l9dcFLjgaZ7567gFzyr89 T9NnrD7k2qEYxjYOcBrxKq5Ufxeeo6tD4dnSe8TlaVCf23d6WVPxKojJOR9ElKlVrVu3 b5ukslgdKKn+i73a/a5Qh18TDVEqXjH0ioe9E5dmrkVfEYp5pbcesZLG2EoucLfn10Tt VvHlp5gXt1rgnpUfZMXoOsgEQqYORpxaLGzWtnNqvrMBmUlVdPPsn9yA1o50RetK04zP +N1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715275455; x=1715880255; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GJd+PuqR17Eq0A33REJzZo/D4RiASDpPnK9j9wlnmj0=; b=YYmo6Za7gKGI2rVfB2Yb4qbvWDrxbVCNjr2jDdO6eB+l1Y+iaXTNsi2Ci0G8pqMy6F thYZp8/6LuZermiKqP+SN3cisaVrCDxCo9ynUKIBPLVS9c4oJQ7k1iiZr8R3PICF0sZk PTHjMMJpejG6irAwiqYyGxxt7stnBgJOQGju9C1PbYyPe6qeKSfBByQzH7vhnSDceSCq L/7hXvN90ZaG9b4s9SpyB2l5/BBWTVOKbW7/tYHi6LFXZP0nlhxa8Xu+FJcLKwQCqnjL RJzI7sns7LTOkvzl1R9plu89zNFZDqHhmwAduI1VKXYIUnCtc/AgZqnTzUjZoQeeUCNP wLfw== X-Forwarded-Encrypted: i=1; AJvYcCV0ZIQ47pVRqSsxZMzs4Iy7wLbbGaGyh3OB6+HSm1RBzyq7vX/MSNBImNa/Imp9/ZVHJmP18mEtfBjEjXh/HiXZkCupCB+3D6FMAX4i X-Gm-Message-State: AOJu0YzUlwsgS+7LFjknc+MXREB3gGNbvrGuSsfhjgR+yubJ1XQdFckw GXcCnng+QHPFiZoEGnrxE6OZnHroqaxs2WmVVL8RLTiktekH+Xu7l7RPNWKl6mLpBi+GBY9YBBg L/6dar28iNv5oXRdtuVAOi4kfi+Q= X-Received: by 2002:a05:6102:162a:b0:47b:9844:8f8 with SMTP id ada2fe7eead31-48077b68500mr680273137.6.1715275455196; Thu, 09 May 2024 10:24:15 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240509085758.123046-1-oushixiong@kylinos.cn> In-Reply-To: <20240509085758.123046-1-oushixiong@kylinos.cn> From: Alex Deucher Date: Thu, 9 May 2024 13:24:03 -0400 Message-ID: Subject: Re: [PATCH] drm/radeon: Delay Connector detecting when HPD singals is unstable To: oushixiong Cc: Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , David Airlie , Daniel Vetter , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Xinhui.Pan@amd.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, May 9, 2024 at 4:58=E2=80=AFAM oushixiong w= rote: > > From: Shixiong Ou > > In some causes, HPD signals will jitter when plugging in > or unplugging HDMI. > > Rescheduling the hotplug work for a second when EDID may still be > readable but HDP is disconnected, and fixes this issue. > > Signed-off-by: Shixiong Ou Applied. Thanks! Alex > --- > drivers/gpu/drm/radeon/radeon_connectors.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm= /radeon/radeon_connectors.c > index b84b58926106..cf0114ca59a4 100644 > --- a/drivers/gpu/drm/radeon/radeon_connectors.c > +++ b/drivers/gpu/drm/radeon/radeon_connectors.c > @@ -1267,6 +1267,16 @@ radeon_dvi_detect(struct drm_connector *connector,= bool force) > goto exit; > } > } > + > + if (dret && radeon_connector->hpd.hpd !=3D RADEON_HPD_NONE && > + !radeon_hpd_sense(rdev, radeon_connector->hpd.hpd) && > + connector->connector_type =3D=3D DRM_MODE_CONNECTOR_HDMIA) { > + DRM_DEBUG_KMS("EDID is readable when HPD disconnected\n")= ; > + schedule_delayed_work(&rdev->hotplug_work, msecs_to_jiffi= es(1000)); > + ret =3D connector_status_disconnected; > + goto exit; > + } > + > if (dret) { > radeon_connector->detected_by_load =3D false; > radeon_connector_free_edid(connector); > -- > 2.17.1 >