Re: [PATCH 05/17] DRM/KMS/EDID: Fix up EEDID Map Blocks if Extension block count has changed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Mon, 19 Nov 2012 15:23:06 -0500,
"Egbert Eich " <"eich@xxxxxxxxxx> 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@xxxxxxx>
> ---
>  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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux