Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-22 Thread Gurkirpal Singh
Since patch 1 was rejected this time around for being too large I've also
sent the series directly to Leo and Julien.

On Sat, Jan 20, 2018 at 8:01 AM, Gurkirpal Singh 
wrote:

> I've added the right patches as a reply.
>
> Sry again for the inconvenience
>
> On Sat, Jan 20, 2018 at 3:38 AM, Gurkirpal Singh 
> wrote:
>
>>
>>
>> On Fri, Jan 19, 2018 at 8:30 PM, Leo Liu  wrote:
>>
>>>
>>>
>>> On 01/19/2018 04:46 AM, Julien Isorce wrote:
>>>
>>> Hi Leo,
>>>
>>> Do you have enough data to start the merge ?
>>>
>>> Hi Julien,
>>>
>>> What I can help is to have the patches pushed to upstream, and which I
>>> think anyone with write-permission account  also can do.
>>>
>>> I would like to help to push patches that are cleanly applied, and build
>>> successfully, and we can take of how functional later.
>>>
>>> @Dylan, you said:
>>> >The patches in this thread don't apply, there is some other work on you
>>> tree not
>>> >included maybe? Or I'd see about adding it (I don't think it would be
>>> too hard).
>>> >Do you have this series in a public git repo I could pull from?
>>>
>>> I have the patch from this thread applied cleanly without any problem,
>>> re-attached as your reference.
>>>
>>> $ git am *.patch
>>> Applying: st/omx/bellagio: Rename st and target directories
>>> Applying: st/omx/tizonia: Add --enable-omx-tizonia flag and build files
>>> Applying: st/omx/tizonia: Add entrypoint
>>> Applying: st/omx/tizonia: Add H.264 decoder
>>> Applying: st/omx/tizonia: Add H.264 encoder
>>> Applying: st/omx/tizonia/h264d: Add EGLImage support
>>>
>>>
>>>
>>> >For Tizonia, what I'd like to do is change the -Dgallium-omx argument
>>> to accept
>>> >['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx
>>> option), with
>>> >auto trying to find bellagio and tizonia in some order and falling back
>>> to
>>> >disabled if neither is found.
>>>
>>> Can you help to add this into current patch set ?  Thanks.
>>>
>>>
>>> @Gukirpal, the patches (also re-attached) failed to build
>>>
>>
>> Ah my bad. I just realised these were slightly older version of same
>> patches that got mixed up. I'll send in the latest ones ASAP.
>>
>>>
>>>
>>> Making all in state_trackers/omx
>>> make[4]: Entering directory 'mesa/src/gallium/state_trackers/omx'
>>> Making all in bellagio
>>> make[5]: Entering directory 'mesa/src/gallium/state_tracke
>>> rs/omx/bellagio'
>>>   CC   entrypoint.lo
>>>   CC   vid_dec_mpeg12.lo
>>>   CC   vid_dec.lo
>>>   CC   vid_dec_h265.lo
>>>   CC   vid_enc.lo
>>>   CC   vid_dec_h264.lo
>>> vid_enc.c: In function ‘vid_enc_Constructor’:
>>> vid_enc.c:150:19: error: implicit declaration of function
>>> ‘omx_get_screen’; did you mean ‘os_get_option’?
>>> [-Werror=implicit-function-declaration]
>>> priv->screen = omx_get_screen("OMX_RENDER_NODE");
>>>^~
>>>os_get_option
>>> vid_enc.c:150:17: warning: assignment makes pointer from integer without
>>> a cast [-Wint-conversion]
>>> priv->screen = omx_get_screen("OMX_RENDER_NODE");
>>>  ^
>>> vid_enc.c: In function ‘vid_enc_Destructor’:
>>> vid_enc.c:276:7: error: implicit declaration of function
>>> ‘omx_put_screen’ [-Werror=implicit-function-declaration]
>>>omx_put_screen();
>>>^~
>>> cc1: some warnings being treated as errors
>>> Makefile:682: recipe for target 'vid_enc.lo' failed
>>> make[5]: *** [vid_enc.lo] Error 1
>>>
>>>
>>> Leo
>>>
>>>
>>>
>>>
>>> Thx
>>> Julien
>>>
>>> On 18 January 2018 at 02:28, Gurkirpal Singh 
>>> wrote:
>>>


 On Wed, Jan 17, 2018 at 10:39 PM, Dylan Baker 
 wrote:

> The meson build for omx-bellagio has landed along with the other media
> state
> trackers that are in tree. Currently there is a known bug with at
> least vdpau
> and va-api (I suspect that the omx, va, and xvmc are affected as well)
> which
> causes required symbols to not be exported, I'm still trying to
> resolve that.
>
> For Tizonia, what I'd like to do is change the -Dgallium-omx argument
> to accept
> ['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx
> option), with
> auto trying to find bellagio and tizonia in some order and falling
> back to
> disabled if neither is found.
>
> The patches in this thread don't apply, there is some other work on
> you tree not
> included maybe? Or I'd see about adding it (I don't think it would be
> too hard).
> Do you have this series in a public git repo I could pull from?
>

 I decided not to commit incomplete work so there are only these commits
 in the repo.
 I have it on my github repo branch "refactor_stomx"
 https://github.com/gpalsingh/mesa/commits/refactor_stomx

 Cheers

>
> Dylan
>
> Quoting Leo Liu (2018-01-17 

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-19 Thread Gurkirpal Singh
I've added the right patches as a reply.

Sry again for the inconvenience

On Sat, Jan 20, 2018 at 3:38 AM, Gurkirpal Singh 
wrote:

>
>
> On Fri, Jan 19, 2018 at 8:30 PM, Leo Liu  wrote:
>
>>
>>
>> On 01/19/2018 04:46 AM, Julien Isorce wrote:
>>
>> Hi Leo,
>>
>> Do you have enough data to start the merge ?
>>
>> Hi Julien,
>>
>> What I can help is to have the patches pushed to upstream, and which I
>> think anyone with write-permission account  also can do.
>>
>> I would like to help to push patches that are cleanly applied, and build
>> successfully, and we can take of how functional later.
>>
>> @Dylan, you said:
>> >The patches in this thread don't apply, there is some other work on you
>> tree not
>> >included maybe? Or I'd see about adding it (I don't think it would be
>> too hard).
>> >Do you have this series in a public git repo I could pull from?
>>
>> I have the patch from this thread applied cleanly without any problem,
>> re-attached as your reference.
>>
>> $ git am *.patch
>> Applying: st/omx/bellagio: Rename st and target directories
>> Applying: st/omx/tizonia: Add --enable-omx-tizonia flag and build files
>> Applying: st/omx/tizonia: Add entrypoint
>> Applying: st/omx/tizonia: Add H.264 decoder
>> Applying: st/omx/tizonia: Add H.264 encoder
>> Applying: st/omx/tizonia/h264d: Add EGLImage support
>>
>>
>>
>> >For Tizonia, what I'd like to do is change the -Dgallium-omx argument to
>> accept
>> >['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx
>> option), with
>> >auto trying to find bellagio and tizonia in some order and falling back
>> to
>> >disabled if neither is found.
>>
>> Can you help to add this into current patch set ?  Thanks.
>>
>>
>> @Gukirpal, the patches (also re-attached) failed to build
>>
>
> Ah my bad. I just realised these were slightly older version of same
> patches that got mixed up. I'll send in the latest ones ASAP.
>
>>
>>
>> Making all in state_trackers/omx
>> make[4]: Entering directory 'mesa/src/gallium/state_trackers/omx'
>> Making all in bellagio
>> make[5]: Entering directory 'mesa/src/gallium/state_tracke
>> rs/omx/bellagio'
>>   CC   entrypoint.lo
>>   CC   vid_dec_mpeg12.lo
>>   CC   vid_dec.lo
>>   CC   vid_dec_h265.lo
>>   CC   vid_enc.lo
>>   CC   vid_dec_h264.lo
>> vid_enc.c: In function ‘vid_enc_Constructor’:
>> vid_enc.c:150:19: error: implicit declaration of function
>> ‘omx_get_screen’; did you mean ‘os_get_option’?
>> [-Werror=implicit-function-declaration]
>> priv->screen = omx_get_screen("OMX_RENDER_NODE");
>>^~
>>os_get_option
>> vid_enc.c:150:17: warning: assignment makes pointer from integer without
>> a cast [-Wint-conversion]
>> priv->screen = omx_get_screen("OMX_RENDER_NODE");
>>  ^
>> vid_enc.c: In function ‘vid_enc_Destructor’:
>> vid_enc.c:276:7: error: implicit declaration of function ‘omx_put_screen’
>> [-Werror=implicit-function-declaration]
>>omx_put_screen();
>>^~
>> cc1: some warnings being treated as errors
>> Makefile:682: recipe for target 'vid_enc.lo' failed
>> make[5]: *** [vid_enc.lo] Error 1
>>
>>
>> Leo
>>
>>
>>
>>
>> Thx
>> Julien
>>
>> On 18 January 2018 at 02:28, Gurkirpal Singh 
>> wrote:
>>
>>>
>>>
>>> On Wed, Jan 17, 2018 at 10:39 PM, Dylan Baker 
>>> wrote:
>>>
 The meson build for omx-bellagio has landed along with the other media
 state
 trackers that are in tree. Currently there is a known bug with at least
 vdpau
 and va-api (I suspect that the omx, va, and xvmc are affected as well)
 which
 causes required symbols to not be exported, I'm still trying to resolve
 that.

 For Tizonia, what I'd like to do is change the -Dgallium-omx argument
 to accept
 ['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx
 option), with
 auto trying to find bellagio and tizonia in some order and falling back
 to
 disabled if neither is found.

 The patches in this thread don't apply, there is some other work on you
 tree not
 included maybe? Or I'd see about adding it (I don't think it would be
 too hard).
 Do you have this series in a public git repo I could pull from?

>>>
>>> I decided not to commit incomplete work so there are only these commits
>>> in the repo.
>>> I have it on my github repo branch "refactor_stomx"
>>> https://github.com/gpalsingh/mesa/commits/refactor_stomx
>>>
>>> Cheers
>>>

 Dylan

 Quoting Leo Liu (2018-01-17 08:23:54)
 >
 >
 > On 01/17/2018 11:19 AM, Gurkirpal Singh wrote:
 >
 >
 >
 > On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu  wrote:
 >
 > Hi Gurkirpal,
 >
 > Do we have patch 1 in the 6 patch set, or it hasn't arrived.
 >
 >
 > We do have a patch 1 which has been 

[Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-19 Thread Gurkirpal Singh
Allow only bellagio or tizonia to be used at the same time.
Detect tizonia package config file
Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir
Only compile empty source (target.c) for now.

GSoC Project link: 
https://summerofcode.withgoogle.com/projects/#4737166321123328

Acked-by: Leo Liu 
Reviewed-by: Julien Isorce 
---
 configure.ac   | 47 +-
 src/gallium/Makefile.am|  4 ++
 src/gallium/state_trackers/omx/Makefile.am | 13 ++
 src/gallium/state_trackers/omx/tizonia/Makefile.am | 36 +
 .../state_trackers/omx/tizonia/Makefile.sources|  1 +
 src/gallium/targets/omx/Makefile.am| 19 -
 src/gallium/targets/omx/omx.sym|  1 +
 7 files changed, 117 insertions(+), 4 deletions(-)
 create mode 100644 src/gallium/state_trackers/omx/tizonia/Makefile.am
 create mode 100644 src/gallium/state_trackers/omx/tizonia/Makefile.sources

diff --git a/configure.ac b/configure.ac
index 8de0c10..aaa3ca5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,7 @@ dnl Versions for external dependencies
 DRI2PROTO_REQUIRED=2.8
 GLPROTO_REQUIRED=1.4.14
 LIBOMXIL_BELLAGIO_REQUIRED=0.0
+LIBOMXIL_TIZONIA_REQUIRED=0.9.0
 LIBVA_REQUIRED=0.38.0
 VDPAU_REQUIRED=1.1
 WAYLAND_REQUIRED=1.11
@@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
[enable_vdpau=auto])
 AC_ARG_ENABLE([omx],
[AS_HELP_STRING([--enable-omx],
- [DEPRECATED: Use --enable-omx-bellagio instead 
@<:@default=auto@:>@])],
-   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio 
instead.])],
+ [DEPRECATED: Use --enable-omx-bellagio or --enable-omx-tizonia 
instead @<:@default=auto@:>@])],
+   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio or 
--enable-omx-tizonia instead.])],
[])
 AC_ARG_ENABLE([omx-bellagio],
[AS_HELP_STRING([--enable-omx-bellagio],
  [enable OpenMAX Bellagio library @<:@default=disabled@:>@])],
[enable_omx_bellagio="$enableval"],
[enable_omx_bellagio=no])
+AC_ARG_ENABLE([omx-tizonia],
+   [AS_HELP_STRING([--enable-omx-tizonia],
+ [enable OpenMAX Tizonia library @<:@default=disabled@:>@])],
+   [enable_omx_tizonia="$enableval"],
+   [enable_omx_tizonia=no])
 AC_ARG_ENABLE([va],
[AS_HELP_STRING([--enable-va],
  [enable va library @<:@default=auto@:>@])],
@@ -1357,11 +1363,17 @@ if test "x$enable_opengl" = xno -a \
 "x$enable_xvmc" = xno -a \
 "x$enable_vdpau" = xno -a \
 "x$enable_omx_bellagio" = xno -a \
+"x$enable_omx_tizonia" = xno -a \
 "x$enable_va" = xno -a \
 "x$enable_opencl" = xno; then
 AC_MSG_ERROR([at least one API should be enabled])
 fi
 
+if test "x$enable_omx_bellagio" = xyes -a \
+"x$enable_omx_tizonia" = xyes; then
+   AC_MSG_ERROR([Can't enable both bellagio and tizonia at same time])
+fi
+
 # Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
 if test "x$enable_opengl" = xno -a \
 "x$enable_gles1" = xyes; then
@@ -2202,6 +2214,10 @@ if test -n "$with_gallium_drivers" -a 
"x$with_gallium_drivers" != xswrast; then
 PKG_CHECK_EXISTS([libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED], 
[enable_omx_bellagio=yes], [enable_omx_bellagio=no])
 fi
 
+if test "x$enable_omx_tizonia" = xauto -a "x$have_omx_platform" = xyes; 
then
+   PKG_CHECK_EXISTS([libtizonia >= $LIBOMXIL_TIZONIA_REQUIRED], 
[enable_omx_tizonia=yes], [enable_omx_tizonia=no])
+fi
+
 if test "x$enable_va" = xauto -a "x$have_va_platform" = xyes; then
 PKG_CHECK_EXISTS([libva >= $LIBVA_REQUIRED], [enable_va=yes], 
[enable_va=no])
 fi
@@ -2211,6 +2227,7 @@ if test "x$enable_dri" = xyes -o \
 "x$enable_xvmc" = xyes -o \
 "x$enable_vdpau" = xyes -o \
 "x$enable_omx_bellagio" = xyes -o \
+"x$enable_omx_tizonia" = xyes -o \
 "x$enable_va" = xyes; then
 need_gallium_vl=yes
 fi
@@ -2219,6 +2236,7 @@ AM_CONDITIONAL(NEED_GALLIUM_VL, test "x$need_gallium_vl" 
= xyes)
 if test "x$enable_xvmc" = xyes -o \
 "x$enable_vdpau" = xyes -o \
 "x$enable_omx_bellagio" = xyes -o \
+"x$enable_omx_tizonia" = xyes -o \
 "x$enable_va" = xyes; then
 if echo $platforms | grep -q "x11"; then
 PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
@@ -2252,9 +2270,23 @@ if test "x$enable_omx_bellagio" = xyes; then
 fi
 PKG_CHECK_MODULES([OMX_BELLAGIO], [libomxil-bellagio >= 
$LIBOMXIL_BELLAGIO_REQUIRED])
 gallium_st="$gallium_st omx_bellagio"
+AC_DEFINE([ENABLE_ST_OMX_BELLAGIO], 1, [Use Bellagio for OMX IL])
 fi
 AM_CONDITIONAL(HAVE_ST_OMX_BELLAGIO, test "x$enable_omx_bellagio" = xyes)
 
+if test "x$enable_omx_tizonia" = xyes; then
+if test "x$have_omx_platform" != xyes; then
+AC_MSG_ERROR([OMX requires at least one of the x11 or drm 

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-19 Thread Gurkirpal Singh
On Fri, Jan 19, 2018 at 8:30 PM, Leo Liu  wrote:

>
>
> On 01/19/2018 04:46 AM, Julien Isorce wrote:
>
> Hi Leo,
>
> Do you have enough data to start the merge ?
>
> Hi Julien,
>
> What I can help is to have the patches pushed to upstream, and which I
> think anyone with write-permission account  also can do.
>
> I would like to help to push patches that are cleanly applied, and build
> successfully, and we can take of how functional later.
>
> @Dylan, you said:
> >The patches in this thread don't apply, there is some other work on you
> tree not
> >included maybe? Or I'd see about adding it (I don't think it would be too
> hard).
> >Do you have this series in a public git repo I could pull from?
>
> I have the patch from this thread applied cleanly without any problem,
> re-attached as your reference.
>
> $ git am *.patch
> Applying: st/omx/bellagio: Rename st and target directories
> Applying: st/omx/tizonia: Add --enable-omx-tizonia flag and build files
> Applying: st/omx/tizonia: Add entrypoint
> Applying: st/omx/tizonia: Add H.264 decoder
> Applying: st/omx/tizonia: Add H.264 encoder
> Applying: st/omx/tizonia/h264d: Add EGLImage support
>
>
>
> >For Tizonia, what I'd like to do is change the -Dgallium-omx argument to
> accept
> >['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx
> option), with
> >auto trying to find bellagio and tizonia in some order and falling back to
> >disabled if neither is found.
>
> Can you help to add this into current patch set ?  Thanks.
>
>
> @Gukirpal, the patches (also re-attached) failed to build
>

Ah my bad. I just realised these were slightly older version of same
patches that got mixed up. I'll send in the latest ones ASAP.

>
>
> Making all in state_trackers/omx
> make[4]: Entering directory 'mesa/src/gallium/state_trackers/omx'
> Making all in bellagio
> make[5]: Entering directory 'mesa/src/gallium/state_trackers/omx/bellagio'
>   CC   entrypoint.lo
>   CC   vid_dec_mpeg12.lo
>   CC   vid_dec.lo
>   CC   vid_dec_h265.lo
>   CC   vid_enc.lo
>   CC   vid_dec_h264.lo
> vid_enc.c: In function ‘vid_enc_Constructor’:
> vid_enc.c:150:19: error: implicit declaration of function
> ‘omx_get_screen’; did you mean ‘os_get_option’? [-Werror=implicit-function-
> declaration]
> priv->screen = omx_get_screen("OMX_RENDER_NODE");
>^~
>os_get_option
> vid_enc.c:150:17: warning: assignment makes pointer from integer without a
> cast [-Wint-conversion]
> priv->screen = omx_get_screen("OMX_RENDER_NODE");
>  ^
> vid_enc.c: In function ‘vid_enc_Destructor’:
> vid_enc.c:276:7: error: implicit declaration of function ‘omx_put_screen’
> [-Werror=implicit-function-declaration]
>omx_put_screen();
>^~
> cc1: some warnings being treated as errors
> Makefile:682: recipe for target 'vid_enc.lo' failed
> make[5]: *** [vid_enc.lo] Error 1
>
>
> Leo
>
>
>
>
> Thx
> Julien
>
> On 18 January 2018 at 02:28, Gurkirpal Singh 
> wrote:
>
>>
>>
>> On Wed, Jan 17, 2018 at 10:39 PM, Dylan Baker 
>> wrote:
>>
>>> The meson build for omx-bellagio has landed along with the other media
>>> state
>>> trackers that are in tree. Currently there is a known bug with at least
>>> vdpau
>>> and va-api (I suspect that the omx, va, and xvmc are affected as well)
>>> which
>>> causes required symbols to not be exported, I'm still trying to resolve
>>> that.
>>>
>>> For Tizonia, what I'd like to do is change the -Dgallium-omx argument to
>>> accept
>>> ['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx
>>> option), with
>>> auto trying to find bellagio and tizonia in some order and falling back
>>> to
>>> disabled if neither is found.
>>>
>>> The patches in this thread don't apply, there is some other work on you
>>> tree not
>>> included maybe? Or I'd see about adding it (I don't think it would be
>>> too hard).
>>> Do you have this series in a public git repo I could pull from?
>>>
>>
>> I decided not to commit incomplete work so there are only these commits
>> in the repo.
>> I have it on my github repo branch "refactor_stomx"
>> https://github.com/gpalsingh/mesa/commits/refactor_stomx
>>
>> Cheers
>>
>>>
>>> Dylan
>>>
>>> Quoting Leo Liu (2018-01-17 08:23:54)
>>> >
>>> >
>>> > On 01/17/2018 11:19 AM, Gurkirpal Singh wrote:
>>> >
>>> >
>>> >
>>> > On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu  wrote:
>>> >
>>> > Hi Gurkirpal,
>>> >
>>> > Do we have patch 1 in the 6 patch set, or it hasn't arrived.
>>> >
>>> >
>>> > We do have a patch 1 which has been held for moderation for being
>>> too
>>> > large.
>>> >
>>> > If there is no arrival tomorrow, please send it as attachment. Thanks.
>>> >
>>> >
>>> >
>>> > Also I haven't seen the updates for Meson build in the current
>>> set.
>>> >
>>> >
>>> > I wasn't sure if the changes needed to be added to this 

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-19 Thread Julien Isorce
Hi Leo,

Do you have enough data to start the merge ?

Thx
Julien

On 18 January 2018 at 02:28, Gurkirpal Singh  wrote:

>
>
> On Wed, Jan 17, 2018 at 10:39 PM, Dylan Baker  wrote:
>
>> The meson build for omx-bellagio has landed along with the other media
>> state
>> trackers that are in tree. Currently there is a known bug with at least
>> vdpau
>> and va-api (I suspect that the omx, va, and xvmc are affected as well)
>> which
>> causes required symbols to not be exported, I'm still trying to resolve
>> that.
>>
>> For Tizonia, what I'd like to do is change the -Dgallium-omx argument to
>> accept
>> ['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx
>> option), with
>> auto trying to find bellagio and tizonia in some order and falling back to
>> disabled if neither is found.
>>
>> The patches in this thread don't apply, there is some other work on you
>> tree not
>> included maybe? Or I'd see about adding it (I don't think it would be too
>> hard).
>> Do you have this series in a public git repo I could pull from?
>>
>
> I decided not to commit incomplete work so there are only these commits in
> the repo.
> I have it on my github repo branch "refactor_stomx"
> https://github.com/gpalsingh/mesa/commits/refactor_stomx
>
> Cheers
>
>>
>> Dylan
>>
>> Quoting Leo Liu (2018-01-17 08:23:54)
>> >
>> >
>> > On 01/17/2018 11:19 AM, Gurkirpal Singh wrote:
>> >
>> >
>> >
>> > On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu  wrote:
>> >
>> > Hi Gurkirpal,
>> >
>> > Do we have patch 1 in the 6 patch set, or it hasn't arrived.
>> >
>> >
>> > We do have a patch 1 which has been held for moderation for being
>> too
>> > large.
>> >
>> > If there is no arrival tomorrow, please send it as attachment. Thanks.
>> >
>> >
>> >
>> > Also I haven't seen the updates for Meson build in the current
>> set.
>> >
>> >
>> > I wasn't sure if the changes needed to be added to this commit or
>> add a new
>> > commit.
>> >
>> >
>> > I think Dylan can give you advice on this for sure.
>> >
>> > Thanks,
>> > Leo
>> >
>> >
>> >
>> >
>> >
>> > @Dylan, if possible, could you give an update for the Meson
>> build on
>> > the current set?
>> >
>> >
>> > Thanks,
>> >
>> > Leo
>> >
>> >
>> >
>> >
>> > On 01/17/2018 08:54 AM, Gurkirpal Singh wrote:
>> >
>> > Allow only bellagio or tizonia to be used at the same time.
>> > Detect tizonia package config file
>> > Generate libomx_mesa.so and install it to
>> libtizcore.pc::pluginsdir
>> > Only compile empty source (target.c) for now.
>> >
>> > GSoC Project link: https://summerofcode.withgoogl
>> e.com/projects/#
>> > 4737166321123328
>> >
>> > Acked-by: Leo Liu 
>> > Reviewed-by: Julien Isorce 
>> > ---
>> >   configure.ac   | 47
>> > +-
>> >   src/gallium/Makefile.am|  4 ++
>> >   src/gallium/state_trackers/omx/Makefile.am | 13
>> ++
>> >   src/gallium/state_trackers/omx/tizonia/Makefile.am | 36
>> > +
>> >   .../state_trackers/omx/tizonia/Makefile.sources|  1 +
>> >   src/gallium/targets/omx/Makefile.am| 19
>> -
>> >   src/gallium/targets/omx/omx.sym|  1 +
>> >   7 files changed, 117 insertions(+), 4 deletions(-)
>> >   create mode 100644 src/gallium/state_trackers/omx
>> /tizonia/
>> > Makefile.am
>> >   create mode 100644 src/gallium/state_trackers/omx
>> /tizonia/
>> > Makefile.sources
>> >
>> > diff --git a/configure.ac b/configure.ac
>> > index 7675a45..1f7b163 100644
>> > --- a/configure.ac
>> > +++ b/configure.ac
>> > @@ -85,6 +85,7 @@ dnl Versions for external dependencies
>> >   DRI2PROTO_REQUIRED=2.8
>> >   GLPROTO_REQUIRED=1.4.14
>> >   LIBOMXIL_BELLAGIO_REQUIRED=0.0
>> > +LIBOMXIL_TIZONIA_REQUIRED=0.9.0
>> >   LIBVA_REQUIRED=0.38.0
>> >   VDPAU_REQUIRED=1.1
>> >   WAYLAND_REQUIRED=1.11
>> > @@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
>> >  [enable_vdpau=auto])
>> >   AC_ARG_ENABLE([omx],
>> >  [AS_HELP_STRING([--enable-omx],
>> > - [DEPRECATED: Use --enable-omx-bellagio instead @
>> > <:@default=auto@:>@])],
>> > -   [AC_MSG_ERROR([--enable-omx is deprecated. Use
>> > --enable-omx-bellagio instead.])],
>> > + [DEPRECATED: Use --enable-omx-bellagio or
>> > --enable-omx-tizonia 

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-18 Thread Gurkirpal Singh
On Wed, Jan 17, 2018 at 10:39 PM, Dylan Baker  wrote:

> The meson build for omx-bellagio has landed along with the other media
> state
> trackers that are in tree. Currently there is a known bug with at least
> vdpau
> and va-api (I suspect that the omx, va, and xvmc are affected as well)
> which
> causes required symbols to not be exported, I'm still trying to resolve
> that.
>
> For Tizonia, what I'd like to do is change the -Dgallium-omx argument to
> accept
> ['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx option),
> with
> auto trying to find bellagio and tizonia in some order and falling back to
> disabled if neither is found.
>
> The patches in this thread don't apply, there is some other work on you
> tree not
> included maybe? Or I'd see about adding it (I don't think it would be too
> hard).
> Do you have this series in a public git repo I could pull from?
>

I decided not to commit incomplete work so there are only these commits in
the repo.
I have it on my github repo branch "refactor_stomx"
https://github.com/gpalsingh/mesa/commits/refactor_stomx

Cheers

>
> Dylan
>
> Quoting Leo Liu (2018-01-17 08:23:54)
> >
> >
> > On 01/17/2018 11:19 AM, Gurkirpal Singh wrote:
> >
> >
> >
> > On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu  wrote:
> >
> > Hi Gurkirpal,
> >
> > Do we have patch 1 in the 6 patch set, or it hasn't arrived.
> >
> >
> > We do have a patch 1 which has been held for moderation for being too
> > large.
> >
> > If there is no arrival tomorrow, please send it as attachment. Thanks.
> >
> >
> >
> > Also I haven't seen the updates for Meson build in the current
> set.
> >
> >
> > I wasn't sure if the changes needed to be added to this commit or
> add a new
> > commit.
> >
> >
> > I think Dylan can give you advice on this for sure.
> >
> > Thanks,
> > Leo
> >
> >
> >
> >
> >
> > @Dylan, if possible, could you give an update for the Meson
> build on
> > the current set?
> >
> >
> > Thanks,
> >
> > Leo
> >
> >
> >
> >
> > On 01/17/2018 08:54 AM, Gurkirpal Singh wrote:
> >
> > Allow only bellagio or tizonia to be used at the same time.
> > Detect tizonia package config file
> > Generate libomx_mesa.so and install it to
> libtizcore.pc::pluginsdir
> > Only compile empty source (target.c) for now.
> >
> > GSoC Project link: https://summerofcode.
> withgoogle.com/projects/#
> > 4737166321123328
> >
> > Acked-by: Leo Liu 
> > Reviewed-by: Julien Isorce 
> > ---
> >   configure.ac   | 47
> > +-
> >   src/gallium/Makefile.am|  4 ++
> >   src/gallium/state_trackers/omx/Makefile.am | 13
> ++
> >   src/gallium/state_trackers/omx/tizonia/Makefile.am | 36
> > +
> >   .../state_trackers/omx/tizonia/Makefile.sources|  1 +
> >   src/gallium/targets/omx/Makefile.am| 19
> -
> >   src/gallium/targets/omx/omx.sym|  1 +
> >   7 files changed, 117 insertions(+), 4 deletions(-)
> >   create mode 100644 src/gallium/state_trackers/omx/tizonia/
> > Makefile.am
> >   create mode 100644 src/gallium/state_trackers/omx/tizonia/
> > Makefile.sources
> >
> > diff --git a/configure.ac b/configure.ac
> > index 7675a45..1f7b163 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -85,6 +85,7 @@ dnl Versions for external dependencies
> >   DRI2PROTO_REQUIRED=2.8
> >   GLPROTO_REQUIRED=1.4.14
> >   LIBOMXIL_BELLAGIO_REQUIRED=0.0
> > +LIBOMXIL_TIZONIA_REQUIRED=0.9.0
> >   LIBVA_REQUIRED=0.38.0
> >   VDPAU_REQUIRED=1.1
> >   WAYLAND_REQUIRED=1.11
> > @@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
> >  [enable_vdpau=auto])
> >   AC_ARG_ENABLE([omx],
> >  [AS_HELP_STRING([--enable-omx],
> > - [DEPRECATED: Use --enable-omx-bellagio instead @
> > <:@default=auto@:>@])],
> > -   [AC_MSG_ERROR([--enable-omx is deprecated. Use
> > --enable-omx-bellagio instead.])],
> > + [DEPRECATED: Use --enable-omx-bellagio or
> > --enable-omx-tizonia instead @<:@default=auto@:>@])],
> > +   [AC_MSG_ERROR([--enable-omx is deprecated. Use
> > --enable-omx-bellagio or --enable-omx-tizonia instead.])],
> >  [])
> >   AC_ARG_ENABLE([omx-bellagio],
> >  [AS_HELP_STRING([--enable-omx-bellagio],

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-18 Thread Dylan Baker
The meson build for omx-bellagio has landed along with the other media state
trackers that are in tree. Currently there is a known bug with at least vdpau
and va-api (I suspect that the omx, va, and xvmc are affected as well) which
causes required symbols to not be exported, I'm still trying to resolve that.

For Tizonia, what I'd like to do is change the -Dgallium-omx argument to accept
['auto', 'bellagio', 'tizonia', 'disabled'] (this mirrors the glx option), with
auto trying to find bellagio and tizonia in some order and falling back to
disabled if neither is found.

The patches in this thread don't apply, there is some other work on you tree not
included maybe? Or I'd see about adding it (I don't think it would be too hard).
Do you have this series in a public git repo I could pull from?

Dylan

Quoting Leo Liu (2018-01-17 08:23:54)
> 
> 
> On 01/17/2018 11:19 AM, Gurkirpal Singh wrote:
> 
> 
> 
> On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu  wrote:
> 
> Hi Gurkirpal,
> 
> Do we have patch 1 in the 6 patch set, or it hasn't arrived.
> 
> 
> We do have a patch 1 which has been held for moderation for being too
> large.
> 
> If there is no arrival tomorrow, please send it as attachment. Thanks.
> 
> 
> 
> Also I haven't seen the updates for Meson build in the current set.
> 
> 
> I wasn't sure if the changes needed to be added to this commit or add a 
> new
> commit.
> 
> 
> I think Dylan can give you advice on this for sure.
> 
> Thanks,
> Leo
> 
> 
>  
> 
> 
> @Dylan, if possible, could you give an update for the Meson build on
> the current set?
> 
> 
> Thanks,
> 
> Leo
> 
> 
> 
> 
> On 01/17/2018 08:54 AM, Gurkirpal Singh wrote:
> 
> Allow only bellagio or tizonia to be used at the same time.
> Detect tizonia package config file
> Generate libomx_mesa.so and install it to 
> libtizcore.pc::pluginsdir
> Only compile empty source (target.c) for now.
> 
> GSoC Project link: https://summerofcode.withgoogle.com/projects/#
> 4737166321123328
> 
> Acked-by: Leo Liu 
> Reviewed-by: Julien Isorce 
> ---
>   configure.ac                                       | 47
> +-
>   src/gallium/Makefile.am                            |  4 ++
>   src/gallium/state_trackers/omx/Makefile.am         | 13 ++
>   src/gallium/state_trackers/omx/tizonia/Makefile.am | 36
> +
>   .../state_trackers/omx/tizonia/Makefile.sources    |  1 +
>   src/gallium/targets/omx/Makefile.am                | 19 
> -
>   src/gallium/targets/omx/omx.sym                    |  1 +
>   7 files changed, 117 insertions(+), 4 deletions(-)
>   create mode 100644 src/gallium/state_trackers/omx/tizonia/
> Makefile.am
>   create mode 100644 src/gallium/state_trackers/omx/tizonia/
> Makefile.sources
> 
> diff --git a/configure.ac b/configure.ac
> index 7675a45..1f7b163 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -85,6 +85,7 @@ dnl Versions for external dependencies
>   DRI2PROTO_REQUIRED=2.8
>   GLPROTO_REQUIRED=1.4.14
>   LIBOMXIL_BELLAGIO_REQUIRED=0.0
> +LIBOMXIL_TIZONIA_REQUIRED=0.9.0
>   LIBVA_REQUIRED=0.38.0
>   VDPAU_REQUIRED=1.1
>   WAYLAND_REQUIRED=1.11
> @@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
>      [enable_vdpau=auto])
>   AC_ARG_ENABLE([omx],
>      [AS_HELP_STRING([--enable-omx],
> -         [DEPRECATED: Use --enable-omx-bellagio instead @
> <:@default=auto@:>@])],
> -   [AC_MSG_ERROR([--enable-omx is deprecated. Use
> --enable-omx-bellagio instead.])],
> +         [DEPRECATED: Use --enable-omx-bellagio or
> --enable-omx-tizonia instead @<:@default=auto@:>@])],
> +   [AC_MSG_ERROR([--enable-omx is deprecated. Use
> --enable-omx-bellagio or --enable-omx-tizonia instead.])],
>      [])
>   AC_ARG_ENABLE([omx-bellagio],
>      [AS_HELP_STRING([--enable-omx-bellagio],
>            [enable OpenMAX Bellagio library 
> @<:@default=disabled@:>
> @])],
>      [enable_omx_bellagio="$enableval"],
>      [enable_omx_bellagio=no])
> +AC_ARG_ENABLE([omx-tizonia],
> +   [AS_HELP_STRING([--enable-omx-tizonia],
> +         [enable OpenMAX Tizonia library @<:@default=disabled@:>
> @])],
> +   [enable_omx_tizonia="$enableval"],
> +   

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-17 Thread Leo Liu



On 01/17/2018 11:19 AM, Gurkirpal Singh wrote:



On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu > wrote:


Hi Gurkirpal,

Do we have patch 1 in the 6 patch set, or it hasn't arrived.


We do have a patch 1 which has been held for moderation for being too 
large.

If there is no arrival tomorrow, please send it as attachment. Thanks.



Also I haven't seen the updates for Meson build in the current set.


I wasn't sure if the changes needed to be added to this commit or add 
a new commit.


I think Dylan can give you advice on this for sure.

Thanks,
Leo



@Dylan, if possible, could you give an update for the Meson build
on the current set?


Thanks,

Leo




On 01/17/2018 08:54 AM, Gurkirpal Singh wrote:

Allow only bellagio or tizonia to be used at the same time.
Detect tizonia package config file
Generate libomx_mesa.so and install it to
libtizcore.pc::pluginsdir
Only compile empty source (target.c) for now.

GSoC Project link:
https://summerofcode.withgoogle.com/projects/#4737166321123328


Acked-by: Leo Liu >
Reviewed-by: Julien Isorce >
---
configure.ac                             
         | 47 +-
  src/gallium/Makefile.am |  4 ++
  src/gallium/state_trackers/omx/Makefile.am      | 13 ++
  src/gallium/state_trackers/omx/tizonia/Makefile.am | 36
+
  .../state_trackers/omx/tizonia/Makefile.sources   |  1 +
  src/gallium/targets/omx/Makefile.am           
    | 19 -
  src/gallium/targets/omx/omx.sy m         |  1 +
  7 files changed, 117 insertions(+), 4 deletions(-)
  create mode 100644
src/gallium/state_trackers/omx/tizonia/Makefile.am
  create mode 100644
src/gallium/state_trackers/omx/tizonia/Makefile.sources

diff --git a/configure.ac  b/configure.ac

index 7675a45..1f7b163 100644
--- a/configure.ac 
+++ b/configure.ac 
@@ -85,6 +85,7 @@ dnl Versions for external dependencies
  DRI2PROTO_REQUIRED=2.8
  GLPROTO_REQUIRED=1.4.14
  LIBOMXIL_BELLAGIO_REQUIRED=0.0
+LIBOMXIL_TIZONIA_REQUIRED=0.9.0
  LIBVA_REQUIRED=0.38.0
  VDPAU_REQUIRED=1.1
  WAYLAND_REQUIRED=1.11
@@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
     [enable_vdpau=auto])
  AC_ARG_ENABLE([omx],
     [AS_HELP_STRING([--enable-omx],
-         [DEPRECATED: Use --enable-omx-bellagio instead
@<:@default=auto@:>@])],
-   [AC_MSG_ERROR([--enable-omx is deprecated. Use
--enable-omx-bellagio instead.])],
+         [DEPRECATED: Use --enable-omx-bellagio or
--enable-omx-tizonia instead @<:@default=auto@:>@])],
+   [AC_MSG_ERROR([--enable-omx is deprecated. Use
--enable-omx-bellagio or --enable-omx-tizonia instead.])],
     [])
  AC_ARG_ENABLE([omx-bellagio],
     [AS_HELP_STRING([--enable-omx-bellagio],
           [enable OpenMAX Bellagio library
@<:@default=disabled@:>@])],
     [enable_omx_bellagio="$enableval"],
     [enable_omx_bellagio=no])
