Patchwork mesa-dri: Enable swrast only by default and intel drivers only on IA platform

login
register
mail settings
Submitter Richard Purdie
Date Oct. 14, 2011, 2:42 p.m.
Message ID <1318603356.2342.20.camel@ted>
Download mbox | patch
Permalink /patch/13249/
State New, archived
Headers show

Comments

Richard Purdie - Oct. 14, 2011, 2:42 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
Otavio Salvador - Oct. 14, 2011, 2:46 p.m.
+1

Just another thing, I'd prefer to have DRIDRIVERS as ?= so machine can
override it.

On Fri, Oct 14, 2011 at 11:42, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/meta/recipes-graphics/mesa/mesa-dri.inc b/meta/recipes-graphics/mesa/mesa-dri.inc
> index 603438e..795144a 100644
> --- a/meta/recipes-graphics/mesa/mesa-dri.inc
> +++ b/meta/recipes-graphics/mesa/mesa-dri.inc
> @@ -4,7 +4,11 @@ LIB_DEPS += "libdrm expat"
>  # most of our targets do not have DRI so will use mesa-xlib
>  DEFAULT_PREFERENCE = "-1"
>
> -EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium --without-gallium-drivers"
> +DRIDRIVERS = "swrast"
> +DRIDRIVERS_x86 = "swrast,i915,i965"
> +DRIDRIVERS_x86-64 = "swrast,i915,i965"
> +
> +EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium --without-gallium-drivers --with-dri-drivers=${DRIDRIVERS}"
>
>  python populate_packages_prepend() {
>        import os.path
> diff --git a/meta/recipes-graphics/mesa/mesa-dri_7.11.bb b/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
> index 6a4f9a9..5d25127 100644
> --- a/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
> +++ b/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
> @@ -2,7 +2,3 @@ include mesa-common.inc
>  include mesa-${PV}.inc
>  include mesa-dri.inc
>  PR = "${INC_PR}.0"
> -
> -EXTRA_OECONF += "--with-dri-drivers=swrast,i915,i965"
> -
> -COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
> diff --git a/meta/recipes-graphics/mesa/mesa-dri_git.bb b/meta/recipes-graphics/mesa/mesa-dri_git.bb
> index 15cde60..a0e1945 100644
> --- a/meta/recipes-graphics/mesa/mesa-dri_git.bb
> +++ b/meta/recipes-graphics/mesa/mesa-dri_git.bb
> @@ -7,5 +7,3 @@ DEFAULT_PREFERENCE = "-2"
>
>  PR = "${INC_PR}.0"
>
> -COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
> -
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Richard Purdie - Oct. 14, 2011, 3:25 p.m.
On Fri, 2011-10-14 at 11:46 -0300, Otavio Salvador wrote:
> +1
> 
> Just another thing, I'd prefer to have DRIDRIVERS as ?= so machine can
> override it.

I really wouldn't recommend overriding this on a per machine basis, it
needs to be on a per arch basis. This is because the recipe is not
machine specific (nor should it be).

Configuration therefore falls to the distro, not machine.

Cheers,

Richard
Martin Jansa - Oct. 14, 2011, 3:30 p.m.
On Fri, Oct 14, 2011 at 04:25:16PM +0100, Richard Purdie wrote:
> On Fri, 2011-10-14 at 11:46 -0300, Otavio Salvador wrote:
> > +1
> > 
> > Just another thing, I'd prefer to have DRIDRIVERS as ?= so machine can
> > override it.
> 
> I really wouldn't recommend overriding this on a per machine basis, it
> needs to be on a per arch basis. This is because the recipe is not
> machine specific (nor should it be).
> 
> Configuration therefore falls to the distro, not machine.

Why not make it machine specific only when machine provides own module
(like the case with glamo on om-gta02)?

Or recipe cannot change PACKAGE_ARCH in some special cases (like
$MACHINE in path to some file in SRC_URI) anymore?

Regards,
Koen Kooi - Oct. 14, 2011, 3:40 p.m.
Op 14 okt. 2011, om 17:30 heeft Martin Jansa het volgende geschreven:

> On Fri, Oct 14, 2011 at 04:25:16PM +0100, Richard Purdie wrote:
>> On Fri, 2011-10-14 at 11:46 -0300, Otavio Salvador wrote:
>>> +1
>>> 
>>> Just another thing, I'd prefer to have DRIDRIVERS as ?= so machine can
>>> override it.
>> 
>> I really wouldn't recommend overriding this on a per machine basis, it
>> needs to be on a per arch basis. This is because the recipe is not
>> machine specific (nor should it be).
>> 
>> Configuration therefore falls to the distro, not machine.
> 
> Why not make it machine specific only when machine provides own module
> (like the case with glamo on om-gta02)?
> 
> Or recipe cannot change PACKAGE_ARCH in some special cases (like
> $MACHINE in path to some file in SRC_URI) anymore?

Kinda like the wpa-supplicant and mplayer trick in OE classic?


> 
> Regards,
> 
> -- 
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Richard Purdie - Oct. 14, 2011, 3:55 p.m.
On Fri, 2011-10-14 at 17:30 +0200, Martin Jansa wrote:
> On Fri, Oct 14, 2011 at 04:25:16PM +0100, Richard Purdie wrote:
> > On Fri, 2011-10-14 at 11:46 -0300, Otavio Salvador wrote:
> > > +1
> > > 
> > > Just another thing, I'd prefer to have DRIDRIVERS as ?= so machine can
> > > override it.
> > 
> > I really wouldn't recommend overriding this on a per machine basis, it
> > needs to be on a per arch basis. This is because the recipe is not
> > machine specific (nor should it be).
> > 
> > Configuration therefore falls to the distro, not machine.
> 
> Why not make it machine specific only when machine provides own module
> (like the case with glamo on om-gta02)?
> 
> Or recipe cannot change PACKAGE_ARCH in some special cases (like
> $MACHINE in path to some file in SRC_URI) anymore?

It works just fine but its not nice practise in my opinion for a library
like this and I don't see there is any need in this case. Certainly I
don't see it as something OE-Core should be recommending.

Cheers,

Richard
Martin Jansa - Oct. 14, 2011, 4:05 p.m.
On Fri, Oct 14, 2011 at 04:55:50PM +0100, Richard Purdie wrote:
> On Fri, 2011-10-14 at 17:30 +0200, Martin Jansa wrote:
> > On Fri, Oct 14, 2011 at 04:25:16PM +0100, Richard Purdie wrote:
> > > On Fri, 2011-10-14 at 11:46 -0300, Otavio Salvador wrote:
> > > > +1
> > > > 
> > > > Just another thing, I'd prefer to have DRIDRIVERS as ?= so machine can
> > > > override it.
> > > 
> > > I really wouldn't recommend overriding this on a per machine basis, it
> > > needs to be on a per arch basis. This is because the recipe is not
> > > machine specific (nor should it be).
> > > 
> > > Configuration therefore falls to the distro, not machine.
> > 
> > Why not make it machine specific only when machine provides own module
> > (like the case with glamo on om-gta02)?
> > 
> > Or recipe cannot change PACKAGE_ARCH in some special cases (like
> > $MACHINE in path to some file in SRC_URI) anymore?
> 
> It works just fine but its not nice practise in my opinion for a library
> like this and I don't see there is any need in this case. Certainly I
> don't see it as something OE-Core should be recommending.

So can I send patches adding my glamo.patch to libdrm and mesa-dri so we
can add glamo to 
DRIDRIVERS_armv4t ?

Patch

diff --git a/meta/recipes-graphics/mesa/mesa-dri.inc b/meta/recipes-graphics/mesa/mesa-dri.inc
index 603438e..795144a 100644
--- a/meta/recipes-graphics/mesa/mesa-dri.inc
+++ b/meta/recipes-graphics/mesa/mesa-dri.inc
@@ -4,7 +4,11 @@  LIB_DEPS += "libdrm expat"
 # most of our targets do not have DRI so will use mesa-xlib
 DEFAULT_PREFERENCE = "-1"
 
-EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium --without-gallium-drivers"
+DRIDRIVERS = "swrast"
+DRIDRIVERS_x86 = "swrast,i915,i965"
+DRIDRIVERS_x86-64 = "swrast,i915,i965"
+
+EXTRA_OECONF += "--with-driver=dri --disable-egl --disable-gallium --without-gallium-drivers --with-dri-drivers=${DRIDRIVERS}"
 
 python populate_packages_prepend() {
 	import os.path
diff --git a/meta/recipes-graphics/mesa/mesa-dri_7.11.bb b/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
index 6a4f9a9..5d25127 100644
--- a/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
+++ b/meta/recipes-graphics/mesa/mesa-dri_7.11.bb
@@ -2,7 +2,3 @@  include mesa-common.inc
 include mesa-${PV}.inc
 include mesa-dri.inc
 PR = "${INC_PR}.0"
-
-EXTRA_OECONF += "--with-dri-drivers=swrast,i915,i965"
-
-COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
diff --git a/meta/recipes-graphics/mesa/mesa-dri_git.bb b/meta/recipes-graphics/mesa/mesa-dri_git.bb
index 15cde60..a0e1945 100644
--- a/meta/recipes-graphics/mesa/mesa-dri_git.bb
+++ b/meta/recipes-graphics/mesa/mesa-dri_git.bb
@@ -7,5 +7,3 @@  DEFAULT_PREFERENCE = "-2"
 
 PR = "${INC_PR}.0"
 
-COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
-