Skip to contentSkip to conversation

mesa: enable additional drivers for gallium-llvm x86/x86-64

PATCH In review Jonathan Liu 2 participants 5 messages Aug 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mesa: enable additional drivers for gallium-llvm x86/x86-64

The additional Gallium drivers are needed for open source ATI Radeon and NVIDIA graphics drivers.

The radeonsi and r600 drivers require LLVM 3.3 built with r600 PACKAGECONFIG so they must be explicitly enabled by adding r600 to the mesa PACKAGECONFIG.

---
 meta/recipes-graphics/mesa/mesa.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-graphics/mesa/mesa.inc +4 -0
index 447e186..e985d67 100644
@@ -50,6 +50,10 @@ PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disa
 PACKAGECONFIG[openvg] = "--enable-openvg, --disable-openvg"
 
 GALLIUMDRIVERS = "swrast"
+GALLIUMDRIVERS_LLVM33 = "${@base_contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
+GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', '', ',${GALLIUMDRIVERS_LLVM33}', d)}"
+GALLIUMDRIVERS_append_x86 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append_x86-64 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
 # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
 PACKAGECONFIG[gallium]      = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
 PACKAGECONFIG[gallium-egl]  = "--enable-gallium-egl, --disable-gallium-egl"
Signature · 1 line
1.8.3.4
#1 lore raw
Quoted 6 lines · Jonathan Liu

The additional Gallium drivers are needed for open source ATI Radeon and NVIDIA graphics drivers.

The radeonsi and r600 drivers require LLVM 3.3 built with r600 PACKAGECONFIG so they must be explicitly enabled by adding r600 to the mesa PACKAGECONFIG.

BTW: I just got interesting question about egl_gallium:

libEGL warning: Could not open driver /usr/lib/egl/egl_gallium.so (libLLVM-3.3.so: cannot open shared object file: No such file or directory)
Could not initialize egl display

EGL error
Aborted

root@qemux86:~# ls -alh /usr/lib/llvm3.3/
drwxr-xr-x    2 root     root        1.0K Aug 20 02:47 .
drwxr-xr-x   35 root     root       10.0K Aug 20 02:47 ..
-rwxr-xr-x    1 root     root       15.8M Aug 19 14:02 libLLVM-3.3.so
-rwxr-xr-x    1 root     root       78.2K Aug 19 14:02 libLTO.so
-rwxr-xr-x    1 root     root       10.1K Aug 19 14:02 libprofile_rt.so

I don't know yet why it worked in my tests when I was updating mesa and llvm, but it's true that we need to make sure that mesa finds libLLVM-3.3.so in versioned subdirectory in runtime.

Quoted 28 lines
---
 meta/recipes-graphics/mesa/mesa.inc | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-graphics/mesa/mesa.inc +4 -0
index 447e186..e985d67 100644
@@ -50,6 +50,10 @@ PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disa
 PACKAGECONFIG[openvg] = "--enable-openvg, --disable-openvg"
 
 GALLIUMDRIVERS = "swrast"
+GALLIUMDRIVERS_LLVM33 = "${@base_contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
+GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', '', ',${GALLIUMDRIVERS_LLVM33}', d)}"
+GALLIUMDRIVERS_append_x86 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append_x86-64 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
 # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
 PACKAGECONFIG[gallium]      = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
 PACKAGECONFIG[gallium-egl]  = "--enable-gallium-egl, --disable-gallium-egl"
Signature · 6 lines
1.8.3.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 23 lines · Martin Jansa
Quoted 6 lines · Jonathan Liu

The additional Gallium drivers are needed for open source ATI Radeon and NVIDIA graphics drivers.

The radeonsi and r600 drivers require LLVM 3.3 built with r600 PACKAGECONFIG so they must be explicitly enabled by adding r600 to the mesa PACKAGECONFIG.

BTW: I just got interesting question about egl_gallium:

libEGL warning: Could not open driver /usr/lib/egl/egl_gallium.so (libLLVM-3.3.so: cannot open shared object file: No such file or directory)
Could not initialize egl display

EGL error
Aborted

root@qemux86:~# ls -alh /usr/lib/llvm3.3/
drwxr-xr-x    2 root     root        1.0K Aug 20 02:47 .
drwxr-xr-x   35 root     root       10.0K Aug 20 02:47 ..
(quoted diff) +0 -3
-rwxr-xr-x    1 root     root       15.8M Aug 19 14:02 libLLVM-3.3.so
-rwxr-xr-x    1 root     root       78.2K Aug 19 14:02 libLTO.so
-rwxr-xr-x    1 root     root       10.1K Aug 19 14:02 libprofile_rt.so
Quoted 3 lines

