Commit 6e8a942b authored by Ville Syrjälä's avatar Ville Syrjälä

drm/edid: Document why we don't bounds check the DispID CEA block start/end

After much head scratching I managed to convince myself that
for_each_displayid_db() has already done the bounds checks for
the DispID CEA data block. Which is why we don't need to repeat
them in cea_db_offsets(). To avoid having to go through that
pain again in the future add a comment which explains this fact.

Cc: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200124200231.10517-5-ville.syrjala@linux.intel.comAcked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
parent 4d23f484
...@@ -4017,6 +4017,10 @@ cea_db_offsets(const u8 *cea, int *start, int *end) ...@@ -4017,6 +4017,10 @@ cea_db_offsets(const u8 *cea, int *start, int *end)
* no non-DTD data. * no non-DTD data.
*/ */
if (cea[0] == DATA_BLOCK_CTA) { if (cea[0] == DATA_BLOCK_CTA) {
/*
* for_each_displayid_db() has already verified
* that these stay within expected bounds.
*/
*start = 3; *start = 3;
*end = *start + cea[2]; *end = *start + cea[2];
} else if (cea[0] == CEA_EXT) { } else if (cea[0] == CEA_EXT) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment