]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/repo-libdce.git/log
android-sdk/repo-libdce.git
9 years agolibdce[ANDROID]: Fix bug in omap buffer object free logic 3.00.07.03
Sunita Nadampalli [Thu, 19 Feb 2015 18:01:12 +0000 (12:01 -0600)]
libdce[ANDROID]: Fix bug in omap buffer object free logic

For the omap_bo_del function call, we need to pass
the bo object rather than the mmaped pointer.

Change-Id: I3b011594b0210ec6f95f3f4644835594a80ace28
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
9 years agoUpdate common.mk to exclude Android libdce_android object files 3.00.07.01 3.00.07.02 3.00.07.04
Buddy Liong [Tue, 27 Jan 2015 18:19:33 +0000 (12:19 -0600)]
Update common.mk to exclude Android libdce_android object files

Updating common.mk so that it will not include in the link/archive step
for libdce_android.c Android files when compiling on QNX HLOS.

Change-Id: I4621b29dfa6c30fbdd3f632afcb9f10d4d8946a6
Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
9 years agolibdce: Add mutex protection for dce_buf_lock/dce_buf_unlock
Sunita Nadampalli [Fri, 30 Jan 2015 16:17:17 +0000 (10:17 -0600)]
libdce: Add mutex protection for dce_buf_lock/dce_buf_unlock

The dce_buf_lock and dce_buf_unlock are meant for any video
buffer locking and unlocking with the GEM allocator.
Currently, these methods are being called from libdce apis
with ipc mutex held. In order to enable other media components
to make use of these buffer lock/unlock apis, explicit ipc mutex
protection is added.

Change-Id: I6d63a4cdcffec62a346341ff515a7ebb03dea8c0
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
9 years agolibdce[Android] - Use drm render node instead of card0
Hemant Hariyani [Wed, 3 Dec 2014 22:21:56 +0000 (16:21 -0600)]
libdce[Android] - Use drm render node instead of card0

Render nodes allow a limited set of ioctls without restrictions.
libdce only needs to access drm to get buffers and render
node should be sufficient.

Note that this is new feature in the kernel.

Also, need a better way to open render node than to use hard coded
path name.

Change-Id: I8178414185dcaf6c70edc756eefb0a00b7e3c332
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
9 years agoRevert "libdce[ANDROID] - add drmsetmaster/dropmaster calls"
Hemant Hariyani [Wed, 3 Dec 2014 22:11:37 +0000 (16:11 -0600)]
Revert "libdce[ANDROID] - add drmsetmaster/dropmaster calls"

Not needed as dce will use drm render node.

This reverts commit 4715ea56d8a266e66bc6cef982410c602a19be43.

Change-Id: I1dc14249ffe2dbbfdfd970cea3bf4a378274db6d
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
9 years ago[Fix] Support Multiplanar encoder input buffers 3.00.07.00
Pradeep Venkatasubbarao [Fri, 28 Nov 2014 05:44:11 +0000 (11:14 +0530)]
[Fix] Support Multiplanar encoder input buffers

An earlier patch to enable Single planar buffers for encoder
broke the multiplanar support.

This patch fixes this issue.

Change-Id: Ide169a43b3df915a969a401e623fdad7f8792faf
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
9 years agolibdce[ANDROID] - add drmsetmaster/dropmaster calls
Sunita Nadampalli [Tue, 25 Nov 2014 17:49:01 +0000 (11:49 -0600)]
libdce[ANDROID] - add drmsetmaster/dropmaster calls

Added setdrmmaster and dropdrmmaster calls for
every drm ioctl.

Change-Id: I9319e5927374e677480a18f937d2bbd12e561462
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
9 years agoIntegration based on IPC 3.30.01.12
Buddy Liong [Tue, 11 Nov 2014 21:34:43 +0000 (15:34 -0600)]
Integration based on IPC 3.30.01.12

Integration with IPC 3.30.01.12 requires build tool update on
XDC tool version to 3_30_xx_xx. Using the latest XDC Tools of
3_30_05_60_core
Copying the header files used from 3_30_05_60 version.

Change-Id: I648bfa945bcc0d8a43b4653d8f303cd9c18ee03f
Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
9 years agolibdce[Android]: Added support for DRM based Android memplugin
Sunita Nadampalli [Mon, 17 Nov 2014 20:00:48 +0000 (14:00 -0600)]
libdce[Android]: Added support for DRM based Android memplugin

This patch adds memplugin implementation for GEM allocator
and dce buffer locking via MmRPC for Android builds.
Android memplugin implement memplugin interface for buffers
with and without memheaders. This implementation is for
DRM/GEM buffer allocations. And libdce_android implements
GEM buffer registration and unregistration with MmRPC.

Change-Id: Ie72c988a37f987446f7d7c1d97225295de73d305
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
9 years agolibdce: Changes to make dce_ipc_init/deinit external
Sunita Nadampalli [Fri, 14 Nov 2014 17:50:08 +0000 (11:50 -0600)]
libdce: Changes to make dce_ipc_init/deinit external

dce_ipc_init and dce_ipc_deinit are required by
android memplugin even before DCE engine open happens.
This is required to use MmRpc interface for DRM/GEM
buffer locking.

Change-Id: Ia11af04658c367242c33ab8acffaa4b522aa0716
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
9 years ago[DCE TEST] [DCE ENC TEST] Logs added for dce test automation 3.00.06.01
Subash Lakkimsetti [Thu, 9 Oct 2014 15:24:27 +0000 (10:24 -0500)]
[DCE TEST] [DCE ENC TEST] Logs added for dce test automation

For test automation, dce logs are parsed and results are updated.
Added logs for error cases.

Change-Id: I354648c02206e8a65efe49ffb0352308e4fe727f
Signed-off-by: Subash Lakkimsetti <x0091084@ti.com>
9 years agoFix multi threaded logic for client indexing
Pradeep Venkatasubbarao [Wed, 10 Sep 2014 08:19:51 +0000 (13:49 +0530)]
Fix multi threaded logic for client indexing

Client count was being used for indexing into an empty slot in table
holding clients' engine handles.

In the case of multi-threaded scenario, there is a possibility of
out of order creation and deletions of clients in which case the client
indexing should search for an empty slot in the table rather than assuming
that the index defined by number of clients points to an empty slot in the
table.

This patch fixes this issue by decoupling client count from table indexing.
Now the table indexing is done by finding the empty slot identified by a '0'
in the entry. This also forces filling '0' during client deletion which is also
taken care of in the patch.

Change-Id: I3d4c8d744c3912a6fae5809f445039d39b762f91
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
9 years agoFixing Klocwork finding
Buddy Liong [Mon, 25 Aug 2014 21:33:13 +0000 (16:33 -0500)]
Fixing Klocwork finding

Running Klocwork stand-alone, it reports 19-20 issues.
This task submitted to resolve the found issues.

Change-Id: I98150d4262ee5b1ab85cb1a7c0e697dcadb4a665
Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
9 years agoREADME update 3.00.06.00
Buddy Liong [Wed, 20 Aug 2014 15:56:01 +0000 (10:56 -0500)]
README update

Integration with IPC 3.23.00.01 requires build tool update on
XDC tool version to 3_25_06_96
Copying the header files used from 3_25_06_90 version.

