mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 04:54:41 +08:00
drm/edid: reduce magic when updating the EDID block checksum
The code modifying the EDID block should not need to do tricks to fix the checksum. We have a function for computing the checksum, use it. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> 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/5a11435419d804a58ef356c0b9acf445cffc1354.1648752228.git.jani.nikula@intel.com
This commit is contained in:
parent
ccc97def44
commit
ab0609a5fb
@ -1842,8 +1842,8 @@ static struct edid *edid_filter_invalid_blocks(const struct edid *edid,
|
|||||||
memcpy(dest_block++, block, EDID_LENGTH);
|
memcpy(dest_block++, block, EDID_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
new->checksum += new->extensions - valid_extensions;
|
|
||||||
new->extensions = valid_extensions;
|
new->extensions = valid_extensions;
|
||||||
|
new->checksum = edid_block_compute_checksum(new);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
kfree(edid);
|
kfree(edid);
|
||||||
|
Loading…
Reference in New Issue
Block a user