All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
@ 2020-03-25 18:14 Mark Hatle
  2020-03-25 18:21 ` [OE-core] " Denys Dmytriyenko
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Mark Hatle @ 2020-03-25 18:14 UTC (permalink / raw)
  To: ross.burton, openembedded-core

Trying to build mesa-gl without X11 enabled, results in numerous errors
about being incorrectly configured, such as:

  ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

After consulting with the author of this recipe, it was clear that it
was only intended for the X11 use-case, so requring X11 should avoid the
error message above.

Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
---
 meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
index d4b1c1c454..5674c6b1fe 100644
--- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
+++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
@@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
 
 S = "${WORKDIR}/mesa-${PV}"
 
-PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
-PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+REQUIRED_DISTRO_FEATURE = "x11"
+
+PACKAGECONFIG ??= "opengl dri x11"
+PACKAGECONFIG_class-target = "opengl dri x11"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 18:14 [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage Mark Hatle
@ 2020-03-25 18:21 ` Denys Dmytriyenko
  2020-03-25 18:41   ` Mark Hatle
       [not found]   ` <15FFA02F5F44ED82.23217@lists.openembedded.org>
  2020-03-25 20:02 ` Andrey Zhizhikin
  2020-03-25 21:58 ` Otavio Salvador
  2 siblings, 2 replies; 14+ messages in thread
From: Denys Dmytriyenko @ 2020-03-25 18:21 UTC (permalink / raw)
  To: Mark Hatle; +Cc: ross.burton, openembedded-core

On Wed, Mar 25, 2020 at 01:14:47PM -0500, Mark Hatle wrote:
> Trying to build mesa-gl without X11 enabled, results in numerous errors
> about being incorrectly configured, such as:
> 
>   ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa
> 
> After consulting with the author of this recipe, it was clear that it
> was only intended for the X11 use-case, so requring X11 should avoid the
> error message above.

Hmm. That's not good. There are embedded devices that provide EGL/GLES support 
through own stack, but fall back on MESA for full desktop GL support. That's 
been working to some extent even with Wayland and w/o X11. With your change 
that won't be possible any more...

-- 
Denys


> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
> ---
>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> index d4b1c1c454..5674c6b1fe 100644
> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
>  
>  S = "${WORKDIR}/mesa-${PV}"
>  
> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> -PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> +REQUIRED_DISTRO_FEATURE = "x11"
> +
> +PACKAGECONFIG ??= "opengl dri x11"
> +PACKAGECONFIG_class-target = "opengl dri x11"
> -- 
> 2.17.1
> 

> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 18:21 ` [OE-core] " Denys Dmytriyenko
@ 2020-03-25 18:41   ` Mark Hatle
  2020-03-25 19:04     ` Alexander Kanavin
       [not found]   ` <15FFA02F5F44ED82.23217@lists.openembedded.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Mark Hatle @ 2020-03-25 18:41 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: Mark Hatle, ross.burton, openembedded-core

> On Wed, Mar 25, 2020 at 01:14:47PM -0500, Mark Hatle wrote:
>> Trying to build mesa-gl without X11 enabled, results in numerous errors
>> about being incorrectly configured, such as:
>>
>>   ERROR: Problem encountered: building dri drivers require at least one
>> windowing system or classic osmesa
>>
>> After consulting with the author of this recipe, it was clear that it
>> was only intended for the X11 use-case, so requring X11 should avoid the
>> error message above.
>
> Hmm. That's not good. There are embedded devices that provide EGL/GLES
> support
> through own stack, but fall back on MESA for full desktop GL support.
> That's
> been working to some extent even with Wayland and w/o X11. With your
> change
> that won't be possible any more...


Have you tried any of these?  This hasn't been working since Zeus with an
external libmali and non-X11 configuration.  It returns the error listed
in the commit message "ERROR: Problem encountered: building dri drivers
require at least one windowing system or classic osmesa" during
configuration.

Ross and I talked about it and he said this was specific to X11
implementation and wasn't meant to work for other implementations. 
(fbdev/QT/etc.)

If Wayland is supposed to work, then someone needs to go in and adjust the
configuration to also support Wayland.  I don't have any Wayland systems
to even know what the right configuration COULD be.

