Thread (27 messages) 27 messages, 4 authors, 2020-03-09

Re: [PATCH v10 08/12] drm/bridge: lvds-codec: Implement basic bus format negotiation

From: Sam Ravnborg <hidden>
Date: 2020-02-25 06:15:52
Also in: dri-devel

Hi Boris/Laurent.
quoted
+
+	err = of_property_read_u32(np, "bus-width", &input_bus_width);
+	of_node_put(np);
+
+	if (err) {
+		lvds_codec->input_fmt = MEDIA_BUS_FMT_FIXED;
+	} else if (input_bus_width == 18) {
+		lvds_codec->input_fmt = MEDIA_BUS_FMT_RGB666_1X18;
+	} else if (input_bus_width == 24) {
+		lvds_codec->input_fmt = MEDIA_BUS_FMT_RGB888_1X24;
+	} else {
+		dev_dbg(dev, "unsupported bus-width value %u on port 0\n",
+			input_bus_width);
+		return -ENOTSUPP;
ENOTSUPP is "Operation not supported", I'd go for -EINVAL.
quoted
+	}
Doesn't this apply to LVDS encoders only ? For LVDS decoders I don't
think we want to report an RGB format on the input.
In panel-lvds we use the property "data-mapping" for the same purpose.
To specify the MEDIA_BUS format.

It would be good to standardize on the same property, and maybe have the
same binding descriptions for all.

And "data-mapping" is a text string, which gives us more flexibility
than just a number, that for MEDIA_BUS_FMT seems required.

	Sam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help