I don't know yet why it worked in my tests when I was updating mesa and llvm, but it's true that we need to make sure that mesa finds libLLVM-3.3.so in versioned subdirectory in runtime.

LLVM has been working fine for me with llvmpipe (Intel GMA 3600 - PowerVR-based), radeon (ATI Radeon HD5450) and nouveau (NVIDIA ION GeForce 9400M) drivers.

There is a symbolic link in /usr/lib:

$ cd /usr/lib
$ ls -l libLLVM-3.3.so
lrwxrwxrwx 1 root root 22 Aug 19 21:03 libLLVM-3.3.so -> llvm3.3/libLLVM-3.3.so

I intend to submit xf86-video-ati and xf86-video-nouveau to meta-openembedded later this week. I tested this change using those recipes, linux-firmware (needed for ATI 3D acceleration) and the following kernel options:
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_DRM_NOUVEAU=y

Regards,
Jonathan

Quoted 28 lines
Quoted 28 lines
---
  meta/recipes-graphics/mesa/mesa.inc | 4 ++++
  1 file changed, 4 insertions(+)
meta/recipes-graphics/mesa/mesa.inc +4 -0
index 447e186..e985d67 100644
@@ -50,6 +50,10 @@ PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disa
  PACKAGECONFIG[openvg] = "--enable-openvg, --disable-openvg"
 
  GALLIUMDRIVERS = "swrast"
+GALLIUMDRIVERS_LLVM33 = "${@base_contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
+GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', '', ',${GALLIUMDRIVERS_LLVM33}', d)}"
+GALLIUMDRIVERS_append_x86 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append_x86-64 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
  # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
  PACKAGECONFIG[gallium]      = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
  PACKAGECONFIG[gallium-egl]  = "--enable-gallium-egl, --disable-gallium-egl"
Signature · 6 lines
1.8.3.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
#3 lore raw
Quoted 31 lines · Jonathan Liu
Quoted 23 lines · Martin Jansa
Quoted 6 lines · Jonathan Liu

The additional Gallium drivers are needed for open source ATI Radeon and NVIDIA graphics drivers.

The radeonsi and r600 drivers require LLVM 3.3 built with r600 PACKAGECONFIG so they must be explicitly enabled by adding r600 to the mesa PACKAGECONFIG.

BTW: I just got interesting question about egl_gallium:

libEGL warning: Could not open driver /usr/lib/egl/egl_gallium.so (libLLVM-3.3.so: cannot open shared object file: No such file or directory)
Could not initialize egl display

EGL error
Aborted

root@qemux86:~# ls -alh /usr/lib/llvm3.3/
drwxr-xr-x    2 root     root        1.0K Aug 20 02:47 .
drwxr-xr-x   35 root     root       10.0K Aug 20 02:47 ..
(quoted diff) +0 -3
-rwxr-xr-x    1 root     root       15.8M Aug 19 14:02 libLLVM-3.3.so
-rwxr-xr-x    1 root     root       78.2K Aug 19 14:02 libLTO.so
-rwxr-xr-x    1 root     root       10.1K Aug 19 14:02 libprofile_rt.so
Quoted 3 lines

I don't know yet why it worked in my tests when I was updating mesa and llvm, but it's true that we need to make sure that mesa finds libLLVM-3.3.so in versioned subdirectory in runtime.

LLVM has been working fine for me with llvmpipe (Intel GMA 3600 - PowerVR-based), radeon (ATI Radeon HD5450) and nouveau (NVIDIA ION GeForce 9400M) drivers.

Quoted 5 lines

There is a symbolic link in /usr/lib:

$ cd /usr/lib
$ ls -l libLLVM-3.3.so
lrwxrwxrwx 1 root root 22 Aug 19 21:03 libLLVM-3.3.so -> 
llvm3.3/libLLVM-3.3.so

But this one is from llvm3.3-dev package which isn't installed by default, isn't it in your setup?

Quoted 39 lines

I intend to submit xf86-video-ati and xf86-video-nouveau to meta-openembedded later this week. I tested this change using those recipes, linux-firmware (needed for ATI 3D acceleration) and the following kernel options:
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_DRM_NOUVEAU=y

Regards,
Jonathan

