2003-11-14 17:48:57 +01:00
|
|
|
|
|
|
|
/* xf86DDC.h
|
|
|
|
*
|
|
|
|
* This file contains all information to interpret a standard EDIC block
|
|
|
|
* transmitted by a display device via DDC (Display Data Channel). So far
|
|
|
|
* there is no information to deal with optional EDID blocks.
|
|
|
|
* DDC is a Trademark of VESA (Video Electronics Standard Association).
|
|
|
|
*
|
|
|
|
* Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef XF86_DDC_H
|
|
|
|
# define XF86_DDC_H
|
|
|
|
|
|
|
|
#include "edid.h"
|
|
|
|
#include "xf86i2c.h"
|
|
|
|
#include "xf86str.h"
|
|
|
|
|
|
|
|
/* speed up / slow down */
|
|
|
|
typedef enum {
|
|
|
|
DDC_SLOW,
|
|
|
|
DDC_FAST
|
|
|
|
} xf86ddcSpeed;
|
|
|
|
|
2004-08-03 11:33:54 +02:00
|
|
|
typedef void (* DDC1SetSpeedProc)(ScrnInfoPtr, xf86ddcSpeed);
|
2004-07-31 03:21:19 +02:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC1(
|
2003-11-14 17:48:57 +01:00
|
|
|
int scrnIndex,
|
2004-07-31 03:21:19 +02:00
|
|
|
DDC1SetSpeedProc DDC1SetSpeed,
|
2003-11-14 17:48:57 +01:00
|
|
|
unsigned int (*DDC1Read)(ScrnInfoPtr)
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC2(
|
2003-11-14 17:48:57 +01:00
|
|
|
int scrnIndex,
|
|
|
|
I2CBusPtr pBus
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool);
|
2007-12-03 21:47:39 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT xf86MonPtr xf86PrintEDID(
|
2003-11-14 17:48:57 +01:00
|
|
|
xf86MonPtr monPtr
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT xf86MonPtr xf86InterpretEDID(
|
2003-11-14 17:48:57 +01:00
|
|
|
int screenIndex, Uchar *block
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT xf86MonPtr xf86InterpretEEDID(
|
2008-07-01 16:55:54 +02:00
|
|
|
int screenIndex, Uchar *block
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT void
|
2009-06-09 16:13:47 +02:00
|
|
|
xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC);
|
2006-09-15 00:30:36 +02:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT Bool xf86SetDDCproperties(
|
2003-11-14 17:48:57 +01:00
|
|
|
ScrnInfoPtr pScreen,
|
|
|
|
xf86MonPtr DDC
|
|
|
|
);
|
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC);
|
2006-11-28 19:31:40 +01:00
|
|
|
|
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 08:43:34 +01:00
|
|
|
extern _X_EXPORT Bool
|
2008-11-03 18:50:28 +01:00
|
|
|
xf86MonitorIsHDMI(xf86MonPtr mon);
|
2003-11-14 17:48:57 +01:00
|
|
|
|
2009-06-09 17:49:41 +02:00
|
|
|
extern _X_EXPORT xf86MonPtr
|
|
|
|
xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus);
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC);
|
|
|
|
|
|
|
|
extern _X_EXPORT DisplayModePtr
|
|
|
|
FindDMTMode(int hsize, int vsize, int refresh, Bool rb);
|
|
|
|
|
|
|
|
extern _X_EXPORT const DisplayModeRec DMTModes[];
|
|
|
|
|
2009-02-18 10:41:26 +01:00
|
|
|
/*
|
|
|
|
* Quirks to work around broken EDID data from various monitors.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
DDC_QUIRK_NONE = 0,
|
|
|
|
/* First detailed mode is bogus, prefer largest mode at 60hz */
|
|
|
|
DDC_QUIRK_PREFER_LARGE_60 = 1 << 0,
|
|
|
|
/* 135MHz clock is too high, drop a bit */
|
|
|
|
DDC_QUIRK_135_CLOCK_TOO_HIGH = 1 << 1,
|
|
|
|
/* Prefer the largest mode at 75 Hz */
|
|
|
|
DDC_QUIRK_PREFER_LARGE_75 = 1 << 2,
|
|
|
|
/* Convert detailed timing's horizontal from units of cm to mm */
|
|
|
|
DDC_QUIRK_DETAILED_H_IN_CM = 1 << 3,
|
|
|
|
/* Convert detailed timing's vertical from units of cm to mm */
|
|
|
|
DDC_QUIRK_DETAILED_V_IN_CM = 1 << 4,
|
|
|
|
/* Detailed timing descriptors have bogus size values, so just take the
|
|
|
|
* maximum size and use that.
|
|
|
|
*/
|
|
|
|
DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5,
|
|
|
|
/* Monitor forgot to set the first detailed is preferred bit. */
|
|
|
|
DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6,
|
|
|
|
/* use +hsync +vsync for detailed mode */
|
|
|
|
DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7,
|
|
|
|
/* Force single-link DVI bandwidth limit */
|
|
|
|
DDC_QUIRK_DVI_SINGLE_LINK = 1 << 8,
|
|
|
|
} ddc_quirk_t;
|
|
|
|
|
|
|
|
typedef void (* handle_detailed_fn)(struct detailed_monitor_section *,void *);
|
|
|
|
|
|
|
|
void xf86ForEachDetailedBlock(xf86MonPtr mon,
|
|
|
|
handle_detailed_fn,
|
|
|
|
void *data);
|
|
|
|
|
|
|
|
ddc_quirk_t
|
|
|
|
xf86DDCDetectQuirks(int scrnIndex, xf86MonPtr DDC, Bool verbose);
|
|
|
|
|
|
|
|
void xf86DetTimingApplyQuirks(struct detailed_monitor_section *det_mon,
|
|
|
|
ddc_quirk_t quirks, int hsize, int vsize);
|
|
|
|
|
|
|
|
typedef void (* handle_video_fn)(struct cea_video_block *, void *);
|
|
|
|
|
|
|
|
void xf86ForEachVideoBlock(xf86MonPtr,
|
|
|
|
handle_video_fn,
|
|
|
|
void *);
|
|
|
|
|
2008-11-03 18:50:28 +01:00
|
|
|
#endif
|