+AC_ARG_ENABLE([omx-tizonia],
+   [AS_HELP_STRING([--enable-omx-tizonia],
+         [enable OpenMAX Tizonia library
@<:@default=disabled@:>@])],
+   [enable_omx_tizonia="$enableval"],
+   [enable_omx_tizonia=no])
  AC_ARG_ENABLE([va],
     [AS_HELP_STRING([--enable-va],
           [enable va library @<:@default=auto@:>@])],
@@ -1357,11 +1363,17 @@ if test "x$enable_opengl" = xno -a \
          "x$enable_xvmc" = xno -a \
          "x$enable_vdpau" = xno -a \
          "x$enable_omx_bellagio" = xno -a \
+        "x$enable_omx_tizonia" = xno -a \
          "x$enable_va" = xno -a \
          "x$enable_opencl" = xno; then
      AC_MSG_ERROR([at least one API should be enabled])
  fi
  +if test "x$enable_omx_bellagio" = xyes -a \
+        "x$enable_omx_tizonia" = xyes; then
+   AC_MSG_ERROR([Can't enable both bellagio and tizonia at
same time])
+fi
+
  # Building OpenGL ES1 and/or ES2 without OpenGL is not
supported on mesa 9.0.x
  if test "x$enable_opengl" = xno -a \
          "x$enable_gles1" = xyes; then
@@ -2202,6 +2214,10 @@ if test -n "$with_gallium_drivers" -a
"x$with_gallium_drivers" != xswrast; then

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-17 Thread Gurkirpal Singh
On Wed, Jan 17, 2018 at 8:22 PM, Leo Liu  wrote:

> Hi Gurkirpal,
>
> Do we have patch 1 in the 6 patch set, or it hasn't arrived.
>

We do have a patch 1 which has been held for moderation for being too
large.

>
> Also I haven't seen the updates for Meson build in the current set.
>

I wasn't sure if the changes needed to be added to this commit or add a new
commit.

>
> @Dylan, if possible, could you give an update for the Meson build on the
> current set?
>
>
> Thanks,
>
> Leo
>
>
>
>
> On 01/17/2018 08:54 AM, Gurkirpal Singh wrote:
>
>> Allow only bellagio or tizonia to be used at the same time.
>> Detect tizonia package config file
>> Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir
>> Only compile empty source (target.c) for now.
>>
>> GSoC Project link: https://summerofcode.withgoogl
>> e.com/projects/#4737166321123328
>>
>> Acked-by: Leo Liu 
>> Reviewed-by: Julien Isorce 
>> ---
>>   configure.ac   | 47
>> +-
>>   src/gallium/Makefile.am|  4 ++
>>   src/gallium/state_trackers/omx/Makefile.am | 13 ++
>>   src/gallium/state_trackers/omx/tizonia/Makefile.am | 36
>> +
>>   .../state_trackers/omx/tizonia/Makefile.sources|  1 +
>>   src/gallium/targets/omx/Makefile.am| 19 -
>>   src/gallium/targets/omx/omx.sym|  1 +
>>   7 files changed, 117 insertions(+), 4 deletions(-)
>>   create mode 100644 src/gallium/state_trackers/omx/tizonia/Makefile.am
>>   create mode 100644 src/gallium/state_trackers/omx
>> /tizonia/Makefile.sources
>>
>> diff --git a/configure.ac b/configure.ac
>> index 7675a45..1f7b163 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -85,6 +85,7 @@ dnl Versions for external dependencies
>>   DRI2PROTO_REQUIRED=2.8
>>   GLPROTO_REQUIRED=1.4.14
>>   LIBOMXIL_BELLAGIO_REQUIRED=0.0
>> +LIBOMXIL_TIZONIA_REQUIRED=0.9.0
>>   LIBVA_REQUIRED=0.38.0
>>   VDPAU_REQUIRED=1.1
>>   WAYLAND_REQUIRED=1.11
>> @@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
>>  [enable_vdpau=auto])
>>   AC_ARG_ENABLE([omx],
>>  [AS_HELP_STRING([--enable-omx],
>> - [DEPRECATED: Use --enable-omx-bellagio instead @<:@default=auto@
>> :>@])],
>> -   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio
>> instead.])],
>> + [DEPRECATED: Use --enable-omx-bellagio or --enable-omx-tizonia
>> instead @<:@default=auto@:>@])],
>> +   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio
>> or --enable-omx-tizonia instead.])],
>>  [])
>>   AC_ARG_ENABLE([omx-bellagio],
>>  [AS_HELP_STRING([--enable-omx-bellagio],
>>[enable OpenMAX Bellagio library @<:@default=disabled@:>@])],
>>  [enable_omx_bellagio="$enableval"],
>>  [enable_omx_bellagio=no])
>> +AC_ARG_ENABLE([omx-tizonia],
>> +   [AS_HELP_STRING([--enable-omx-tizonia],
>> + [enable OpenMAX Tizonia library @<:@default=disabled@:>@])],
>> +   [enable_omx_tizonia="$enableval"],
>> +   [enable_omx_tizonia=no])
>>   AC_ARG_ENABLE([va],
>>  [AS_HELP_STRING([--enable-va],
>>[enable va library @<:@default=auto@:>@])],
>> @@ -1357,11 +1363,17 @@ if test "x$enable_opengl" = xno -a \
>>   "x$enable_xvmc" = xno -a \
>>   "x$enable_vdpau" = xno -a \
>>   "x$enable_omx_bellagio" = xno -a \
>> +"x$enable_omx_tizonia" = xno -a \
>>   "x$enable_va" = xno -a \
>>   "x$enable_opencl" = xno; then
>>   AC_MSG_ERROR([at least one API should be enabled])
>>   fi
>>   +if test "x$enable_omx_bellagio" = xyes -a \
>> +"x$enable_omx_tizonia" = xyes; then
>> +   AC_MSG_ERROR([Can't enable both bellagio and tizonia at same time])
>> +fi
>> +
>>   # Building OpenGL ES1 and/or ES2 without OpenGL is not supported on
>> mesa 9.0.x
>>   if test "x$enable_opengl" = xno -a \
>>   "x$enable_gles1" = xyes; then
>> @@ -2202,6 +2214,10 @@ if test -n "$with_gallium_drivers" -a
>> "x$with_gallium_drivers" != xswrast; then
>>   PKG_CHECK_EXISTS([libomxil-bellagio >=
>> $LIBOMXIL_BELLAGIO_REQUIRED], [enable_omx_bellagio=yes],
>> [enable_omx_bellagio=no])
>>   fi
>>   +if test "x$enable_omx_tizonia" = xauto -a "x$have_omx_platform" =
>> xyes; then
>> +   PKG_CHECK_EXISTS([libtizonia >= $LIBOMXIL_TIZONIA_REQUIRED],
>> [enable_omx_tizonia=yes], [enable_omx_tizonia=no])
>> +fi
>> +
>>   if test "x$enable_va" = xauto -a "x$have_va_platform" = xyes; then
>>   PKG_CHECK_EXISTS([libva >= $LIBVA_REQUIRED], [enable_va=yes],
>> [enable_va=no])
>>   fi
>> @@ -2211,6 +2227,7 @@ if test "x$enable_dri" = xyes -o \
>>   "x$enable_xvmc" = xyes -o \
>>   "x$enable_vdpau" = xyes -o \
>>   "x$enable_omx_bellagio" = xyes -o \
>> +"x$enable_omx_tizonia" = xyes -o \
>>   "x$enable_va" = xyes; then
>>   need_gallium_vl=yes
>>   fi
>> @@ -2219,6 +2236,7 

Re: [Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-17 Thread Leo Liu

Hi Gurkirpal,

Do we have patch 1 in the 6 patch set, or it hasn't arrived.

Also I haven't seen the updates for Meson build in the current set.

@Dylan, if possible, could you give an update for the Meson build on the 
current set?



Thanks,

Leo



On 01/17/2018 08:54 AM, Gurkirpal Singh wrote:

Allow only bellagio or tizonia to be used at the same time.
Detect tizonia package config file
Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir
Only compile empty source (target.c) for now.

GSoC Project link: 
https://summerofcode.withgoogle.com/projects/#4737166321123328

Acked-by: Leo Liu 
Reviewed-by: Julien Isorce 
---
  configure.ac   | 47 +-
  src/gallium/Makefile.am|  4 ++
  src/gallium/state_trackers/omx/Makefile.am | 13 ++
  src/gallium/state_trackers/omx/tizonia/Makefile.am | 36 +
  .../state_trackers/omx/tizonia/Makefile.sources|  1 +
  src/gallium/targets/omx/Makefile.am| 19 -
  src/gallium/targets/omx/omx.sym|  1 +
  7 files changed, 117 insertions(+), 4 deletions(-)
  create mode 100644 src/gallium/state_trackers/omx/tizonia/Makefile.am
  create mode 100644 src/gallium/state_trackers/omx/tizonia/Makefile.sources

diff --git a/configure.ac b/configure.ac
index 7675a45..1f7b163 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,7 @@ dnl Versions for external dependencies
  DRI2PROTO_REQUIRED=2.8
  GLPROTO_REQUIRED=1.4.14
  LIBOMXIL_BELLAGIO_REQUIRED=0.0
+LIBOMXIL_TIZONIA_REQUIRED=0.9.0
  LIBVA_REQUIRED=0.38.0
  VDPAU_REQUIRED=1.1
  WAYLAND_REQUIRED=1.11
@@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
 [enable_vdpau=auto])
  AC_ARG_ENABLE([omx],
 [AS_HELP_STRING([--enable-omx],
- [DEPRECATED: Use --enable-omx-bellagio instead 
@<:@default=auto@:>@])],
-   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio 
instead.])],
+ [DEPRECATED: Use --enable-omx-bellagio or --enable-omx-tizonia instead 
@<:@default=auto@:>@])],
+   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio or 
--enable-omx-tizonia instead.])],
 [])
  AC_ARG_ENABLE([omx-bellagio],
 [AS_HELP_STRING([--enable-omx-bellagio],
   [enable OpenMAX Bellagio library @<:@default=disabled@:>@])],
 [enable_omx_bellagio="$enableval"],
 [enable_omx_bellagio=no])