The specific configuration I'm running has "OpenGL" in the DISTRO_FEATURE,
but does NOT have X11 or Wayland".

DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = "x11 wayland"

--Mark

> --
> Denys
>
>
>> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
>> ---
>>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> index d4b1c1c454..5674c6b1fe 100644
>> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
>>
>>  S = "${WORKDIR}/mesa-${PV}"
>>
>> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
>> 'x11', d)}"
>> -PACKAGECONFIG_class-target = "opengl dri
>> ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
>> +REQUIRED_DISTRO_FEATURE = "x11"
>> +
>> +PACKAGECONFIG ??= "opengl dri x11"
>> +PACKAGECONFIG_class-target = "opengl dri x11"
>> --
>> 2.17.1
>>
>
>> 
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
       [not found]   ` <15FFA02F5F44ED82.23217@lists.openembedded.org>
@ 2020-03-25 19:04     ` Mark Hatle
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Hatle @ 2020-03-25 19:04 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Denys Dmytriyenko, Mark Hatle, ross.burton, openembedded-core

>> On Wed, Mar 25, 2020 at 01:14:47PM -0500, Mark Hatle wrote:
>>> Trying to build mesa-gl without X11 enabled, results in numerous errors
>>> about being incorrectly configured, such as:
>>>
>>>   ERROR: Problem encountered: building dri drivers require at least one
>>> windowing system or classic osmesa
>>>
>>> After consulting with the author of this recipe, it was clear that it
>>> was only intended for the X11 use-case, so requring X11 should avoid
>>> the
>>> error message above.
>>
>> Hmm. That's not good. There are embedded devices that provide EGL/GLES
>> support
>> through own stack, but fall back on MESA for full desktop GL support.
>> That's
>> been working to some extent even with Wayland and w/o X11. With your
>> change
>> that won't be possible any more...
>
>
> Have you tried any of these?  This hasn't been working since Zeus with an
> external libmali and non-X11 configuration.  It returns the error listed
> in the commit message "ERROR: Problem encountered: building dri drivers
> require at least one windowing system or classic osmesa" during
> configuration.
>
> Ross and I talked about it and he said this was specific to X11
> implementation and wasn't meant to work for other implementations.
> (fbdev/QT/etc.)
>
> If Wayland is supposed to work, then someone needs to go in and adjust the
> configuration to also support Wayland.  I don't have any Wayland systems
> to even know what the right configuration COULD be.
>
> The specific configuration I'm running has "OpenGL" in the DISTRO_FEATURE,
> but does NOT have X11 or Wayland".
>
> DISTRO_FEATURES_append = " opengl"
> DISTRO_FEATURES_remove = "x11 wayland"

This can be further refined to:

conf/local.conf:

PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"
PREFERRED_PROVIDER_virtual/mesa = "mesa-gl"
DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = "x11"

bitbake mesa-gl

Error is the same:

meson.build:455:4: ERROR: Problem encountered: building dri drivers
require at least one windowing system or classic osmesa

