From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5DB61C01 for ; Mon, 13 Apr 2026 15:30:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776094251; cv=none; b=Js/SlsqJLxpAl8PUXU/T6XBDyx6C60DJ5O9kuLHey7kv14tnC46q2q7LWh1IbtniWvAObebnhegceDND89YY2cMNhc/NFOH8COcv/8WQ/MiYJMzNl02YUa6WsZGb1hensEeWaT1pWjKUcKn3DrfT0N0vq7qljHpFzVC2s315Ru8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776094251; c=relaxed/simple; bh=+UBVumy3dcX3j2L/1VCf3fLbDsHsv3bd6nLkCFtEwls=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=m6GqWN+SLaIdEMEwxgUcuNKI5CtbsIVKSIfjZa6qX3jyoz9TPiD/zMczzHtv0RrFw+kQdFO6eCCUiEtcKLQ4zRSstd1pwoRGfJw5le26rTfpYM4+svMqmHxCcG1bYomOxt0vcidYSnjtZ3Rs7j8M8Af1bSjzsi3I5Q0Tb7g4SOY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=Bd+Mxj8L; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="Bd+Mxj8L" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 9C1DDC5B19E; Mon, 13 Apr 2026 15:31:22 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id ED2C35FFBB; Mon, 13 Apr 2026 15:30:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id D8842104513C6; Mon, 13 Apr 2026 17:30:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1776094244; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=xg8mzFbPBXrLw9j1EK50l3GIhD/98doCuEPkQsBTXYk=; b=Bd+Mxj8LwX8bmTnYNL7sIGdg6fifgVRg5gBnAlj9DJfaOxX3ZMmFgplXr3RpU0G6J0nZsm GsPmX0Cd70dbZe9H37Sg/fs6lNEDwb2HFql8aKBOyyVHYkhs+kOEsc4183IEhRtE/+Y+bn B7Quo8kONLit4TeT3qRtlgQ8aIpLCBKwRueL734GVpuAoGRTWcIVQd8HZh+lml6CSdv5qB 1DIjkVOi1e1GN698Ge5QhGyetJvHFhguVpCbSawA8cwwM0U4oRZqE04EEmUDBhaj9QQqzN 5xK+Sw/bTXn8nBDLQHq455wUR0enHUfQ4/ku2qUCLZV+HGW8lgvFBy129MgmxA== Date: Mon, 13 Apr 2026 17:30:32 +0200 From: Kory Maincent To: Dmitry Baryshkov Cc: Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , Simona Vetter , Dave Airlie , Jesse Barnes , Eric Anholt , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , AngeloGioacchino Del Regno , Chris Wilson , Thomas Petazzoni , Mark Yacoub , Sean Paul , Louis Chauvet , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Simona Vetter Subject: Re: [PATCH RFC 09/12] drm: Introduce drmm_connector_dp_init() with link training state properties Message-ID: <20260413173032.75ee842a@kmaincent-XPS-13-7390> In-Reply-To: References: <20260409-feat_link_cap-v1-0-7069e8199ce2@bootlin.com> <20260409-feat_link_cap-v1-9-7069e8199ce2@bootlin.com> <20260413145930.140ba461@kmaincent-XPS-13-7390> Organization: bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) 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 X-Last-TLS-Session-Version: TLSv1.3 On Mon, 13 Apr 2026 16:59:43 +0300 Dmitry Baryshkov wrote: > On Mon, Apr 13, 2026 at 02:59:30PM +0200, Kory Maincent wrote: > > On Fri, 10 Apr 2026 00:53:08 +0300 > > Dmitry Baryshkov wrote: > > =20 > > > On Thu, Apr 09, 2026 at 07:08:25PM +0200, Kory Maincent wrote: =20 > > > > Add a managed DisplayPort connector initialization helper, > > > > drmm_connector_dp_init(), modeled after the existing HDMI counterpa= rt > > > > drmm_connector_hdmi_init(). Cleanup is handled automatically via a > > > > DRM-managed action. > > > >=20 > > > > The helper creates the following immutable connector properties to > > > > expose DP link training capabilities and state to userspace: > > > >=20 > > > > - num_lanes: bitmask of supported lane counts (1, 2, 4) > > > > - link_rate: Array of supported link rates. > > > > - dsc_en: Display Stream Compression supported > > > > - voltage_swingN: per-lane voltage swing level bitmask > > > > - pre-emphasisN: per-lane pre-emphasis level bitmask > > > >=20 > > > > Link rates are passed by the driver in deca-kbps, following the DRM > > > > convention, but exposed to userspace in kbps for clarity. > > > >=20 > > > > Two additional helpers are provided to update and reset those prope= rties > > > > at runtime: > > > > - drm_connector_dp_set_link_train_properties() > > > > - drm_connector_dp_reset_link_train_properties() > > > > =20 > >=20 > > ... > > =20 > > > > +/** > > > > + * struct drm_connector_dp_link_train - DRM DisplayPort link train= ing > > > > + * information report > > > > + */ > > > > +struct drm_connector_dp_link_train { =20 > > >=20 > > > THese define the current DP state. As such, they definitely make sense > > > to be a part of the drm_connector. =20 > > > > + /** > > > > + * @nlanes: The number of lanes used > > > > + */ > > > > + u8 nlanes; > > > > + > > > > + /** > > > > + * @rates: Link rate value selected in deca-kbps > > > > + */ > > > > + u32 rate; > > > > + > > > > + /** > > > > + * @dsc: Display Stream Compression enabled > > > > + */ > > > > + bool dsc_en; > > > > + > > > > + /** > > > > + * @v_swings: Array listing the bitmask voltage swing level per > > > > lanes > > > > + */ > > > > + u8 v_swing[4]; > > > > + > > > > + /** > > > > + * @pre_emph: Array listing the bitmask pre-emphasis level per > > > > lanes > > > > + */ > > > > + u8 pre_emph[4]; =20 > > >=20 > > > Please consider following struct phy_configure_opts_dp (or using it as > > > is). Overall, please refer the talk and (more important) the lightning > > > resumee at this XDC. I have some bits and pieces ready in spite of th= at > > > proposal, but I didn't have time to finish it. =20 > >=20 > > I didn't know this phy_configure_opts_dp struct. This indeed could make > > sense to reuse and modify that structure for our needs. =20 >=20 > Why would you want to modify it? It is an interface for the PHY drivers. > Is there anything that you miss there? I was thinking of the DSC, but after a quick look it is not done at the PHY level therefore it won't land here. =20 > > About your XDC talk. What were the developments you were talking about? > > Could I have a look at them? =20 >=20 > I've posted an RFC just before the XDC. Currently I'm looking at the > link training generification. Overall, you don't have to wait for that > job to be completed, just take some of the notes in account (like reuse > of the PHY config structures). Ok, have you a link? I can't find the related series. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com