Lines Matching +full:lvds +full:- +full:encoder

1 // SPDX-License-Identifier: GPL-2.0-only
5 #include <linux/media-bus-format.h>
25 * drm_of_crtc_port_mask - find the mask of a registered CRTC by port OF node
39 if (tmp->port == port) in drm_of_crtc_port_mask()
50 * drm_of_find_possible_crtcs - find the possible CRTCs for an encoder port
52 * @port: encoder port to scan for endpoints
56 * encoder.
83 * drm_of_component_match_add - Add a component helper OF node match rule
101 * drm_of_component_probe - Generic probe function for a component based master
121 if (!dev->of_node) in drm_of_component_probe()
122 return -EINVAL; in drm_of_component_probe()
126 * called from encoder's .bind callbacks works as expected in drm_of_component_probe()
129 port = of_parse_phandle(dev->of_node, "ports", i); in drm_of_component_probe()
133 if (of_device_is_available(port->parent)) in drm_of_component_probe()
142 return -ENODEV; in drm_of_component_probe()
147 return -ENODEV; in drm_of_component_probe()
154 port = of_parse_phandle(dev->of_node, "ports", i); in drm_of_component_probe()
158 if (!of_device_is_available(port->parent)) { in drm_of_component_probe()
168 } else if (!of_device_is_available(remote->parent)) { in drm_of_component_probe()
187 * drm_of_encoder_active_endpoint - return the active encoder endpoint
188 * @node: device tree node containing encoder input ports
189 * @encoder: drm_encoder
191 * Given an encoder device node and a drm_encoder with a connected crtc,
192 * parse the encoder endpoint connecting to the crtc port.
195 struct drm_encoder *encoder, in drm_of_encoder_active_endpoint() argument
199 struct drm_crtc *crtc = encoder->crtc; in drm_of_encoder_active_endpoint()
204 return -EINVAL; in drm_of_encoder_active_endpoint()
209 if (port == crtc->port) { in drm_of_encoder_active_endpoint()
216 return -EINVAL; in drm_of_encoder_active_endpoint()
221 * drm_of_find_panel_or_bridge - return connected panel or bridge device
222 * @np: device tree node containing encoder output ports
242 int ret = -EPROBE_DEFER; in drm_of_find_panel_or_bridge()
246 return -EINVAL; in drm_of_find_panel_or_bridge()
254 * device-tree node. in drm_of_find_panel_or_bridge()
257 return -ENODEV; in drm_of_find_panel_or_bridge()
261 return -ENODEV; in drm_of_find_panel_or_bridge()
296 of_property_read_bool(port_node, "dual-lvds-even-pixels"); in drm_of_lvds_get_port_pixels_type()
298 of_property_read_bool(port_node, "dual-lvds-odd-pixels"); in drm_of_lvds_get_port_pixels_type()
308 int pixels_type = -EPIPE; in drm_of_lvds_get_remote_pixels_type()
320 return -EPIPE; in drm_of_lvds_get_remote_pixels_type()
331 * support multiple sinks with different dual-link in drm_of_lvds_get_remote_pixels_type()
337 return -EINVAL; in drm_of_lvds_get_remote_pixels_type()
345 * drm_of_lvds_get_dual_link_pixel_order - Get LVDS dual-link pixel order
346 * @port1: First DT port node of the Dual-link LVDS source
347 * @port2: Second DT port node of the Dual-link LVDS source
349 * An LVDS dual-link connection is made of two links, with even pixels
351 * returns, for two ports of an LVDS dual-link source, which port shall transmit
354 * The pixel order is determined from the dual-lvds-even-pixels and
355 * dual-lvds-odd-pixels properties in the sink's DT port nodes. If those
357 * returns -EINVAL.
359 * If either port is not connected, this function returns -EPIPE.
362 * parents when, for instance, two separate LVDS encoders carry the even and odd
366 * * DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS - @port1 carries even pixels and @port2
368 * * DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS - @port1 carries odd pixels and @port2
370 * * -EINVAL - @port1 and @port2 are not connected to a dual-link LVDS sink, or
372 * * -EPIPE - when @port1 or @port2 are not connected
380 return -EINVAL; in drm_of_lvds_get_dual_link_pixel_order()
391 * A valid dual-lVDS bus is found when one remote port is marked with in drm_of_lvds_get_dual_link_pixel_order()
392 * "dual-lvds-even-pixels", and the other remote port is marked with in drm_of_lvds_get_dual_link_pixel_order()
393 * "dual-lvds-odd-pixels", bail out if the markers are not right. in drm_of_lvds_get_dual_link_pixel_order()
396 return -EINVAL; in drm_of_lvds_get_dual_link_pixel_order()
405 * drm_of_lvds_get_data_mapping - Get LVDS data mapping
406 * @port: DT port node of the LVDS source or sink
408 * Convert DT "data-mapping" property string value into media bus format value.
411 * * MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - data-mapping is "jeida-18"
412 * * MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - data-mapping is "jeida-24"
413 * * MEDIA_BUS_FMT_RGB888_1X7X4_SPWG - data-mapping is "vesa-24"
414 * * -EINVAL - the "data-mapping" property is unsupported
415 * * -ENODEV - the "data-mapping" property is missing
422 ret = of_property_read_string(port, "data-mapping", &mapping); in drm_of_lvds_get_data_mapping()
424 return -ENODEV; in drm_of_lvds_get_data_mapping()
426 if (!strcmp(mapping, "jeida-18")) in drm_of_lvds_get_data_mapping()
428 if (!strcmp(mapping, "jeida-24")) in drm_of_lvds_get_data_mapping()
430 if (!strcmp(mapping, "vesa-24")) in drm_of_lvds_get_data_mapping()
433 return -EINVAL; in drm_of_lvds_get_data_mapping()
438 * drm_of_get_data_lanes_count - Get DSI/(e)DP data lane count
443 * Count DT "data-lanes" property elements and check for validity.
446 * * min..max - positive integer count of "data-lanes" elements
447 * * -ve - the "data-lanes" property is missing or invalid
448 * * -EINVAL - the "data-lanes" property is unsupported
455 ret = of_property_count_u32_elems(endpoint, "data-lanes"); in drm_of_get_data_lanes_count()
460 return -EINVAL; in drm_of_get_data_lanes_count()
467 * drm_of_get_data_lanes_count_ep - Get DSI/(e)DP data lane count by endpoint
474 * Count DT "data-lanes" property elements and check for validity.
478 * * min..max - positive integer count of "data-lanes" elements
479 * * -EINVAL - the "data-mapping" property is unsupported
480 * * -ENODEV - the "data-mapping" property is missing
501 * drm_of_get_dsi_bus - find the DSI bus for a given device
505 * than MIPI-DCS (SPI, I2C, etc.) using the Device Tree.
507 * Returns pointer to mipi_dsi_host if successful, -EINVAL if the
508 * request is unsupported, -EPROBE_DEFER if the DSI host is found but
509 * not available, or -ENODEV otherwise.
519 endpoint = of_graph_get_next_endpoint(dev->of_node, NULL); in drm_of_get_dsi_bus()
521 return ERR_PTR(-ENODEV); in drm_of_get_dsi_bus()
530 return ERR_PTR(-ENODEV); in drm_of_get_dsi_bus()
540 return ERR_PTR(-EPROBE_DEFER); in drm_of_get_dsi_bus()