From: Zhenyu Wang Subject: Re: [Intel-gfx] [PATCH] Initialize DRI2 info rec version 4 list of driver names Date: Mon, 1 Feb 2010 09:39:04 +0800 Message-ID: <20100201013904.GA23806@zhen-devel.sh.intel.com> References: <1264836666-3809-1-git-send-email-keithp@keithp.com> Reply-To: Zhenyu Wang Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2803199249741261594==" Return-path: In-Reply-To: <1264836666-3809-1-git-send-email-keithp@keithp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: Keith Packard Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.sourceforge.net List-Id: dri-devel@lists.freedesktop.org --===============2803199249741261594== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010.01.29 23:31:06 -0800, Keith Packard wrote: > 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. >=20 Please push this, I've met this too and fixed it locally, without this X crashed for me in start up. > Signed-off-by: Keith Packard > --- > src/i830_dri.c | 7 +++++++ > 1 files changed, 7 insertions(+), 0 deletions(-) >=20 > diff --git a/src/i830_dri.c b/src/i830_dri.c > index ed9d69f..0996629 100644 > --- a/src/i830_dri.c > +++ b/src/i830_dri.c > @@ -865,6 +865,9 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) > int dri2_major =3D 1; > int dri2_minor =3D 0; > #endif > +#if DRI2INFOREC_VERSION >=3D 4 > + const char *driverNames[1]; > +#endif > =20 > #ifdef USE_DRI2_1_1_0 > if (xf86LoaderCheckSymbol("DRI2Version")) { > @@ -879,6 +882,7 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) > #endif > =20 > intel->deviceName =3D drmGetDeviceNameFromFd(intel->drmSubFD); > + memset(&info, '\0', sizeof(info)); > info.fd =3D intel->drmSubFD; > info.driverName =3D IS_I965G(intel) ? "i965" : "i915"; > info.deviceName =3D intel->deviceName; > @@ -907,6 +911,9 @@ Bool I830DRI2ScreenInit(ScreenPtr screen) > info.ScheduleSwap =3D I830DRI2ScheduleSwap; > info.GetMSC =3D I830DRI2GetMSC; > info.ScheduleWaitMSC =3D I830DRI2ScheduleWaitMSC; > + info.numDrivers =3D 1; > + info.driverNames =3D driverNames; > + driverNames[0] =3D info.driverName; > #endif > =20 > return DRI2ScreenInit(screen, &info); > --=20 > 1.6.6.1 >=20 > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --n8g4imXOkfNTN/H1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAktmMLgACgkQsQQaM014GCfN1wCghs8znI5BrZ/Q+B2Z5j0Rterr Iz4AnR/LTmLYNwkNN/YOzP1tAemSiSNh =psyG -----END PGP SIGNATURE----- --n8g4imXOkfNTN/H1-- --===============2803199249741261594== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --===============2803199249741261594== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel --===============2803199249741261594==--