<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu <span dir="ltr"><<a href="mailto:leo.liu@amd.com" target="_blank">leo.liu@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Gurkirpal,<br>
<br>
Do we have patch 1 in the 6 patch set, or it hasn't arrived.<br></blockquote><div><br></div><div>We do have a patch 1 which has been held for moderation for being too large. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Also I haven't seen the updates for Meson build in the current set.<br></blockquote><div><br></div><div>I wasn't sure if the changes needed to be added to this commit or add a new commit. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
@Dylan, if possible, could you give an update for the Meson build on the current set?<br>
<br>
<br>
Thanks,<br>
<br>
Leo<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On 01/17/2018 08:54 AM, Gurkirpal Singh wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Allow only bellagio or tizonia to be used at the same time.<br>
Detect tizonia package config file<br>
Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir<br>
Only compile empty source (target.c) for now.<br>
<br>
GSoC Project link: <a href="https://summerofcode.withgoogle.com/projects/#4737166321123328" rel="noreferrer" target="_blank">https://summerofcode.withgoogl<wbr>e.com/projects/#47371663211233<wbr>28</a><br>
<br>
Acked-by: Leo Liu <<a href="mailto:leo.liu@amd.com" target="_blank">leo.liu@amd.com</a>><br>
Reviewed-by: Julien Isorce <<a href="mailto:julien.isorce@gmail.com" target="_blank">julien.isorce@gmail.com</a>><br>
---<br>
  <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>                                       | 47 +++++++++++++++++++++-<br>
  src/gallium/Makefile.am                            |  4 ++<br>
  src/gallium/state_trackers/omx<wbr>/Makefile.am         | 13 ++++++<br>
  src/gallium/state_trackers/omx<wbr>/tizonia/Makefile.am | 36 +++++++++++++++++<br>
  .../state_trackers/omx/tizonia<wbr>/Makefile.sources    |  1 +<br>
  src/gallium/targets/omx/Makefi<wbr><a href="http://le.am">le.am</a>                | 19 ++++++++-<br>
  src/gallium/targets/omx/<a href="http://omx.sy">omx.sy</a><wbr>m                    |  1 +<br>
  7 files changed, 117 insertions(+), 4 deletions(-)<br>
  create mode 100644 src/gallium/state_trackers/omx<wbr>/tizonia/Makefile.am<br>
  create mode 100644 src/gallium/state_trackers/omx<wbr>/tizonia/Makefile.sources<br>
<br>
diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
index 7675a45..1f7b163 100644<br>
--- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
+++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
@@ -85,6 +85,7 @@ dnl Versions for external dependencies<br>
  DRI2PROTO_REQUIRED=2.8<br>
  GLPROTO_REQUIRED=1.4.14<br>
  LIBOMXIL_BELLAGIO_REQUIRED=0.0<br>
+LIBOMXIL_TIZONIA_REQUIRED=0.9<wbr>.0<br>
  LIBVA_REQUIRED=0.38.0<br>
  VDPAU_REQUIRED=1.1<br>
  WAYLAND_REQUIRED=1.11<br>
@@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],<br>
     [enable_vdpau=auto])<br>
  AC_ARG_ENABLE([omx],<br>
     [AS_HELP_STRING([--enable-<wbr>omx],<br>
-         [DEPRECATED: Use --enable-omx-bellagio instead @<:@default=auto@:>@])],<br>
-   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio instead.])],<br>
+         [DEPRECATED: Use --enable-omx-bellagio or --enable-omx-tizonia instead @<:@default=auto@:>@])],<br>
+   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio or --enable-omx-tizonia instead.])],<br>
     [])<br>
  AC_ARG_ENABLE([omx-bellagio],<br>
     [AS_HELP_STRING([--enable-<wbr>omx-bellagio],<br>
           [enable OpenMAX Bellagio library @<:@default=disabled@:>@])],<br>
     [enable_omx_bellagio="$enable<wbr>val"],<br>
     [enable_omx_bellagio=no])<br>
