diff mbox

mesa3d: add intel gallium driver support

Message ID 1457632891-4354-1-git-send-email-gustavo@zacarias.com.ar
State Rejected
Headers show

Commit Message

Gustavo Zacarias March 10, 2016, 6:01 p.m. UTC
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/mesa3d/Config.in | 9 +++++++++
 package/mesa3d/mesa3d.mk | 1 +
 2 files changed, 10 insertions(+)

Comments

Peter Korsgaard March 10, 2016, 7:59 p.m. UTC | #1
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 > Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
 > ---
 >  package/mesa3d/Config.in | 9 +++++++++
 >  package/mesa3d/mesa3d.mk | 1 +
 >  2 files changed, 10 insertions(+)

 > diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
 > index 9057746..5badefa 100644
 > --- a/package/mesa3d/Config.in
 > +++ b/package/mesa3d/Config.in
 > @@ -43,6 +43,15 @@ config BR2_PACKAGE_MESA3D_NEEDS_XA
 
 >  comment "Gallium drivers"
 
 > +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
 > +	bool "Gallium i915 driver"
 > +	depends on BR2_i386 || BR2_x86_64
 > +	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
 > +	select BR2_PACKAGE_LIBDRM_INTEL
 > +	select BR2_PACKAGE_MESA3D_NEEDS_XA
 > +	help
 > +	  Driver for Intel integrated graphics.
 > +

I don't know much about mesa, but I thought the Intel driver didn't use
galium? Is this some kind of alternative to the dri driver?
Gustavo Zacarias March 10, 2016, 8:08 p.m. UTC | #2
On 10/03/16 16:59, Peter Korsgaard wrote:

> I don't know much about mesa, but I thought the Intel driver didn't use
> galium? Is this some kind of alternative to the dri driver?

You've got both, from mesa configure:

--with-gallium-drivers[=DIRS...]
    comma delimited Gallium drivers list, e.g.
    "i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl"
    [default=r300,r600,svga,swrast]

Enabling it builds /usr/lib/dri/i915_dri.so besides others you may have 
selected (in my case kms_swrast_dri.so and swrast_dri.so).
Otherwise we can ask Bernd, but i get that additional driver with this 
option, and it's documented.
Regards.
Bernd Kuhls March 10, 2016, 9:58 p.m. UTC | #3
Am Thu, 10 Mar 2016 17:08:47 -0300 schrieb Gustavo Zacarias:

> On 10/03/16 16:59, Peter Korsgaard wrote:
> 
>> I don't know much about mesa, but I thought the Intel driver didn't use
>> galium? Is this some kind of alternative to the dri driver?
> 
> You've got both, from mesa configure:
> 
> --with-gallium-drivers[=DIRS...]
>     comma delimited Gallium drivers list, e.g.
>     
"i915,ilo,nouveau,r300,r600,radeonsi,freedreno,svga,swrast,vc4,virgl"
>     [default=r300,r600,svga,swrast]
> 
> Enabling it builds /usr/lib/dri/i915_dri.so besides others you may have
> selected (in my case kms_swrast_dri.so and swrast_dri.so).
> Otherwise we can ask Bernd, but i get that additional driver with this
> option, and it's documented.
> Regards.

Hi,

I am using the DRI driver for my Kodi system and never tried the Gallium 
one because my personal Kodi package follows the OpenElec development, 
and they use DRI, too ;)
https://github.com/OpenELEC/OpenELEC.tv/blob/master/config/graphic#L26

Some quotes I found during a quick research:
http://www.mesa3d.org/relnotes/8.0.html (February 9, 2012)
"Removed the dead Gallium i965, cell and failover drivers, which were 
either broken and with nobody in sight to fix the situation or 
deprecated."

https://blogs.igalia.com/itoral/2014/08/08/diving-into-mesa/
"Although there were some efforts to port the Intel driver to Gallium in 
the past, development of the Intel Gallium drivers (i915g and i965g) is 
stalled now as far as I know. Intel is focusing in the classic version of 
the drivers instead."

