[PATCH 05/17] DRM/KMS/EDID: Fix up EEDID Map Blocks if Extension block count has changed.
Takashi Iwai
tiwai at suse.de
Tue Nov 20 00:13:35 PST 2012
At Mon, 19 Nov 2012 15:23:06 -0500,
"Egbert Eich " <"eich at novell.com> wrote:
>
> EEDID v1.3 mandates map blocks if more than one EDID extension block
> is used while in v1.4 they are optional.
> If the extension count has been changed (because some extension
> blocks were not readable) those map blocks need fixing.
> In case of v1.4 or higher we simply eliminate all map blocks as
> this is less time consuming. For v1.3 we scrap any exsisting map
> blocks and recreate them from scratch.
>
> Signed-off-by: Egbert Eich <eich at suse.de>
> ---
> drivers/gpu/drm/drm_edid.c | 105 +++++++++++++++++++++++++++++++++++++++++--
> 1 files changed, 100 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index ec6f3bb..d1b9d67 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -44,7 +44,11 @@
> #define EDID_DETAILED_TIMINGS 4
>
> #define EDID_EXTENSION_FLAG_OFFSET ((size_t)&((struct edid *)0)->extensions)
> -#define EDID_CHECKSUM_OFFSET ((size_t)&((struct edid *)0)->checksum)
> +#define EDID_CHECKSUM_OFFSET ((size_t)&((struct edid *)0)->checksum)
> +#define EDID_VERSION_MAJOR_OFFSET ((size_t)&((struct edid *)0)->version)
> +#define EDID_VERSION_MINOR_OFFSET ((size_t)&((struct edid *)0)->revision)
Better to use offsetof().
Takashi
More information about the dri-devel
mailing list