> --Mark
>
>> --
>> Denys
>>
>>
>>> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
>>> ---
>>>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>>> b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>>> index d4b1c1c454..5674c6b1fe 100644
>>> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>>> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>>> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
>>>
>>>  S = "${WORKDIR}/mesa-${PV}"
>>>
>>> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
>>> 'x11', d)}"
>>> -PACKAGECONFIG_class-target = "opengl dri
>>> ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
>>> +REQUIRED_DISTRO_FEATURE = "x11"
>>> +
>>> +PACKAGECONFIG ??= "opengl dri x11"
>>> +PACKAGECONFIG_class-target = "opengl dri x11"
>>> --
>>> 2.17.1
>>>
>>
>>>
>>
>
> 
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 18:41   ` Mark Hatle
@ 2020-03-25 19:04     ` Alexander Kanavin
  2020-03-25 19:27       ` Mark Hatle
  0 siblings, 1 reply; 14+ messages in thread
From: Alexander Kanavin @ 2020-03-25 19:04 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Denys Dmytriyenko, Burton, Ross, OE-core

[-- Attachment #1: Type: text/plain, Size: 3097 bytes --]

To be honest, I would just take the entire recipe out. It's causing trouble
during updates, isn't being tested neither for builds nor at runtime, and
is supposed to provide some specific configuration which as this discussion
makes clear, nobody seems to quite understand.

Alex

On Wed, 25 Mar 2020 at 19:42, Mark Hatle <mark.hatle@kernel.crashing.org>
wrote:

> > On Wed, Mar 25, 2020 at 01:14:47PM -0500, Mark Hatle wrote:
> >> Trying to build mesa-gl without X11 enabled, results in numerous errors
> >> about being incorrectly configured, such as:
> >>
> >>   ERROR: Problem encountered: building dri drivers require at least one
> >> windowing system or classic osmesa
> >>
> >> After consulting with the author of this recipe, it was clear that it
> >> was only intended for the X11 use-case, so requring X11 should avoid the
> >> error message above.
> >
> > Hmm. That's not good. There are embedded devices that provide EGL/GLES
> > support
> > through own stack, but fall back on MESA for full desktop GL support.
> > That's
> > been working to some extent even with Wayland and w/o X11. With your
> > change
> > that won't be possible any more...
>
>
> Have you tried any of these?  This hasn't been working since Zeus with an
> external libmali and non-X11 configuration.  It returns the error listed
> in the commit message "ERROR: Problem encountered: building dri drivers
> require at least one windowing system or classic osmesa" during
> configuration.
>
> Ross and I talked about it and he said this was specific to X11
> implementation and wasn't meant to work for other implementations.
> (fbdev/QT/etc.)
>
> If Wayland is supposed to work, then someone needs to go in and adjust the
> configuration to also support Wayland.  I don't have any Wayland systems
> to even know what the right configuration COULD be.
>
> The specific configuration I'm running has "OpenGL" in the DISTRO_FEATURE,
> but does NOT have X11 or Wayland".
>
> DISTRO_FEATURES_append = " opengl"
> DISTRO_FEATURES_remove = "x11 wayland"
>
> --Mark
>
> > --
> > Denys
> >
> >
> >> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
> >> ---
> >>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> index d4b1c1c454..5674c6b1fe 100644
> >> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
> >>
> >>  S = "${WORKDIR}/mesa-${PV}"
> >>
> >> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
> >> 'x11', d)}"
> >> -PACKAGECONFIG_class-target = "opengl dri
> >> ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> >> +REQUIRED_DISTRO_FEATURE = "x11"
> >> +
> >> +PACKAGECONFIG ??= "opengl dri x11"
> >> +PACKAGECONFIG_class-target = "opengl dri x11"
> >> --
> >> 2.17.1
> >>
> >
> >>
> >
>
> 
>

[-- Attachment #2: Type: text/html, Size: 4456 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 19:04     ` Alexander Kanavin
@ 2020-03-25 19:27       ` Mark Hatle
  2020-03-26 13:11         ` Adrian Bunk
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Hatle @ 2020-03-25 19:27 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Mark Hatle, Denys Dmytriyenko, Burton, Ross, OE-core

> To be honest, I would just take the entire recipe out. It's causing
> trouble
> during updates, isn't being tested neither for builds nor at runtime, and
> is supposed to provide some specific configuration which as this
> discussion
> makes clear, nobody seems to quite understand.

With the abomination that is libmali (and similar), it is still needed. 
It's the only way to support GL on a primarily GLES compatible system.

The problem is the way they do this seems to be a custom version of
libdrm, which then conflicts with the mesa version.  Thus the issues.

I'm happy to continue testing my particular needs now and the future (thus
the patch against master.)

What we absolutely don't want is a different version of this for every
system that has a custom graphics chip in it.  That would be a far larger
nightmare than what is currently implemented.  The key to this is to come
to an agreement on what should work and how it should be configured.  As
of right now, the only working configuration I can find is X11.

--Mark