Change-Id: Ie1e6e167a9cfb42fde706fa06ba4dd5900db7483
Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
9 years ago[TEST_QNX] Fixing compiler warnings
Buddy Liong [Wed, 20 Aug 2014 15:04:57 +0000 (10:04 -0500)]
[TEST_QNX] Fixing compiler warnings

Using QNX SDP 6.6, compiler issues warnings:

/libdce/test_qnx/dce_enc_test/dce_enc_test.c: In function 'main':
/libdce/test_qnx/dce_enc_test/dce_enc_test.c:363:21: warning: variable 'ivahd_encode_type' set but not used [-Wunused-but-set-variable]
/libdce/test_qnx/dce_enc_test/dce_enc_test.c:357:21: warning: variable 'oned' set but not used [-Wunused-but-set-variable]

/libdce/test_qnx/dce_test/dce_test.c:588:22: warning: variable 'vc1_flush' set but not used [-Wunused-but-set-variable]

Change-Id: I53798b7a10128baea6f87ee0cc1eca483243846c
Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
9 years ago[QNX] Fixing compiler warning.
Buddy Liong [Wed, 20 Aug 2014 17:11:15 +0000 (12:11 -0500)]
[QNX] Fixing compiler warning.

When compiling with QNX SDP 6.6, compiler issues warning of:
/libdce/memplugin_qnx.c: In function 'memplugin_alloc':
/libdce/memplugin_qnx.c:46:25: warning: variable 'eError' set but not used [-Wunused-but-set-variable]
/libdce/memplugin_qnx.c: In function 'memplugin_free':
/libdce/memplugin_qnx.c:109:25: warning: variable 'eError' set but not used [-Wunused-but-set-variable]

Change-Id: Iebb4e68fd036e5bb750198f5b60d38f44c5cd856
Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
9 years ago[VIDENC2] Single planar support for encoder input
Pradeep Venkatasubbarao [Mon, 18 Aug 2014 02:53:56 +0000 (08:23 +0530)]
[VIDENC2] Single planar support for encoder input

This patch adds support for single planar buffers (Y and UV) in a single buffer
sharing the same dma buf fd.
In the case of single planar buffers the offset of uv data need to passed to
rpc. This logic has been added in this patch. The patch s specific to LINUX and
will not have any effect on QNX and Android builds.

Change-Id: Ib4be4b8f1df36a1dc8d53eb0299189802ce040ca
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
9 years agoREADME update 3.00.05.01
buddy.liong [Thu, 17 Jul 2014 22:47:32 +0000 (17:47 -0500)]
README update

Updating README note on the codec version used for
MMIP 3.00.05.01
VC1 decoder codec version 01.00.00.13
MPEG2 decoder codec version 01.00.14.01
H.264 encoder codec version 02.00.08.01

Change-Id: Iccaf4895398d514d0710794d4e9d9773468669b8
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
9 years ago[Linux] Add automatic search path for IPC headers
Pradeep Venkatasubbarao [Mon, 6 Jan 2014 09:03:01 +0000 (14:33 +0530)]
[Linux] Add automatic search path for IPC headers

Adds the automatic search header mechanism using pkg-config
for libmmrpc.

Change-Id: If4aa61cb598567455a1342be358338e4adfcc3e0
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
9 years ago[DCE_TEST] When outBufsInUse is set, use previous inputID 3.00.05.00
buddy.liong [Tue, 27 May 2014 17:04:53 +0000 (12:04 -0500)]
[DCE_TEST] When outBufsInUse is set, use previous inputID

When handling interlace clip, the codec can hold the output buffer after
processing the top field frame. The codec will set the outBufsInUse flag.
When the application receives an indication that outBufsInUse flag is set,
the application should use the previous inputID as the inputID and not
sending a new output buffer (set to NULL on the output buffer) on the next
VIDDEC3_process call.

Change-Id: Id5e05984330e686ec5ea449be5d0aff8f8802d70
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years agoREADME update 3.00.04.02
buddy.liong [Thu, 10 Apr 2014 14:14:57 +0000 (09:14 -0500)]
README update

Updating README note on the VC1 codec version update from
01.00.00.11 to 01.00.00.12 on the IPUMM side.

Change-Id: Ib02274fd0ac1c86f6e7978e4e82ac618603159b1
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years agoUpdating README 3.00.04.01
buddy.liong [Thu, 20 Mar 2014 20:33:55 +0000 (15:33 -0500)]
Updating README

The command to build libdce on QNX requires additional information.
Instead of "make clean" and "make install", due to the renaming of
Makefile to Makefile.qnx, the command becomes "make -f Makefile.qnx clean"
and "make -f Makefile.qnx install".

Updates the "Supported API Information" to point to the header files
instead of listed it again here.

Change-Id: Ied47d812eb8b0a6c9a9bb0cace3f6241f91d7325
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years agoMerge "updating gitignore"
Pradeep Venkatasubbarao [Wed, 26 Mar 2014 05:23:53 +0000 (00:23 -0500)]
Merge "updating gitignore"

10 years agoMerge "[LINUX] Manage Tiler Pinning for dce DRM buffers"
Pradeep Venkatasubbarao [Wed, 26 Mar 2014 05:23:37 +0000 (00:23 -0500)]
Merge "[LINUX] Manage Tiler Pinning for dce DRM buffers"

10 years agoupdating gitignore
Pradeep Venkatasubbarao [Thu, 20 Mar 2014 09:09:23 +0000 (14:39 +0530)]
updating gitignore

Added Makefile and *.out

Change-Id: I6c81aa1ea0b7d1ab8a1772895310f479e8521ad7
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
10 years ago[LINUX] Manage Tiler Pinning for dce DRM buffers
Pradeep Venkatasubbarao [Mon, 24 Mar 2014 07:48:35 +0000 (13:18 +0530)]
[LINUX] Manage Tiler Pinning for dce DRM buffers

Applications using dce_alloc/dce_free calls to manage memory,
leaked memory because on non-closure of the created dmabuf fds.
Additionally, all memory allocated from Tiler/DMM via DRM need to be
explictly pinned to tiler using dce_buf_lock/dce_buf_unlock calls.
Hence in the earlier implementation, every call to dce_alloc/free
had to be followed by a lock/unlock call to pin/unpin it to tiler.
In order, to insulate the applications from the internal details of
DRM memory management and for ease of use of alloc and free calls,
dce_alloc now takes care of creating the dmabuf and pinning it to tiler
while dce_free takes care of tiler unpinning and closure of dmabuf fd.
Applications can continue to use dce_alloc and dce_free calls as before
thus maintiaining backward compatibility.

On the other hand, since the same interfaces are used for multiple remote
core targets, like IPU and DSP, MemHeader struture is upgraded to hold the
core for which the block of memory belongs to, to keep track of the core.

Hence all applications/Remote cores using this version of libdce should
recompile with the new MemHeader for proper functioning.

Dependent IPUMM patch: https://gerrit.ext.ti.com/gerrit/omap/#/c/12994/

Change-Id: If09a1039b5b16f3cc5ff0e9c6c598932d8a2ce3e
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
10 years ago[LIBDCE] Updating README 3.00.04.00
buddy.liong [Thu, 6 Mar 2014 16:14:23 +0000 (10:14 -0600)]
[LIBDCE] Updating README

