Module Name: xsrc Committed By: macallan Date: Wed Jun 29 04:11:31 UTC 2011
Modified Files: xsrc/external/mit/xf86-video-r128/dist/src: r128_driver.c Log Message: use ioctl(WSDISPLAYIO_GET_EDID) To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c diff -u xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.5 xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.6 --- xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c:1.5 Sun May 15 23:44:47 2011 +++ xsrc/external/mit/xf86-video-r128/dist/src/r128_driver.c Wed Jun 29 04:11:31 2011 @@ -1395,6 +1395,10 @@ return TRUE; } +/* XXX + * the following comment is bogus - the code scans the main monitor port, + * not R128_GPIO_MONIDB + */ /* return TRUE is a DFP is indeed connected to a DVI port */ static Bool R128GetDFPInfo(ScrnInfoPtr pScrn) { @@ -1416,6 +1420,22 @@ & ~(CARD32)(R128_GPIO_MONID_A_0 | R128_GPIO_MONID_A_3)); MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, info->pI2CBus); +#ifdef __NetBSD__ + { + struct wsdisplayio_edid_info ei; + char buffer[1024]; + int i, j; + + ei.edid_data = buffer; + ei.buffer_size = 1024; + if (ioctl(xf86Info.screenFd, WSDISPLAYIO_GET_EDID, &ei) != -1) { + xf86Msg(X_INFO, "got %d bytes worth of EDID from wsdisplay\n", ei.data_size); + MonInfo = xf86InterpretEDID(pScrn->scrnIndex, buffer); + } else + xf86Msg(X_INFO, "ioctl failed %d\n", errno); + } +#endif + if(!MonInfo) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No DFP detected\n");