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
This commit is contained in:
parent
18e3c1d5d4
commit
b1dee9527e
1 changed files with 13 additions and 0 deletions
|
@ -1629,6 +1629,19 @@ static int drm_edid_block_count(const struct drm_edid *drm_edid)
|
||||||
/* Starting point */
|
/* Starting point */
|
||||||
num_blocks = edid_block_count(drm_edid->edid);
|
num_blocks = edid_block_count(drm_edid->edid);
|
||||||
|
|
||||||
|
/* HF-EEODB override */
|
||||||
|
if (drm_edid->size >= edid_size_by_blocks(2)) {
|
||||||
|
int eeodb;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note: HF-EEODB may specify a smaller extension count than the
|
||||||
|
* regular one. Unlike in buffer allocation, here we can use it.
|
||||||
|
*/
|
||||||
|
eeodb = edid_hfeeodb_block_count(drm_edid->edid);
|
||||||
|
if (eeodb)
|
||||||
|
num_blocks = eeodb;
|
||||||
|
}
|
||||||
|
|
||||||
/* Limit by allocated size */
|
/* Limit by allocated size */
|
||||||
num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH);
|
num_blocks = min(num_blocks, (int)drm_edid->size / EDID_LENGTH);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue