<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 13, 2017 at 8:47 AM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Where is the patch 1?</blockquote><div>Sorry for the patches got messed up somehow while sending, I could only see two patches on mail-archive but three on patchwork.</div><div>Tried two times and same result.</div><div>About the first one I got a mail saying that it was too large has been put aside for mod approval.</div><div>The changes I made were to just rename the st/omx directory to st/omx_bellagio (the reason it became large)</div><div>and renaming bits in the <a href="http://configure.ac">configure.ac</a> and Makefiles. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><br>
<br>
<br>
On 08/12/2017 12:07 PM, Gurkirpal Singh wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Coexist with --enable-omx so they can be built independently<br>
Detect tizonia package config file<br>
Generate libomxtiz_mesa.so and install it to libtizcore.pc::pluginsdir<br>
Only compile empty source (target.c) for now.<br>
<br>
v2: Show error message when --enable-omx is used (Christian)<br>
     Use single PKG_CHECK_MODULES for omx_tizonia checks (Emil)<br>
     Use spaces instead of tabs<br>
     Add checks around omx-tizonia<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>
Signed-off-by: Gurkirpal Singh <<a href="mailto:gurkirpal204@gmail.com" target="_blank">gurkirpal204@gmail.com</a>><br>
Reviewed-and-Tested-by: Julien Isorce <<a href="mailto:julien.iso...@gmail.com" target="_blank">julien.iso...@gmail.com</a>><br>
---<br>
  <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>                                | 40 ++++++++++++++-<br>
  src/gallium/Makefile.am                     |  4 ++<br>
  src/gallium/targets/omx-tizoni<wbr>a/Makefile.am | 77 +++++++++++++++++++++++++++++<br>
  src/gallium/targets/omx-tizoni<wbr>a/omx.sym     | 11 +++++<br>
  src/gallium/targets/omx-tizoni<wbr>a/target.c    |  2 +<br>
  5 files changed, 132 insertions(+), 2 deletions(-)<br>
  create mode 100644 src/gallium/targets/omx-tizoni<wbr>a/Makefile.am<br>
  create mode 100644 src/gallium/targets/omx-tizoni<wbr>a/omx.sym<br>
  create mode 100644 src/gallium/targets/omx-tizoni<wbr>a/target.c<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 38af96a..5669695 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>
@@ -1216,14 +1217,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>
</blockquote>
<br></div></div>
Is this in patch 1?</blockquote><div>Yes, it is so.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+         [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>
@@ -1275,6 +1281,7 @@ 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>
@@ -2121,6 +2128,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>
@@ -2130,6 +2141,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>
@@ -2138,6 +2150,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>
      PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])<br>
      need_gallium_vl_winsys=yes<br>
