lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DA5ZNDCHXC6M.1CDYDG6KKMAP0@kernel.org>
Date: Mon, 26 May 2025 11:35:04 +0200
From: "Michael Walle" <mwalle@...nel.org>
To: "Aradhya Bhatia" <aradhya.bhatia@...ux.dev>, "Rob Herring"
 <robh@...nel.org>, "Krzysztof Kozlowski" <krzk+dt@...nel.org>, "Conor
 Dooley" <conor+dt@...nel.org>, "Tomi Valkeinen"
 <tomi.valkeinen@...asonboard.com>, "Jyri Sarha" <jyri.sarha@....fi>
Cc: "Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>, "Thomas
 Zimmermann" <tzimmermann@...e.de>, "Maxime Ripard" <mripard@...nel.org>,
 "David Airlie" <airlied@...il.com>, "Laurent Pinchart"
 <laurent.pinchart@...asonboard.com>, "Simona Vetter" <simona@...ll.ch>,
 "Nishanth Menon" <nm@...com>, "Vignesh Raghavendra" <vigneshr@...com>,
 "Devarsh Thakkar" <devarsht@...com>, "Praneeth Bajjuri" <praneeth@...com>,
 "Udit Kumar" <u-kumar1@...com>, "Jayesh Choudhary" <j-choudhary@...com>,
 "Francesco Dolcini" <francesco@...cini.it>, "Alexander Sverdlin"
 <alexander.sverdlin@...mens.com>, "DRI Development List"
 <dri-devel@...ts.freedesktop.org>, "Devicetree List"
 <devicetree@...r.kernel.org>, "Linux Kernel List"
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v8 4/4] drm/tidss: Add OLDI bridge support

Hi Aradhya,

> +static int get_oldi_mode(struct device_node *oldi_tx, int *companion_instance)
> +{
> +	struct device_node *companion;
> +	struct device_node *port0, *port1;
> +	u32 companion_reg;
> +	bool secondary_oldi = false;
> +	int pixel_order;
> +
> +	/*
> +	 * Find if the OLDI is paired with another OLDI for combined OLDI
> +	 * operation (dual-link or clone).
> +	 */
> +	companion = of_parse_phandle(oldi_tx, "ti,companion-oldi", 0);
> +	if (!companion)
> +		/*
> +		 * The OLDI TX does not have a companion, nor is it a
> +		 * secondary OLDI. It will operate independently.
> +		 */
> +		return OLDI_MODE_SINGLE_LINK;

How is this supposed to work? If I read this code correctly, the
second (companion) port is always reported as SINGLE_LINK if its
device tree node doesn't have a ti,companion-oldi property. But
reading the device tree binding, the companion-old property is only
for the first OLDI port.

FWIW, I've tested this series and I get twice the clock rate as
expected and the second link is reported as "OLDI_MODE_SINGLE_LINK".
I'll dig deeper into this tomorrow.

-michael

> +
> +	if (of_property_read_u32(companion, "reg", &companion_reg))
> +		return OLDI_MODE_UNSUPPORTED;
> +
> +	if (companion_reg > (TIDSS_MAX_OLDI_TXES - 1))
> +		/* Invalid companion OLDI reg value. */
> +		return OLDI_MODE_UNSUPPORTED;
> +
> +	*companion_instance = (int)companion_reg;
> +
> +	if (of_property_read_bool(oldi_tx, "ti,secondary-oldi"))
> +		secondary_oldi = true;
> +
> +	/*
> +	 * We need to work out if the sink is expecting us to function in
> +	 * dual-link mode. We do this by looking at the DT port nodes, the
> +	 * OLDI TX ports are connected to. If they are marked as expecting
> +	 * even pixels and odd pixels, then we need to enable dual-link.
> +	 */
> +	port0 = of_graph_get_port_by_id(oldi_tx, 1);
> +	port1 = of_graph_get_port_by_id(companion, 1);
> +	pixel_order = drm_of_lvds_get_dual_link_pixel_order(port0, port1);
> +	of_node_put(port0);
> +	of_node_put(port1);
> +	of_node_put(companion);
> +
> +	switch (pixel_order) {
> +	case -EINVAL:
> +		/*
> +		 * The dual-link properties were not found in at least
> +		 * one of the sink nodes. Since 2 OLDI ports are present
> +		 * in the DT, it can be safely assumed that the required
> +		 * configuration is Clone Mode.
> +		 */
> +		return (secondary_oldi ? OLDI_MODE_CLONE_SECONDARY_SINGLE_LINK :
> +					 OLDI_MODE_CLONE_SINGLE_LINK);
> +
> +	case DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS:
> +		return (secondary_oldi ? OLDI_MODE_SECONDARY_DUAL_LINK :
> +					 OLDI_MODE_DUAL_LINK);
> +
> +	/* Unsupported OLDI Modes */
> +	case DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS:
> +	default:
> +		return OLDI_MODE_UNSUPPORTED;
> +	}
> +}

Download attachment "signature.asc" of type "application/pgp-signature" (298 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