[PATCH 2/3] drm/edid: Use block local to refer to the block
Daniel Vetter
daniel at ffwll.ch
Mon Oct 17 12:28:57 UTC 2016
On Mon, Oct 17, 2016 at 09:35:13AM +0100, Chris Wilson wrote:
> Now that we have the name "block" free once more, we can use it to point
> to the start of a block within the edid.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Merged the 2 prep patches to drm-misc for now. I'll wait with 3/3 until
you&Ville reach some agreement.
Thanks, Daniel
> ---
> drivers/gpu/drm/drm_edid.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 3b4ac28f509e..95de47ba1e77 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -1313,15 +1313,13 @@ struct edid *drm_do_get_edid(struct drm_connector *connector,
> edid = new;
>
> for (j = 1; j <= edid[0x7e]; j++) {
> + u8 *block = edid + (valid_extensions + 1) * EDID_LENGTH;
> +
> for (i = 0; i < 4; i++) {
> - if (get_edid_block(data,
> - edid + (valid_extensions + 1) * EDID_LENGTH,
> - j, EDID_LENGTH))
> + if (get_edid_block(data, block, j, EDID_LENGTH))
> goto out;
> - if (drm_edid_block_valid(edid + (valid_extensions + 1)
> - * EDID_LENGTH, j,
> - print_bad_edid,
> - NULL)) {
> + if (drm_edid_block_valid(block, j,
> + print_bad_edid, NULL)) {
> valid_extensions++;
> break;
> }
> --
> 2.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list