Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Aug 2012 09:25:09 +0800
From:      Meowthink <meowthink@gmail.com>
To:        freebsd-x11@freebsd.org
Cc:        freebsd-emulation@freebsd.org
Subject:   [CFT]Patch for dri / drm interoperability i386 world / amd64 kernel
Message-ID:  <CABnABoZKENJqcoQbkw6A0hJY_YY6Y0-FUM6GghtE%2Ba4wH7GwVA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--e89a8f923ba0d5719b04c6f3547f
Content-Type: text/plain; charset=ISO-8859-1

Hello all,

So long FreeBSD's DRI implementation lacks of i386/amd64
interoperability, as discussed [0] [1]. This breaks wine, linuxulator
etc. drawing using DRI-based OpenGL.
Paul Mackerras et al. actually did that part for Linux implementation,
so I simply translated their work to FreeBSD. Due to my poor
programming skills, there's some limitations:
0. I tried to split compatible codes into separate files, like under
Linux. But as a result of the difference between FreeBSD and Linux,
the code is integrated in a  "#include ...ioc32.c" form which is not
so elegant.
1. For same reason, struct drm_driver_info has to be changed.
2. There should be some assertions if a 64-bit pointer failed to fit
in a 32-bit space. Linux implementation didn't do this either, but
they're guaranteed by user-space ioctl structures. This may result
unstable under heavy load.
3. Technically this could be applied to either drm and drm2 module.
The patch is for drm2 only because I only translated core drm and
intel part.

For wine, my setup is based on David Naylor's wine-fbsd64.patch, with
xorg-dev ports tree. It works well, with minor manual works:
0. Copy /i386chroot/usr/local/lib/dri/i965_drv.so to
/usr/local/lib32/dri/ or somewhere else and setenv LIBGL_DRIVERS_PATH
to there(My suggestion is add the following line in /usr/bin/wine:)
export LIBGL_DRIVERS_PATH="$LOCALBASE/lib32/dri":"$LIBGL_DRIVERS_PATH"
1. Copy /i386chroot/usr/local/lib/libdrm_intel.so,
/i386chroot/usr/local/lib/libpciaccess.so.0 to /usr/local/lib32/
This enables direct rendering of d3d/gl demos under wine on my Intel
SNB platform.

I didn't test using this with linuxulator, as linux base from port
don't have up-to-date libdrm/mesa dri-drivers.

[0] http://lists.freebsd.org/pipermail/freebsd-amd64/2005-August/005818.html
[1] http://forums.freebsd.org/showthread.php?t=24519

Regards,
Meowthink

--e89a8f923ba0d5719b04c6f3547f
Content-Type: application/octet-stream; 
	name="0001-Add-64-bit-kernel-32-bit-world-compatible-wrappers-t.patch"
Content-Disposition: attachment; 
	filename="0001-Add-64-bit-kernel-32-bit-world-compatible-wrappers-t.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h5pze6aq0

RnJvbSBiYzg0NDc0MzI3YzZiMGViYjMxOTc1ZWU3Yzk5ZGJiY2UyNTcxNjZjIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBNZW93dGhpbmsgPG1lb3d0aGlua0Bnb29nbGVtYWlsLmNvbT4K
RGF0ZTogVHVlLCAzMSBKdWwgMjAxMiAxNzozNTowMiArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIEFk
ZCA2NC1iaXQga2VybmVsIC8gMzItYml0IHdvcmxkIGNvbXBhdGlibGUgd3JhcHBlcnMgdG8KIGRy
bTIvaTkxNWttcwoKLS0tCiBzeXMvZGV2L2RybTIvZHJtUC5oICAgICAgICAgICAgICAgfCAgIDQg
Kwogc3lzL2Rldi9kcm0yL2RybV9kcnYuYyAgICAgICAgICAgIHwgIDI0ICsrCiBzeXMvZGV2L2Ry
bTIvZHJtX2lvYzMyLmMgICAgICAgICAgfCA3ODEgKysrKysrKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysKIHN5cy9kZXYvZHJtMi9pOTE1L2k5MTVfZG1hLmMgICAgICB8ICAgNyArCiBz
eXMvZGV2L2RybTIvaTkxNS9pOTE1X2lvYzMyLmMgICAgfCAxMjQgKysrKysrCiBzeXMvbW9kdWxl
cy9kcm0yL2RybTIvTWFrZWZpbGUgICAgfCAgIDIgKy0KIHN5cy9tb2R1bGVzL2RybTIvaTkxNWtt
cy9NYWtlZmlsZSB8ICAgMyArLQogNyBmaWxlcyBjaGFuZ2VkLCA5NDMgaW5zZXJ0aW9ucygrKSw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2lmLmggcGNpX2lmLmggaWljYnVzX2lmLmggaWljYmJfaWYuaCBvcHRfZHJtLmggXAorCSBv
cHRfY29tcGF0LmgKIAogLmluY2x1ZGUgPGJzZC5rbW9kLm1rPgo=
--e89a8f923ba0d5719b04c6f3547f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABnABoZKENJqcoQbkw6A0hJY_YY6Y0-FUM6GghtE%2Ba4wH7GwVA>