Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1055047lqt; Tue, 19 Mar 2024 11:15:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1dLSCBtTjpb2qI3pyhs6tyqEC3UIOJyBMtgVZmjxo2PuXR5F/P/sMydPkpP1YH2VzKR4RbSNpYtvhjPJ0S7nKtOcbugevZphR7b8jhg== X-Google-Smtp-Source: AGHT+IFUGwZUyhg51k07NykHN0eWevv8hJ40b+XZetFB3kK2WdnlHm7/NDMsjwl4ySsd3v/cwSct X-Received: by 2002:a05:6a00:b84:b0:6e6:f9e1:fd07 with SMTP id g4-20020a056a000b8400b006e6f9e1fd07mr15380863pfj.10.1710872113965; Tue, 19 Mar 2024 11:15:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710872113; cv=pass; d=google.com; s=arc-20160816; b=GSHrFBKJO/ITEQbKZPyR8bKN8+GZi8iDC8M3EYcMP2rPkLWC9Axl61qc0tCzKR0lHW 2taU45y1+nEKkEuKExI3m3VmQOyN7KXB32YLsxRoziIHEhR5vHlmPHXNenwqZlPXBKHb /is0cFeFpjKsrtgksgOIgRrzUHEfDhIrTlzEdFKxb2GRuLsKxNq5JNRpV94EXgEGPW9A y6moJ8GkNnbofK0/BhGVWiE5tLl9jtd4OcRv/mcRDZY59fY4InkmEipbJf+h3VCJR+3J 5c/H/bJgOgiIivEgdwfr5LEj15+YPKi5frS0pIRytZJpW6Z0wDRDIInfNefZeU8HEv2R K6pA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=KcaIci4ngfZq5XN/VP6t9YI7Rpj+hyL5AivE9QQ6SzY=; fh=HJTrnBrRmyFfHAB/aila46Qal+PG9GypTg1nGwmKbnk=; b=goVaCm1FlpfJRx4Lka2e9TwF5pOp9ybkBLifGBsEy1aOympg2Ynel9g8TfKcj91zDD UlofxyskKdakP6Q1k+lUrPvq9YLuXizY3en/w/Xp72/CVYG8e8vbuD/6d1IB56zKEM/K DSypUDT2CGn4YEyXIbDnDI1i0gcNZ8LWnocdFvU3TL9n5fUsfnTq1sbxhivVeTt5MYeo ABF/KxwMJk0MKT6ccH8nITqrpHkN8jGGhmaSSzrKn8Fq8oNKORVmbpZu4RrhHWt+yvcs h/atYsGfByXrypSK6dgl4udbr7GZ4ucuAKtHJryC44GhdxJT6B8c8mXa7kg3WmWvkd7I 9Iqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lwvabqTY; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-107988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b2-20020a056a00114200b006e69fe83fcfsi12015431pfm.149.2024.03.19.11.15.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 11:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lwvabqTY; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-107988-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107988-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A17672821E3 for ; Tue, 19 Mar 2024 18:15:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A73FE2C6A9; Tue, 19 Mar 2024 18:15:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lwvabqTY" Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (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 C7BAB2E64F for ; Tue, 19 Mar 2024 18:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710872108; cv=none; b=ZjQAx7EY0gRyBRG/SfRJLwUpFefW2X0VAMU2DsPNVvwF3osOAcutIhi6O1BH4ULEEC4uMMf/0Xo/HxKptbZpuUA3ZGUXRd0+dJGY86KC6/murJv8VOTVm5fps3Fh3+drEBhFzT7aA7GnxmcrYxIuq0lInC2C0vqwx4IEezIOCY8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710872108; c=relaxed/simple; bh=RZ6lEH7cyONfShml37mNV7nkIh1YCuPRnlSy8js1sI0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=B48pomqlWkt+tI/gIkpIaCQztibBFdNNxxv3pAEmJuEVdXZ+wC7EXYkUAg2b+0PJKX4HwRhN2i/qFQTUitP5O+g/DAaYkoYV9gg1tqKXOFHzy47I25k5gy/TBx8ZXhQ1X1kCUT7wBg3KmdxAgYLdb5I2cZe/FPtZ87+ppFSP5wk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=lwvabqTY; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6e6aa5c5a6fso5630413b3a.0 for ; Tue, 19 Mar 2024 11:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1710872105; x=1711476905; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KcaIci4ngfZq5XN/VP6t9YI7Rpj+hyL5AivE9QQ6SzY=; b=lwvabqTYB2uGZDeXat4J1UARbEGbLbcCygKCe1JN4eJSYR9c3EDQzySbscjs8pcQp7 k3Yzf0FzsSZ7DZfMS59Siy+IglMN/nua7OnC6WC3rj+RIATSKYNSMlnaHtonD6gORBi/ sKmU5zDFtM0rqku4yEUhxDgjd2l3e98l1dNk4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710872105; x=1711476905; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KcaIci4ngfZq5XN/VP6t9YI7Rpj+hyL5AivE9QQ6SzY=; b=k5fAo1+YvS956i9fuD19elQ7oeN1Ro8jOGzGPjc7J0ywjkM7ky25kLkm5n+S6AABy9 jp/ap1o7gK3nsgRi31PBohtKBigWcZc5Caf7L2qlepfSv9pJB/ci/8OFBgMMgwTeoXcm 9Q4aemH2s90oarmIUEDW/HltK6OUoX8weqLgZDpIodHbH3n2dhDHyGUt2JzAuPf0YAur 1AzBgO6GSYTKQUHnjliS3HhTbqNAN19fJVnMU7qBXhqiB6is501Kd0qWOsvx3320mQSI qx7doqaRx7PEJdQ8c9Tjj1uV1m7brEuQfMfd8TRF2lNA8JLUUHvoqAJTVhXklt9lK51X XzCg== X-Forwarded-Encrypted: i=1; AJvYcCXen4iwDHGCnv7hVoipSsN8KGV9CTWa9g+R4MMN+jdoSxaV+JaKGP7de5EnsQ3URxIiZhhyxfhtO0WzKpvEKvkiYJwm7fAb2JNehMU/ X-Gm-Message-State: AOJu0Yxzsq2BImQFMRlrTEDwOKwcKjC4CO/yK2bZPH7je5bsH1yaS/kV c+wUiVLWpnKGp0LczmcGMpoXWF/eYoie5U6QGfSy/pYljZQeVWDTaXi5MMCmMw== X-Received: by 2002:a05:6a20:1594:b0:1a3:6817:1b02 with SMTP id h20-20020a056a20159400b001a368171b02mr5885140pzj.55.1710872105015; Tue, 19 Mar 2024 11:15:05 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:f4b6:c22b:c130:6c79]) by smtp.gmail.com with ESMTPSA id by24-20020a056a02059800b005e49bf50ff9sm8176006pgb.0.2024.03.19.11.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 11:15:04 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Abhinav Kumar , Dmitry Baryshkov Cc: linux-tegra@vger.kernel.org, Mikko Perttunen , Jonathan Hunter , Thierry Reding , Douglas Anderson , Ankit Nautiyal , Daniel Vetter , David Airlie , Imre Deak , Jani Nikula , Maxime Ripard , linux-kernel@vger.kernel.org Subject: [PATCH] drm/dp: Clarify that wait_hpd_asserted() is not optional for panels Date: Tue, 19 Mar 2024 11:14:35 -0700 Message-ID: <20240319111432.1.I521dad0693cc24fe4dd14cba0c7048d94f5b6b41@changeid> X-Mailer: git-send-email 2.44.0.291.gc1ea87d7ee-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In response to my patch removing the "wait for HPD" logic at the beginning of the MSM DP transfer() callback [1], we had some debate about what the "This is an optional function" meant in the documentation of the wait_hpd_asserted() callback. Let's clarify. As talked about in the MSM DP patch [1], before wait_hpd_asserted() was introduced there was no great way for panel drivers to wait for HPD in the case that the "built-in" HPD signal was used. Panel drivers could only wait for HPD if a GPIO was used. At the time, we ended up just saying that if we were using the "built-in" HPD signal that DP AUX controllers needed to wait for HPD themselves at the beginning of their transfer() callback. The fact that the wait for HPD at the beginning of transfer() was awkward/problematic was the whole reason wait_hpd_asserted() was added. Let's make it obvious that if a DP AUX controller implements wait_hpd_asserted() that they don't need a loop waiting for HPD at the start of their transfer() function. We'll still allow DP controllers to work the old way but mark it as deprecated. [1] https://lore.kernel.org/r/20240315143621.v2.3.I535606f6d4f7e3e5588bb75c55996f61980183cd@changeid Signed-off-by: Douglas Anderson --- I would consider changing the docs to say that implementing wait_hpd_asserted() is actually _required_ for any DP controllers that want to support eDP panels parented on the DP AUX bus. The issue is that one DP controller (tegra/dpaux.c, found by looking for those that include display/drm_dp_aux_bus.h) does populate the DP AUX bus but doesn't implement wait_hpd_asserted(). I'm actually not sure how/if this work on tegra since I also don't see any delay loop for HPD in tegra's transfer() callback. For now, I've left wait_hpd_asserted() as optional and described the old/deprecated way things used to work before wait_hpd_asserted(). include/drm/display/drm_dp_helper.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/drm/display/drm_dp_helper.h b/include/drm/display/drm_dp_helper.h index a62fcd051d4d..b170efa1f5d2 100644 --- a/include/drm/display/drm_dp_helper.h +++ b/include/drm/display/drm_dp_helper.h @@ -422,7 +422,13 @@ struct drm_dp_aux { * @wait_hpd_asserted: wait for HPD to be asserted * * This is mainly useful for eDP panels drivers to wait for an eDP - * panel to finish powering on. This is an optional function. + * panel to finish powering on. It is optional for DP AUX controllers + * to implement this function but required for DP AUX endpoints (panel + * drivers) to call it after powering up but before doing AUX transfers. + * If a DP AUX controller does not implement this function then it + * may still support eDP panels that use the AUX controller's built-in + * HPD signal by implementing a long wait for HPD in the transfer() + * callback, though this is deprecated. * * This function will efficiently wait for the HPD signal to be * asserted. The `wait_us` parameter that is passed in says that we -- 2.44.0.291.gc1ea87d7ee-goog