[PATCH 1/9] Includes some new structures and defined MACRO in edid.h

Alex Deucher alexdeucher at gmail.com
Thu Jan 22 06:50:23 PST 2009


On Thu, Jan 22, 2009 at 2:46 AM, Ma Ling <ling.ma at intel.com> wrote:
> defined corresponding structure and MACRO for detailed timing and CEA data blocks.
>
> ---
>  hw/xfree86/ddc/edid.h |   90 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 90 insertions(+), 0 deletions(-)
>
> diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
> index b556003..7167f64 100644
> --- a/hw/xfree86/ddc/edid.h
> +++ b/hw/xfree86/ddc/edid.h
> @@ -555,4 +555,94 @@ typedef struct {
>
>  extern _X_EXPORT xf86MonPtr ConfiguredMonitor;
>
> +#define EXT_TAG 0
> +#define EXT_REV 1
> +#define CEA_EXT   0x02
> +#define VTB_EXT   0x10
> +#define DI_EXT    0x40
> +#define LS_EXT    0x50
> +#define MI_EXT    0x60
> +
> +#define CEA_EXT_MIN_DATA_OFFSET 4
> +#define CEA_EXT_MAX_DATA_OFFSET 127
> +#define CEA_EXT_DET_TIMING_NUM 6
> +
> +#define IEEE_ID_HDMI    0x000C03
> +#define CEA_AUDIO_BLK   1
> +#define CEA_VIDEO_BLK   2
> +#define CEA_VENDOR_BLK  3
> +#define CEA_SPEAKER_ALLOC_BLK 4
> +#define CEA_VESA_DTC_BLK 5
> +#define VENDOR_SUPPORT_AI(x) (x >> 7)
> +#define VENDOR_SUPPORT_DC_48bit(x) ( ( x >> 6) & 0x01)
> +#define VENDOR_SUPPORT_DC_36bit(x) ( ( x >> 5) & 0x01)
> +#define VENDOR_SUPPORT_DC_30bit(x) ( ( x >> 4) & 0x01)
> +#define VENDOR_SUPPORT_DC_Y444(x)  ( ( x >> 3) & 0x01)
> +#define VENDOR_LATENCY_PRESENT(x)  ( ( x >> 7) )
> +#define VENDOR_LATENCY_PRESENT_I(x)  ( ( x >> 6) & 0x01)

I would suggest putting parentheses around x in the above macros, e.g.,
#define VENDOR_LATENCY_PRESENT_I(x)  ( ( (x) >> 6) & 0x01)
to avoid problems with passing things to the macros.

Alex



More information about the xorg mailing list