> Alex
>
> On Wed, 25 Mar 2020 at 19:42, Mark Hatle <mark.hatle@kernel.crashing.org>
> wrote:
>
>> > On Wed, Mar 25, 2020 at 01:14:47PM -0500, Mark Hatle wrote:
>> >> Trying to build mesa-gl without X11 enabled, results in numerous
>> errors
>> >> about being incorrectly configured, such as:
>> >>
>> >>   ERROR: Problem encountered: building dri drivers require at least
>> one
>> >> windowing system or classic osmesa
>> >>
>> >> After consulting with the author of this recipe, it was clear that it
>> >> was only intended for the X11 use-case, so requring X11 should avoid
>> the
>> >> error message above.
>> >
>> > Hmm. That's not good. There are embedded devices that provide EGL/GLES
>> > support
>> > through own stack, but fall back on MESA for full desktop GL support.
>> > That's
>> > been working to some extent even with Wayland and w/o X11. With your
>> > change
>> > that won't be possible any more...
>>
>>
>> Have you tried any of these?  This hasn't been working since Zeus with
>> an
>> external libmali and non-X11 configuration.  It returns the error listed
>> in the commit message "ERROR: Problem encountered: building dri drivers
>> require at least one windowing system or classic osmesa" during
>> configuration.
>>
>> Ross and I talked about it and he said this was specific to X11
>> implementation and wasn't meant to work for other implementations.
>> (fbdev/QT/etc.)
>>
>> If Wayland is supposed to work, then someone needs to go in and adjust
>> the
>> configuration to also support Wayland.  I don't have any Wayland systems
>> to even know what the right configuration COULD be.
>>
>> The specific configuration I'm running has "OpenGL" in the
>> DISTRO_FEATURE,
>> but does NOT have X11 or Wayland".
>>
>> DISTRO_FEATURES_append = " opengl"
>> DISTRO_FEATURES_remove = "x11 wayland"
>>
>> --Mark
>>
>> > --
>> > Denys
>> >
>> >
>> >> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
>> >> ---
>> >>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
>> >>  1 file changed, 4 insertions(+), 2 deletions(-)
>> >>
>> >> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> >> b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> >> index d4b1c1c454..5674c6b1fe 100644
>> >> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> >> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> >> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
>> >>
>> >>  S = "${WORKDIR}/mesa-${PV}"
>> >>
>> >> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
>> >> 'x11', d)}"
>> >> -PACKAGECONFIG_class-target = "opengl dri
>> >> ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
>> >> +REQUIRED_DISTRO_FEATURE = "x11"
>> >> +
>> >> +PACKAGECONFIG ??= "opengl dri x11"
>> >> +PACKAGECONFIG_class-target = "opengl dri x11"
>> >> --
>> >> 2.17.1
>> >>
>> >
>> >>
>> >
>>
>> 
>>
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 18:14 [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage Mark Hatle
  2020-03-25 18:21 ` [OE-core] " Denys Dmytriyenko
@ 2020-03-25 20:02 ` Andrey Zhizhikin
  2020-03-25 20:35   ` Mark Hatle
  2020-03-25 21:58 ` Otavio Salvador
  2 siblings, 1 reply; 14+ messages in thread
From: Andrey Zhizhikin @ 2020-03-25 20:02 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Ross Burton, OE Core mailing list

On Wed, Mar 25, 2020 at 7:15 PM Mark Hatle
<mark.hatle@kernel.crashing.org> wrote:
>
> Trying to build mesa-gl without X11 enabled, results in numerous errors
> about being incorrectly configured, such as:
>
>   ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa

I believe I was fighting similar issue in meta-freescale layer for
imx8mm derivative [1], where the status of GPU support was not know at
the time. What I did back then is set the default configuration to
osmesa and used swrast in order to be able to use mesa on that
derivative. After that, when GPU support has been added into Mesa -
those modifications were reverted.

I guess turning to swrast in case if someone would decide _not_ to use
X11 - is not a bad option here, rather than enforcing the X11 for
distros which are using this recipe. Any thoughts?

>
> After consulting with the author of this recipe, it was clear that it
> was only intended for the X11 use-case, so requring X11 should avoid the
> error message above.
>
> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
> ---
>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> index d4b1c1c454..5674c6b1fe 100644
> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
>
>  S = "${WORKDIR}/mesa-${PV}"
>
> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> -PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> +REQUIRED_DISTRO_FEATURE = "x11"
> +
> +PACKAGECONFIG ??= "opengl dri x11"
> +PACKAGECONFIG_class-target = "opengl dri x11"
> --
> 2.17.1
>
> 

-- 
Regards,
Andrey.

[1]: https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 20:02 ` Andrey Zhizhikin
@ 2020-03-25 20:35   ` Mark Hatle
  2020-03-25 21:37     ` Andrey Zhizhikin
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Hatle @ 2020-03-25 20:35 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: Mark Hatle, Ross Burton, OE Core mailing list

> On Wed, Mar 25, 2020 at 7:15 PM Mark Hatle
> <mark.hatle@kernel.crashing.org> wrote:
>>
>> Trying to build mesa-gl without X11 enabled, results in numerous errors
>> about being incorrectly configured, such as:
>>
>>   ERROR: Problem encountered: building dri drivers require at least one
>> windowing system or classic osmesa
>
> I believe I was fighting similar issue in meta-freescale layer for
> imx8mm derivative [1], where the status of GPU support was not know at
> the time. What I did back then is set the default configuration to
> osmesa and used swrast in order to be able to use mesa on that
> derivative. After that, when GPU support has been added into Mesa -
> those modifications were reverted.

Do you have a pointer to that anywhere?  I'm curious if any of it might
still apply.. but I know nothing about mesa and what configurations are
even possible.

> I guess turning to swrast in case if someone would decide _not_ to use
> X11 - is not a bad option here, rather than enforcing the X11 for
> distros which are using this recipe. Any thoughts?

I don't know any any reasons we couldn't do this.. but like I said.. I'm a
newbie when it comes to mesa.

--Mark

>>
>> After consulting with the author of this recipe, it was clear that it
>> was only intended for the X11 use-case, so requring X11 should avoid the
>> error message above.
>>
>> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
>> ---
>>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> index d4b1c1c454..5674c6b1fe 100644
>> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
>> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
>>
>>  S = "${WORKDIR}/mesa-${PV}"
>>
>> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
>> 'x11', d)}"
>> -PACKAGECONFIG_class-target = "opengl dri
>> ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
>> +REQUIRED_DISTRO_FEATURE = "x11"
>> +
>> +PACKAGECONFIG ??= "opengl dri x11"
>> +PACKAGECONFIG_class-target = "opengl dri x11"
>> --
>> 2.17.1
>>
>>
>
> --
> Regards,
> Andrey.
>
> [1]:
> https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8
> 
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 20:35   ` Mark Hatle
@ 2020-03-25 21:37     ` Andrey Zhizhikin
  2020-03-25 21:48       ` Denys Dmytriyenko
  0 siblings, 1 reply; 14+ messages in thread
From: Andrey Zhizhikin @ 2020-03-25 21:37 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Ross Burton, OE Core mailing list

On Wed, Mar 25, 2020 at 9:36 PM Mark Hatle
<mark.hatle@kernel.crashing.org> wrote:
>
> > On Wed, Mar 25, 2020 at 7:15 PM Mark Hatle
> > <mark.hatle@kernel.crashing.org> wrote:
> >>
> >> Trying to build mesa-gl without X11 enabled, results in numerous errors
> >> about being incorrectly configured, such as:
> >>
> >>   ERROR: Problem encountered: building dri drivers require at least one
> >> windowing system or classic osmesa
> >
> > I believe I was fighting similar issue in meta-freescale layer for
> > imx8mm derivative [1], where the status of GPU support was not know at
> > the time. What I did back then is set the default configuration to
> > osmesa and used swrast in order to be able to use mesa on that
> > derivative. After that, when GPU support has been added into Mesa -
> > those modifications were reverted.
>
> Do you have a pointer to that anywhere?  I'm curious if any of it might
> still apply.. but I know nothing about mesa and what configurations are
> even possible.

I've included the link to my commit in meta-freescale layer, where the
PACKAGECONFIG is set to use 'classic' OSMesa and adds swrast to
DRIDRIVERS. This should turn the rendering to be performed in the SW,
effectively working for all backends (at the obvious performance
penalty). It took me quite some digging to figure this combination
out, as I also cannot claim myself an expert in mesa...

>
> > I guess turning to swrast in case if someone would decide _not_ to use
> > X11 - is not a bad option here, rather than enforcing the X11 for
> > distros which are using this recipe. Any thoughts?
>
> I don't know any any reasons we couldn't do this.. but like I said.. I'm a
> newbie when it comes to mesa.

Maybe something like this could be used (warning: untested):
PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES',
'x11', 'x11', 'osmesa',d)}"
DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11',
'', ' swrast',d)}"