XDCTOOLS version is updated from 3.25.04.88 to 3.25.05.94.

Change-Id: I94842de37a268d38cd6e32d09339a57ebbd9f7a4
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years ago[DCE_TEST] Dump output frames per user specified request for NON-TILER
Subash Lakkimsetti [Thu, 6 Mar 2014 18:32:55 +0000 (12:32 -0600)]
[DCE_TEST] Dump output frames per user specified request for NON-TILER

For NON-TILER case, dce_test is currently dumping a maximum of 300 frames. The change is to
dump output frames per user specified request on frames to write as done in TILER case

Change-Id: I224c9254140c6bc0804aa10b8c9560306fa78534
Signed-off-by: Subash Lakkimsetti <x0091084@ti.com>
10 years ago[LIBDCE] Rename Makefile to Makefile.qnx
buddy.liong [Wed, 29 Jan 2014 22:17:35 +0000 (16:17 -0600)]
[LIBDCE] Rename Makefile to Makefile.qnx

LIBDCE is common component for Linux, Android and QNX.
Linux is using automake tools which create a file by name
of Makefile which overwrite the Makefile intended for QNX.

Prior to this patch, the command to build LIBDCE for QNX:
Command to clean:
    make clean
Command to build:
    make
Command to build and install the output to install folder:
    make install

After this patch, the command to build LIBDCE for QNX:
Command to clean:
    make -f Makefile.qnx clean
Command to build:
    make -f Makefile.qnx
Command to build and install the output to install folder:
    make -f Makefile.qnx install

Change-Id: Iaa76d4d6c51a510dc6ccd19fdd45865c4cb46c18
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years ago[DCE_TEST] Clean up of OMAP5 flag for MPEG4 decoder.
buddy.liong [Wed, 29 Jan 2014 21:15:24 +0000 (15:15 -0600)]
[DCE_TEST] Clean up of OMAP5 flag for MPEG4 decoder.

MPEG4 decoder is defined by IPUMM with "ivahd_mpeg4dec" name.
Previously the name can be either "ivahd_mpeg4dec" or "ivahd_mpeg4vdec".
This patch to clean up so that it will only used "ivahd_mpeg4dec" for
OMAP5 or J6 which utilizes IPUMM image.

Change-Id: Iff92620f1d09a9700f8d460b7126f6e4b95ac248
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years ago[Fix] Hold mutex during Mmrpc_call
Pradeep Venkatasubbarao [Thu, 19 Dec 2013 13:20:33 +0000 (18:50 +0530)]
[Fix] Hold mutex during Mmrpc_call

There is a single IPC channel to communicate to IPU2
using Mmrpc calls. Any communication to remote proc
ipu2 gets routed through same channel. If mutiple
instances use IVAHD/DCE, all the packets get routed
through same channel. There is a possibility of corruption
 if the ipc calls are not serialised.

Hence this patch protects the Mmrpc_call function calls
with a mutex.

Change-Id: I3673ba76e52f03707277893cec07cff06abe8f1f
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
10 years ago[Bug] Fix possible client count overflow
Pradeep Venkatasubbarao [Thu, 19 Dec 2013 12:45:30 +0000 (18:15 +0530)]
[Bug] Fix possible client count overflow

The number of existing clients already running was being incremented
and then checked for maximum clients allowed.
However in the error scenario i.e. when maximum allowed clients are already
running and the new incoming client connection request was rejected the
client count was incremented unconditionally and not rolled back to
previous value thus resulting in possible overflow error.

This patch fixes this erroneous case.

Change-Id: I3e2b2bebfd025ba6a99b7ef838537d9716154ca4
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
10 years ago[LIBDCE] Clean up README and unsupported header files.
buddy.liong [Wed, 18 Dec 2013 19:18:47 +0000 (13:18 -0600)]
[LIBDCE] Clean up README and unsupported header files.

Updating README on the version information of headers included in
the packages folder.

Removal of h264svcenc, h264svcvdec, and vc1enc header files since it is
not supported in the current IPUMM.

Change-Id: I2bb140604a7c7d6e4ba7482a11ac43bc5076d9f6
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years ago[LIBDCE]: Changes to make Encoder and Decoder co-exist on Android
Sunita Nadampalli [Wed, 11 Dec 2013 19:22:38 +0000 (13:22 -0600)]
[LIBDCE]: Changes to make Encoder and Decoder co-exist on Android

In the current design omx video decoder is sending ptr for
inbufs and dma_buf_fd for the outbufs to the dce client.
In order to co-exist with encoder the inbufs/outbufs interpretation
is unified between encoder and decoder. this is achieved by
passing the memheader for both inbufs and outbufs for
both encoder and decoders.
This patch modified the process function to handle memheader
for all Android scenarios (inbufs/outbufs for encoder/decoder)
With this unified buf interpretation, the process function
simplified for Android.

Note# This patch has should be merged along with the omx patch:
http://review.omapzoom.org/#/c/34414/

Change-Id: Ia89ef9785ddf702bca986ce6b4a91983fb8bcc11
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years agoMerge "[DSP]Added duplicate functions for buffer lock and unlock." 3.00.03.04
Buddy Liong [Fri, 6 Dec 2013 20:09:49 +0000 (14:09 -0600)]
Merge "[DSP]Added duplicate functions for buffer lock and unlock."

10 years ago[DSP]Added duplicate functions for buffer lock and unlock.
Pradeep Venkatasubbarao [Thu, 5 Dec 2013 12:19:48 +0000 (17:49 +0530)]
[DSP]Added duplicate functions for buffer lock and unlock.

This is required temporarily as there is no other way to
get the core index.dce_buf_lock and unlock functions expects
MmRpcHandle  and now as there are separate handles for DSP
and IPU, to avoid modifying these APIs, duplicate functions
have been created coreIndex is hardcoded.

Added prototypes of dsp specific lock and unlock functions
in libdce.h

Change-Id: I360632acd061f9e134c38bea009b1ad257e32bb8
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
10 years ago[LIBDCE] Add non-TILER input buffer for dce_enc_test
buddy.liong [Wed, 4 Dec 2013 00:17:21 +0000 (18:17 -0600)]
[LIBDCE] Add non-TILER input buffer for dce_enc_test

Adding capability for the QNX dce_enc_test to use buffer
allocated through shmallocator instead of TILER memory on
the input buffer.

Fixing the submission on http://review.omapzoom.org/34254 as
originally it was pressumed that TI encoder codec required
the input to be 2D TILER buffer.

With this patch when executing dce_enc_test with "nontiler"
argument, the input and output buffers will be using the non TILER
(through shmallocator).

Change-Id: I14aff91a4f5491dd0efcab316d584585263fb666
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years ago[LIBDCE] Spacing and alignment clean up
buddy.liong [Wed, 4 Dec 2013 00:56:08 +0000 (18:56 -0600)]
[LIBDCE] Spacing and alignment clean up

Clean the spacing and alignment of tab to 4 spaces.

Change-Id: I62d75f0aef1a06858868458eedaf017f90f04ec4
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years agoAdded VIDDEC2 interfaces for DSP codecs
Pradeep Venkatasubbarao [Fri, 15 Nov 2013 11:05:01 +0000 (16:35 +0530)]
Added VIDDEC2 interfaces for DSP codecs

