diff options
author | Keith Packard <keithp@keithp.com> | 2010-01-29 23:28:46 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-01-31 18:08:23 -0800 |
commit | 1a76fa5574e8e8f88ac3518a4e4494e1af301dc1 (patch) | |
tree | 9add8354b1a7f4fa8a26f42093cb528d6c6fe373 | |
parent | 918151a7955c26174db80b775205f6ffb4f44ab6 (diff) | |
download | xf86-video-intel-1a76fa5574e8e8f88ac3518a4e4494e1af301dc1.tar.gz xf86-video-intel-1a76fa5574e8e8f88ac3518a4e4494e1af301dc1.tar.bz2 xf86-video-intel-1a76fa5574e8e8f88ac3518a4e4494e1af301dc1.zip |
Initialize DRI2 info rec version 4 list of driver names
With DRI2 supporting multiple subsystems, the video driver must
initialize the list of driver names instead of just passing the single
driver name used by Mesa. Without this, the X server will fail to
initialize DRI2 as the numDrivers field in this structure will be
uninitialized.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/i830_dri.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index ed9d69f62..0996629ed 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -865,6 +865,9 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) int dri2_major = 1; int dri2_minor = 0; #endif +#if DRI2INFOREC_VERSION >= 4 + const char *driverNames[1]; +#endif #ifdef USE_DRI2_1_1_0 if (xf86LoaderCheckSymbol("DRI2Version")) { @@ -879,6 +882,7 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) #endif intel->deviceName = drmGetDeviceNameFromFd(intel->drmSubFD); + memset(&info, '\0', sizeof(info)); info.fd = intel->drmSubFD; info.driverName = IS_I965G(intel) ? "i965" : "i915"; info.deviceName = intel->deviceName; @@ -907,6 +911,9 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) info.ScheduleSwap = I830DRI2ScheduleSwap; info.GetMSC = I830DRI2GetMSC; info.ScheduleWaitMSC = I830DRI2ScheduleWaitMSC; + info.numDrivers = 1; + info.driverNames = driverNames; + driverNames[0] = info.driverName; #endif return DRI2ScreenInit(screen, &info); |