@@ -2172,6 +2185,18 @@ if test "x$enable_omx_bellagio" = xyes; then<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>
+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>
@@ -2342,6 +2367,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>
@@ -2840,6 +2874,7 @@ 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_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>
@@ -2850,6 +2885,7 @@ AC_CONFIG_FILES([Makefile<br>
                   src/gallium/targets/dri/Makef<wbr>ile<br>
                   src/gallium/targets/libgl-xli<wbr>b/Makefile<br>
                   src/gallium/targets/omx-bella<wbr>gio/Makefile<br>
+                 src/gallium/targets/omx-tizon<wbr>ia/Makefile<br>
                   src/gallium/targets/opencl/Ma<wbr>kefile<br>
                   src/gallium/targets/opencl/me<wbr>sa.icd<br>
                   src/gallium/targets/osmesa/Ma<wbr>kefile<br>
diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am<br>
index 2b930ac..e17c679 100644<br>
--- a/src/gallium/Makefile.am<br>
+++ b/src/gallium/Makefile.am<br>
@@ -153,6 +153,10 @@ if HAVE_ST_OMX_BELLAGIO<br>
  SUBDIRS += state_trackers/omx_bellagio targets/omx-bellagio<br>
  endif<br>
  +if HAVE_ST_OMX_TIZONIA<br>
+SUBDIRS += state_trackers/omx_tizonia targets/omx-tizonia<br>
+endif<br>
+<br>
</blockquote>
<br></div></div>
So now we have 2 OMX ST under gallium state trackers<br>
<br>
Is possible that we could have both tizonia and bellagio  as sub-directory under st/omx?, so that they could share the same Makefile.am, Makefile.source, and entrypoint.[ch] etc.<br>
even maybe same idea for gallium/target?<br>
<br>
Regards,<br>
Leo<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div>The original plan was to completely replace the existing OMX IL ST however porting wasn't that straightforward since the new OMX IL version breaks backward compatibility.</div><div>I think Julien will be able to expain better here.</div><div><br></div><div>So the plan is still to replace the ST but for now we've postponed that task until all the components have been ported. As it is now we'll later just remove omx_bellagio and rename omx_tizonia to omx.</div><div>I think that merging them both will make the transition a little bit harder.</div><div><br></div><div>So maybe if you still insist can we mark it as good-to-have for later? Actually Julien gave the same idea earlier when we started on the project and decided to postpone it for later due to project time restraints.</div><div><br></div><div>Cheers</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  if HAVE_GALLIUM_OSMESA<br>
  SUBDIRS += state_trackers/osmesa targets/osmesa<br>
  endif<br>
diff --git a/src/gallium/targets/omx-tizo<wbr>nia/Makefile.am b/src/gallium/targets/omx-tizo<wbr>nia/Makefile.am<br>
new file mode 100644<br>
index 0000000..6baacaa<br>
--- /dev/null<br>
+++ b/src/gallium/targets/omx-tizo<wbr>nia/Makefile.am<br>
@@ -0,0 +1,77 @@<br>
+include $(top_srcdir)/src/gallium/Auto<wbr>make.inc<br>
+<br>
+AM_CFLAGS = \<br>
+       $(GALLIUM_TARGET_CFLAGS)<br>
+<br>
+omxdir = $(OMX_TIZONIA_LIB_INSTALL_DIR)<br>
+omx_LTLIBRARIES = <a href="http://libomxtiz_mesa.la" rel="noreferrer" target="_blank">libomxtiz_mesa.la</a><br>
+<br>
+nodist_EXTRA_libomxtiz_mesa_l<wbr>a_SOURCES = dummy.cpp<br>
+libomxtiz_mesa_la_SOURCES =<br>
+<br>
+libomxtiz_mesa_la_LDFLAGS = \<br>
+       -shared \<br>
+       -module \<br>
+       -no-undefined \<br>
+       -avoid-version \<br>
+       $(GC_SECTIONS) \<br>
+       $(LD_NO_UNDEFINED)<br>
+<br>
+if HAVE_LD_VERSION_SCRIPT<br>
+libomxtiz_mesa_la_LDFLAGS += \<br>
+       -Wl,--version-script=$(top_sr<wbr>cdir)/src/gallium/targets/omx-<wbr>tizonia/omx.sym<br>
+endif # HAVE_LD_VERSION_SCRIPT<br>
+<br>
+libomxtiz_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>
+       $(top_builddir)/src/gallium/a<wbr>uxiliary/<a href="http://libgalliumvlwinsys.la" rel="noreferrer" target="_blank">libgalliumvlwinsys.la</a> \<br>
+       $(top_builddir)/src/gallium/a<wbr>uxiliary/<a href="http://libgalliumvl.la" rel="noreferrer" target="_blank">libgalliumvl.la</a> \<br>
+       $(top_builddir)/src/gallium/a<wbr>uxiliary/<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">libm<wbr>esautil.la</a> \<br>
+       $(OMX_TIZONIA_LIBS) \<br>
+       $(OMX_TIZILHEADERS_LIBS) \<br>
+       $(OMX_TIZPLATFORM_LIBS) \<br>
+       $(LIBDRM_LIBS) \<br>
+       $(GALLIUM_COMMON_LIB_DEPS)<br>
+<br>
+if HAVE_PLATFORM_X11<br>
+libomxtiz_mesa_la_LIBADD += \<br>
+       $(VL_LIBS) \<br>
+       $(XCB_DRI3_LIBS)<br>
+endif<br>
+<br>
+EXTRA_libomxtiz_mesa_la_DEPEN<wbr>DENCIES = omx.sym<br>
+EXTRA_DIST = omx.sym<br>
+<br>
+if HAVE_GALLIUM_STATIC_TARGETS<br>
+<br>
+TARGET_DRIVERS =<br>
+TARGET_CPPFLAGS =<br>
+TARGET_LIB_DEPS =<br>
+<br>
+<br>
+include $(top_srcdir)/src/gallium/driv<wbr>ers/nouveau/Automake.inc<br>
+<br>
+include $(top_srcdir)/src/gallium/driv<wbr>ers/r600/Automake.inc<br>
+include $(top_srcdir)/src/gallium/driv<wbr>ers/radeonsi/Automake.inc<br>
+<br>
+libomxtiz_mesa_la_SOURCES += target.c<br>
+libomxtiz_mesa_la_CPPFLAGS = $(TARGET_CPPFLAGS)<br>
+libomxtiz_mesa_la_LIBADD += \<br>
+       $(top_builddir)/src/gallium/a<wbr>uxiliary/pipe-loader/<a href="http://libpipe_loader_static.la" rel="noreferrer" target="_blank">libpipe_l<wbr>oader_static.la</a> \<br>
+       $(GALLIUM_PIPE_LOADER_WINSYS_<wbr>LIBS) \<br>
+       $(TARGET_LIB_DEPS) \<br>
+       $(TARGET_COMPILER_LIB_DEPS) \<br>
+       $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)<br>
+<br>
+else # HAVE_GALLIUM_STATIC_TARGETS<br>
+<br>
+libomxtiz_mesa_la_LIBADD += \<br>
+       $(top_builddir)/src/gallium/a<wbr>uxiliary/pipe-loader/<a href="http://libpipe_loader_dynamic.la" rel="noreferrer" target="_blank">libpipe_l<wbr>oader_dynamic.la</a><br>
+<br>
+endif # HAVE_GALLIUM_STATIC_TARGETS<br>
+<br>
+if HAVE_GALLIUM_LLVM<br>
+libomxtiz_mesa_la_LIBADD += $(LLVM_LIBS)<br>
+libomxtiz_mesa_la_LDFLAGS += $(LLVM_LDFLAGS)<br>
+endif<br>
diff --git a/src/gallium/targets/omx-tizo<wbr>nia/omx.sym b/src/gallium/targets/omx-tizo<wbr>nia/omx.sym<br>
new file mode 100644<br>
index 0000000..2aafb29<br>
--- /dev/null<br>
+++ b/src/gallium/targets/omx-tizo<wbr>nia/omx.sym<br>
@@ -0,0 +1,11 @@<br>
+{<br>
+       global:<br>
+               OMX_ComponentInit;<br>
+<br>
+               # Workaround for an LLVM warning with -simplifycfg-sink-common<br>
+               # due to LLVM being initialized multiple times.<br>
+               radeon_drm_winsys_create;<br>
+               amdgpu_winsys_create;<br>
+       local:<br>
+               *;<br>
+};<br>
diff --git a/src/gallium/targets/omx-tizo<wbr>nia/target.c b/src/gallium/targets/omx-tizo<wbr>nia/target.c<br>
new file mode 100644<br>
index 0000000..308e23b<br>
--- /dev/null<br>
+++ b/src/gallium/targets/omx-tizo<wbr>nia/target.c<br>
@@ -0,0 +1,2 @@<br>
+#include "target-helpers/drm_helper.h"<br>
+#include "target-helpers/sw_helper.h"<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div></div>