aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/ddc/ddc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-08 09:33:13 +0200
committermarha <marha@users.sourceforge.net>2012-06-08 09:33:13 +0200
commit990bc3f015a4f8fce2eb918375defcd44980a845 (patch)
tree8e8301f19482b52cc00bd95b4593522cc93267af /xorg-server/hw/xfree86/ddc/ddc.c
parent1af6fc1b5d93e54d6674de8b5870448b29f139a7 (diff)
downloadvcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.tar.gz
vcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.tar.bz2
vcxsrv-990bc3f015a4f8fce2eb918375defcd44980a845.zip
Used synchronise script to update files
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;
}