Lines Matching full:edid
58 * EDID blocks out in the wild have a variety of bugs, try to collect
188 /* Rotel RSX-1058 forwards sink's EDID but only does HDMI 1.1*/
602 * modes are old-school Mac modes. The EDID spec says the 1152x864@75 mode
1578 * The opaque EDID type, internal to drm_edid.c.
1581 /* Size allocated for edid */
1583 const struct edid *edid; member
1586 static int edid_hfeeodb_extension_block_count(const struct edid *edid);
1588 static int edid_hfeeodb_block_count(const struct edid *edid) in edid_hfeeodb_block_count() argument
1590 int eeodb = edid_hfeeodb_extension_block_count(edid); in edid_hfeeodb_block_count()
1595 static int edid_extension_block_count(const struct edid *edid) in edid_extension_block_count() argument
1597 return edid->extensions; in edid_extension_block_count()
1600 static int edid_block_count(const struct edid *edid) in edid_block_count() argument
1602 return edid_extension_block_count(edid) + 1; in edid_block_count()
1610 static int edid_size(const struct edid *edid) in edid_size() argument
1612 return edid_size_by_blocks(edid_block_count(edid)); in edid_size()
1615 static const void *edid_block_data(const struct edid *edid, int index) in edid_block_data() argument
1617 BUILD_BUG_ON(sizeof(*edid) != EDID_LENGTH); in edid_block_data()
1619 return edid + index; in edid_block_data()
1622 static const void *edid_extension_block_data(const struct edid *edid, int index) in edid_extension_block_data() argument
1624 return edid_block_data(edid, index + 1); in edid_extension_block_data()
1627 /* EDID block count indicated in EDID, may exceed allocated size */
1633 num_blocks = edid_block_count(drm_edid->edid); in __drm_edid_block_count()
1643 eeodb = edid_hfeeodb_block_count(drm_edid->edid); in __drm_edid_block_count()
1651 /* EDID block count, limited by allocated size */
1659 /* EDID extension block count, limited by allocated size */
1667 return edid_block_data(drm_edid->edid, index); in drm_edid_block_data()
1673 return edid_extension_block_data(drm_edid->edid, index); in drm_edid_extension_block_data()
1678 * trust edid size. Not for general purpose use.
1681 const struct edid *edid) in drm_edid_legacy_init() argument
1683 if (!edid) in drm_edid_legacy_init()
1688 drm_edid->edid = edid; in drm_edid_legacy_init()
1689 drm_edid->size = edid_size(edid); in drm_edid_legacy_init()
1695 * EDID base and extension block iterator.
1746 static void edid_header_fix(void *edid) in edid_header_fix() argument
1748 memcpy(edid, edid_header, sizeof(edid_header)); in edid_header_fix()
1752 * drm_edid_header_is_valid - sanity check the header of the base EDID block
1753 * @_edid: pointer to raw base EDID block
1755 * Sanity check the header of the base EDID block.
1761 const struct edid *edid = _edid; in drm_edid_header_is_valid() local
1765 if (edid->header[i] == edid_header[i]) in drm_edid_header_is_valid()
1776 "Minimum number of valid EDID header bytes (0-8, default 6)");
1794 const struct edid *block = _block; in edid_block_get_checksum()
1806 static bool edid_block_is_zero(const void *edid) in edid_block_is_zero() argument
1808 return !memchr_inv(edid, 0, EDID_LENGTH); in edid_block_is_zero()
1812 * drm_edid_are_equal - compare two edid blobs.
1816 * edid had changed.
1818 bool drm_edid_are_equal(const struct edid *edid1, const struct edid *edid2) in drm_edid_are_equal()
1857 const struct edid *block = _block; in edid_block_check()
1905 const struct edid *block, in edid_block_status_print()
1912 pr_debug("EDID block %d read failed\n", block_num); in edid_block_status_print()
1915 pr_debug("EDID block %d pointer is NULL\n", block_num); in edid_block_status_print()
1918 pr_notice("EDID block %d is all zeroes\n", block_num); in edid_block_status_print()
1921 pr_notice("EDID has corrupt header\n"); in edid_block_status_print()
1924 pr_debug("EDID corrupt header needs repair\n"); in edid_block_status_print()
1927 pr_debug("EDID corrupt header fixed\n"); in edid_block_status_print()
1931 pr_debug("EDID block %d (tag 0x%02x) checksum is invalid, remainder is %d, ignoring\n", in edid_block_status_print()
1935 pr_notice("EDID block %d (tag 0x%02x) checksum is invalid, remainder is %d\n", in edid_block_status_print()
1941 pr_notice("EDID has major version %d, instead of 1\n", in edid_block_status_print()
1945 WARN(1, "EDID block %d unknown edid block status code %d\n", in edid_block_status_print()
1969 * drm_edid_block_valid - Sanity check the EDID block (base or extension)
1970 * @_block: pointer to raw EDID block
1972 * @print_bad_edid: if true, dump bad EDID blocks to the console
1975 * Validate a base or extension EDID block and optionally dump bad blocks to
1983 struct edid *block = (struct edid *)_block; in drm_edid_block_valid()
1993 DRM_DEBUG_KMS("Fixing EDID header, your hardware may be failing\n"); in drm_edid_block_valid()
2020 pr_notice("Raw EDID:\n"); in drm_edid_block_valid()
2029 * drm_edid_is_valid - sanity check EDID data
2030 * @edid: EDID data
2032 * Sanity-check an entire EDID record (including extensions)
2034 * Return: True if the EDID data is valid, false otherwise.
2036 bool drm_edid_is_valid(struct edid *edid) in drm_edid_is_valid() argument
2040 if (!edid) in drm_edid_is_valid()
2043 for (i = 0; i < edid_block_count(edid); i++) { in drm_edid_is_valid()
2044 void *block = (void *)edid_block_data(edid, i); in drm_edid_is_valid()
2055 * drm_edid_valid - sanity check EDID data
2056 * @drm_edid: EDID data
2058 * Sanity check an EDID. Cross check block count against allocated size and
2061 * Return: True if the EDID data is valid, false otherwise.
2084 static struct edid *edid_filter_invalid_blocks(struct edid *edid, in edid_filter_invalid_blocks() argument
2087 struct edid *new; in edid_filter_invalid_blocks()
2091 * Note: If the EDID uses HF-EEODB, but has invalid blocks, we'll revert in edid_filter_invalid_blocks()
2095 for (i = 0; i < edid_block_count(edid); i++) { in edid_filter_invalid_blocks()
2096 const void *src_block = edid_block_data(edid, i); in edid_filter_invalid_blocks()
2099 void *dst_block = (void *)edid_block_data(edid, valid_blocks); in edid_filter_invalid_blocks()
2108 kfree(edid); in edid_filter_invalid_blocks()
2112 edid->extensions = valid_blocks - 1; in edid_filter_invalid_blocks()
2113 edid->checksum = edid_block_compute_checksum(edid); in edid_filter_invalid_blocks()
2117 new = krealloc(edid, *alloc_size, GFP_KERNEL); in edid_filter_invalid_blocks()
2119 kfree(edid); in edid_filter_invalid_blocks()
2126 * drm_do_probe_ddc_edid() - get EDID information via I2C
2128 * @buf: EDID data buffer to be filled
2129 * @block: 128 byte EDID block to start fetching from
2130 * @len: EDID data buffer length to fetch
2132 * Try to fetch EDID information by calling I2C driver functions.
2189 const struct edid *edid, int num_blocks) in connector_bad_edid() argument
2195 * 0x7e in the EDID is the number of extension blocks. The EDID in connector_bad_edid()
2197 * of 0x7e in the EDID of the _index_ of the last block in the in connector_bad_edid()
2200 last_block = edid->extensions; in connector_bad_edid()
2202 /* Calculate real checksum for the last edid extension block data */ in connector_bad_edid()
2205 edid_block_compute_checksum(edid + last_block); in connector_bad_edid()
2210 drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID is invalid:\n", in connector_bad_edid()
2213 edid_block_dump(KERN_DEBUG, edid + i, i); in connector_bad_edid()
2216 /* Get override or firmware EDID */
2243 seq_write(m, drm_edid->edid, drm_edid->size); in drm_edid_override_show()
2251 int drm_edid_override_set(struct drm_connector *connector, const void *edid, in drm_edid_override_set() argument
2256 drm_edid = drm_edid_alloc(edid, size); in drm_edid_override_set()
2258 drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override invalid\n", in drm_edid_override_set()
2264 drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override set\n", in drm_edid_override_set()
2280 drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID override reset\n", in drm_edid_override_reset()
2294 * drm_edid_override_connector_update - add modes from override/firmware EDID
2297 * Add modes from the override/firmware EDID, if available. Only to be used from
2299 * failed during drm_get_edid() and caused the override/firmware EDID to be
2317 "[CONNECTOR:%d:%s] adding %d modes via fallback override/firmware EDID\n", in drm_edid_override_connector_update()
2360 static struct edid *_drm_do_get_edid(struct drm_connector *connector, in _drm_do_get_edid()
2367 struct edid *edid, *new; in _drm_do_get_edid() local
2373 edid = kmemdup(override->edid, alloc_size, GFP_KERNEL); in _drm_do_get_edid()
2375 if (!edid) in _drm_do_get_edid()
2380 edid = kmalloc(alloc_size, GFP_KERNEL); in _drm_do_get_edid()
2381 if (!edid) in _drm_do_get_edid()
2384 status = edid_block_read(edid, 0, read_block, context); in _drm_do_get_edid()
2386 edid_block_status_print(status, edid, 0); in _drm_do_get_edid()
2391 /* FIXME: Clarify what a corrupt EDID actually means. */ in _drm_do_get_edid()
2397 if (!edid_block_status_valid(status, edid_block_tag(edid))) { in _drm_do_get_edid()
2401 connector_bad_edid(connector, edid, 1); in _drm_do_get_edid()
2405 if (!edid_extension_block_count(edid)) in _drm_do_get_edid()
2408 alloc_size = edid_size(edid); in _drm_do_get_edid()
2409 new = krealloc(edid, alloc_size, GFP_KERNEL); in _drm_do_get_edid()
2412 edid = new; in _drm_do_get_edid()
2414 num_blocks = edid_block_count(edid); in _drm_do_get_edid()
2416 void *block = (void *)edid_block_data(edid, i); in _drm_do_get_edid()
2428 * If the first EDID extension is a CTA extension, and in _drm_do_get_edid()
2436 int eeodb = edid_hfeeodb_block_count(edid); in _drm_do_get_edid()
2441 new = krealloc(edid, alloc_size, GFP_KERNEL); in _drm_do_get_edid()
2444 edid = new; in _drm_do_get_edid()
2450 connector_bad_edid(connector, edid, num_blocks); in _drm_do_get_edid()
2452 edid = edid_filter_invalid_blocks(edid, &alloc_size); in _drm_do_get_edid()
2459 return edid; in _drm_do_get_edid()
2462 kfree(edid); in _drm_do_get_edid()
2467 * drm_do_get_edid - get EDID data using a custom EDID block read function
2469 * @read_block: EDID block read function
2473 * exposes a different interface to read EDID blocks this function can be used
2474 * to get EDID data using a custom block read function.
2480 * The EDID may be overridden using debugfs override_edid or firmware EDID
2482 * order. Having either of them bypasses actual EDID reads.
2484 * Return: Pointer to valid EDID or NULL if we couldn't find any.
2486 struct edid *drm_do_get_edid(struct drm_connector *connector, in drm_do_get_edid()
2495 * drm_edid_raw - Get a pointer to the raw EDID data.
2498 * Get a pointer to the raw EDID data.
2502 * Return: Pointer to raw EDID data.
2504 const struct edid *drm_edid_raw(const struct drm_edid *drm_edid) in drm_edid_raw()
2510 * Do not return pointers where relying on EDID extension count would in drm_edid_raw()
2513 if (WARN_ON(edid_size(drm_edid->edid) > drm_edid->size)) in drm_edid_raw()
2516 return drm_edid->edid; in drm_edid_raw()
2520 /* Allocate struct drm_edid container *without* duplicating the edid data */
2521 static const struct drm_edid *_drm_edid_alloc(const void *edid, size_t size) in _drm_edid_alloc() argument
2525 if (!edid || !size || size < EDID_LENGTH) in _drm_edid_alloc()
2530 drm_edid->edid = edid; in _drm_edid_alloc()
2539 * @edid: Pointer to raw EDID data
2540 * @size: Size of memory allocated for EDID
2542 * Allocate a new drm_edid container. Do not calculate edid size from edid, pass
2544 * of the raw EDID data against the size, but at least the EDID base block must
2551 const struct drm_edid *drm_edid_alloc(const void *edid, size_t size) in drm_edid_alloc() argument
2555 if (!edid || !size || size < EDID_LENGTH) in drm_edid_alloc()
2558 edid = kmemdup(edid, size, GFP_KERNEL); in drm_edid_alloc()
2559 if (!edid) in drm_edid_alloc()
2562 drm_edid = _drm_edid_alloc(edid, size); in drm_edid_alloc()
2564 kfree(edid); in drm_edid_alloc()
2572 * @drm_edid: EDID to duplicate
2583 return drm_edid_alloc(drm_edid->edid, drm_edid->size); in drm_edid_dup()
2589 * @drm_edid: EDID to free
2596 kfree(drm_edid->edid); in drm_edid_free()
2617 * drm_get_edid - get EDID data, if available
2621 * Poke the given I2C channel to grab EDID data if possible. If found,
2624 * Return: Pointer to valid EDID or NULL if we couldn't find any.
2626 struct edid *drm_get_edid(struct drm_connector *connector, in drm_get_edid()
2629 struct edid *edid; in drm_get_edid() local
2637 edid = _drm_do_get_edid(connector, drm_do_probe_ddc_edid, adapter, NULL); in drm_get_edid()
2638 drm_connector_update_edid_property(connector, edid); in drm_get_edid()
2639 return edid; in drm_get_edid()
2644 * drm_edid_read_custom - Read EDID data using given EDID block read function
2646 * @read_block: EDID block read function
2650 * exposes a different interface to read EDID blocks this function can be used
2651 * to get EDID data using a custom block read function.
2658 * The EDID may be overridden using debugfs override_edid or firmware EDID
2660 * order. Having either of them bypasses actual EDID reads.
2664 * Return: Pointer to EDID, or NULL if probe/read failed.
2671 struct edid *edid; in drm_edid_read_custom() local
2674 edid = _drm_do_get_edid(connector, read_block, context, &size); in drm_edid_read_custom()
2675 if (!edid) in drm_edid_read_custom()
2681 drm_edid = _drm_edid_alloc(edid, size); in drm_edid_read_custom()
2683 kfree(edid); in drm_edid_read_custom()
2690 * drm_edid_read_ddc - Read EDID data using given I2C adapter
2694 * Read EDID using the given I2C adapter.
2696 * The EDID may be overridden using debugfs override_edid or firmware EDID
2698 * order. Having either of them bypasses actual EDID reads.
2705 * Return: Pointer to EDID, or NULL if probe/read failed.
2727 * drm_edid_read - Read EDID data using connector's I2C adapter
2730 * Read EDID using the connector's I2C adapter.
2732 * The EDID may be overridden using debugfs override_edid or firmware EDID
2734 * order. Having either of them bypasses actual EDID reads.
2738 * Return: Pointer to EDID, or NULL if probe/read failed.
2749 static u32 edid_extract_panel_id(const struct edid *edid) in edid_extract_panel_id() argument
2764 return (u32)edid->mfg_id[0] << 24 | in edid_extract_panel_id()
2765 (u32)edid->mfg_id[1] << 16 | in edid_extract_panel_id()
2766 (u32)EDID_PRODUCT_ID(edid); in edid_extract_panel_id()
2773 * This function reads the first block of the EDID of a panel and (assuming
2774 * that the EDID is valid) extracts the ID out of it. The ID is a 32-bit value
2780 * assume that the EDID of the panel is correct, at least as far as the ID
2784 * be read the EDID, but there is no caching between them. Since we're only
2801 * the EDID then we'll just return 0. in drm_edid_get_panel_id()
2824 * drm_get_edid_switcheroo - get EDID data for a vga_switcheroo output
2830 * switch DDC to the GPU which is retrieving EDID.
2832 * Return: Pointer to valid EDID or %NULL if we couldn't find any.
2834 struct edid *drm_get_edid_switcheroo(struct drm_connector *connector, in drm_get_edid_switcheroo()
2839 struct edid *edid; in drm_get_edid_switcheroo() local
2845 edid = drm_get_edid(connector, adapter); in drm_get_edid_switcheroo()
2848 return edid; in drm_get_edid_switcheroo()
2853 * drm_edid_read_switcheroo - get EDID data for a vga_switcheroo output
2859 * temporarily switch DDC to the GPU which is retrieving EDID.
2861 * Return: Pointer to valid EDID or %NULL if we couldn't find any.
2882 * drm_edid_duplicate - duplicate an EDID and the extensions
2883 * @edid: EDID to duplicate
2885 * Return: Pointer to duplicated EDID or NULL on allocation failure.
2887 struct edid *drm_edid_duplicate(const struct edid *edid) in drm_edid_duplicate() argument
2889 if (!edid) in drm_edid_duplicate()
2892 return kmemdup(edid, edid_size(edid), GFP_KERNEL); in drm_edid_duplicate()
2896 /*** EDID parsing ***/
2899 * edid_get_quirks - return quirk flags for a given EDID
2900 * @drm_edid: EDID to process
2906 u32 panel_id = edid_extract_panel_id(drm_edid->edid); in edid_get_quirks()
3072 cb(&drm_edid->edid->detailed_timings[i], closure); in drm_for_each_detailed_block()
3106 /* EDID 1.4 defines this explicitly. For EDID 1.3, we guess, badly. */
3110 if (drm_edid->edid->revision >= 4) { in drm_monitor_supports_rb()
3117 return ((drm_edid->edid->input & DRM_EDID_INPUT_DIGITAL) != 0); in drm_monitor_supports_rb()
3223 const struct edid *edid = drm_edid->edid; in standard_timing_level() local
3225 if (edid->revision >= 4) { in standard_timing_level()
3235 } else if (edid->revision >= 3 && drm_gtf2_hbreak(drm_edid)) { in standard_timing_level()
3237 } else if (edid->revision >= 2) { in standard_timing_level()
3314 /* According to the EDID spec, the hdisplay = hsize * 8 + 248 */ in drm_mode_std()
3320 if (drm_edid->edid->revision < 3) in drm_mode_std()
3392 * EDID is delightfully ambiguous about how interlaced modes are to be
3434 * Create a new mode from an EDID detailed timing section. An EDID detailed
3538 mode->width_mm = drm_edid->edid->width_cm * 10; in drm_mode_detailed()
3539 mode->height_mm = drm_edid->edid->height_cm * 10; in drm_mode_detailed()
3550 const struct edid *edid, const u8 *t) in mode_in_hsync_range() argument
3555 if (edid->revision >= 4) in mode_in_hsync_range()
3558 if (edid->revision >= 4) in mode_in_hsync_range()
3567 const struct edid *edid, const u8 *t) in mode_in_vsync_range() argument
3572 if (edid->revision >= 4) in mode_in_vsync_range()
3575 if (edid->revision >= 4) in mode_in_vsync_range()
3583 range_pixel_clock(const struct edid *edid, const u8 *t) in range_pixel_clock() argument
3590 if (edid->revision >= 4 && t[10] == DRM_EDID_CVT_SUPPORT_FLAG) in range_pixel_clock()
3601 const struct edid *edid = drm_edid->edid; in mode_in_range() local
3605 if (!mode_in_hsync_range(mode, edid, t)) in mode_in_range()
3608 if (!mode_in_vsync_range(mode, edid, t)) in mode_in_range()
3611 if ((max_clock = range_pixel_clock(edid, t))) in mode_in_range()
3616 if (edid->revision >= 4 && t[10] == DRM_EDID_CVT_SUPPORT_FLAG) in mode_in_range()
3781 if (closure->drm_edid->edid->revision < 2) in do_inferred_modes()
3796 if (closure->drm_edid->edid->revision < 4) in do_inferred_modes()
3817 if (drm_edid->edid->revision >= 1) in add_inferred_modes()
3864 * Get established modes from EDID and add them. Each EDID block contains a
3872 const struct edid *edid = drm_edid->edid; in add_established_modes() local
3873 unsigned long est_bits = edid->established_timings.t1 | in add_established_modes()
3874 (edid->established_timings.t2 << 8) | in add_established_modes()
3875 ((edid->established_timings.mfg_rsvd & 0x80) << 9); in add_established_modes()
3894 if (edid->revision >= 1) in add_established_modes()
3925 * Get standard modes from EDID and add them. Standard modes can be calculated
3926 * using the appropriate standard (DMT, GTF, or CVT). Grab them from EDID and
3942 &drm_edid->edid->standard_timings[i]); in add_standard_modes()
3949 if (drm_edid->edid->revision >= 1) in add_standard_modes()
4029 if (drm_edid->edid->revision >= 3) in add_cvt_modes()
4072 * @drm_edid: EDID block to scan
4082 if (drm_edid->edid->revision >= 4) in add_detailed_modes()
4086 drm_edid->edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING; in add_detailed_modes()
4115 * Search EDID for CEA extension block.
4117 * FIXME: Prefer not returning pointers to raw EDID data.
4125 /* No EDID or EDID extensions */ in drm_find_edid_extension()
4144 /* Return true if the EDID has a CTA extension or a DisplayID CTA data block */
4514 * the EDID, or NULL on errors.
4897 * Iterate through all CTA Data Blocks in both EDID CTA Extensions and DisplayID
4903 * cea_db_iter_edid_begin(edid, &iter);
5005 * - VESA E-EDID v1.4
5084 * the EDID CTA Extensions, then all the DisplayID CTA blocks. in __cea_db_iter_next()
5086 * Per DisplayID v1.3 Appendix B: DisplayID as an EDID in __cea_db_iter_next()
5167 * Get the HF-EEODB override extension block count from EDID.
5169 * The passed in EDID may be partially read, as long as it has at least two
5170 * blocks (base block and one extension block) if EDID extension count is > 0.
5177 * - HDMI 2.1 section 10.3.6 HDMI Forum EDID Extension Override Data Block
5179 static int edid_hfeeodb_extension_block_count(const struct edid *edid) in edid_hfeeodb_extension_block_count() argument
5184 if (!edid_extension_block_count(edid)) in edid_hfeeodb_extension_block_count()
5187 /* HF-EEODB is always in the first EDID extension block only */ in edid_hfeeodb_extension_block_count()
5188 cta = edid_extension_block_data(edid, 0); in edid_hfeeodb_extension_block_count()
5197 * Sinks that include the HF-EEODB in their E-EDID shall include one and in edid_hfeeodb_extension_block_count()
5198 * only one instance of the HF-EEODB in the E-EDID, occupying bytes 4 in edid_hfeeodb_extension_block_count()
5199 * through 6 of Block 1 of the E-EDID. in edid_hfeeodb_extension_block_count()
5272 /* Add 4:2:0(only) modes present in EDID */ in add_cea_modes()
5472 * drm_edid_get_monitor_name - fetch the monitor name from the edid
5473 * @edid: monitor EDID information
5478 void drm_edid_get_monitor_name(const struct edid *edid, char *name, int bufsize) in drm_edid_get_monitor_name() argument
5485 if (edid) { in drm_edid_get_monitor_name()
5488 .edid = edid, in drm_edid_get_monitor_name()
5489 .size = edid_size(edid), in drm_edid_get_monitor_name()
5515 * drm_edid_to_eld - build ELD from EDID
5517 * @drm_edid: EDID to parse
5519 * Fill the ELD (EDID-Like Data) buffer for passing to the audio driver. The
5547 eld[DRM_ELD_MANUFACTURER_NAME0] = drm_edid->edid->mfg_id[0]; in drm_edid_to_eld()
5548 eld[DRM_ELD_MANUFACTURER_NAME1] = drm_edid->edid->mfg_id[1]; in drm_edid_to_eld()
5549 eld[DRM_ELD_PRODUCT_CODE0] = drm_edid->edid->prod_code[0]; in drm_edid_to_eld()
5550 eld[DRM_ELD_PRODUCT_CODE1] = drm_edid->edid->prod_code[1]; in drm_edid_to_eld()
5636 * drm_edid_to_sad - extracts SADs from EDID
5637 * @edid: EDID to parse
5640 * Looks for CEA EDID block and extracts SADs (Short Audio Descriptors) from it.
5646 int drm_edid_to_sad(const struct edid *edid, struct cea_sad **sads) in drm_edid_to_sad() argument
5650 return _drm_edid_to_sad(drm_edid_legacy_init(&drm_edid, edid), sads); in drm_edid_to_sad()
5681 * drm_edid_to_speaker_allocation - extracts Speaker Allocation Data Blocks from EDID
5682 * @edid: EDID to parse
5685 * Looks for CEA EDID block and extracts the Speaker Allocation Data Block from it.
5692 int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb) in drm_edid_to_speaker_allocation() argument
5696 return _drm_edid_to_speaker_allocation(drm_edid_legacy_init(&drm_edid, edid), in drm_edid_to_speaker_allocation()
5730 * Convert raw EDID values to millisecond. in drm_av_sync_delay()
5766 * @edid: monitor EDID information
5770 * Drivers that have added the modes parsed from EDID to drm_display_info
5775 bool drm_detect_hdmi_monitor(const struct edid *edid) in drm_detect_hdmi_monitor() argument
5779 return _drm_detect_hdmi_monitor(drm_edid_legacy_init(&drm_edid, edid)); in drm_detect_hdmi_monitor()
5827 * @edid: EDID block to scan
5833 * audio' is not defined in EDID.
5837 bool drm_detect_monitor_audio(const struct edid *edid) in drm_detect_monitor_audio() argument
5841 return _drm_detect_monitor_audio(drm_edid_legacy_init(&drm_edid, edid)); in drm_detect_monitor_audio()
6100 * * Availability of a HF-VSDB block in EDID (check) in drm_parse_hdmi_forum_scds()
6235 * See EDID extension for head-mounted and specialized monitors, specified at:
6236 …* https://docs.microsoft.com/en-us/windows-hardware/drivers/display/specialized-monitors-edid-exte…
6329 const struct edid *edid = closure->drm_edid->edid; in get_monitor_range() local
6349 if (edid->revision >= 4) { in get_monitor_range()
6366 if (drm_edid->edid->revision < 4) in drm_get_monitor_range()
6369 if (!(drm_edid->edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ)) in drm_get_monitor_range()
6454 /* A connector has no EDID information, so we've got no EDID to compute quirks from. Reset
6455 * all of the values which would have been set from EDID
6521 const struct edid *edid; in update_display_info() local
6529 edid = drm_edid->edid; in update_display_info()
6533 info->width_mm = edid->width_cm * 10; in update_display_info()
6534 info->height_mm = edid->height_cm * 10; in update_display_info()
6538 if (edid->revision < 3) in update_display_info()
6541 if (!(edid->input & DRM_EDID_INPUT_DIGITAL)) in update_display_info()
6550 * Digital sink with "DFP 1.x compliant TMDS" according to EDID 1.3? in update_display_info()
6552 * For such displays, the DFP spec 1.0, section 3.10 "EDID support" in update_display_info()
6553 * tells us to assume 8 bpc color depth if the EDID doesn't have in update_display_info()
6556 if (info->bpc == 0 && edid->revision == 3 && in update_display_info()
6557 edid->input & DRM_EDID_DIGITAL_DFP_1_X) { in update_display_info()
6565 if (edid->revision < 4) in update_display_info()
6568 switch (edid->input & DRM_EDID_DIGITAL_DEPTH_MASK) { in update_display_info()
6594 "[CONNECTOR:%d:%s] Assigning EDID-1.4 digital sink color depth as %d bpc.\n", in update_display_info()
6597 if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB444) in update_display_info()
6599 if (edid->features & DRM_EDID_FEATURE_RGB_YCRCB422) in update_display_info()
6733 * EDID spec says modes should be preferred in this order: in _drm_edid_connector_add_modes()
6753 if (drm_edid->edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ) in _drm_edid_connector_add_modes()
6772 const struct edid *old_edid = connector->edid_blob_ptr->data; in _drm_edid_connector_property_update()
6775 if (!drm_edid_are_equal(drm_edid ? drm_edid->edid : NULL, old_edid)) { in _drm_edid_connector_property_update()
6777 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] EDID changed, epoch counter %llu\n", in _drm_edid_connector_property_update()
6787 drm_edid ? drm_edid->edid : NULL, in _drm_edid_connector_property_update()
6791 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] EDID property update failed (%d)\n", in _drm_edid_connector_property_update()
6817 * drm_edid_connector_update - Update connector information from EDID
6819 * @drm_edid: EDID
6822 * etc. from the passed in EDID.
6824 * If EDID is NULL, reset the information.
6842 * drm_edid_connector_add_modes - Update probed modes from the EDID property
6845 * Add the modes from the previously updated EDID property to the connector
6849 * EDID property.
6871 * drm_connector_update_edid_property - update the edid property of a connector
6873 * @edid: new value of the edid property
6876 * connector's edid property.
6877 * Since we also parse tile information from EDID's displayID block, we also
6887 const struct edid *edid) in drm_connector_update_edid_property() argument
6891 return drm_edid_connector_update(connector, drm_edid_legacy_init(&drm_edid, edid)); in drm_connector_update_edid_property()
6896 * drm_add_edid_modes - add modes from EDID data, if available
6898 * @edid: EDID data
6902 * can be derived from the edid.
6908 int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid) in drm_add_edid_modes() argument
6913 if (edid && !drm_edid_is_valid(edid)) { in drm_add_edid_modes()
6914 drm_warn(connector->dev, "[CONNECTOR:%d:%s] EDID invalid.\n", in drm_add_edid_modes()
6916 edid = NULL; in drm_add_edid_modes()
6919 drm_edid = drm_edid_legacy_init(&_drm_edid, edid); in drm_add_edid_modes()
6928 * drm_add_modes_noedid - add modes for the connectors without EDID