mesa-lima: Add support for mesa for Mail-4xx GPUs

Submitted by Alistair Francis on Feb. 8, 2019, 6:07 a.m. | Patch ID: 158592

Details

Message ID 20190208060733.5096-1-alistair@alistair23.me
State New
Headers show

Commit Message

Alistair Francis Feb. 8, 2019, 6:07 a.m.
Add support for the open source reverse engineered drivers for the
Mali-4xx GPUs.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
---
 .../recipes-graphics/mesa/mesa-lima_18.3.0.bb | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb

Patch hide | download patch | download mbox

diff --git a/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb b/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
new file mode 100644
index 0000000000..0f26ede2c4
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
@@ -0,0 +1,23 @@ 
+require ${BPN}.inc
+
+BRANCH = "lima-18.3"
+SRCREV = "8e713e4781982c700bfc7b09279146189d525a86"
+SRC_URI = "git://gitlab.freedesktop.org/lima/mesa.git;branch=${BRANCH} \
+"
+
+S = "${WORKDIR}/git"
+
+DEPENDS += "python3-native python3-mako python3-mako-native gettext-native libdrm"
+DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr', '', d)}"
+
+PACKAGECONFIG[sun4i] = ""
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'sun4i', ',lima,sun4i', '', d)}"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+    fi
+}
+

Comments

Alexander Kanavin Feb. 8, 2019, 9:28 a.m.
The status of the driver is described here:
https://www.phoronix.com/scan.php?page=news_item&px=Lima-DRM-Driver-Mainline-V2

Considering the kernel DRM driver is not yet mainlined, and mesa
driver is also developed separately, and the developer says:
"Qiang continues to work on the out-of-tree Lima Mesa driver, which he
says isn't yet ready for daily usage but can run simple tests like the
KMS cube and glmark2."
I think this shouldn't  go to oe-core yet. Once this is in mainline
mesa and kernel, it will be available 'automatically' through version
updates, until then the pieces belong in a suitable BSP layer, I
think.

Alex

On Fri, 8 Feb 2019 at 07:07, Alistair Francis <alistair23@gmail.com> wrote:
>
> Add support for the open source reverse engineered drivers for the
> Mali-4xx GPUs.
>
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
> ---
>  .../recipes-graphics/mesa/mesa-lima_18.3.0.bb | 23 +++++++++++++++++++
>  1 file changed, 23 insertions(+)
>  create mode 100644 meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
>
> diff --git a/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb b/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
> new file mode 100644
> index 0000000000..0f26ede2c4
> --- /dev/null
> +++ b/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
> @@ -0,0 +1,23 @@
> +require ${BPN}.inc
> +
> +BRANCH = "lima-18.3"
> +SRCREV = "8e713e4781982c700bfc7b09279146189d525a86"
> +SRC_URI = "git://gitlab.freedesktop.org/lima/mesa.git;branch=${BRANCH} \
> +"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS += "python3-native python3-mako python3-mako-native gettext-native libdrm"
> +DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr', '', d)}"
> +
> +PACKAGECONFIG[sun4i] = ""
> +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'sun4i', ',lima,sun4i', '', d)}"
> +
> +#because we cannot rely on the fact that all apps will use pkgconfig,
> +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
> +do_install_append() {
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
> +        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
> +    fi
> +}
> +
> --
> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Alistair Francis Feb. 11, 2019, 11:54 p.m.
On Fri, Feb 8, 2019 at 1:28 AM Alexander Kanavin <alex.kanavin@gmail.com> wrote:
>
> The status of the driver is described here:
> https://www.phoronix.com/scan.php?page=news_item&px=Lima-DRM-Driver-Mainline-V2
>
> Considering the kernel DRM driver is not yet mainlined, and mesa
> driver is also developed separately, and the developer says:
> "Qiang continues to work on the out-of-tree Lima Mesa driver, which he
> says isn't yet ready for daily usage but can run simple tests like the
> KMS cube and glmark2."
> I think this shouldn't  go to oe-core yet. Once this is in mainline
> mesa and kernel, it will be available 'automatically' through version
> updates, until then the pieces belong in a suitable BSP layer, I
> think.

Fair enough, I just wanted to check if it would be accepted. I
actually didn't realise that there was an effort to merge it back into
mesa when I sent the patch.

Alistair

>
> Alex
>
> On Fri, 8 Feb 2019 at 07:07, Alistair Francis <alistair23@gmail.com> wrote:
> >
> > Add support for the open source reverse engineered drivers for the
> > Mali-4xx GPUs.
> >
> > Signed-off-by: Alistair Francis <alistair@alistair23.me>
> > ---
> >  .../recipes-graphics/mesa/mesa-lima_18.3.0.bb | 23 +++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> >  create mode 100644 meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
> >
> > diff --git a/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb b/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
> > new file mode 100644
> > index 0000000000..0f26ede2c4
> > --- /dev/null
> > +++ b/meta/recipes-graphics/mesa/mesa-lima_18.3.0.bb
> > @@ -0,0 +1,23 @@
> > +require ${BPN}.inc
> > +
> > +BRANCH = "lima-18.3"
> > +SRCREV = "8e713e4781982c700bfc7b09279146189d525a86"
> > +SRC_URI = "git://gitlab.freedesktop.org/lima/mesa.git;branch=${BRANCH} \
> > +"
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +DEPENDS += "python3-native python3-mako python3-mako-native gettext-native libdrm"
> > +DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr', '', d)}"
> > +
> > +PACKAGECONFIG[sun4i] = ""
> > +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'sun4i', ',lima,sun4i', '', d)}"
> > +
> > +#because we cannot rely on the fact that all apps will use pkgconfig,
> > +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
> > +do_install_append() {
> > +    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
> > +        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
> > +    fi
> > +}
> > +
> > --
> > 2.20.1
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core