Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/edid: take HF-EEODB extension count into account

Take the HF-EEODB extension count override into account.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c31b5796feb05c3ebac067600be2e88e098d7592.1656494768.git.jani.nikula@intel.com

+13
+13
drivers/gpu/drm/drm_edid.c
··· 1629 1629 /* Starting point */ 1630 1630 num_blocks = edid_block_count(drm_edid->edid); 1631 1631 1632 + /* HF-EEODB override */ 1633 + if (drm_edid->size >= edid_size_by_blocks(2)) { 1634 + int eeodb; 1635 + 1636 + /* 1637 + * Note: HF-EEODB may specify a smaller extension count than the 1638 + * regular one. Unlike in buffer allocation, here we can use it. 1639 + */ 1640 + eeodb = edid_hfeeodb_block_count(drm_edid->edid); 1641 + if (eeodb) 1642 + num_blocks = eeodb; 1643 + } 1644 + 1632 1645 /* Limit by allocated size */ 1633 1646 num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH); 1634 1647