Quoted 28 lines
Quoted 28 lines
---
  meta/recipes-graphics/mesa/mesa.inc | 4 ++++
  1 file changed, 4 insertions(+)
meta/recipes-graphics/mesa/mesa.inc +4 -0
index 447e186..e985d67 100644
@@ -50,6 +50,10 @@ PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disa
  PACKAGECONFIG[openvg] = "--enable-openvg, --disable-openvg"
 
  GALLIUMDRIVERS = "swrast"
+GALLIUMDRIVERS_LLVM33 = "${@base_contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
+GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', '', ',${GALLIUMDRIVERS_LLVM33}', d)}"
+GALLIUMDRIVERS_append_x86 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append_x86-64 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
  # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
  PACKAGECONFIG[gallium]      = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
  PACKAGECONFIG[gallium-egl]  = "--enable-gallium-egl, --disable-gallium-egl"
Signature · 6 lines
1.8.3.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw
Quoted 32 lines · Martin Jansa
Quoted 31 lines · Jonathan Liu
Quoted 23 lines · Martin Jansa
Quoted 6 lines · Jonathan Liu

The additional Gallium drivers are needed for open source ATI Radeon and NVIDIA graphics drivers.

The radeonsi and r600 drivers require LLVM 3.3 built with r600 PACKAGECONFIG so they must be explicitly enabled by adding r600 to the mesa PACKAGECONFIG.

BTW: I just got interesting question about egl_gallium:

libEGL warning: Could not open driver /usr/lib/egl/egl_gallium.so (libLLVM-3.3.so: cannot open shared object file: No such file or directory)
Could not initialize egl display

EGL error
Aborted

root@qemux86:~# ls -alh /usr/lib/llvm3.3/
drwxr-xr-x    2 root     root        1.0K Aug 20 02:47 .
drwxr-xr-x   35 root     root       10.0K Aug 20 02:47 ..
(quoted diff) +0 -3
-rwxr-xr-x    1 root     root       15.8M Aug 19 14:02 libLLVM-3.3.so
-rwxr-xr-x    1 root     root       78.2K Aug 19 14:02 libLTO.so
-rwxr-xr-x    1 root     root       10.1K Aug 19 14:02 libprofile_rt.so
Quoted 3 lines

I don't know yet why it worked in my tests when I was updating mesa and llvm, but it's true that we need to make sure that mesa finds libLLVM-3.3.so in versioned subdirectory in runtime.

LLVM has been working fine for me with llvmpipe (Intel GMA 3600 - PowerVR-based), radeon (ATI Radeon HD5450) and nouveau (NVIDIA ION GeForce 9400M) drivers.

Quoted 7 lines
Quoted 5 lines

There is a symbolic link in /usr/lib:

$ cd /usr/lib
$ ls -l libLLVM-3.3.so
lrwxrwxrwx 1 root root 22 Aug 19 21:03 libLLVM-3.3.so ->
llvm3.3/libLLVM-3.3.so

But this one is from llvm3.3-dev package which isn't installed by default, isn't it in your setup?

Right. It's in llvm3.3-dev. I have been testing it in my dev image which includes the dev packages. It needs to be moved into the main package.

Regards,
Jonathan

Quoted 38 lines
Quoted 38 lines

I intend to submit xf86-video-ati and xf86-video-nouveau to meta-openembedded later this week. I tested this change using those recipes, linux-firmware (needed for ATI 3D acceleration) and the following kernel options:
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_DRM_NOUVEAU=y

Regards,
Jonathan

Quoted 27 lines
Quoted 27 lines
---
   meta/recipes-graphics/mesa/mesa.inc | 4 ++++
   1 file changed, 4 insertions(+)
meta/recipes-graphics/mesa/mesa.inc +4 -0
index 447e186..e985d67 100644
@@ -50,6 +50,10 @@ PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disa
   PACKAGECONFIG[openvg] = "--enable-openvg, --disable-openvg"
 
   GALLIUMDRIVERS = "swrast"
+GALLIUMDRIVERS_LLVM33 = "${@base_contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
+GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', '', ',${GALLIUMDRIVERS_LLVM33}', d)}"
+GALLIUMDRIVERS_append_x86 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append_x86-64 = "${@base_contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
   # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
   PACKAGECONFIG[gallium]      = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
   PACKAGECONFIG[gallium-egl]  = "--enable-gallium-egl, --disable-gallium-egl"
Signature · 6 lines
1.8.3.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core