>
> --Mark
>
> >>
> >> After consulting with the author of this recipe, it was clear that it
> >> was only intended for the X11 use-case, so requring X11 should avoid the
> >> error message above.
> >>
> >> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
> >> ---
> >>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> index d4b1c1c454..5674c6b1fe 100644
> >> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> >> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
> >>
> >>  S = "${WORKDIR}/mesa-${PV}"
> >>
> >> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
> >> 'x11', d)}"
> >> -PACKAGECONFIG_class-target = "opengl dri
> >> ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> >> +REQUIRED_DISTRO_FEATURE = "x11"
> >> +
> >> +PACKAGECONFIG ??= "opengl dri x11"
> >> +PACKAGECONFIG_class-target = "opengl dri x11"
> >> --
> >> 2.17.1
> >>
> >>
> >
> > --
> > Regards,
> > Andrey.
> >
> > [1]:
> > https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8
> > 
> >
>


--
Regards,
Andrey.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 21:37     ` Andrey Zhizhikin
@ 2020-03-25 21:48       ` Denys Dmytriyenko
  0 siblings, 0 replies; 14+ messages in thread
From: Denys Dmytriyenko @ 2020-03-25 21:48 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: Mark Hatle, Ross Burton, OE Core mailing list

On Wed, Mar 25, 2020 at 10:37:55PM +0100, Andrey Zhizhikin wrote:
> On Wed, Mar 25, 2020 at 9:36 PM Mark Hatle
> <mark.hatle@kernel.crashing.org> wrote:
> >
> > > On Wed, Mar 25, 2020 at 7:15 PM Mark Hatle
> > > <mark.hatle@kernel.crashing.org> wrote:
> > >>
> > >> Trying to build mesa-gl without X11 enabled, results in numerous errors
> > >> about being incorrectly configured, such as:
> > >>
> > >>   ERROR: Problem encountered: building dri drivers require at least one
> > >> windowing system or classic osmesa
> > >
> > > I believe I was fighting similar issue in meta-freescale layer for
> > > imx8mm derivative [1], where the status of GPU support was not know at
> > > the time. What I did back then is set the default configuration to
> > > osmesa and used swrast in order to be able to use mesa on that
> > > derivative. After that, when GPU support has been added into Mesa -
> > > those modifications were reverted.
> >
> > Do you have a pointer to that anywhere?  I'm curious if any of it might
> > still apply.. but I know nothing about mesa and what configurations are
> > even possible.
> 
> I've included the link to my commit in meta-freescale layer, where the
> PACKAGECONFIG is set to use 'classic' OSMesa and adds swrast to
> DRIDRIVERS. This should turn the rendering to be performed in the SW,
> effectively working for all backends (at the obvious performance
> penalty). It took me quite some digging to figure this combination
> out, as I also cannot claim myself an expert in mesa...