These days Intel is busy in coding a Vulkan driver for mesa3d:
https://cgit.freedesktop.org/mesa/mesa/tree/README.intel-vulkan.txt?
h=vulkan

To sum up: Yes, it is possible to build a i915 gallium driver in mesa3d, 
but who needs it? That's the reason I never implemented a Config.in 
option for it, but it will not hurt having one ;)

Regards, Bernd
Peter Korsgaard March 11, 2016, 11:09 a.m. UTC | #4
>>>>> "Bernd" == Bernd Kuhls <bernd.kuhls@t-online.de> writes:

Hi,

 > To sum up: Yes, it is possible to build a i915 gallium driver in mesa3d, 
 > but who needs it? That's the reason I never implemented a Config.in 
 > option for it, but it will not hurt having one ;)

Ok, that was more of less also my understanding. Gustavoz, what do you
need the gallium driver for?
Gustavo Zacarias March 11, 2016, 11:16 a.m. UTC | #5
On 11/03/16 08:09, Peter Korsgaard wrote:

> Hi,
>
>   > To sum up: Yes, it is possible to build a i915 gallium driver in mesa3d,
>   > but who needs it? That's the reason I never implemented a Config.in
>   > option for it, but it will not hurt having one ;)
>
> Ok, that was more of less also my understanding. Gustavoz, what do you
> need the gallium driver for?

"DRI drivers need X.org" -> wayland, plus libgtk3 with it as backend.
All that libepoxy effort would go to /dev/null otherwise.
Regards.
Peter Korsgaard March 11, 2016, 11:38 a.m. UTC | #6
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 > On 11/03/16 08:09, Peter Korsgaard wrote:
 >> Hi,
 >> 
 >> > To sum up: Yes, it is possible to build a i915 gallium driver in mesa3d,
 >> > but who needs it? That's the reason I never implemented a Config.in
 >> > option for it, but it will not hurt having one ;)
 >> 
 >> Ok, that was more of less also my understanding. Gustavoz, what do you
 >> need the gallium driver for?

 > "DRI drivers need X.org" -> wayland, plus libgtk3 with it as backend.
 > All that libepoxy effort would go to /dev/null otherwise.
 > Regards.

I actually think the comment is wrong. Googling around for wayland /
mesa / intel seems to show a bunch of references to people using dri
drivers and not gallium:

https://wayland.freedesktop.org/building.html
https://lists.freedesktop.org/archives/wayland-devel/2011-February/000702.html
https://lists.freedesktop.org/archives/wayland-devel/2012-August/004832.html
https://gist.github.com/tmpvar/6218568
Gustavo Zacarias March 11, 2016, 11:47 a.m. UTC | #7
On 11/03/16 08:38, Peter Korsgaard wrote:

> I actually think the comment is wrong. Googling around for wayland /
> mesa / intel seems to show a bunch of references to people using dri
> drivers and not gallium:
>
> https://wayland.freedesktop.org/building.html
> https://lists.freedesktop.org/archives/wayland-devel/2011-February/000702.html
> https://lists.freedesktop.org/archives/wayland-devel/2012-August/004832.html
> https://gist.github.com/tmpvar/6218568