+AC_ARG_ENABLE([omx-tizonia],
+   [AS_HELP_STRING([--enable-omx-tizonia],
+ [enable OpenMAX Tizonia library @<:@default=disabled@:>@])],
+   [enable_omx_tizonia="$enableval"],
+   [enable_omx_tizonia=no])
  AC_ARG_ENABLE([va],
 [AS_HELP_STRING([--enable-va],
   [enable va library @<:@default=auto@:>@])],
@@ -1357,11 +1363,17 @@ if test "x$enable_opengl" = xno -a \
  "x$enable_xvmc" = xno -a \
  "x$enable_vdpau" = xno -a \
  "x$enable_omx_bellagio" = xno -a \
+"x$enable_omx_tizonia" = xno -a \
  "x$enable_va" = xno -a \
  "x$enable_opencl" = xno; then
  AC_MSG_ERROR([at least one API should be enabled])
  fi
  
+if test "x$enable_omx_bellagio" = xyes -a \

+"x$enable_omx_tizonia" = xyes; then
+   AC_MSG_ERROR([Can't enable both bellagio and tizonia at same time])
+fi
+
  # Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
  if test "x$enable_opengl" = xno -a \
  "x$enable_gles1" = xyes; then
@@ -2202,6 +2214,10 @@ if test -n "$with_gallium_drivers" -a 
"x$with_gallium_drivers" != xswrast; then
  PKG_CHECK_EXISTS([libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED], 
[enable_omx_bellagio=yes], [enable_omx_bellagio=no])
  fi
  
+if test "x$enable_omx_tizonia" = xauto -a "x$have_omx_platform" = xyes; then

+   PKG_CHECK_EXISTS([libtizonia >= $LIBOMXIL_TIZONIA_REQUIRED], 
[enable_omx_tizonia=yes], [enable_omx_tizonia=no])
+fi
+
  if test "x$enable_va" = xauto -a "x$have_va_platform" = xyes; then
  PKG_CHECK_EXISTS([libva >= $LIBVA_REQUIRED], [enable_va=yes], 
[enable_va=no])
  fi
@@ -2211,6 +2227,7 @@ if test "x$enable_dri" = xyes -o \
  "x$enable_xvmc" = xyes -o \
  "x$enable_vdpau" = xyes -o \
  "x$enable_omx_bellagio" = xyes -o \
+"x$enable_omx_tizonia" = xyes -o \
  "x$enable_va" = xyes; then
  need_gallium_vl=yes
  fi
@@ -2219,6 +2236,7 @@ AM_CONDITIONAL(NEED_GALLIUM_VL, test "x$need_gallium_vl" 
= xyes)
  if test "x$enable_xvmc" = xyes -o \
  "x$enable_vdpau" = xyes -o \
  "x$enable_omx_bellagio" = xyes -o \
+"x$enable_omx_tizonia" = xyes -o \
  "x$enable_va" = xyes; then
  if echo $platforms | grep -q "x11"; then
  PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
@@ -2252,9 +2270,23 @@ if test "x$enable_omx_bellagio" = xyes; then
  fi
  PKG_CHECK_MODULES([OMX_BELLAGIO], [libomxil-bellagio >= 

[Mesa-dev] [PATCH 2/6] st/omx/tizonia: Add --enable-omx-tizonia flag and build files

2018-01-17 Thread Gurkirpal Singh
Allow only bellagio or tizonia to be used at the same time.
Detect tizonia package config file
Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir
Only compile empty source (target.c) for now.

GSoC Project link: 
https://summerofcode.withgoogle.com/projects/#4737166321123328

Acked-by: Leo Liu 
Reviewed-by: Julien Isorce 
---
 configure.ac   | 47 +-
 src/gallium/Makefile.am|  4 ++
 src/gallium/state_trackers/omx/Makefile.am | 13 ++
 src/gallium/state_trackers/omx/tizonia/Makefile.am | 36 +
 .../state_trackers/omx/tizonia/Makefile.sources|  1 +
 src/gallium/targets/omx/Makefile.am| 19 -
 src/gallium/targets/omx/omx.sym|  1 +
 7 files changed, 117 insertions(+), 4 deletions(-)
 create mode 100644 src/gallium/state_trackers/omx/tizonia/Makefile.am
 create mode 100644 src/gallium/state_trackers/omx/tizonia/Makefile.sources

diff --git a/configure.ac b/configure.ac
index 7675a45..1f7b163 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,6 +85,7 @@ dnl Versions for external dependencies
 DRI2PROTO_REQUIRED=2.8
 GLPROTO_REQUIRED=1.4.14
 LIBOMXIL_BELLAGIO_REQUIRED=0.0
+LIBOMXIL_TIZONIA_REQUIRED=0.9.0
 LIBVA_REQUIRED=0.38.0
 VDPAU_REQUIRED=1.1
 WAYLAND_REQUIRED=1.11
@@ -1298,14 +1299,19 @@ AC_ARG_ENABLE([vdpau],
[enable_vdpau=auto])
 AC_ARG_ENABLE([omx],
[AS_HELP_STRING([--enable-omx],
- [DEPRECATED: Use --enable-omx-bellagio instead 
@<:@default=auto@:>@])],
-   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio 
instead.])],
+ [DEPRECATED: Use --enable-omx-bellagio or --enable-omx-tizonia 
instead @<:@default=auto@:>@])],
+   [AC_MSG_ERROR([--enable-omx is deprecated. Use --enable-omx-bellagio or 
--enable-omx-tizonia instead.])],
[])
 AC_ARG_ENABLE([omx-bellagio],
[AS_HELP_STRING([--enable-omx-bellagio],
  [enable OpenMAX Bellagio library @<:@default=disabled@:>@])],
[enable_omx_bellagio="$enableval"],
[enable_omx_bellagio=no])
+AC_ARG_ENABLE([omx-tizonia],
+   [AS_HELP_STRING([--enable-omx-tizonia],
+ [enable OpenMAX Tizonia library @<:@default=disabled@:>@])],
+   [enable_omx_tizonia="$enableval"],
+   [enable_omx_tizonia=no])
 AC_ARG_ENABLE([va],
[AS_HELP_STRING([--enable-va],
  [enable va library @<:@default=auto@:>@])],
@@ -1357,11 +1363,17 @@ if test "x$enable_opengl" = xno -a \
 "x$enable_xvmc" = xno -a \
 "x$enable_vdpau" = xno -a \
 "x$enable_omx_bellagio" = xno -a \
+"x$enable_omx_tizonia" = xno -a \
 "x$enable_va" = xno -a \
 "x$enable_opencl" = xno; then
 AC_MSG_ERROR([at least one API should be enabled])
 fi
 
+if test "x$enable_omx_bellagio" = xyes -a \
+"x$enable_omx_tizonia" = xyes; then
+   AC_MSG_ERROR([Can't enable both bellagio and tizonia at same time])
+fi
+
 # Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa 9.0.x
 if test "x$enable_opengl" = xno -a \
 "x$enable_gles1" = xyes; then
@@ -2202,6 +2214,10 @@ if test -n "$with_gallium_drivers" -a 
"x$with_gallium_drivers" != xswrast; then
 PKG_CHECK_EXISTS([libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED], 
[enable_omx_bellagio=yes], [enable_omx_bellagio=no])
 fi
 
+if test "x$enable_omx_tizonia" = xauto -a "x$have_omx_platform" = xyes; 
then
+   PKG_CHECK_EXISTS([libtizonia >= $LIBOMXIL_TIZONIA_REQUIRED], 
[enable_omx_tizonia=yes], [enable_omx_tizonia=no])
+fi
+
 if test "x$enable_va" = xauto -a "x$have_va_platform" = xyes; then
 PKG_CHECK_EXISTS([libva >= $LIBVA_REQUIRED], [enable_va=yes], 
[enable_va=no])
 fi
@@ -2211,6 +2227,7 @@ if test "x$enable_dri" = xyes -o \
 "x$enable_xvmc" = xyes -o \
 "x$enable_vdpau" = xyes -o \
 "x$enable_omx_bellagio" = xyes -o \
+"x$enable_omx_tizonia" = xyes -o \
 "x$enable_va" = xyes; then
 need_gallium_vl=yes
 fi
@@ -2219,6 +2236,7 @@ AM_CONDITIONAL(NEED_GALLIUM_VL, test "x$need_gallium_vl" 
= xyes)
 if test "x$enable_xvmc" = xyes -o \
 "x$enable_vdpau" = xyes -o \
 "x$enable_omx_bellagio" = xyes -o \
+"x$enable_omx_tizonia" = xyes -o \
 "x$enable_va" = xyes; then
 if echo $platforms | grep -q "x11"; then
 PKG_CHECK_MODULES([VL], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED])
@@ -2252,9 +2270,23 @@ if test "x$enable_omx_bellagio" = xyes; then
 fi
 PKG_CHECK_MODULES([OMX_BELLAGIO], [libomxil-bellagio >= 
$LIBOMXIL_BELLAGIO_REQUIRED])
 gallium_st="$gallium_st omx_bellagio"
+AC_DEFINE([ENABLE_ST_OMX_BELLAGIO], 1, [Use Bellagio for OMX IL])
 fi
 AM_CONDITIONAL(HAVE_ST_OMX_BELLAGIO, test "x$enable_omx_bellagio" = xyes)
 
+if test "x$enable_omx_tizonia" = xyes; then
+if test "x$have_omx_platform" != xyes; then
+AC_MSG_ERROR([OMX requires at least one of the x11 or drm