This patch adds VIDDEC2 interfaces and libdce now supports
both VIDDEC2 and VIDDEC3 interfaces. It initializes ipc based
on the server name(IVA or DSP).

Provisions are made to handle multiple instances of IPU and DSP codecs.

Change-Id: Ie1869e626423a6250983711114dc9d0854022309
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
10 years ago[LIBDCE] Get codec version on dce_test and dce_enc_test
buddy.liong [Fri, 15 Nov 2013 23:39:49 +0000 (17:39 -0600)]
[LIBDCE] Get codec version on dce_test and dce_enc_test

Internal reference: DVT OMAPS00302159.

To add the capability for the QNX dce_test and dce_enc_test to
get the codec version through XDM_GETVERSION command of
codec_control.

Change-Id: Ia39aeb5b55d3b8aba9365ad6d4a4a63e4e44b8aa
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years ago[LIBDCE] Add non-TILER output buffer for dce_enc_test
buddy.liong [Tue, 12 Nov 2013 22:02:28 +0000 (16:02 -0600)]
[LIBDCE] Add non-TILER output buffer for dce_enc_test

Internal reference: DVT OMAPS00302160
To add capability for the QNX dce_enc_test to use buffer
allocated through shmallocator instead of TILER memory on
the output buffer.

For input buffer, based on the TI encoder codec user guide
document, it must be configured as 2D TILER buffer.

Change-Id: I0cdda0ff1ddc607f9df41172bc45b6cf3010b95f
Signed-off-by: buddy.liong <buddy.budiono@ti.com>
10 years ago[ANDROID] update make file for ipc 3.20.00.04_eng 3.00.03.03
Sunita Nadampalli [Wed, 6 Nov 2013 21:19:43 +0000 (15:19 -0600)]
[ANDROID] update make file for ipc 3.20.00.04_eng

In IPC 3.20.00.04_eng release, the MPU side ipc library
is split into mmrpc.lib and ti_ipc.lib to better maintain
mm and generic ipc stacks. Hence the dce make file needs to be
updated to link to mmrpc.lib

Change-Id: If5598fed13a864d62fdb0e0a4e06c16b862d7147
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Remove memcpy in read_input for dce_enc_test
Buddy Liong [Mon, 4 Nov 2013 17:38:17 +0000 (11:38 -0600)]
[LIBDCE] Remove memcpy in read_input for dce_enc_test

Remove memcpy in read_input() for dce_enc_test since it is not
needed.
In the current implementation, read_input() creates a temporary
buffer "pTmpBuffer" to store the input frame after reading for the
input file. Then it performs memcpy from "PTmpBuffer" into input Buffer in
TILER 2D which is passed down to IVA-HD video encoder.

The "pTmpBuffer" is allocated using calloc() which allocates space from
the heap which may/may not be contiguous.
During robustness test, it causes hang during memcpy which indicates that
QNX calloc doesn't allocate contiguous memory.

The solution is to read the input frame directly from the input file and
store directly into input Buffer in TILER 2D.

Additional clean up in removing unused TMPDUMPDATA and DUMPINPUTDATA0.

Internal reference: this solution fix the issue reported in
DRT OMAPS00300892.

Change-Id: If5f4941f4d2adc4a82ec4e60652d4792a72866d7
Signed-off-by: Buddy Liong <buddy.budiono@ti.com>
10 years ago[FIX][DCE_ENC_TEST] Allocate buffer for Motion vector and SAD
Subash Lakkimsetti [Mon, 4 Nov 2013 20:01:12 +0000 (14:01 -0600)]
[FIX][DCE_ENC_TEST] Allocate buffer for Motion vector and SAD

enableAnalyticinfo is enabled by default for MPEG4/H263 encode and the required MVInfo buffer is not allocated.
This leads to memory corruption in MPEG4/H263 codec for encode with certain resolutions on QNX platform.
Buffer handling is added for MVInfo buffer when enableAnalyticinfo is enabled.
enableAnalyticinfo is disabled by default for MPEG4/H263 encode case.

For Internal reference, it fixes the  DRT OMAPS00300892 - 720P video encode is not functional with MPEG4/H263

Change-Id: I13d5d61faf8352d884070c3e1f17bb7005157334
Signed-off-by: Subash Lakkimsetti <x0091084@ti.com>
10 years ago[Linux] Makefile updated to export xdais/fc header 3.00.03.02
Chandramohan [Thu, 19 Sep 2013 14:19:36 +0000 (19:49 +0530)]
[Linux] Makefile updated to export xdais/fc header

Makefile changes to export the framework component
and xdais header files.

Change-Id: I789c53d96ff43ed91bb70e0f774af5078a041365
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
10 years agoAdd check for ownership for file descriptor
Amarinder Bindra [Wed, 25 Sep 2013 10:37:33 +0000 (16:07 +0530)]
Add check for ownership for file descriptor

Currently, the dce_deinit function deletes the file descriptor(fd) that
it uses for allocation of the buffers even if it has not created it.
This adds a check where it only deletes the fd only when the ownership
of fd is with libdce else it only deletes th device which it uses.
Also, add a check where the dce_set_fd sets the fd only if the drm
device fd is not already set to avoid memory leak.

Change-Id: Ie5e23f06a5d171f2c06f4bebb64b040915e71153
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
10 years agoconfigure.ac: Add test for cross-compiling.
Mrinmayee Hingolikar [Fri, 20 Sep 2013 06:26:19 +0000 (11:56 +0530)]
configure.ac: Add test for cross-compiling.

Since AC_CHECK_FILES macro doesn't work while cross-compiling.

Change-Id: I1913543e99d4e2423a4cf1cd15d5cc372d689318
Signed-off-by: Mrinmayee Hingolikar <mrinmayee@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
10 years ago[Linux] fixed an unreachable statement
Chandramohan [Thu, 19 Sep 2013 08:22:58 +0000 (13:52 +0530)]
[Linux] fixed an unreachable statement

Applications can optionally communicate the drm FD to libdce using
dce_set_fd before calling dce_init. In such cases dce_init will not
open a new DRM file descriptor. But for applications not using this
option, libdce will create a new fd for its use in dce_alloc.
The drmOpen call was unreachable in such cases and hence there was
an invalid handle. This patch fixes this issue of an unreachable
statement in dce_init

Change-Id: I4758416a7d34fff873c280f7583c05c1640c312b
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
10 years ago[LIBDCE] Replace Semaphore with Mutex
Sunita Nadampalli [Thu, 26 Sep 2013 21:26:59 +0000 (16:26 -0500)]
[LIBDCE] Replace Semaphore with Mutex

This patch reverts the below commit:
"abd5152ca071e552954571862635666297221177
[LIBDCE] Mutual exclusion of Engine_open and Engine_close"
Description:
-----------
(1) The current semaphore logic doesn't protect the engine open/close
calls across processes. It is confirmed on QNX that two instances of
dce test app is creating two different instances of semaphore.
Hence, other than the delay the current semaphore doesn't add
any protection for the mutli process <-> multi instance scenarios.
(2) For the single process <-> multi instance scenario, it does protect
the engine open/close calls, but it fails due to lack of reference counting
And also, it is not sure why we need to protect the entire engine_open/close.
Hence the current semaphore is replaced with mutex to protect the ipc handle
create/close.

