From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 12/12] drm/edid: reduce magic when updating the EDID block checksum
Date: Thu, 31 Mar 2022 17:59:48 +0300 [thread overview]
Message-ID: <YkXB5ASH8F7KLANc@intel.com> (raw)
In-Reply-To: <0ec68aa82b4be2d46e442e74e341419d10c4c41b.1648578814.git.jani.nikula@intel.com>
On Tue, Mar 29, 2022 at 09:42:19PM +0300, Jani Nikula wrote:
> 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>
> ---
> drivers/gpu/drm/drm_edid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index d0a76781ed19..d2dfab28b5b7 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -1840,8 +1840,8 @@ static struct edid *edid_filter_invalid_blocks(const struct edid *edid,
> memcpy(base++, block, EDID_LENGTH);
> }
>
> - new->checksum += new->extensions - valid_extensions;
> new->extensions = valid_extensions;
> + new->checksum = edid_block_compute_checksum(new);
Seems to happen after we've validated the base block so this won't
accidentally fix up an already bad checksum.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> out:
> kfree(edid);
> --
> 2.30.2
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-03-31 14:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 18:42 [PATCH 00/12] drm/edid: cleanup and refactoring around validity checks Jani Nikula
2022-03-29 18:42 ` [PATCH 01/12] drm/edid: use struct edid * in drm_do_get_edid() Jani Nikula
2022-03-30 13:05 ` Ville Syrjälä
2022-03-30 15:16 ` Jani Nikula
2022-03-30 15:39 ` Ville Syrjälä
2022-03-30 16:28 ` Jani Nikula
2022-03-30 16:50 ` Ville Syrjälä
2022-03-30 17:09 ` [Intel-gfx] " Jani Nikula
2022-03-30 21:01 ` Jani Nikula
2022-03-31 18:46 ` Jani Nikula
2022-03-29 18:42 ` [PATCH 02/12] drm/edid: clean up EDID block checksum functions Jani Nikula
2022-03-29 18:42 ` [PATCH 03/12] drm/edid: add edid_block_tag() helper to get the EDID extension tag Jani Nikula
2022-03-29 18:42 ` [PATCH 04/12] drm/edid: make drm_edid_header_is_valid() accept void pointer Jani Nikula
2022-03-29 18:42 ` [PATCH 05/12] drm/edid: clean up edid_is_zero() Jani Nikula
2022-03-29 18:42 ` [PATCH 06/12] drm/edid: split out edid_header_fix() Jani Nikula
2022-03-29 18:42 ` [PATCH 07/12] drm/edid: split drm_edid_block_valid() to check and act parts Jani Nikula
2022-03-31 14:54 ` Ville Syrjälä
2022-03-31 15:54 ` Jani Nikula
2022-03-31 16:49 ` Jani Nikula
2022-03-31 16:58 ` Ville Syrjälä
2022-03-29 18:42 ` [PATCH 08/12] drm/edid: use a better variable name for EDID block read retries Jani Nikula
2022-03-31 14:55 ` Ville Syrjälä
2022-03-29 18:42 ` [PATCH 09/12] drm/edid: simplify block check when filtering invalid blocks Jani Nikula
2022-03-29 18:42 ` [PATCH 10/12] drm/edid: split out invalid block filtering to a separate function Jani Nikula
2022-03-29 18:42 ` [PATCH 11/12] drm/edid: track invalid blocks in drm_do_get_edid() Jani Nikula
2022-03-29 18:42 ` [PATCH 12/12] drm/edid: reduce magic when updating the EDID block checksum Jani Nikula
2022-03-31 14:59 ` Ville Syrjälä [this message]
2022-03-31 17:07 ` [PATCH 00/12] drm/edid: cleanup and refactoring around validity checks Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YkXB5ASH8F7KLANc@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).