Lines Matching +full:dual +full:- +full:lane
1 // SPDX-License-Identifier: GPL-2.0-only
5 #include <linux/media-bus-format.h>
24 * drm_of_crtc_port_mask - find the mask of a registered CRTC by port OF node
38 if (tmp->port == port) in drm_of_crtc_port_mask()
49 * drm_of_find_possible_crtcs - find the possible CRTCs for an encoder port
82 * drm_of_component_match_add - Add a component helper OF node match rule
100 * drm_of_component_probe - Generic probe function for a component based master
120 if (!dev->of_node) in drm_of_component_probe()
121 return -EINVAL; in drm_of_component_probe()
128 port = of_parse_phandle(dev->of_node, "ports", i); in drm_of_component_probe()
132 if (of_device_is_available(port->parent)) in drm_of_component_probe()
141 return -ENODEV; in drm_of_component_probe()
146 return -ENODEV; in drm_of_component_probe()
153 port = of_parse_phandle(dev->of_node, "ports", i); in drm_of_component_probe()
157 if (!of_device_is_available(port->parent)) { in drm_of_component_probe()
167 } else if (!of_device_is_available(remote->parent)) { in drm_of_component_probe()
186 * drm_of_encoder_active_endpoint - return the active encoder endpoint
198 struct drm_crtc *crtc = encoder->crtc; in drm_of_encoder_active_endpoint()
203 return -EINVAL; in drm_of_encoder_active_endpoint()
208 if (port == crtc->port) { in drm_of_encoder_active_endpoint()
215 return -EINVAL; in drm_of_encoder_active_endpoint()
220 * drm_of_find_panel_or_bridge - return connected panel or bridge device
241 int ret = -EPROBE_DEFER; in drm_of_find_panel_or_bridge()
245 return -EINVAL; in drm_of_find_panel_or_bridge()
253 * device-tree node. in drm_of_find_panel_or_bridge()
256 return -ENODEV; in drm_of_find_panel_or_bridge()
260 return -ENODEV; in drm_of_find_panel_or_bridge()
295 of_property_read_bool(port_node, "dual-lvds-even-pixels"); in drm_of_lvds_get_port_pixels_type()
297 of_property_read_bool(port_node, "dual-lvds-odd-pixels"); in drm_of_lvds_get_port_pixels_type()
307 int pixels_type = -EPIPE; in drm_of_lvds_get_remote_pixels_type()
319 return -EPIPE; in drm_of_lvds_get_remote_pixels_type()
330 * support multiple sinks with different dual-link in drm_of_lvds_get_remote_pixels_type()
336 return -EINVAL; in drm_of_lvds_get_remote_pixels_type()
344 * drm_of_lvds_get_dual_link_pixel_order - Get LVDS dual-link pixel order
345 * @port1: First DT port node of the Dual-link LVDS source
346 * @port2: Second DT port node of the Dual-link LVDS source
348 * An LVDS dual-link connection is made of two links, with even pixels
350 * returns, for two ports of an LVDS dual-link source, which port shall transmit
353 * The pixel order is determined from the dual-lvds-even-pixels and
354 * dual-lvds-odd-pixels properties in the sink's DT port nodes. If those
356 * returns -EINVAL.
358 * If either port is not connected, this function returns -EPIPE.
365 * * DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS - @port1 carries even pixels and @port2
367 * * DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS - @port1 carries odd pixels and @port2
369 * * -EINVAL - @port1 and @port2 are not connected to a dual-link LVDS sink, or
371 * * -EPIPE - when @port1 or @port2 are not connected
379 return -EINVAL; in drm_of_lvds_get_dual_link_pixel_order()
390 * A valid dual-lVDS bus is found when one remote port is marked with in drm_of_lvds_get_dual_link_pixel_order()
391 * "dual-lvds-even-pixels", and the other remote port is marked with in drm_of_lvds_get_dual_link_pixel_order()
392 * "dual-lvds-odd-pixels", bail out if the markers are not right. in drm_of_lvds_get_dual_link_pixel_order()
395 return -EINVAL; in drm_of_lvds_get_dual_link_pixel_order()
404 * drm_of_lvds_get_data_mapping - Get LVDS data mapping
407 * Convert DT "data-mapping" property string value into media bus format value.
410 * * MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - data-mapping is "jeida-18"
411 * * MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - data-mapping is "jeida-24"
412 * * MEDIA_BUS_FMT_RGB888_1X7X4_SPWG - data-mapping is "vesa-24"
413 * * -EINVAL - the "data-mapping" property is unsupported
414 * * -ENODEV - the "data-mapping" property is missing
421 ret = of_property_read_string(port, "data-mapping", &mapping); in drm_of_lvds_get_data_mapping()
423 return -ENODEV; in drm_of_lvds_get_data_mapping()
425 if (!strcmp(mapping, "jeida-18")) in drm_of_lvds_get_data_mapping()
427 if (!strcmp(mapping, "jeida-24")) in drm_of_lvds_get_data_mapping()
429 if (!strcmp(mapping, "vesa-24")) in drm_of_lvds_get_data_mapping()
432 return -EINVAL; in drm_of_lvds_get_data_mapping()
437 * drm_of_get_data_lanes_count - Get DSI/(e)DP data lane count
442 * Count DT "data-lanes" property elements and check for validity.
445 * * min..max - positive integer count of "data-lanes" elements
446 * * -ve - the "data-lanes" property is missing or invalid
447 * * -EINVAL - the "data-lanes" property is unsupported
454 ret = of_property_count_u32_elems(endpoint, "data-lanes"); in drm_of_get_data_lanes_count()
459 return -EINVAL; in drm_of_get_data_lanes_count()
466 * drm_of_get_data_lanes_count_ep - Get DSI/(e)DP data lane count by endpoint
473 * Count DT "data-lanes" property elements and check for validity.
477 * * min..max - positive integer count of "data-lanes" elements
478 * * -EINVAL - the "data-mapping" property is unsupported
479 * * -ENODEV - the "data-mapping" property is missing