Change-Id: Ibdad089bdd39cd5afc813373e84bf91fa8920860
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Fix memory leak on dce_ipc_init failure
Sunita Nadampalli [Fri, 20 Sep 2013 22:18:49 +0000 (17:18 -0500)]
[LIBDCE] Fix memory leak on dce_ipc_init failure

On dce_ipc_init failure, we need to close the semaphore
that was already created successfully.

Change-Id: Id04ed4cae7e3dab6193e460b005580fac0c2edd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE][ANDROID] unify 1D output buffer support for Android/Linux
Sunita Nadampalli [Fri, 20 Sep 2013 20:52:55 +0000 (15:52 -0500)]
[LIBDCE][ANDROID] unify 1D output buffer support for Android/Linux

Android omx components are modified to support dma buf fd
for the output buffers, in all scenarios.
Hence Android specific changes are removed from libdce, and
enabled linux code for android as well.

Change-Id: I8bf86803b40702d28ba0c45fd829b35fb47445fd
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Add single planar output buffer support for Android
Sunita Nadampalli [Wed, 18 Sep 2013 18:46:41 +0000 (13:46 -0500)]
[LIBDCE] Add single planar output buffer support for Android

Android Thumbnail scenario allocates both input and out buffers
from ION carveout. A single buffer is allocated for both Y and UV,
with an offset for UV.
This patch adds support for single planar buffers with memheaders
required for the Android thumbnail scenario.

Change-Id: I18306d2b07fe89f667d3f04bf5769ef1f2585c9d
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years agoAndroid.mk: Android make file update for new project path
Sunita Nadampalli [Wed, 18 Sep 2013 18:30:12 +0000 (13:30 -0500)]
Android.mk: Android make file update for new project path

make file is updated for the ipc and omx project paths.

Change-Id: I7b4f8583782d72181c40c248a28f165154e3423e
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Add TI License Header for the codec headers
Sunita Nadampalli [Fri, 13 Sep 2013 20:05:31 +0000 (15:05 -0500)]
[LIBDCE] Add TI License Header for the codec headers

Change-Id: I906358240c9e72529f80a1d13822cb0205d66caf
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Trace and Comments cleanup 3.00.03.00
Saurabh Bipin Chandra [Fri, 13 Sep 2013 06:26:54 +0000 (11:56 +0530)]
[LIBDCE] Trace and Comments cleanup

This patch:
1. replaces printf with trace MACROS.
2. Remove unwanted comments.

Change-Id: Id137603cbe947ca371550f594fc249d2f1b1410b
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LINUX] Fix for memory allocation/free in buf_lock/unlock
Saurabh Bipin Chandra [Thu, 12 Sep 2013 16:08:38 +0000 (21:38 +0530)]
[LINUX] Fix for memory allocation/free in buf_lock/unlock

This patch makes the following changes within dce_buf_lock/unlock:
1. Changes API of memory allocation from memplugin_alloc
to malloc as Tiler/Shared memory is not needed
2. Frees the allocated memory at EXIT from function.

Change-Id: Id728abad86d4582f0e904f4c8680e99d47cb3a0a
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LIBDCE] Add Android specific changes
Sunita Nadampalli [Fri, 13 Sep 2013 11:35:59 +0000 (06:35 -0500)]
[LIBDCE] Add Android specific changes

This patch adds changes specific to Android OS:
(1) Semaphore handling
(2) Input buffer offset handling

Change-Id: Id6232e0b90e638fd1268ccbfafb51c6ca916fad2
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Move semaphore handling into dce_sem_* methods
Sunita Nadampalli [Fri, 13 Sep 2013 11:28:28 +0000 (06:28 -0500)]
[LIBDCE] Move semaphore handling into dce_sem_* methods

Inorder to unify semaphore handling across multiple OSes
semphore calls are moved into dce_sem_* methods.

Change-Id: I32e8fc2ffdbf9ee91365923a28dded7f1d8784ce
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Add support for offset within the xlation buffers
Sunita Nadampalli [Thu, 12 Sep 2013 16:01:16 +0000 (11:01 -0500)]
[LIBDCE] Add support for offset within the xlation buffers

The input buffers for the video decoders need offset support
because of HLOS Multimedia framework requirement.
Inorder to support such input buffers, we should provide the
buffer base address and offseted address to ipc.

Change-Id: I2214dbced0a40911b17c5951593322b0fa3bfd16
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] update memplugin headers and apis
Sunita Nadampalli [Fri, 13 Sep 2013 11:05:29 +0000 (06:05 -0500)]
[LIBDCE] update memplugin headers and apis

memheader and memplugin apis are extended to meet the
requirements for mem allocations/free/share for all OSes.

Change-Id: Ide911d1654ccd0807ace37de9576299cbb860d07
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[DOC] Update ReadMe 3.00.02.00
Saurabh Bipin Chandra [Fri, 6 Sep 2013 12:01:06 +0000 (17:31 +0530)]
[DOC] Update ReadMe

ReadMe now contains:
1. Build Information for QNX
2. Build Information for Linux
3. API Information
4. API call flow
5. Version Info of headers in
   packages folder.

Change-Id: If76f6bae18bfac0cb9c6d918d365f5263c539d0d
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[DOC] Renamed README.txt as README
Pradeep Venkatasubbarao [Fri, 6 Sep 2013 05:57:48 +0000 (11:27 +0530)]
[DOC] Renamed README.txt as README

Change-Id: Ie4209ef72aa8e10d246e7b523678dd42350535d8
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
10 years ago[LIBDCE] Update .gitignore
Buddy Liong [Thu, 5 Sep 2013 18:21:33 +0000 (13:21 -0500)]
[LIBDCE] Update .gitignore

Update .gitignore to ignore:
nto
dce_test arm folder
dce_enc_test arm folder

Change-Id: I146219e389c84567cf47d116d4fe6b9cc258607d
Signed-off-by: Buddy Liong <a0270631@ti.com>
10 years ago[GIT] Add gitignore file
Saurabh Bipin Chandra [Thu, 5 Sep 2013 18:14:14 +0000 (23:44 +0530)]
[GIT] Add gitignore file

Patch adds .gitignore file.

Change-Id: Iee9731e461dccf95beeeb61a2e2869cc1007eda9
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LIBDCE] Update packages with XDAIS, FC Headers
Saurabh Bipin Chandra [Thu, 5 Sep 2013 17:33:07 +0000 (23:03 +0530)]
[LIBDCE] Update packages with XDAIS, FC Headers

This patch adds XDAIS, FC headers included by
the codec header files and makes necessary build
changes to include them.

Change-Id: I6de3988291e6f4fa229b47a119431d83be1025c2
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[QNX-MAKE] QNX Build system changes
Saurabh Bipin Chandra [Thu, 5 Sep 2013 15:28:03 +0000 (20:58 +0530)]
[QNX-MAKE] QNX Build system changes

The changes include:
1. Redirecting Include Path to packages/ folder
for the CE, XDAIS, XDCTOOLS and IVAHD_CODECS.

