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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6D8EDE77182 for ; Thu, 12 Dec 2024 13:11:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F05B10EDBC; Thu, 12 Dec 2024 13:11:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="m9WTlTne"; dkim-atps=neutral Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 864A510EAD4 for ; Wed, 11 Dec 2024 09:08:49 +0000 (UTC) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4361d5dcf5bso4841545e9.3 for ; Wed, 11 Dec 2024 01:08:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733908128; x=1734512928; darn=lists.freedesktop.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9vEtBjFWv0oJ9eIaHpJrX0BFB+4qp8phO4ofGzRE0Nw=; b=m9WTlTnerA/rr5OuHyqW60qnb4eKtj+T1YJGi7OUSZT/0UxuX4xV9MMUQYoMIYI5Bt QiqEPJdKEzBRbs3/00fKWwSYAUgfnNP5vajlNBrZ8twpg3LWvUMxo68wUZSfZHB9XYuN JAZ0al7NYCAD6XZ4a5Q9a2PMsMYAyOS6vMLR6YRwrFSvnUyM1+Zp8f/pZzkDRYTqFQbi 0bZarWkKHRF+qRx7TygkGvj50Ykl8vHIV2U1QTUhhvl6iK9ABd6mudUL788dodFcHSOM eyq63ogNqXfqSRltb9HbwVxZ8j1GUOdFo0K9ovJ5b2Js76TPlHjUiZ1TzK4Z/GbpoybP or7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733908128; x=1734512928; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9vEtBjFWv0oJ9eIaHpJrX0BFB+4qp8phO4ofGzRE0Nw=; b=KRpx4DifOhoMKpuwq1EWphNqL3M1Yxs5yVTimdkzYVzBLQgt/pHpw2KoQmj1USUs/d SQKo1OSfjH0OFW/9rqx4z5fiepKKyIqAsAcDV6m8BFbP8ev7I/Dy3xy3mAu7fmYeWINk RxUu+l6T+Hv9BfoD8n/AAUXLhNXt/HHoQnEto7ko5slT5dXHt27WfTwT5xV2ftTOQQX7 KwtQBLu9Og40AEfXTly1InCyAX898tzeoANVeh8GCmgnCyw0vkzH5ZAFSUq43IA3HYaZ 8OZUXVTUbGfdVcwxJR7tedCtujqTuWnV5OWYz/zpWOhM7eKNz7/WMjiKq/5Q5cqJVoTU ziiw== X-Forwarded-Encrypted: i=1; AJvYcCVXjlsX4h1lmSrxxlBdNyCTq4ykA1kPli43SyCXqmH/MBOibEsXqN+pfx2rAyLmezCuMyUfywy3rA==@lists.freedesktop.org X-Gm-Message-State: AOJu0YwUVJ/MXU/fma/7tvPZt91xy7j4DZmQrULvaaJB77KJ37kvvAPY TyRhRE0yf4y3NnMDarJg1MXE14t6PbrTDNVyWc15OCSnV8QC4/qDmdDOZI6eYBU= X-Gm-Gg: ASbGnctIzYAAxncd7LHvOGbmsUl0ofvgpLZiwlUGUuCMbGDeo3uZ05i/OT2Ea8wDUF1 d7AWmc9vjSQbYh5575U+f6Kt6xtdZQci8QBiR6vI+QbbhE+RsrFW8ZdSbvdH4ykUe+qF34WWvwX 4BMQkWscx5m1rNqIBd7sDIjXj2Pjw44w3Z4VrqJMFUroZHHerGVtqwKqVHabf66RWyUWU+L74pB 9wujjwI8gcNmPMmC8r8CCgRtIebel3GO3p7I25bO9ML+XWDZOA1 X-Google-Smtp-Source: AGHT+IGD0J/JRFizsjyOq9cq12J2ujkcAmyNKzRhsrMcAI97nrwbSWWcCwaN8qi6JkWUTmtl0C7NHQ== X-Received: by 2002:a5d:64cf:0:b0:385:ec8d:8ca9 with SMTP id ffacd0b85a97d-3864cec5b76mr1446900f8f.42.1733908127884; Wed, 11 Dec 2024 01:08:47 -0800 (PST) Received: from linaro.org ([82.76.168.176]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-387824a4815sm807610f8f.26.2024.12.11.01.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2024 01:08:47 -0800 (PST) Date: Wed, 11 Dec 2024 11:08:45 +0200 From: Abel Vesa To: Dmitry Baryshkov Cc: 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 , Sean Paul , Marijn Suijten , 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 Subject: Re: [PATCH RFC 2/4] drm/nouveau/dp: Use the generic helper to control LTTPR transparent mode Message-ID: References: <20241031-drm-dp-msm-add-lttpr-transparent-mode-set-v1-0-cafbb9855f40@linaro.org> <20241031-drm-dp-msm-add-lttpr-transparent-mode-set-v1-2-cafbb9855f40@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Thu, 12 Dec 2024 13:11:48 +0000 X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On 24-10-31 18:44:55, Dmitry Baryshkov wrote: > On Thu, Oct 31, 2024 at 05:12:46PM +0200, Abel Vesa wrote: > > LTTPRs operating modes are defined by the DisplayPort standard and the > > generic framework now provides a helper to switch between them. > > So use the drm generic helper instead as it makes the code a bit cleaner. > > > > Signed-off-by: Abel Vesa > > --- > > drivers/gpu/drm/nouveau/nouveau_dp.c | 9 +++------ > > 1 file changed, 3 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c > > index bcda0105160f1450df855281e0d932606a5095dd..80264e6186246903fa037861fe37493646de0c6e 100644 > > --- a/drivers/gpu/drm/nouveau/nouveau_dp.c > > +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c > > @@ -80,15 +80,12 @@ nouveau_dp_probe_dpcd(struct nouveau_connector *nv_connector, > > int nr = drm_dp_lttpr_count(outp->dp.lttpr.caps); > > > > if (nr) { > > - drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE, > > - DP_PHY_REPEATER_MODE_TRANSPARENT); > > + drm_dp_lttpr_set_transparent_mode(aux, true); > > > > if (nr > 0) { > > - ret = drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE, > > - DP_PHY_REPEATER_MODE_NON_TRANSPARENT); > > + ret = drm_dp_lttpr_set_transparent_mode(aux, false); > > if (ret != 1) { > > - drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE, > > - DP_PHY_REPEATER_MODE_TRANSPARENT); > > + drm_dp_lttpr_set_transparent_mode(aux, true); > > } else { > > outp->dp.lttpr.nr = nr; > > } > > Could you please extract this true-false-true dance to a new helper too? > This way Intel driver can use the simple helper, the rest of the drivers > can benefit having the common code. Will be part of the new version. > > > > > -- > > 2.34.1 > > > > -- > With best wishes > Dmitry