+AC_ARG_ENABLE([omx-tizonia],<br>
+   [AS_HELP_STRING([--enable-<wbr>omx-tizonia],<br>
+         [enable OpenMAX Tizonia library @<:@default=disabled@:>@])],<br>
+   [enable_omx_tizonia="$enablev<wbr>al"],<br>
+   [enable_omx_tizonia=no])<br>
  AC_ARG_ENABLE([va],<br>
     [AS_HELP_STRING([--enable-va]<wbr>,<br>
           [enable va library @<:@default=auto@:>@])],<br>
@@ -1357,11 +1363,17 @@ if test "x$enable_opengl" = xno -a \<br>
          "x$enable_xvmc" = xno -a \<br>
          "x$enable_vdpau" = xno -a \<br>
          "x$enable_omx_bellagio" = xno -a \<br>
+        "x$enable_omx_tizonia" = xno -a \<br>
          "x$enable_va" = xno -a \<br>
          "x$enable_opencl" = xno; then<br>
      AC_MSG_ERROR([at least one API should be enabled])<br>
  fi<br>
  +if test "x$enable_omx_bellagio" = xyes -a \<br>
+        "x$enable_omx_tizonia" = xyes; then<br>
+   AC_MSG_ERROR([Can't enable both bellagio and tizonia at same time])<br>
+fi<br>
+<br>
  # Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x<br>
  if test "x$enable_opengl" = xno -a \<br>
          "x$enable_gles1" = xyes; then<br>
@@ -2202,6 +2214,10 @@ if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then<br>
          PKG_CHECK_EXISTS([libomxil-bel<wbr>lagio >= $LIBOMXIL_BELLAGIO_REQUIRED], [enable_omx_bellagio=yes], [enable_omx_bellagio=no])<br>
      fi<br>
  +    if test "x$enable_omx_tizonia" = xauto -a "x$have_omx_platform" = xyes; then<br>
+       PKG_CHECK_EXISTS([libtizonia >= $LIBOMXIL_TIZONIA_REQUIRED], [enable_omx_tizonia=yes], [enable_omx_tizonia=no])<br>
+    fi<br>
+<br>
      if test "x$enable_va" = xauto -a "x$have_va_platform" = xyes; then<br>
          PKG_CHECK_EXISTS([libva >= $LIBVA_REQUIRED], [enable_va=yes], [enable_va=no])<br>
      fi<br>
@@ -2211,6 +2227,7 @@ if test "x$enable_dri" = xyes -o \<br>
          "x$enable_xvmc" = xyes -o \<br>
          "x$enable_vdpau" = xyes -o \<br>
          "x$enable_omx_bellagio" = xyes -o \<br>
+        "x$enable_omx_tizonia" = xyes -o \<br>
          "x$enable_va" = xyes; then<br>
      need_gallium_vl=yes<br>
  fi<br>
@@ -2219,6 +2236,7 @@ AM_CONDITIONAL(NEED_GALLIUM_VL<wbr>, test "x$need_gallium_vl" = xyes)<br>
  if test "x$enable_xvmc" = xyes -o \<br>
          "x$enable_vdpau" = xyes -o \<br>
          "x$enable_omx_bellagio" = xyes -o \<br>
+        "x$enable_omx_tizonia" = xyes -o \<br>
          "x$enable_va" = xyes; then<br>
      if echo $platforms | grep -q "x11"; then<br>
          PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])<br>
@@ -2252,9 +2270,23 @@ if test "x$enable_omx_bellagio" = xyes; then<br>
      fi<br>
      PKG_CHECK_MODULES([OMX_BELLAGI<wbr>O], [libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED])<br>
      gallium_st="$gallium_st omx_bellagio"<br>
+    AC_DEFINE([ENABLE_ST_OMX_BELLA<wbr>GIO], 1, [Use Bellagio for OMX IL])<br>
  fi<br>
  AM_CONDITIONAL(HAVE_ST_OMX_BEL<wbr>LAGIO, test "x$enable_omx_bellagio" = xyes)<br>
  +if test "x$enable_omx_tizonia" = xyes; then<br>
+    if test "x$have_omx_platform" != xyes; then<br>
+        AC_MSG_ERROR([OMX requires at least one of the x11 or drm platforms])<br>
+    fi<br>
+    PKG_CHECK_MODULES([OMX_TIZONIA<wbr>],<br>
+                      [libtizonia >= $LIBOMXIL_TIZONIA_REQUIRED<br>
+                       tizilheaders >= $LIBOMXIL_TIZONIA_REQUIRED<br>
+                       libtizplatform >= $LIBOMXIL_TIZONIA_REQUIRED])<br>
+    gallium_st="$gallium_st omx_tizonia"<br>
+    AC_DEFINE([ENABLE_ST_OMX_TIZON<wbr>IA], 1, [Use Tizoina for OMX IL])<br>
+fi<br>
+AM_CONDITIONAL(HAVE_ST_OMX_TI<wbr>ZONIA, test "x$enable_omx_tizonia" = xyes)<br>
+<br>
  if test "x$enable_va" = xyes; then<br>
      if test "x$have_va_platform" != xyes; then<br>
          AC_MSG_ERROR([VA requires at least one of the x11 drm or wayland platforms])<br>
@@ -2428,6 +2460,15 @@ AC_ARG_WITH([omx-bellagio-libd<wbr>ir],<br>
                                     $PKG_CONFIG --define-variable=libdir=\$lib<wbr>dir --variable=pluginsdir libomxil-bellagio`])<br>
  AC_SUBST([OMX_BELLAGIO_LIB_INS<wbr>TALL_DIR])<br>
  +dnl Directory for OMX_TIZONIA libs<br>
+<br>
+AC_ARG_WITH([omx-tizonia-libd<wbr>ir],<br>
+    [AS_HELP_STRING([--with-omx-ti<wbr>zonia-libdir=DIR],<br>
+        [directory for the OMX_TIZONIA libraries])],<br>
+    [OMX_TIZONIA_LIB_INSTALL_DIR="<wbr>$withval"],<br>
+    [OMX_TIZONIA_LIB_INSTALL_DIR=`<wbr>$PKG_CONFIG --define-variable=libdir=\$lib<wbr>dir --variable=pluginsdir libtizcore`])<br>
+AC_SUBST([OMX_TIZONIA_LIB_INS<wbr>TALL_DIR])<br>
+<br>
  dnl Directory for VA libs<br>
    AC_ARG_WITH([va-libdir],<br>
@@ -2950,6 +2991,8 @@ AC_CONFIG_FILES([Makefile<br>
                   src/gallium/state_trackers/gl<wbr>x/xlib/Makefile<br>
                   src/gallium/state_trackers/ni<wbr>ne/Makefile<br>
                   src/gallium/state_trackers/om<wbr>x/Makefile<br>
+                 src/gallium/state_trackers/om<wbr>x/bellagio/Makefile<br>
+                 src/gallium/state_trackers/om<wbr>x/tizonia/Makefile<br>
                   src/gallium/state_trackers/os<wbr>mesa/Makefile<br>
                   src/gallium/state_trackers/<wbr>va/Makefile<br>
                   src/gallium/state_trackers/vd<wbr>pau/Makefile<br>
diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am<br>
index 4076478..b6fbadb 100644<br>
--- a/src/gallium/Makefile.am<br>
+++ b/src/gallium/Makefile.am<br>
@@ -158,6 +158,10 @@ if HAVE_ST_OMX_BELLAGIO<br>
  SUBDIRS += state_trackers/omx targets/omx<br>
  endif<br>
  +if HAVE_ST_OMX_TIZONIA<br>
+SUBDIRS += state_trackers/omx targets/omx<br>
+endif<br>
+<br>
  if HAVE_GALLIUM_OSMESA<br>
  SUBDIRS += state_trackers/osmesa targets/osmesa<br>
  endif<br>
diff --git a/src/gallium/state_trackers/o<wbr>mx/Makefile.am b/src/gallium/state_trackers/o<wbr>mx/Makefile.am<br>
index b80a5e1..de6eb64 100644<br>
--- a/src/gallium/state_trackers/o<wbr>mx/Makefile.am<br>
+++ b/src/gallium/state_trackers/o<wbr>mx/Makefile.am<br>
@@ -23,6 +23,7 @@<br>
  include Makefile.sources<br>
  include $(top_srcdir)/src/gallium/Auto<wbr>make.inc<br>
  +if HAVE_ST_OMX_BELLAGIO<br>
  SUBDIRS = bellagio<br>
    AM_CFLAGS = \<br>
@@ -31,6 +32,18 @@ AM_CFLAGS = \<br>
        $(VL_CFLAGS) \<br>
        $(XCB_DRI3_CFLAGS) \<br>
        $(OMX_BELLAGIO_CFLAGS)<br>
+else<br>
+SUBDIRS = tizonia<br>
+<br>
+AM_CFLAGS = \<br>
+       $(GALLIUM_CFLAGS) \<br>
+       $(VISIBILITY_CFLAGS) \<br>
+       $(VL_CFLAGS) \<br>
+       $(XCB_DRI3_CFLAGS) \<br>
+       $(OMX_TIZONIA_CFLAGS) \<br>
+       $(OMX_TIZILHEADERS_CFLAGS) \<br>
+       $(OMX_TIZPLATFORM_CFLAGS)<br>
+endif<br>
    noinst_LTLIBRARIES = <a href="http://libomxtracker_common.la" rel="noreferrer" target="_blank">libomxtracker_common.la</a><br>
  diff --git a/src/gallium/state_trackers/o<wbr>mx/tizonia/Makefile.am b/src/gallium/state_trackers/o<wbr>mx/tizonia/Makefile.am<br>
new file mode 100644<br>
index 0000000..0f72e39<br>
--- /dev/null<br>
+++ b/src/gallium/state_trackers/o<wbr>mx/tizonia/Makefile.am<br>
@@ -0,0 +1,36 @@<br>
+# Permission is hereby granted, free of charge, to any person obtaining a<br>
+# copy of this software and associated documentation files (the "Software"),<br>
+# to deal in the Software without restriction, including without limitation<br>
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+# and/or sell copies of the Software, and to permit persons to whom the<br>
+# Software is furnished to do so, subject to the following conditions:<br>
+#<br>
+# The above copyright notice and this permission notice (including the next<br>
+# paragraph) shall be included in all copies or substantial portions of the<br>
+# Software.<br>
+#<br>
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,<br>
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND<br>
+# NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT<br>
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,<br>
+# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br>
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br>
+# DEALINGS IN THE SOFTWARE.<br>
+<br>
+include Makefile.sources<br>
+include $(top_srcdir)/src/gallium/Auto<wbr>make.inc<br>
+<br>
+AM_CFLAGS = \<br>
+       -I$(top_srcdir)/src/gallium/s<wbr>tate_trackers/omx \<br>
+       $(GALLIUM_CFLAGS) \<br>
+       $(VISIBILITY_CFLAGS) \<br>
+       $(VL_CFLAGS) \<br>
+       $(XCB_DRI3_CFLAGS) \<br>
+       $(OMX_TIZONIA_CFLAGS) \<br>
+       $(OMX_TIZILHEADERS_CFLAGS) \<br>
+       $(OMX_TIZPLATFORM_CFLAGS)<br>
+<br>
+noinst_LTLIBRARIES = <a href="http://libomxtiztracker.la" rel="noreferrer" target="_blank">libomxtiztracker.la</a><br>
+<br>
+libomxtiztracker_la_SOURCES = $(C_SOURCES)<br>
diff --git a/src/gallium/state_trackers/o<wbr>mx/tizonia/Makefile.sources b/src/gallium/state_trackers/o<wbr>mx/tizonia/Makefile.sources<br>
new file mode 100644<br>
index 0000000..9103ca8<br>
--- /dev/null<br>
+++ b/src/gallium/state_trackers/o<wbr>mx/tizonia/Makefile.sources<br>
@@ -0,0 +1 @@<br>
+C_SOURCES :=<br>
diff --git a/src/gallium/targets/omx/Make<wbr><a href="http://file.am">file.am</a> b/src/gallium/targets/omx/Make<wbr><a href="http://file.am">file.am</a><br>
index e323616..627d396 100644<br>
--- a/src/gallium/targets/omx/Make<wbr><a href="http://file.am">file.am</a><br>
+++ b/src/gallium/targets/omx/Make<wbr><a href="http://file.am">file.am</a><br>
@@ -3,7 +3,12 @@ include $(top_srcdir)/src/gallium/Auto<wbr>make.inc<br>
  AM_CFLAGS = \<br>
        $(GALLIUM_TARGET_CFLAGS)<br>
  +if HAVE_ST_OMX_BELLAGIO<br>
  omxdir = $(OMX_BELLAGIO_LIB_INSTALL_DIR<wbr>)<br>
+else<br>
+omxdir = $(OMX_TIZONIA_LIB_INSTALL_DIR)<br>
+endif<br>
+<br>
  omx_LTLIBRARIES = <a href="http://libomx_mesa.la" rel="noreferrer" target="_blank">libomx_mesa.la</a><br>
    nodist_EXTRA_libomx_mesa_la_SO<wbr>URCES = dummy.cpp<br>
@@ -24,15 +29,25 @@ endif # HAVE_LD_VERSION_SCRIPT<br>
    libomx_mesa_la_LIBADD = \<br>
        $(top_builddir)/src/gallium/st<wbr>ate_trackers/omx/<a href="http://libomxtracker_common.la" rel="noreferrer" target="_blank">libomxtracker<wbr>_common.la</a> \<br>
-       $(top_builddir)/src/gallium/s<wbr>tate_trackers/omx/bellagio/<a href="http://libomxtracker.la" rel="noreferrer" target="_blank">lib<wbr>omxtracker.la</a> \<br>
        $(top_builddir)/src/gallium/au<wbr>xiliary/<a href="http://libgalliumvlwinsys.la" rel="noreferrer" target="_blank">libgalliumvlwinsys.la</a> \<br>
        $(top_builddir)/src/gallium/au<wbr>xiliary/<a href="http://libgalliumvl.la" rel="noreferrer" target="_blank">libgalliumvl.la</a> \<br>
        $(top_builddir)/src/gallium/au<wbr>xiliary/<a href="http://libgallium.la" rel="noreferrer" target="_blank">libgallium.la</a> \<br>
        $(top_builddir)/src/util/<a href="http://libmesautil.la" rel="noreferrer" target="_blank">libme<wbr>sautil.la</a> \<br>
-       $(OMX_BELLAGIO_LIBS) \<br>
        $(LIBDRM_LIBS) \<br>
        $(GALLIUM_COMMON_LIB_DEPS)<br>
  +if HAVE_ST_OMX_BELLAGIO<br>
+libomx_mesa_la_LIBADD += \<br>
+       $(top_builddir)/src/gallium/s<wbr>tate_trackers/omx/bellagio/<a href="http://libomxtracker.la" rel="noreferrer" target="_blank">lib<wbr>omxtracker.la</a> \<br>
+       $(OMX_BELLAGIO_LIBS)<br>
+else<br>
+libomx_mesa_la_LIBADD += \<br>
+       $(top_builddir)/src/gallium/s<wbr>tate_trackers/omx/tizonia/<a href="http://libomxtiztracker.la" rel="noreferrer" target="_blank">libo<wbr>mxtiztracker.la</a> \<br>
+       $(OMX_TIZONIA_LIBS) \<br>
+       $(OMX_TIZILHEADERS_LIBS) \<br>
+       $(OMX_TIZPLATFORM_LIBS)<br>
+endif<br>
+<br>
  if HAVE_PLATFORM_X11<br>
  libomx_mesa_la_LIBADD += \<br>
        $(VL_LIBS) \<br>
diff --git a/src/gallium/targets/omx/omx.<wbr>sym b/src/gallium/targets/omx/omx.<wbr>sym<br>
index e8a2876..07b65e5 100644<br>
--- a/src/gallium/targets/omx/omx.<wbr>sym<br>
+++ b/src/gallium/targets/omx/omx.<wbr>sym<br>
@@ -1,5 +1,6 @@<br>
  {<br>
        global:<br>
+               OMX_ComponentInit;<br>
                omx_component_library_Setup;<br>
                # Workaround for an LLVM warning with -simplifycfg-sink-common<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>