From: Eric Anholt Subject: Re: [PATCH] Add second DRI driver name (DRI2DriverVDPAU) Date: Wed, 28 Aug 2013 16:26:41 -0700 Message-ID: <87txi9qtvy.fsf@eliezer.anholt.net> References: <1376649073.392605286@f12.i.mail.ru> <1377552151.192170899@f62.i.mail.ru> <87haecdol2.fsf@eliezer.anholt.net> <1377588540.132340590@f368.i.mail.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1342453913==" Return-path: In-Reply-To: <1377588540.132340590@f368.i.mail.ru> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Rinat Ibragimov Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1342453913== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Rinat Ibragimov writes: > =D0=9F=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 26 = =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013, 16:22 -07:00 =D0=BE=D1=82 = Eric Anholt : >> Rinat Ibragimov writes: >>=20 >> > =D0=9F=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 26= =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013, 13:40 -07:00 =D0=BE=D1=82= Eric Anholt : >> >> =D0=98=D0=B1=D1=80=D0=B0=D0=B3=D0=B8=D0=BC=D0=BE=D0=B2 =D0=A0=D0=B8= =D0=BD=D0=B0=D1=82 writes: >> >>=20 >> >> > libvdpau uses second DRI driver name to determine which VDPAU driver >> >> > to use. This patch will allow libvdpau choose libvdpau_i965.so on s= ystems >> >> > with Intel GPUs, libvdpau_nvidia.so on those with nVidia ones, and = so on. >> >> > I'm experimenting now with generic vdpau driver using OpenGL/VA-API, >> >> > it would be convenient to have this driver selection working withou= t manual >> >> > driver selection. >> >>=20 >> >> If it's a generic driver, why would it need a "i965" string passed ov= er >> >> the DRI2 protocol to find it? >> > >> > It doesn't actually. It's just to simplify distribution package manage= ment. >> > If one names driver libvdpau_nvidia.so.1, it will break VDPAU on >> > nVidia equipped machines. With this patch one can name it >> > libvdpau_i965.so.1 and driver will be loaded on intel equipped >> > machines only. >> > >> >>=20 >> >> One of the things I'm planning on doing is removing use of the >> >> protocol-provided DRI2 driver name from Mesa -- Mesa knows what drive= rs >> >> it has built, and it knows how to detect those devices (in the EGL >> >> code), so why would we pay attention to what the X Server thinks our >> >> driver's name is? Seems like vdpau could probably do the same. >> >>=20 >> > >> > VDPAU uses entry point library (libvdpau) which loads backend drivers. >> > libvdpau uses second DRI2 driver name amongst other methods to determi= ne >> > which driver to load. It can not rely on Mesa's internal knowledge, be= cause >> > it must work with proprietary nVidia driver too. >>=20 >> Right, I meant "couldn't libvdpau have a method to determine which >> driver to load based on looking at your hardware, like how Mesa's EGL >> does?", since only libvdpau is likely to know how pieces of hardware map >> to driver binaries. >>=20 > > VDPAU drivers have separate code from libvdpau, while Mesa have drivers > inside it (if I get it right). I can't figure out how libvdpau beeing sep= arate > can determine mapping between hardware and driver to load. The only way > is to ask[1] DRI2. Yet the Xorg 2D driver is even less related to the set of vdpau drivers available than the vdpau driver loader (which could do things like look at a symbol in the driver to find a probing mechanism, like the X Server does to X drivers, or read some config directory containing mappings installed by the external drivers). The reason I'm making a point of this is that DRI3 is dropping the driver name strings from the protocol. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBCAAGBQJSHocxAAoJELXWKTbR/J7oyX0P/RrqO8vrfDdYCFuHYDQu1F37 YogWeNcmm+8peuKOzARV39Fkr5tkAA3SaXM9I6ITceujUg/e2hx8fif6HtQ6pDA9 z0DAEt6wcmMxnAOJqLeZtdG55Sl3kx1aQ17AUDYXtwuInbx+gKxTbn2gJk74+vtk CAtOUYFMLDShqaYciyzDFWUhgofgdyCpMZT7hQoiq3n9bEpo/LRK7YwgziAPKzRk uOowZ3m0FJFIINT4wP49Cy0+lO+1bOi/nM0EovzJSuh4XKDxjxZDuRVWaQOVWr/V qKb0230kyX3S9/THPFptH1THyCBwy3aCZSkfJ3eHRDsfdhxJz210eHj07TK3Qv1x J+C1wGYYPyrUyAUsSUCIzjI6Fe4R8FnEuUot1P1jIlZ0HMAs7ZOJCu6dH59iJChd +sqeLSEd+o+s8ezGf+qxWSK1FxhywCuhKC4RTU20Q1xpWSD4UK8abDVT+RrRlbtd 2whvFnILdDASAKmWHNsYUFlPxGuztHjyeiNX9wn3cdiwCw8hp2dah5PBPJuyHTYf 8OFo8TR1JIH+ia7qKf5zCX41fbIVKrLq+CA+gFDb7j7LqeTZc/ZGbOeDmNAPKaR9 ESZpmaDh6dQz4qXRPWAt9YFBr4r4QRN+BrQLcjG8hgQAK1ifyDP5BWH1MmSPqQ6A cdTSOtB5dfFN49Xwm3o/ =zNaU -----END PGP SIGNATURE----- --=-=-=-- --===============1342453913== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1342453913==--