aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/ddc/ddc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-08 14:29:46 +0200
committermarha <marha@users.sourceforge.net>2012-06-08 14:50:37 +0200
commit72ec0e3bb2d7fc6b77b2a75873792f781679da6a (patch)
tree0a736ab9a8c26276929ab077dc661e3625b54884 /xorg-server/hw/xfree86/ddc/ddc.c
parent5e865910f0ce672295bd60460631339be5e311a0 (diff)
parent990bc3f015a4f8fce2eb918375defcd44980a845 (diff)
downloadvcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.gz
vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.tar.bz2
vcxsrv-72ec0e3bb2d7fc6b77b2a75873792f781679da6a.zip
Merge remote-tracking branch 'origin/released'
Conflicts: fontconfig/.gitignore libX11/src/ConvSel.c libX11/src/CrGlCur.c libX11/src/CrWindow.c libX11/src/GetDflt.c libX11/src/Window.c libX11/src/xlibi18n/XimProto.h libX11/src/xlibi18n/lcDynamic.c libxcb/src/.gitignore libxcb/src/xcb_ext.c libxcb/src/xcb_xid.c mesalib/src/glsl/.gitignore mesalib/src/glsl/glcpp/.gitignore mesalib/src/mapi/glapi/gen/glX_API.xml mesalib/src/mapi/glapi/glapi_getproc.c mesalib/src/mesa/main/.gitignore mesalib/src/mesa/main/syncobj.c mesalib/src/mesa/program/.gitignore xkbcomp/listing.c xkbcomp/xkbpath.c xorg-server/.gitignore xorg-server/Xext/xvmain.c xorg-server/dix/dispatch.c xorg-server/hw/xwin/glx/winpriv.h xorg-server/hw/xwin/winprefsyacc.y xorg-server/hw/xwin/winscrinit.c xorg-server/xkeyboard-config/rules/bin/ml1_s.sh xorg-server/xkeyboard-config/rules/bin/ml1v1_s.sh xorg-server/xkeyboard-config/rules/bin/ml1v_s.sh xorg-server/xkeyboard-config/rules/bin/ml_s.sh xorg-server/xkeyboard-config/rules/bin/mlv_s.sh xorg-server/xkeyboard-config/rules/compat/.gitignore
Diffstat (limited to 'xorg-server/hw/xfree86/ddc/ddc.c')
-rw-r--r--xorg-server/hw/xfree86/ddc/ddc.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/xorg-server/hw/xfree86/ddc/ddc.c b/xorg-server/hw/xfree86/ddc/ddc.c
index a1281d735..28c969646 100644
--- a/xorg-server/hw/xfree86/ddc/ddc.c
+++ b/xorg-server/hw/xfree86/ddc/ddc.c
@@ -258,10 +258,9 @@ EDIDRead_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDCSpeed,
* @return NULL if no monitor attached or failure to interpret the EDID.
*/
xf86MonPtr
-xf86DoEDID_DDC1(int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
+xf86DoEDID_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDC1SetSpeed,
unsigned int (*DDC1Read) (ScrnInfoPtr))
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
unsigned char *EDID_block = NULL;
xf86MonPtr tmp = NULL;
@@ -285,7 +284,7 @@ xf86DoEDID_DDC1(int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed,
OsReleaseSignals();
if (EDID_block) {
- tmp = xf86InterpretEDID(scrnIndex, EDID_block);
+ tmp = xf86InterpretEDID(pScrn->scrnIndex, EDID_block);
}
#ifdef DEBUG
else
@@ -323,7 +322,7 @@ DDC2MakeDevice(I2CBusPtr pBus, int address, char *name)
}
static I2CDevPtr
-DDC2Init(int scrnIndex, I2CBusPtr pBus)
+DDC2Init(I2CBusPtr pBus)
{
I2CDevPtr dev = NULL;
@@ -403,9 +402,8 @@ DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer)
* @return NULL if no monitor attached or failure to interpret the EDID.
*/
xf86MonPtr
-xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
+xf86DoEEDID(ScrnInfoPtr pScrn, I2CBusPtr pBus, Bool complete)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
unsigned char *EDID_block = NULL;
xf86MonPtr tmp = NULL;
I2CDevPtr dev = NULL;
@@ -427,7 +425,7 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
if (noddc || noddc2)
return NULL;
- if (!(dev = DDC2Init(scrnIndex, pBus)))
+ if (!(dev = DDC2Init(pBus)))
return NULL;
EDID_block = calloc(1, EDID1_LEN);
@@ -444,7 +442,7 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
DDC2Read(dev, i + 1, EDID_block + (EDID1_LEN * (1 + i)));
}
- tmp = xf86InterpretEEDID(scrnIndex, EDID_block);
+ tmp = xf86InterpretEEDID(pScrn->scrnIndex, EDID_block);
}
if (tmp && complete)
@@ -465,9 +463,9 @@ xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete)
* @return NULL if no monitor attached or failure to interpret the EDID.
*/
xf86MonPtr
-xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus)
+xf86DoEDID_DDC2(ScrnInfoPtr pScrn, I2CBusPtr pBus)
{
- return xf86DoEEDID(scrnIndex, pBus, FALSE);
+ return xf86DoEEDID(pScrn, pBus, FALSE);
}
/* XXX write me */
@@ -489,9 +487,8 @@ DDC2ReadDisplayID(void)
* @return NULL if no monitor attached or failure to interpret the DisplayID.
*/
xf86MonPtr
-xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus)
+xf86DoDisplayID(ScrnInfoPtr pScrn, I2CBusPtr pBus)
{
- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
unsigned char *did = NULL;
xf86MonPtr tmp = NULL;
I2CDevPtr dev = NULL;
@@ -513,7 +510,7 @@ xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus)
if (noddc || noddc2)
return NULL;
- if (!(dev = DDC2Init(scrnIndex, pBus)))
+ if (!(dev = DDC2Init(pBus)))
return NULL;
if ((did = DDC2ReadDisplayID())) {
@@ -521,7 +518,7 @@ xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus)
if (!tmp)
return NULL;
- tmp->scrnIndex = scrnIndex;
+ tmp->scrnIndex = pScrn->scrnIndex;
tmp->flags |= MONITOR_DISPLAYID;
tmp->rawData = did;
}