FWIW, we also expect SW rendering for GL, while SGX/RGX cores in our SoCs 
accelerate EGL/GLES.

But, like Mark, I also don't know much about Mesa. Similar to what he 
mentioned about Mali, we used to require a custom libdrm years ago. But 
since then, everything has been upstreamed into main libdrm-omap driver.

-- 
Denys


> > > I guess turning to swrast in case if someone would decide _not_ to use
> > > X11 - is not a bad option here, rather than enforcing the X11 for
> > > distros which are using this recipe. Any thoughts?
> >
> > I don't know any any reasons we couldn't do this.. but like I said.. I'm a
> > newbie when it comes to mesa.
> 
> Maybe something like this could be used (warning: untested):
> PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES',
> 'x11', 'x11', 'osmesa',d)}"
> DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11',
> '', ' swrast',d)}"
> 
> >
> > --Mark
> >
> > >>
> > >> After consulting with the author of this recipe, it was clear that it
> > >> was only intended for the X11 use-case, so requring X11 should avoid the
> > >> error message above.
> > >>
> > >> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
> > >> ---
> > >>  meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb | 6 ++++--
> > >>  1 file changed, 4 insertions(+), 2 deletions(-)
> > >>
> > >> diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> > >> b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> > >> index d4b1c1c454..5674c6b1fe 100644
> > >> --- a/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> > >> +++ b/meta/recipes-graphics/mesa/mesa-gl_20.0.1.bb
> > >> @@ -6,5 +6,7 @@ PROVIDES = "virtual/libgl virtual/mesa"
> > >>
> > >>  S = "${WORKDIR}/mesa-${PV}"
> > >>
> > >> -PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES',
> > >> 'x11', d)}"
> > >> -PACKAGECONFIG_class-target = "opengl dri
> > >> ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
> > >> +REQUIRED_DISTRO_FEATURE = "x11"
> > >> +
> > >> +PACKAGECONFIG ??= "opengl dri x11"
> > >> +PACKAGECONFIG_class-target = "opengl dri x11"
> > >> --
> > >> 2.17.1
> > >>
> > >>
> > >
> > > --
> > > Regards,
> > > Andrey.
> > >
> > > [1]:
> > > https://github.com/Freescale/meta-freescale/commit/9a2210d9ec707531436dc4b56ce655c0bf50a8a8
> > > 
> > >
> >
> 
> 
> --
> Regards,
> Andrey.