2. Since xdc_target_types__ is defined as gnu/targets/std.h
in libdce.h, the definition has been removed
rom the common.mk files.
This helps as the client application need not define
xdc_target_types__ as a compiler option.

3. Since xdc/std.h is included in libdce.h, it is being
removed from the test applications.

4. Adding trace variables to libdce make.

Change-Id: I1e2675901340daefefe865a03757459e41f1d837
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[TRACE] Debug Log levels enabled
Sathishkumar [Thu, 5 Sep 2013 06:42:28 +0000 (12:12 +0530)]
[TRACE] Debug Log levels enabled

This patch adds debug log levels to libdce.
To enable traces, set the DCE_DEBUG_ENABLE.
The trace level can be changed by setting
DCE_DEBUG_LEVEL= [1/2/3] during compile time.

Change-Id: I4bed53cc6e3af938c02221376662318e3a1b8ec4
Signed-off-by: Sathishkumar <x0203598@ti.com>
10 years ago[LINUX] Fix for make install
Sathishkumar [Thu, 5 Sep 2013 11:34:31 +0000 (17:04 +0530)]
[LINUX] Fix for make install

This patch fixes make install. All the required headers are
copied to $(includedir)/dce on make install.
Unused variables(X11 and WAYLAND) are removed in Makefile.am and
pkg-config on libmmrpc is removed as no libmmrpc.pc is available.
xdc_target_types__=gnu/targets/std.h is added to libdce.h, so
that applications need not do it when using libdce.h.

Change-Id: I8cc70aa2102becdbdc4c6b1e38e2aaa91739c4cc
Signed-off-by: Sathishkumar <x0203598@ti.com>
10 years ago[LIBDCE] Add function descriptor in libdce header file
Saurabh Bipin Chandra [Wed, 4 Sep 2013 16:23:25 +0000 (21:53 +0530)]
[LIBDCE] Add function descriptor in libdce header file

This patch adds function descriptors in the libdce.h.
The xdc/std.h inclusion is shifted from libdce.c to
libdce.h to remove the need of client application
including xdc/std.h.

Change-Id: I4b9e6f12643b130a2cf1d317c4fed595008c7812
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[QNX-MAKE] Include XDC, CE, XDAIS, IVAHD Headers from packages
Saurabh Bipin Chandra [Wed, 4 Sep 2013 14:28:45 +0000 (19:58 +0530)]
[QNX-MAKE] Include XDC, CE, XDAIS, IVAHD Headers from packages

This patch adds std.h from GNU and it directs
the build system to include Codec Engine,
XDCTools, XDAIS and IVAHD Codec Header files
from the packages/ folder. This removes the
need for libdce users to install these tools.

Change-Id: I368a5aaff4c1edeaf6eae794bea9971787e036e3
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LIBDCE] Added codec, xdais and xdctools headers
Sunita Nadampalli [Tue, 3 Sep 2013 16:37:10 +0000 (11:37 -0500)]
[LIBDCE] Added codec, xdais and xdctools headers

This patch adds codec,xdais and xdctools headers for libdce
compilation at HLOS level. Since HLOS code doesn't refer to the
tools directly, this patch provides copy for all the required headers.
Note# These headers need to be updated for every release if the tools
versions are changed.

Version Info of the added Headers:

Tools:
XDC version   : xdctools_3_25_02_70
CE version    : codec_engine_3_24_00_08
XDAIS version : xdais_7_24_00_04

IVAHD_Codecs:
H.264 Dec  : 02.00.13.00
MJPEG Dec  : 01.00.11.01
MPEG-4 Dec : 01.00.13.00
VC-1 Dec   : 01.00.00.11
MPEG-2 Dec : 01.00.12.00
SVC Dec    : 00.06.00.00
H.264 Enc  : 02.00.06.01
MJPEG Enc  : 01.00.02.01
SVC Enc    : 00.02.00.05

Change-Id: Id2307e2376d3ba0c13464c1b21cdba53d8f997f2
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
10 years ago[LIBDCE] Mutual exclusion of Engine_open and Engine_close
Saurabh Bipin Chandra [Tue, 3 Sep 2013 09:50:45 +0000 (15:20 +0530)]
[LIBDCE] Mutual exclusion of Engine_open and Engine_close

This patch uses semaphores to mutually exclude:
1. dce_init() and Engine_open() IPU call.
   This solves a hang on IPU side during multiple
   instances.
   pthread mutex used within dce_init is replaced with
   semaphores as mutex is valid only across
   threads and not processes.
2. dce_deinit() and Engine_close().
   This solves a hang on IPU side during multiple
   instances.

Change-Id: Ia4d31582ebf0536142dee389e9601eae0169fb22
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[QNX-MAKE] Exclude linux/android specific files
Saurabh Bipin Chandra [Thu, 5 Sep 2013 11:17:57 +0000 (16:47 +0530)]
[QNX-MAKE] Exclude linux/android specific files

This patch directs QNX build system to exclude
libdce_linux.c and memplugin_android.c during build.

Change-Id: I96ad60d1c0397eb46acd4927e6b7e9912cf01718
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LINUX] Moving Linux specific functions to new c file
Saurabh Bipin Chandra [Thu, 5 Sep 2013 10:16:56 +0000 (15:46 +0530)]
[LINUX] Moving Linux specific functions to new c file

This patch moves Linux specific functions to
libdce_linux.c.
It also takes in the DRM Initialization cleanup
changes in dce_init from:
https://gerrit.ext.ti.com/gerrit/omap/#/c/12888

Change-Id: I570341c8dfbe1d120bc89071a86020b6ba5d4cac
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LINUX] Expose dce_init and dce_deinit calls to user
Saurabh Bipin Chandra [Tue, 3 Sep 2013 04:04:10 +0000 (09:34 +0530)]
[LINUX] Expose dce_init and dce_deinit calls to user

This patch changes the declaration of dce_init() and
dce_deinit() to what is expected by Gstreamer for GLP
and exposes it. This involves returning a struct
omap_device pointer as void * during dce_init() and
receiving a struct omap_device during dce_deinit().

The IPC initialization/deinitialization has been
separated out of dce_init()/dce_deinit() into two static
functions dce_ipc_init(), dce_ipc_deinit().
These functions are now included within Engine_open(),
Engine_close() for all OSs.

Change-Id: I86f4778cbd80f0a83aa3c39d8183bb3155a2a391
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LINUX] Expose API to lock and Unlock IO Buffers
Saurabh Bipin Chandra [Fri, 30 Aug 2013 11:58:19 +0000 (17:28 +0530)]
[LINUX] Expose API to lock and Unlock IO Buffers

This patch exposes APIs:
   dce_buf_lock(int num, size_t *handle)
   dce_buf_unlock(int num, size_t *handle)
to lock and unlock the Input/Output Buffers respectively.

The change is specific to GLP.
The DRM driver pins and unpins tiler address for the
IO Buffers whenever the rpmsg_rpc driver calls
map_attachment and unmap_attachment() respectively.
As the rpmsg_rpc driver invokes these calls during every
process call, the reference buffer addresses (address of
past locked buffers) held by the codec gets invalidated.
That is, these addresses will not continue to map to the
same memory region (YUV reference buffer) as before.

Most often, these virtual addresses may point to the
next YUV Buffer translated from the MPU.