Many people use xwayland hence care (or don't, depending on perspective) 
about lingering x11 stuff around.
The end reason is libgtk3 with the wayland and/or broadway backend, 
newer gtk3 versions require some form of *GL support provided by the 
libepoxy wrapper.
libepoxy in turn needs a real GLX and/or EGL provider, GLX is a 
no-brainer, it requires X11. EGL on the other hand does not.
With some patching (sent) libepoxy can be built X11-less to only handle 
EGL, after all who wants a gtk3 with wayland carrying x11 luggage? (when 
building libgtk3 with only the wayland and/or broadway backends)
Now, since newer libgtk3 versions mandate some form of GL support, which 
is wrapped by libepoxy and provided by mesa, doesn't it make sense that 
said GL support is accelerated?
Regards.
Peter Korsgaard March 11, 2016, 2:19 p.m. UTC | #8
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

Hi,

 > Now, since newer libgtk3 versions mandate some form of GL support,
 > which is wrapped by libepoxy and provided by mesa, doesn't it make
 > sense that said GL support is accelerated?

Yes it does, it is just not clear to me that using this gallium driver
is the way to do it. Your commit message also didn't explain this, which
is why I'm asking.

Is this gallium driver useful for non-wayland (X11) setups? If not,
perhaps it should depend on wayland.
Gustavo Zacarias March 11, 2016, 2:23 p.m. UTC | #9
On 11/03/16 11:19, Peter Korsgaard wrote:

> Yes it does, it is just not clear to me that using this gallium driver
> is the way to do it. Your commit message also didn't explain this, which
> is why I'm asking.
>
> Is this gallium driver useful for non-wayland (X11) setups? If not,
> perhaps it should depend on wayland.

I fail to see why, you've got many other gallium drivers and they don't 
mention wayland either (noveau, r600, svga, swrast, virgl).
I'm pretty sure these are valid for qt5 as well since it can use an EGL 
backend too.
Regards.
Thomas Petazzoni March 31, 2016, 2 a.m. UTC | #10
Hello,

On Fri, 11 Mar 2016 08:16:42 -0300, Gustavo Zacarias wrote:
> On 11/03/16 08:09, Peter Korsgaard wrote:
> 
> > Hi,
> >
> >   > To sum up: Yes, it is possible to build a i915 gallium driver in mesa3d,
> >   > but who needs it? That's the reason I never implemented a Config.in
> >   > option for it, but it will not hurt having one ;)
> >
> > Ok, that was more of less also my understanding. Gustavoz, what do you
> > need the gallium driver for?
> 
> "DRI drivers need X.org" -> wayland, plus libgtk3 with it as backend.

"DRI drivers need X.org" ? This seems wrong, since you precisely sent a
patch recently to all DRI drivers to be built without X.org.

So I guess this specific patch, allowing to build the unmaintained
Intel Gallium driver is no longer needed?

I've marked it as Rejected on patchwork for now. Let me know if you
disagree for some reason.

Thanks!

Thomas
Gustavo Zacarias March 31, 2016, 10:28 a.m. UTC | #11
On 30/03/16 23:00, Thomas Petazzoni wrote:

> "DRI drivers need X.org" ? This seems wrong, since you precisely sent a
> patch recently to all DRI drivers to be built without X.org.
>
> So I guess this specific patch, allowing to build the unmaintained
> Intel Gallium driver is no longer needed?
>
> I've marked it as Rejected on patchwork for now. Let me know if you
> disagree for some reason.
>
> Thanks!
>
> Thomas

Hi Thomas.
The gallium intel driver wasn't cutting it like Bernd said so i 
tried/investigated the DRI route and it worked out.
So yes, even though it might be academically interesting to have the 
option to build the intel gallium driver it's pretty much useless so no 
argument from me since i got what was really interesting from the other 
patchset.
Regards.
diff mbox

Patch

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 9057746..5badefa 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -43,6 +43,15 @@  config BR2_PACKAGE_MESA3D_NEEDS_XA
 
 comment "Gallium drivers"
 
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915
+	bool "Gallium i915 driver"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+	select BR2_PACKAGE_LIBDRM_INTEL
+	select BR2_PACKAGE_MESA3D_NEEDS_XA
+	help
+	  Driver for Intel integrated graphics.
+
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
 	bool "Gallium nouveau driver"
 	depends on BR2_i386 || BR2_x86_64
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index ff2f932..c1f2f45 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -61,6 +61,7 @@  endif
 # Drivers
 
 #Gallium Drivers
+MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_I915)     += i915
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU)  += nouveau
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600)     += r600
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA)     += svga