Lines Matching +full:dual +full:- +full:lvds +full:- +full:odd +full:- +full:pixels
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)
50 * drm_of_find_possible_crtcs - find the possible CRTCs for an encoder port
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)
122 return -EINVAL;
129 port = of_parse_phandle(dev->of_node, "ports", i);
133 if (of_device_is_available(port->parent))
142 return -ENODEV;
147 return -ENODEV;
154 port = of_parse_phandle(dev->of_node, "ports", i);
158 if (!of_device_is_available(port->parent)) {
168 } else if (!of_device_is_available(remote->parent)) {
187 * drm_of_encoder_active_endpoint - return the active encoder endpoint
199 struct drm_crtc *crtc = encoder->crtc;
204 return -EINVAL;
209 if (port == crtc->port) {
216 return -EINVAL;
221 * drm_of_find_panel_or_bridge - return connected panel or bridge device
242 int ret = -EPROBE_DEFER;
246 return -EINVAL;
254 * device-tree node.
257 return -ENODEV;
261 return -ENODEV;
296 of_property_read_bool(port_node, "dual-lvds-even-pixels");
298 of_property_read_bool(port_node, "dual-lvds-odd-pixels");
308 int pixels_type = -EPIPE;
320 return -EPIPE;
331 * support multiple sinks with different dual-link
337 return -EINVAL;
347 * A valid dual-lVDS bus is found when one port is marked with
348 * "dual-lvds-even-pixels", and the other port is marked with
349 * "dual-lvds-odd-pixels", bail out if the markers are not right.
352 return -EINVAL;
360 * drm_of_lvds_get_dual_link_pixel_order - Get LVDS dual-link source pixel order
361 * @port1: First DT port node of the Dual-link LVDS source
362 * @port2: Second DT port node of the Dual-link LVDS source
364 * An LVDS dual-link connection is made of two links, with even pixels
365 * transitting on one link, and odd pixels on the other link. This function
366 * returns, for two ports of an LVDS dual-link source, which port shall transmit
367 * the even and odd pixels, based on the requirements of the connected sink.
369 * The pixel order is determined from the dual-lvds-even-pixels and
370 * dual-lvds-odd-pixels properties in the sink's DT port nodes. If those
372 * returns -EINVAL.
374 * If either port is not connected, this function returns -EPIPE.
377 * parents when, for instance, two separate LVDS encoders carry the even and odd
378 * pixels.
381 * * DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS - @port1 carries even pixels and @port2
382 * carries odd pixels
383 * * DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS - @port1 carries odd pixels and @port2
384 * carries even pixels
385 * * -EINVAL - @port1 and @port2 are not connected to a dual-link LVDS sink, or
387 * * -EPIPE - when @port1 or @port2 are not connected
395 return -EINVAL;
410 * drm_of_lvds_get_dual_link_pixel_order_sink - Get LVDS dual-link sink pixel order
411 * @port1: First DT port node of the Dual-link LVDS sink
412 * @port2: Second DT port node of the Dual-link LVDS sink
414 * An LVDS dual-link connection is made of two links, with even pixels
415 * transitting on one link, and odd pixels on the other link. This function
416 * returns, for two ports of an LVDS dual-link sink, which port shall transmit
417 * the even and odd pixels, based on the requirements of the sink.
419 * The pixel order is determined from the dual-lvds-even-pixels and
420 * dual-lvds-odd-pixels properties in the sink's DT port nodes. If those
422 * returns -EINVAL.
424 * If either port is not connected, this function returns -EPIPE.
427 * parents when, for instance, two separate LVDS decoders receive the even and
428 * odd pixels.
431 * * DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS - @port1 receives even pixels and @port2
432 * receives odd pixels
433 * * DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS - @port1 receives odd pixels and @port2
434 * receives even pixels
435 * * -EINVAL - @port1 or @port2 are NULL
436 * * -EPIPE - when @port1 or @port2 are not connected
444 return -EINVAL;
448 return -EPIPE;
452 return -EPIPE;
459 * drm_of_lvds_get_data_mapping - Get LVDS data mapping
460 * @port: DT port node of the LVDS source or sink
462 * Convert DT "data-mapping" property string value into media bus format value.
465 * * MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - data-mapping is "jeida-18"
466 * * MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - data-mapping is "jeida-24"
467 * * MEDIA_BUS_FMT_RGB101010_1X7X5_JEIDA - data-mapping is "jeida-30"
468 * * MEDIA_BUS_FMT_RGB888_1X7X4_SPWG - data-mapping is "vesa-24"
469 * * MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG - data-mapping is "vesa-30"
470 * * -EINVAL - the "data-mapping" property is unsupported
471 * * -ENODEV - the "data-mapping" property is missing
478 ret = of_property_read_string(port, "data-mapping", &mapping);
480 return -ENODEV;
482 if (!strcmp(mapping, "jeida-18"))
484 if (!strcmp(mapping, "jeida-24"))
486 if (!strcmp(mapping, "jeida-30"))
488 if (!strcmp(mapping, "vesa-24"))
490 if (!strcmp(mapping, "vesa-30"))
493 return -EINVAL;
498 * drm_of_get_data_lanes_count - Get DSI/(e)DP data lane count
503 * Count DT "data-lanes" property elements and check for validity.
506 * * min..max - positive integer count of "data-lanes" elements
507 * * -ve - the "data-lanes" property is missing or invalid
508 * * -EINVAL - the "data-lanes" property is unsupported
515 ret = of_property_count_u32_elems(endpoint, "data-lanes");
520 return -EINVAL;
527 * drm_of_get_data_lanes_count_ep - Get DSI/(e)DP data lane count by endpoint
534 * Count DT "data-lanes" property elements and check for validity.
538 * * min..max - positive integer count of "data-lanes" elements
539 * * -EINVAL - the "data-mapping" property is unsupported
540 * * -ENODEV - the "data-mapping" property is missing
561 * drm_of_get_dsi_bus - find the DSI bus for a given device
565 * than MIPI-DCS (SPI, I2C, etc.) using the Device Tree.
569 * Returns pointer to mipi_dsi_host if successful, -EINVAL if the
570 * request is unsupported, -EPROBE_DEFER if the DSI host is found but
571 * not available, or -ENODEV otherwise.
581 endpoint = of_graph_get_endpoint_by_regs(dev->of_node, 0, -1);
583 return ERR_PTR(-ENODEV);
592 return ERR_PTR(-ENODEV);
602 return ERR_PTR(-EPROBE_DEFER);