These APIs put a condition on the map and unmap() within
rpmsg_rpc.

The expectation from the application is to
call dce_buf_lock() for the inArgs.inputID buffer
and dce_buf_unlock() for the outArgs.freeBufID buffer.

Change-Id: Ic749c6b18385f9052a2eeb4e16959063c5efab5e
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[DCE] Align MmRpc offset setting with GLP Rpmsg_rpc
Saurabh Bipin Chandra [Thu, 29 Aug 2013 09:21:50 +0000 (14:51 +0530)]
[DCE] Align MmRpc offset setting with GLP Rpmsg_rpc

This patch aligns setting translation[i].offset field
of MmRpc Translation Array (XltAry) with the
understanding of rpmsg_rpc of GLP.

Rpmsg_rpc of GLP calculates:
primary_offset as mmrpc_params.addr - mmprc_params.base
and
secondary_offset as translation[i].offset
and sums both to get to the location of the address to
be translated.
Whereas in QNX rpmsg_rpc, the primary offset was subtracted
from the secondary offset.

This logic has now been modified in IPC_03_10_00_07_eng to
align with the rpmsg_rpc of GLP.

Change-Id: Ied11e78891119312f35162e336cd3dded9e8997a
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[GLP] Enable DMA Buf Handle 3.00.01.05
Saurabh Bipin Chandra [Sun, 4 Aug 2013 09:55:14 +0000 (15:25 +0530)]
[GLP] Enable DMA Buf Handle

This patch converts all MmRpc_Pointer_Param call
to MmRpc_OffsetPointer_Param to take care of MemHeader.

This is not needed from a QNX perspective but is needed
from a Linux perspective. There should no added latency is QNX
due to this change as the rpmsg_rpc kernel path is still the same.

This patch invokes memplugin_share() for the buffers allocated
through DCE to get the corresponding DMA Buf Handles for GLP.
For QNX, the return value is expected to be 0.

For linux, the patch adds the logic for Single vs Multiplanar buffers.

For linux, the memplugin_share() logic is modified to store and
retireve the same dma_buf_fd rather than getting a dup() each time.

These changes makes the following assumptions:
1. All the parameter buffers are allocated through
   DCE/MemPlugin.
2. The CLient passes Virtual pointers, rather than
   DMA Buf Handles to libdce for parameter buffers.
3. For IO Buffers, the client passes DMA Buf Handles
   and are not allocated using DCE/MemPlugin.

This patch assumes MmRpc is exposing translation[i].base.

Change-Id: I7d13f4a4d69fbe8b6dd0317e2a860f0df2061ef9
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LIBDCE] Adding dce_enc_test
Buddy Liong [Tue, 27 Aug 2013 22:43:27 +0000 (17:43 -0500)]
[LIBDCE] Adding dce_enc_test

Adding dce_enc_test for H.264 baseline and High Profile.
Adding MPEG4/H263 simple Profile.

Change-Id: I29b5043210d3a79e5ab859c5781bb89584714dfa
Signed-off-by: Buddy Liong <a0270631@ti.com>
10 years ago[LINUX] X11 and Wayland Support removed
Sathishkumar [Wed, 28 Aug 2013 13:13:59 +0000 (18:43 +0530)]
[LINUX] X11 and Wayland Support removed

X11 and wayland support is removed from libdce.
Defaults to omapdrm device.

Change-Id: I0def0c872cc2658edd12a3e69dec6016eab3f1c9
Signed-off-by: Sathishkumar <x0203598@ti.com>
10 years ago[MEMPLUGIN] Modify memplugin_share() implementation for QNX
Saurabh Bipin Chandra [Wed, 31 Jul 2013 14:53:08 +0000 (20:23 +0530)]
[MEMPLUGIN] Modify memplugin_share() implementation for QNX

This patch updates the definition of memplugin_share()
for QNX to make it aligned with the definition for
linux.
It also makes the function inline, to save on
function switching in QNX.
Only the QNX declaration is made inline.

Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
Change-Id: I20b89d4a3f560d8f4e4de36a496b87b6820b2d10

10 years ago[GLP] Libdce linux implementation
Sathishkumar [Tue, 30 Jul 2013 05:50:14 +0000 (11:20 +0530)]
[GLP] Libdce linux implementation

make install & libdce.c issue fix

1. make install has been fixed. libdce.h will be installed in /usr/include,
   libdce.so files in /usr/lib and libdce.pc in /usr/lib/pkgconfig on using
   --prefix=/usr. By default the prefix is /usr/local.
2. init and deinit calls are removed from libdce.h
3. dce_set_fd and dce_get_fd calls are implemented in libdce.c
4. configure.ac checks for libmmrpc and makefile.am modified to link with libmmrpc.

configure.ac and makefile.am modified

1. Codec_engine,xdctolls,framework_components,ipc,xdctools and xdaias paths needs
   to be exported. Configure.ac checks for the exported paths.
2. Makefile.am is modified to have the exported paths in the include directories list
   for the compiler.

Modifications done after review

1. Comments added in memplugin_linux.c. White spaces removed manually and cleaned up
   libdce.c, memplugin.h. dce_priv.h is modified to have File and line number in the
   logs. linux/dce.h file is removed.

Libdce modifications for linux

Linux Specific libdce functionality added.
1. memplugin calls specific to linux are added in memplugin_linux.c
2. Error and debug logs implementation for linux in dce_priv.h
3. xll and wayland specific files are moved to linux folder

Change-Id: Ib41e6a52d902376cdabbb939dee7585944720d92
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
Signed-off-by: Sathishkumar <x0203598@ti.com>
10 years ago[DCE] Modify approach to pass parameters to IPC
Saurabh Bipin Chandra [Wed, 31 Jul 2013 14:50:49 +0000 (20:20 +0530)]
[DCE] Modify approach to pass parameters to IPC

Three approaches were followed for IPC MmRpc calls.
1. All the parameters which need to be sent and received to/from IPU are coupled in a struct
   allocated from Shared/Tiler Memory. Only the adrress of the struct is passed to MmRpc
   as a pointer argument. This approach is useful as MmRpc in some cases to avoid multiple
   translations. This approach is followed for :
   Engine_open(), Engine_close(), create(), control(), delete()
2. All the parameters which need to be sent are given as separate arguments to
   MmRpc. This approach is needed when you need to translate an address which is
   ofsetted from a pointer which in itself needs to be translated.
   This apporach is followed for : process()
   For understanding, take the example of inbufs argument in process call(). Inbufs
   allocated in Shared memory and needs to be translated, has the address of Input
   buffer (allocated from Tiler). It is not possible to give the Input buffer as an argument
   to Mmrpc for translation until inbufs is given as a parameter to Mmrpc. Therefore inbuf
   can't be populated inside another Shared/Tiler memory struct.
3. This approach is a workaround to use approach [1] by solving the issue posed by [2].
   This approach is followed for : get_version()
   Taking the example of inbufs to explain, the Input buffer address will be one of the
   parameters of the struct (explained in [1]) along with inbufs address. Therefore the
   Input buffer address will get translated here. At the IPU, this address needs to be
   copied back to inbufs.

