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 85D3A3C5529 for ; Mon, 13 Apr 2026 12:59:51 +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=1776085193; cv=none; b=dgsSe4T8ZKO+h4mKBqWZN8H1+X3GFyoBtC3wxURwh/yEAdqcOotULfbOuCLkvLuzKLht0abLuNeHD8+6asfVaHESW9VKSriPb1tq868Jm/5QWKoiKsk2LQufA7NYAYJV31cs5fa284qfA5thcnsBbQb11pANYJqQ7pLH6+u9QXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776085193; c=relaxed/simple; bh=l7VrN8buhGTEJnPvziSDNOGWSKx1ByyFWF+erHwBAIo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=R2ogIevOKKRTRzFD4fjIxCjfdEOeZmC60fgkq5T7o4DQY6yT6zGEQAYOdBK0OaCiSdE46BCwAUVfJMU2s3tz4i0RuIIyL9L1i7RP/EGa/8r4/8BIYtVeEkxfWp+Wdd3EUbBxxf5yhf3bWagidZyR9FDdZJVuYKbnG0t96UKYfCM= 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=wDi4rylp; 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="wDi4rylp" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 5D8E2C5B19E; Mon, 13 Apr 2026 13:00:20 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B42DE5FFB9; Mon, 13 Apr 2026 12:59:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 05B5810450229; Mon, 13 Apr 2026 14:59:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1776085182; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=h3FUUOILacuSgM+ABHMGfQupbtWpVZVev0K7QR0S3PA=; b=wDi4rylprXYa5KvrF5XClhZwCqdBhIRvrj68umpv0rOZCRw+SHIMqqb9J6A5OlpXFegLXb 1v1yWAis2ur92VlhEUydt8lyKrp3p55Mm8z+cYDV+L0hnrTR+erxW8efuL3L8dxN5VzCkr zU/YVxQzBaq+vUFYst8ScqPRT6rtP+1OJUU/axL3iUbwIQxAhQxyAuWdIIfxwRFUKKgp/6 th235XxhexkP7slAiEV8kDSum6Qom6jTajuknHPdnSpgRF4Y9gRdntzSjMMsboitxLJD2v 2oOiT4IQHWd8cguLrclzB4T7Rk0CCw8IEvepPTsgnrO/+IRlae+TSlDZSMjNuQ== Date: Mon, 13 Apr 2026 14:59:30 +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: <20260413145930.140ba461@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> 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 Fri, 10 Apr 2026 00:53:08 +0300 Dmitry Baryshkov wrote: > On Thu, Apr 09, 2026 at 07:08:25PM +0200, Kory Maincent wrote: > > Add a managed DisplayPort connector initialization helper, > > drmm_connector_dp_init(), modeled after the existing HDMI counterpart > > drmm_connector_hdmi_init(). Cleanup is handled automatically via a > > DRM-managed action. > >=20 > > The helper creates the following immutable connector properties to expo= se > > 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 properties > > at runtime: > > - drm_connector_dp_set_link_train_properties() > > - drm_connector_dp_reset_link_train_properties() > >=20 ... > > +/** > > + * struct drm_connector_dp_link_train - DRM DisplayPort link training > > + * 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. > > + /** > > + * @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 that > proposal, but I didn't have time to finish it. I didn't know this phy_configure_opts_dp struct. This indeed could make sen= se to reuse and modify that structure for our needs. About your XDC talk. What were the developments you were talking about? Cou= ld I have a look at them? Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com