From nobody Fri Dec 19 17:16:12 2025 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 E342D1FCF66 for ; Wed, 8 Jan 2025 14:32:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736346730; cv=none; b=OMccXy7kJ6XlrYtKstmtZH6gxxND3FD7CR6sz7rk2LUNFiYcVY4UmZOi1ww1ZlCBW+Ui/cJDNvOPo8N/wC+TIuTzExMZtIc2dCIzLhfipoBckO/EyAV0tMf97ps5p25sUCEbgMLpCzrq/ajQcA8iHr1tuuYBEAt+ezmeMICOmfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736346730; c=relaxed/simple; bh=zSpYhtCfdoGV8lx5sZ6QJCKOEoZaxgqNtvMuGie1uZU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=byIioD1+Z+M2N7tRMEyHx1LNaYI73u9JTZRW83KKY/p0BYquu6QVWxP73OY9VmU529ZJOC0kAG2+Vv0jwpxlYImWagB5ZO9+qvBcCoEHfPdYBvCtAadoQiAOJjgDIIY9mPGPeX2WCUsDmOVdLCTA2kAzkfF01DEqySguCq+J8Uk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=cuQti48p; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cuQti48p" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4361f796586so172739395e9.3 for ; Wed, 08 Jan 2025 06:32:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736346727; x=1736951527; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8ja7AsPHVhh/ztffyEqltS3S3NOI8MWwC75cFS3zUfQ=; b=cuQti48pvFfPNJ51MW+ys0Ku+Au5RddvLtGLwQcNs8E1sm71Pjy+9rrMoQr9w2jMF1 ctTX9oceFt0c5OwRE4yjW7f+9GJXrHtqu3BeowwsRC3nHF8eEJkCqekRdiLBOL94Rk2t q92xYFEueEkj38MrmlgLMwEq2qIYmK1jDcuFh7br9o6u4rFGbRGTrnQiNBKFjmDuNd9e 9qE7BTrRdNNis4KJPuUz6yNwWZT1H/5qbupPvByOpJ1lJ2+Dn9Y1yuBJTgmqyFE3r1SL K/mFMQe2otj5kMiCI8eRpFmwukc3yGRIFtnB8EpHjLJWRKt9Bs1LTqp7RynzekADEnWV i6ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736346727; x=1736951527; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8ja7AsPHVhh/ztffyEqltS3S3NOI8MWwC75cFS3zUfQ=; b=tFeXwyr3/MInpZe0dLu0zY2p4ylySfteHoqB4M4Olt1KicPLGw/TU4rSwlihv7s00G 1QXuJuj2B3qAaJMoGhu5xjZCDOzrJ7rbQH7SxGFhEgJwOeVl6uMgV8ZNnwup8bFeXkhs BnZT2w61vXbuQo3FQZBGhE7wI9AP7A3Bha8uKsuopA/DEwZSY93BEFL+PBYNntel6aaG e8qazG5yZjNJSwGLK+KuV5IMnEbWwqIclbqlVMXcFjP6vHbRa4k33kXfGlaNcXFb6JR0 sPkGt06wO/1WW8+zsD/8aos8n11vl8Q1pKH3ZVdyIoh83m8qIy4q1hIphwCJOTNCd2E1 xmmw== X-Forwarded-Encrypted: i=1; AJvYcCX0KysWxFeXOtCjUvEQrYGurgQCxtddiOfjH7SkQFWpZvDQw4agOsRE5uvrI7vqU8IYKhlwg6qg1maNU4o=@vger.kernel.org X-Gm-Message-State: AOJu0Yyju2KIW/LUp8VWmiubftAnXBwVIh3m8PnlZKegB889Wt3oWkhG J6HjAMneZPmo/I6Df4KuH+3iN9j4EFXloNXE9isqj81H0VPcEoqjd/a/T7BDEj0= X-Gm-Gg: ASbGnctLv7SbUFo3UdaKAN7TAVhSe83/5jZiKRZ0MEMj9zxtamUxDP0k9IEg70r2nFD wjUmK6t7l2sNAQE8TbVy9q6iORuIKDyLysYCvzM9hNCU/z/D+RLjiGnN7odl3w8Bo5rEZ37SZE9 e8dmRXmvZDv5cWrvKlJz1a3pkJpK8UylqQgphC8spWUW3m+3e9/H+UHMBSwpSKmt1rSf96Jj6qA vh0CC1MqZvmt2lVPqDb39Gk3KRhZdviR+0TlR/ZJVX1JkpRlM36Cbyt X-Google-Smtp-Source: AGHT+IEeHzOxvdMOGmcpEKHTmCQ1xR9X2mBdhrRAs090fw105gW9jWt3zL5YMm4BKVnJtfcnbPIJ6g== X-Received: by 2002:a05:600c:1c1d:b0:431:4f29:9539 with SMTP id 5b1f17b1804b1-436e26fbaa6mr23365835e9.32.1736346727258; Wed, 08 Jan 2025 06:32:07 -0800 (PST) Received: from [127.0.1.1] ([86.121.162.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2e89e14sm22741445e9.33.2025.01.08.06.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 06:32:06 -0800 (PST) From: Abel Vesa Date: Wed, 08 Jan 2025 16:31:44 +0200 Subject: [PATCH v4 2/4] drm/nouveau/dp: Use the generic helper to control LTTPR transparent mode Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250108-drm-dp-msm-add-lttpr-transparent-mode-set-v4-2-918949bc2e3a@linaro.org> References: <20250108-drm-dp-msm-add-lttpr-transparent-mode-set-v4-0-918949bc2e3a@linaro.org> In-Reply-To: <20250108-drm-dp-msm-add-lttpr-transparent-mode-set-v4-0-918949bc2e3a@linaro.org> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Karol Herbst , Lyude Paul , Danilo Krummrich , Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten Cc: Bjorn Andersson , Konrad Dybcio , Johan Hovold , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Abel Vesa X-Mailer: b4 0.15-dev-dedf8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1634; i=abel.vesa@linaro.org; h=from:subject:message-id; bh=zSpYhtCfdoGV8lx5sZ6QJCKOEoZaxgqNtvMuGie1uZU=; b=owEBbQKS/ZANAwAKARtfRMkAlRVWAcsmYgBnfoxd1zaADCiqyAG6sqqGiZaCSMDvAko7Z/RAB qnzYaAuP/uJAjMEAAEKAB0WIQRO8+4RTnqPKsqn0bgbX0TJAJUVVgUCZ36MXQAKCRAbX0TJAJUV VsotEACKVYOAT4FX0Zl5/UtLfxszK6yqfSpvZBETDmfriJH3iARfEmyFCwzxT5krleGndSDwyWo muThvi9bmeveOffXwjS8yLtngaQQXm823SZWXLksm4rnDrgYtt8neXuYFKlkIwT7bLnydJ0DaJN JHTd3qWl1JqaA2voGitbWcjHGm+pQsyLr2qPugi3oVy0SbKleIX4uOHpcF/bie7veTJF4NIZIwn 78+SUdHeJnvW0KMTl+Lx3YB+0kuMf0lzwSSFNiMZh8gAngpJQRE83FncDSI9g3RDXdaIX1VHmZ5 cx/PkZKSloNzdooFCZWaHCeEShwsSeLD2xPGWA9JRf49cKwyEso50jtquK264rKvDzrAAvWV2QT 6XXoLhrTkffqBoOqgbrc2WQbCpi2K6lIsWiqcKWPqfpr3XSUYpRNbvq+b0xwy42+D+LgpfbhUXJ dpM7NrjpU5qwl3BcPEHj+6IrytmW2bX4R5o9NArIQIi1rxnExJtr5XP9GGI7U3rHuW1wnciXJJx ogtweTyXXFCBIQXSAf4Uxwu+GkVziAZ1KkCB0OX5wDzOScajLIhPmr0Pt05vMOZbglN4KM2y+Rl esuSrBYIrshvVYjjyJ5H+uB0nipBl+fsNU0e9efycXuEOiA/7n2y7TeXx2vsg422BzYLPp0aHam l+vjJUlVNxarFVw== X-Developer-Key: i=abel.vesa@linaro.org; a=openpgp; fpr=6AFF162D57F4223A8770EF5AF7BF214136F41FAE LTTPRs operating modes are defined by the DisplayPort standard and the generic framework now provides a helper to switch between them, which is handling the explicit disabling of non-transparent mode and its disable->enable sequence mentioned in the DP Standard v2.0 section 3.6.6.1. So use the new drm generic helper instead as it makes the code a bit cleaner. Reviewed-by: Lyude Paul Signed-off-by: Abel Vesa --- drivers/gpu/drm/nouveau/nouveau_dp.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau= /nouveau_dp.c index bcda0105160f1450df855281e0d932606a5095dd..55691ec44abaa53c84e73358e33= df1949bb1e35c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c @@ -79,21 +79,8 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_conne= ctor, !drm_dp_read_lttpr_common_caps(aux, dpcd, outp->dp.lttpr.caps)) { int nr =3D drm_dp_lttpr_count(outp->dp.lttpr.caps); =20 - if (nr) { - drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE, - DP_PHY_REPEATER_MODE_TRANSPARENT); - - if (nr > 0) { - ret =3D drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE, - DP_PHY_REPEATER_MODE_NON_TRANSPARENT); - if (ret !=3D 1) { - drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE, - DP_PHY_REPEATER_MODE_TRANSPARENT); - } else { - outp->dp.lttpr.nr =3D nr; - } - } - } + if (!drm_dp_lttpr_init(aux, nr)) + outp->dp.lttpr.nr =3D nr; } =20 ret =3D drm_dp_read_dpcd_caps(aux, dpcd); --=20 2.34.1