> 


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 18:14 [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage Mark Hatle
  2020-03-25 18:21 ` [OE-core] " Denys Dmytriyenko
  2020-03-25 20:02 ` Andrey Zhizhikin
@ 2020-03-25 21:58 ` Otavio Salvador
  2020-03-30 12:07   ` Ross Burton
  2 siblings, 1 reply; 14+ messages in thread
From: Otavio Salvador @ 2020-03-25 21:58 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Burton, Ross, Patches and discussions about the oe-core layer

On Wed, Mar 25, 2020 at 3:15 PM Mark Hatle
<mark.hatle@kernel.crashing.org> wrote:
>
> Trying to build mesa-gl without X11 enabled, results in numerous errors
> about being incorrectly configured, such as:
>
>   ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa
>
> After consulting with the author of this recipe, it was clear that it
> was only intended for the X11 use-case, so requring X11 should avoid the
> error message above.
>
> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>

This is wrong. We ought to add osmesa as fallback and not hard-require X11

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 19:27       ` Mark Hatle
@ 2020-03-26 13:11         ` Adrian Bunk
  2020-03-26 14:15           ` Mark Hatle
  0 siblings, 1 reply; 14+ messages in thread
From: Adrian Bunk @ 2020-03-26 13:11 UTC (permalink / raw)
  To: Mark Hatle; +Cc: Alexander Kanavin, Denys Dmytriyenko, Burton, Ross, OE-core

On Wed, Mar 25, 2020 at 02:27:37PM -0500, Mark Hatle wrote:
> > To be honest, I would just take the entire recipe out. It's causing
> > trouble
> > during updates, isn't being tested neither for builds nor at runtime, and
> > is supposed to provide some specific configuration which as this
> > discussion
> > makes clear, nobody seems to quite understand.
> 
> With the abomination that is libmali (and similar), it is still needed. 
> It's the only way to support GL on a primarily GLES compatible system.
> 
> The problem is the way they do this seems to be a custom version of
> libdrm, which then conflicts with the mesa version.  Thus the issues.
> 
> I'm happy to continue testing my particular needs now and the future (thus
> the patch against master.)
>...

Stupid question:

Is
  PREFERRED_PROVIDER_virtual/mesa = "mesa-gl"
  PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"
equivalent to
  PACKAGECONFIG_pn-mesa = "opengl dri x11"
?

> --Mark

cu
Adrian

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-26 13:11         ` Adrian Bunk
@ 2020-03-26 14:15           ` Mark Hatle
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Hatle @ 2020-03-26 14:15 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Mark Hatle, Alexander Kanavin, Denys Dmytriyenko, Burton, Ross, OE-core

> On Wed, Mar 25, 2020 at 02:27:37PM -0500, Mark Hatle wrote:
>> > To be honest, I would just take the entire recipe out. It's causing
>> > trouble
>> > during updates, isn't being tested neither for builds nor at runtime,
>> and
>> > is supposed to provide some specific configuration which as this
>> > discussion
>> > makes clear, nobody seems to quite understand.
>>
>> With the abomination that is libmali (and similar), it is still needed.
>> It's the only way to support GL on a primarily GLES compatible system.
>>
>> The problem is the way they do this seems to be a custom version of
>> libdrm, which then conflicts with the mesa version.  Thus the issues.
>>
>> I'm happy to continue testing my particular needs now and the future
>> (thus
>> the patch against master.)
>>...
>
> Stupid question:
>
> Is
>   PREFERRED_PROVIDER_virtual/mesa = "mesa-gl"
>   PREFERRED_PROVIDER_virtual/libgl = "mesa-gl"
> equivalent to
>   PACKAGECONFIG_pn-mesa = "opengl dri x11"
> ?

I don't know.  I didn't write this.

However, doing some investigation, the big difference here is the overall
capabilities.  There are common distributions where a user may want to use
mesa (no external libdrm) as well as distress where they want to use an
external drm and the mesa-gl version only.

So 'mesa' and 'external drm + mesa-gl' are equivalent in functionality for
a given distro.  Only difference being optimization.

You may ask why would I use one vs the other.  In my case, we have a
family of SoC parts.  Some of the family have a Mali graphics chip on
them, while others don't have any optimized graphics so everything has to
be software rendered.  The only difference (from a software point of view)
is if the Mali is on-board or not.  So using a common (binary)
distribution, and being able to just swap those parts is highly desirable.
 (Does that ACTUALLY work right now, I'm not sure.. but that is what I am
working on.)

>> --Mark
>
> cu
> Adrian
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [OE-core] [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage
  2020-03-25 21:58 ` Otavio Salvador
@ 2020-03-30 12:07   ` Ross Burton
  0 siblings, 0 replies; 14+ messages in thread
From: Ross Burton @ 2020-03-30 12:07 UTC (permalink / raw)
  To: openembedded-core



On 25/03/2020 21:58, Otavio Salvador wrote:
> On Wed, Mar 25, 2020 at 3:15 PM Mark Hatle
> <mark.hatle@kernel.crashing.org> wrote:
>>
>> Trying to build mesa-gl without X11 enabled, results in numerous errors
>> about being incorrectly configured, such as:
>>
>>    ERROR: Problem encountered: building dri drivers require at least one windowing system or classic osmesa
>>
>> After consulting with the author of this recipe, it was clear that it
>> was only intended for the X11 use-case, so requring X11 should avoid the
>> error message above.
>>
>> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
> 
> This is wrong. We ought to add osmesa as fallback and not hard-require X11

But does anyone actually use this combination, or are we talking about 
ways to make it work in theory?

At the end of the day, OpenGL (not EGL, not GLES) on Linux *is* GLX and 
the point of this recipe was to be a software-backed GL stack for boards 
that only supports GLES in hardware.

Ross

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-03-30 12:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 18:14 [PATCH] mesa-gl: The purpose of mesa-gl is to provide for X11 usage Mark Hatle
2020-03-25 18:21 ` [OE-core] " Denys Dmytriyenko
2020-03-25 18:41   ` Mark Hatle
2020-03-25 19:04     ` Alexander Kanavin
2020-03-25 19:27       ` Mark Hatle
2020-03-26 13:11         ` Adrian Bunk
2020-03-26 14:15           ` Mark Hatle
     [not found]   ` <15FFA02F5F44ED82.23217@lists.openembedded.org>
2020-03-25 19:04     ` Mark Hatle
2020-03-25 20:02 ` Andrey Zhizhikin
2020-03-25 20:35   ` Mark Hatle
2020-03-25 21:37     ` Andrey Zhizhikin
2020-03-25 21:48       ` Denys Dmytriyenko
2020-03-25 21:58 ` Otavio Salvador
2020-03-30 12:07   ` Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.