This patch aligns all DCE calls except Engine_Open to use Approach [2].
Engine_open still follows Approach [1] because:
1. Engine open takes in pointers to Engine_attrs and Error_code structures. The client may
   set both, none or either one of them to NULL (as allowed by CE). So that implies either
   I'll have to pass NULL as param_pointer to IPU or decide not to pass them at all. In the
   second case, I'll have to pass extra arguments to inform IPU that I have not passed Attrs
   or ErrorCode or both.

I tried passing NULL but mmrpc_write failed.

Dependent on ipumm patch:
https://gerrit.ext.ti.com/gerrit/omap/#/c/12773

Change-Id: Ic770aaa99a56ea559efe9446e6e98d70726cc7c5
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[MAKE] Exclude Linux files for QNX build
Saurabh Bipin Chandra [Wed, 31 Jul 2013 14:51:46 +0000 (20:21 +0530)]
[MAKE] Exclude Linux files for QNX build

This patch adds condition within QNX build
to exclude Linux specific files.

Change-Id: I4ccca9198ed4d8d81fbab895524e4cb18babc2d2
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LIBDCE] Update XDC Tools
Saurabh Bipin Chandra [Thu, 1 Aug 2013 14:55:56 +0000 (20:25 +0530)]
[LIBDCE] Update XDC Tools

This update is to align with the IPC
update in IPUMM at:
https://gerrit.ext.ti.com/gerrit/omap/#/c/12734

Change-Id: I92e42c0fbfee049acc692c62c577113bfbdd478c
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LIBDCE] Remove MmRpc translation param base 3.00.01.02 3.00.01.03 3.00.01.04
Saurabh Bipin Chandra [Wed, 19 Jun 2013 11:37:20 +0000 (17:07 +0530)]
[LIBDCE] Remove MmRpc translation param base

The "base" field is no longer exposed by MmRpc
from IPC 03.00.01.23 release as it can be
calculated internally using the "offset" field.
Hence this patch removes setting the field.

Change-Id: I08df16e08042ae27bb2fa550b7126b3f7cae8fa6
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[MAKEFILE] Update Tools
Saurabh Bipin Chandra [Wed, 19 Jun 2013 11:35:37 +0000 (17:05 +0530)]
[MAKEFILE] Update Tools

This patch updates the following tools:
CEVERSION ?= codec_engine_3_24_00_08
FCVERSION ?= framework_components_3_24_00_09
XDAISVERSION ?= xdais_7_24_00_04
XDCVERSION ?= xdctools_3_25_01_65

Change-Id: I4122a2161c1ca09b997c518ad51bfd07849139f7
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[Dce_Test] Enable MPEG2 Decoder in dce_test app 3.00.01.01
Saurabh Bipin Chandra [Thu, 23 May 2013 12:06:20 +0000 (17:36 +0530)]
[Dce_Test] Enable MPEG2 Decoder in dce_test app

This patch enables MPEG2 decoder as the MPEG2 codec
library 01.00.12.00 renames the enum which was common
with MJPEG decoder.

Change-Id: Ifbdabee6358652af633474ca7ac2aebad57f4591
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years agoFix to pass right translation param to IPC.
Saurabh Bipin Chandra [Thu, 23 May 2013 06:55:26 +0000 (12:25 +0530)]
Fix to pass right translation param to IPC.

The base field of the MmRpc_Xlt translation structure
needs to be value of the address to be translated.
The code was wrongly setting base to the location of
the address. This has been corrected. This didn't create
issues because the IPC doesnot use the base field for
address translation. IPC uses offset to find the
address to be translated.

Change-Id: I404c7dc61cf3f4b5b584008b13336441420149d8
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years agoAdd Header declaration for MemHeader
Saurabh Bipin Chandra [Fri, 10 May 2013 13:31:56 +0000 (15:31 +0200)]
Add Header declaration for MemHeader

To maintain a generic implementation this
patch moves the MemHeader declaration from
memplugin_qnx.c to memplugin.h.

Change-Id: I881ee18903a906a6e31284710949709a5be4132e
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years agoEnable build of dce_test app with IPC 3.17
Saurabh Bipin Chandra [Fri, 10 May 2013 13:28:59 +0000 (15:28 +0200)]
Enable build of dce_test app with IPC 3.17

Build of IPC 3.17 generates ipc_client.so instead
of syslink_client.so. Hence updating dce_test mk file
to include the right IPC library.

Change-Id: Icc1c0451ffc10a04bfeb102f5a4b61b4cda0f759
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[LIBDCE] Remove check for error_code in Engine_open
Saurabh Bipin Chandra [Fri, 10 May 2013 13:25:45 +0000 (15:25 +0200)]
[LIBDCE] Remove check for error_code in Engine_open

This patch removes check for error_code in Engine_open
because the Codec Engine doesnot expect a valid
address.

Change-Id: Id3286a101e290f6d987017741a0c194f53c19f94
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[DCE_TEST] Add Input argument to take in number of frames to write.
Saurabh Bipin Chandra [Fri, 10 May 2013 13:21:48 +0000 (15:21 +0200)]
[DCE_TEST] Add Input argument to take in number of frames to write.

This patch lets dce_test app users mention the number
of frames of the output raw data to be written to the
output file as an extra input command line argument.

To invoke dce_test app:
dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler

Change-Id: I311b5afbe56aedc93263777bc1891d71cdd73c9a
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
10 years ago[libDCE] Add IPC 3.x Adapted code to Repository 3.00.01.00
Saurabh Bipin Chandra [Mon, 22 Apr 2013 16:42:19 +0000 (22:12 +0530)]
[libDCE] Add IPC 3.x Adapted code to Repository

This patch adds libdce code to the repository.
LibDCE has been adapted to use the MmRpc layer
of IPC 3.x. This version of LibDCE is expected to
work on QNX.

Patchset 2 adds/modifies:
1. Removes Tiler 2D allocation/free for now.
2. Corrects memplugin_free() for Tiler 1D.
3. Modifies dce_test app to dump output till 30 frames.
4. Renamed dce.h to libdce.h.
5. Corrected header files across all files.
6. Build configuration for QNX
7. Removes build warnings.
8. Add README for Build instructions
9. Takes care of comments of Buddy and Pradeep.

Patchset 3 adds/modifies:
1. Reduced Stack usage of each function.
2. Add ptr check in memplugin and remove from libdce.
3. Add DCE_Assert macros.
4. Add DCE_error_status enum.
5. Comments Cleanup
6. Make some functions static.
7. process() cleanup including removing reply_buf.
8. Add else if (for codec_type == Encoder type)
9. Converted Macros to Inline functions.
10.Converted init and deinit to dce_init and dce_deinit functions.
11. Removed dce_init() and dce_deinit() declarations

Patchset 4 adds/modifies:
1. Assert Input function arguments.
2. Correct copyright year.
3. Correct memplugin_free for Shared memory.
4. Create dce_priv.h and move trace and assert macros to the header.
5. Redeclare mem_type enum and add mem_error_status enum in
   memplugin.h and make corresponding changes.
6. Add asserts in memplugin.

Intention of some of the changes above is to move towards
delinking Libdce and Memplugin.

Patchset 5:
1. Missed to add dce_priv.h file.

Patchset 6:
1. Take care Pradeep's comment.

Change-Id: I6e5e37b7088362e7bad66200fc3454bb828e0eff
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>