Skip to contentSkip to conversation

video: tidss: Use DT property names for parsing nodes

PATCH In review Devarsh Thakkar 3 participants 4 messages Jan 24, 2024 – Jan 30, 2024 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: tidss: Use DT property names for parsing nodes

Use device-tree node property names for parsing nodes instead of indexing as indexing could be different between different SoCs based on number of DSS entities available on that particular SoC.

Also correct the video layer naming in driver to match to actual one being used in upstream DSS device-tree node [1].

This also fixes AM62x splash screen usage using the latest upstream DSS device-tree nodes where hard-coded indexing which driver was using before this patch was not matching the correct properties in the DT node.

[1]: Upstream AM62x DSS node:
https://github.com/torvalds/linux/blob/v6.8-rc1/arch/arm64/boot/dts/ti/k3-am62-main.dtsi#L774

Fixes 5f9f816bb8 ("drivers: video: tidss: TIDSS video driver support

for AM62x")

---
 drivers/video/tidss/tidss_drv.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/video/tidss/tidss_drv.c +5 -5
index e285f255d7..1380c6b693 100644
@@ -107,7 +107,7 @@ const struct dss_features dss_am625_feats = {
 
 	.num_planes = 2,
 	/* note: vid is plane_id 0 and vidl1 is plane_id 1 */
-	.vid_name = { "vidl1", "vid1" },
+	.vid_name = { "vidl1", "vid" },
 	.vid_lite = { true, false },
 	.vid_order = { 1, 0 },
 };
@@ -814,13 +814,13 @@ static int tidss_drv_probe(struct udevice *dev)
 		priv->bus_format = &dss_bus_formats[8];
 
 	/* Common address */
-	priv->base_common = dev_remap_addr_index(dev, 0);
+	priv->base_common = dev_remap_addr_name(dev, priv->feat->common);
 	if (!priv->base_common)
 		return -EINVAL;
 
 	/* plane address setup and enable */
 	for (i = 0; i < priv->feat->num_planes; i++) {
-		priv->base_vid[i] = dev_remap_addr_index(dev, i + 2);
+		priv->base_vid[i] = dev_remap_addr_name(dev, priv->feat->vid_name[i]);
 		if (!priv->base_vid[i])
 			return -EINVAL;
 	}
@@ -841,8 +841,8 @@ static int tidss_drv_probe(struct udevice *dev)
 
 	/* video port address clocks and enable */
 	for (i = 0; i < priv->feat->num_vps; i++) {
-		priv->base_ovr[i] = dev_remap_addr_index(dev, i + 4);
-		priv->base_vp[i] = dev_remap_addr_index(dev, i + 6);
+		priv->base_ovr[i] = dev_remap_addr_name(dev, priv->feat->ovr_name[i]);
+		priv->base_vp[i] = dev_remap_addr_name(dev, priv->feat->vp_name[i]);
 	}
 
 	ret = clk_get_by_name(dev, "vp1", &priv->vp_clk[0]);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Devarsh,

Quoted 12 lines · Devarsh Thakkar

Use device-tree node property names for parsing nodes instead of indexing as indexing could be different between different SoCs based on number of DSS entities available on that particular SoC.

Also correct the video layer naming in driver to match to actual one being used in upstream DSS device-tree node [1].

This also fixes AM62x splash screen usage using the latest upstream DSS device-tree nodes where hard-coded indexing which driver was using before this patch was not matching the correct properties in the DT node.

Quoted 6 lines

[1]: Upstream AM62x DSS node:
https://github.com/torvalds/linux/blob/v6.8-rc1/arch/arm64/boot/dts/ti/k3-am62-main.dtsi#L774

Fixes 5f9f816bb8 ("drivers: video: tidss: TIDSS video driver support

for AM62x")

#2 lore raw

Hi Anatolij,Tom

Quoted 15 lines · Nikhil Jain

Hi Devarsh,

Quoted 12 lines · Devarsh Thakkar

Use device-tree node property names for parsing nodes instead of indexing as indexing could be different between different SoCs based on number of DSS entities available on that particular SoC.

Also correct the video layer naming in driver to match to actual one being used in upstream DSS device-tree node [1].

This also fixes AM62x splash screen usage using the latest upstream DSS device-tree nodes where hard-coded indexing which driver was using before this patch was not matching the correct properties in the DT node.

Quoted 7 lines
Quoted 6 lines

[1]: Upstream AM62x DSS node:
https://github.com/torvalds/linux/blob/v6.8-rc1/arch/arm64/boot/dts/ti/k3-am62-main.dtsi#L774

Fixes 5f9f816bb8 ("drivers: video: tidss: TIDSS video driver support

for AM62x")

Is it possible to pull this in for current merge window for v2024.04 ?

Regards
Devarsh

#3 lore raw
In reply to Devarsh Thakkar
Quoted 8 lines · Devarsh Thakkar

Use device-tree node property names for parsing nodes instead of indexing as indexing could be different between different SoCs based on number of DSS entities available on that particular SoC.

Also correct the video layer naming in driver to match to actual one being used in upstream DSS device-tree node [1].

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom