| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CMA-enabled kernel for tuna devices will unload Ducati firmware when it's not
in use to free extra memory for applications.
On the first access to /dev/rpmsg-omx1 it will reload the firmware. However, in
the process of this reloading device drivers will be reset, therefore causing
errors when either opening the device or performing the first operation on it.
Moreover, the previously opened handle will be invalidated in this case.
Therefore, the connection loop is modified to retry both open() and first
ioctl()calls instead of just open() and to reopen the device on retries.
Also, because the reload can happen relatively fast when there are not too many
pages to migrate, we use smaller waiting period but increased number of retries
to improve camera start latency.
Change-Id: I4b919f457c0e3bc43f99381c405e364b3326f583
|
|
|
|
|
|
|
| |
The 'dcc_loaded' local static variable was never reset properly.
Change-Id: Id4ceddea6153d897456e0f845f3818be5dfbae36
(cherry picked from commit 881a349f9721837f2556b6ed8214fecbf7a19f27)
|
|
|
|
|
| |
Change-Id: Ibdf65581caca78b2daa41ac9898383f4c3d38097
(cherry picked from commit e57f2b6f67a2b87da5b9c2f2b82e6cc28eef819b)
|
|
|
|
|
|
|
|
|
|
| |
Thanks to Kyle Repinski <repinski23@gmail.com> for pinpointing the issue,
I just ifdef'd it and modified the return value to OMX_ErrorNotImplemented.
Since OMX_IndexParamConsumerUsageBits is fairly new, we're
assuming none of the current omap4 ducatis implement it.
Change-Id: Ib1e26c8be36d90ef1624699a5d4107ae25794951
|
|
|
|
| |
Change-Id: I4b2f8b72601aae7c4baedd91ddfb6d6437de73f7
|
|
|
|
|
|
|
| |
These additions are only enabled when BOARD_USE_MOTOROLA_DOMX_ENHANCEMENTS
is defined.
Change-Id: I47d559d4908b7f5da2b1b3370a736a13376ef464
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Change-Id: If1a49cddc1ea241008b9e8faeae26ace8415b188
|
|
|
|
|
|
|
| |
This reverts the DCC handling by camera HAL and loads the dcc files
using the legacy method (works better with ICS-based ducati binaries)
Change-Id: I2b8d4615beee224068ea39a746ff8b4796699d20
|
| |
|
|
|
|
|
|
|
| |
Change-Id: I1a888975945ec88d011e3bfc4e8af7d8ac36fc59
Conflicts:
domx/domx/plugins/memplugin_ion.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Google approach is to have own ion library in parallel with TI
ion library, latter has been renamed to ion_ti in JB MR1 and moved into
hardware/ti/omap4xxx together with kernel headers.
This patch fixes inclusion of ion library from <ion_ti/ion.h> and
linking to libion_ti appropriately.
Change-Id: Ibea0d45b013a49310d75c77561724add4ee01999
Signed-off-by: Daniel Levin <dendy@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
Functions "MemPlugin_ION_Alloc", "PROXY_AllocateBuffer" and
"PROXY_UseBuffer" always returns successfull result,
in unsuccessfull memory allocation cases. This behaviour
caused crashes in code, which used these functions.
Change-Id: I014905d7972d7a74d2de5051d34fdf52d90bca83
Signed-off-by: Oleksii Gulchenko <oleksii.gulchenko@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the introduction of generic MEMUTIL APIs, the old
wrapper method PROXY_AllocateBufferIonCarveout used to make
ION specific allocations in DOMX PROXY is no longer used.
This patch removes the method from code.
This patch should be integrated after the integration of
following patches:
http://review.omapzoom.org/#/c/27669/
http://review.omapzoom.org/#/c/27671/
http://review.omapzoom.org/#/c/27776/
Change-Id: I10e0f251aaf3a15b903cfdf3af38695cda9c4193
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows allocation of secure buffer in memplugin ION.
Based on alloc flags, retry with tiler 1d is done only for default
buffer alloc flags. For any special alloc flags, no retry done.
This patch has been verified on OMAP5 JB DB 139 for android sanity.
Change-Id: Ia95b8a9eba5b42c1cb69342fe2a5222e8a718a7e
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the following:
*initialization for pPluginExtendedInfo was missed previously.
*pMemPluginHandle->pPluginExtendedInfo was not properly pointed and passed
for allocation.
These two issues are fixed in this patch and tested on OMAP5 DB 139.
Change-Id: I5150c4c71eccc7b24d1e4fad01bb0cf1312b0170
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix memory leak when receiving OMX_ErrorHardware from the
remote core. In such cases, the listener will not free the
allocated packet; instead omx_rpc should check for this condition
and free the packet.
Change-Id: I3694a8fef4fee93495070671fe574abd61b3b948
Signed-off-by: Alberto Aguirre <a-aguirre@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch integrates the generic memory manager APIs
from MemPlugin introduced by
http://review.omapzoom.org/#/c/27669/
into the DOMX proxy COMMON and components. This
involves the following changes:
*New element pMemPluginHandle has been introduced in
PROXY_COMPONENT_PRIVATE to contain memory manager
info and to link to corresponding APIs.
*Remove ION APIs that are directly used in DOMX
PROXY code. PROXY common is completely cleaned
out in this patch. In component proxies, camera
proxy is not completely clean yet since it requires
more effort and testing. That will be done in
PART 2.
*Make changes to compile MemPlugin files that have been
integrated and used within PROXY code.
Tested on DB 285 with android and OMTB sanity.
Change-Id: I31e9ecefcf5be77da237a7b1b6234b7f34cf99f7
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces the MemPlugin generic API interface for
buffer actions. All types and definitions are contained in
memplugin.h & memplugin.c
ION memory manager is "plugged in" through internal methods
defined in memplugin_ion.h & memplugin_ion.c.
The generic APIs are linked to the specific memory manager
methods internally based on the mapping table defined in
memplugin_table.c.
Change-Id: Ibff94732c40749f9c8cf34aa18bc0c43ddd298de
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch introduces a new struct PROXY_BUFFER_ACCESSOR.
This contains all possible accessors for a buffer including:
*buffer handle pBufferHandle
*context free FD bufferFd
*Registered handle pRegBufferHandle
*Mapped buffer address pBufferMappedAddress
Three elements of this struct are included in the
PROXY_BUFFER_INFO struct replacing the following
elements that were not well organized:
OMX_PTR pYBuffer;
OMX_PTR pMetaDataBuffer;
int mmap_fd;
int mmap_fd_metadata_buff;
OMX_PTR pRegisteredAufBux0;
OMX_PTR pRegisteredAufBux1;
OMX_PTR pRegisteredAufBux2;
This patch also removes the ION dependency from these elements.
In addition, all changes to introduce this new struct and
element in PROXY_BUFFER_INFO are included in this patch.
Tested on DB 285 with android and OMTB sanity.
Change-Id: I6f4ea6239bf6b8d5395fece04008f6b8298f0a95
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Buffer registration and unregistration was added to facilitate
buffer tracking from RPMSG. Registered buffer handle should be
unregistered before they are freed. Buffers are freed either in
FreeBuffer or ComponentDeInit.
Presently Unregister calls are included in FreeBuffer method.
This patch adds them to ComponentDeInit which was missed previously.
Now registered buffer handles are unregistered at all places before
the buffer is freed.
Change-Id: I58919b8ad6f955bf2632d18b9480b6b24dac9472
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following members were nested under USE_ION preprocessor flag
in PROXY_COMPONENT_PRIVATE structure:
*bUseIon
*bMapIonBuffers
*ion_fd
Out of them, bMapIonBuffers and ion_fd are generic and denote:
*bMapIonBuffers - if buffers needs to be mapped in userspace
*ion_fd - userspace mem manager[ION] client
for creating/destroying buffers
Hence they have been generalized in this patch into:
*bMapIonBuffers -> bMapBuffers
*ion_fd -> nMemmgrClientDesc
Also these elements are removed from the USE_ION # flag.
Changes to element 'bUseIon' has greater impacts in the
domx code base and hence will be done in a separate patch.
Note: This patch has nothing to do with COMMON DOMX, GLUE
and UTILS. This is a seperate clean up.
This patch has been tested in REL DB 285 with android
and OMTB sanity.
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
Change-Id: I4ca29ceb0e0f5f5c2ae306f802cab2a888a18f03
|
|
|
|
|
|
|
|
|
|
| |
Raw dump utility was broken due to changing NV12 to be continuous in memory,
this patch changes the algorithm for getting Y and UV parts
according the new implementation.
Change-Id: I639471d0159bab5d027d762719e0d97afd1586d6
Signed-off-by: Illia Ragozin <x0160199@ti.com>
Signed-off-by: Devaraj Rangasamy <dev@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
Reconciling with JB ION headers inclusion style.
The ION headers should be included from <ion/ion.h> to avoid ambiguity.
Depends on: http://review.omapzoom.org/#/c/23883/
Change-Id: Ie0c93f5b03b67660825ca3ed77af6ca1ceb7fc3e
Signed-off-by: Daniel Levin <dendy@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ducati patches:
https://gerrit.ext.ti.com/gerrit/omap/#change,8128
https://gerrit.ext.ti.com/gerrit/omap/#change,8261
implement Get/Setparam for OMX_TI_IndexUseBufferDescriptor at Ducati.
The implementation of OMX_TI_IndexUseBufferDescriptor mandates ducati side
OMX components to be aware of attributes such as buffer type to
proceed with buffer processing appropriately.
This patch propogates the GetParameter call that was so far handled
internally within DOMX to ducati OMX component utilizing the
GetParameter implementation at components. Now DOMX is aware
of component defaults to the structure related to this index.
Change-Id: Icad3abb5236c927edda5ad668ac7ef89db92dfef
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For CPCAM usecases, gralloc buffers could be 1D
also. This patch makes corresponding changes in
DOMX to allow this.
- In RPC_RegisterBuffer, looks for num_handles returned
from rpmsg ioctl call and returns the corresponding
valid handles only. Rest are NULL.
- While passing gralloc buffers to ducati via UseBuffer
call, fetch only number of components as indicated
in pBuffer->numFds. Set other place holders to NULL.
This patch has a kernel dependency:
http://review.omapzoom.org/#/c/26668/
Change-Id: Ief80d45e8cbe4719aca4eaf09200b2034078e688
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stride value (4096) was used to determine 2D buffers in
- PROXY_UseBuffer
- PROXY_AllocateBuffer
- PROXY_FreeBuffer
In case of PROXY_UseBuffer - GrallocPointers, BufferDescriptorVirtual2D
are always 2D and EncoderMetadataPointers are always 1D. So the stride check
was not required as none of the handled buffer types coexist in 1D and
2D forms.
In case of PROXY_AllocateBuffer - Tiler 2D buffers are not implemented and
a request for such a buffer was detected using nStride == LINUX_PAGE_SIZE
condition. But tiler 2d buffers are presently not used and hence, this
check is removed.
In case of PROXY_FreeBuffer - BufferDescriptorVirtual2D (always 2D) is
handled within the stride check. So the stride check was not required
as it does not coexist in 1D and 2D forms.
This patch will enable usecases that require 2D buffers of multiple
stride values. Previously, the filling of pAuxBuf1 was hampered by
the stride check.
Change-Id: I31a26442dc8401f18edf5cc23ed0e7697336c72c
Signed-off-by: Yordan Lilov <ylilov@mm-sol.com>
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For (un)registration of 2D ION, Gralloc buffers, multiple
calls from PROXY APIs were being made to RPC_(Un)RegisterBuffer
for each component of the buffer. To avoid this, all the buffer
type specific logic has been moved to (Un)Register APIs.
To facilitate this, the prototype of these APIs have been
changed accordingly.
Minor change:
Previously OMX_IOCPVRREGISTER was used to enable registration
implementation for gralloc buffers (to not affect REL DBs).
Now it can be replaced by ENABLE_GRALLOC_BUFFERS which is the
conventional macro within DOMX for compile time enablement of
gralloc buffers.
Change-Id: I90ac8e0eb350a53e4f9aff5ecaeb66b5598b6509
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In secure playback case, we dont map the ion buffers. We allocate
the buffer and perform ion share to share it across to other components.
In this case, we also need to close the fd inadditional to the existing
ion free call inorder to ensure that buffer gets released as otherwise
the reference count is still valid in ion driver and is not freed.
Change-Id: I621077e132af55ada2a5ab0c7f4a01ed7afc7d02
Signed-off-by: Prasanna Kumar M.R. <prasanna.kumarmr@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* simple alignment with Ducati instrumentation
+ OMX component index is added to component name to monitor
several instances in parallel, i.e. DECODE->DECODE0, H264E->H264E1
* 2 minor issues fixed:
+ cast timestamp to long long to avoid negative values after
2^32 us elapsed (1 hour testing)
+ strncpy does not put \0 at end of string in all cases
Change-Id: Ieb07d4900b5ac43295dc95328c4aef954be4f2e5
Signed-off-by: Frederic Turgis <f-turgis@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
In secure playback case, we dont map the ion buffers. When we pass
the Ion handle, the Rpmsg fails in buffer registration. Hence
we need to share the ion buffer and then pass it to Rpmsg/Ducati.
Change-Id: I2bea9323aa557d340c2a2c2d653fd5f0480160a4
Signed-off-by: Prasanna Kumar M.R. <prasanna.kumarmr@ti.com>
Ported-by: Bryan Buckley <bryan.buckley@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
trace
Added framework to control activation of perf trace:
- set DEBUG_DOMX_KPI_STATUS environment variable
- or set debug.domx.kpi_status android property. Env variable takes precedence
kpi_status is a bitfield to control enabling of various perf traces.
Currently only OMX buffers events are available with bitfield value of 1. It will
trace EmptyThisBuffer, FillThisBuffer, EmptyBufferDone, FillBufferDone.
It is aligned with Ducati equivalent trace. Enabling the 2 allows computing
MPU<->Ducati latency
Following parameters are included for each message:
- message type: ETB, FTB, EBD, FBD
- OMX component name: DECODE, H264E, CAMERA, ...
- number of such requests for this component
- time in us, from clock_gettime(CLOCK_MONOTONIC, ...)
- Remote buffer header to match Ducati trace
- FBD nTimeStamp metadata to identify an FBD buffer among framework SW layers
visual post-processing is described at
http://opbuwiki.dal.design.ti.com/index.php/Benelli-Ducati_performance_instrumentation
It is the same for MPU or Ducati trace
Example:
- setprop debug.domx.trace_level 3 (perf trace is trace level >= 3)
- setprop debug.domx.kpi_status 1
- logcat DOMX:D *:S
Change-Id: I3b8a996fb861ba84a9f96c98285a30209880423a
Signed-off-by: Frederic Turgis <f-turgis@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Profiling trace level introduced after WARN and before INFO levels
* Cleaning of trace level usage through enum
* "Trace level update" functionality called at every proxy common init
* Trace level can be updated through Android property debug.domx.trace_level.
Environment variable still has precedence over Android property
To modify trace level, do on terminal either:
- export TIMM_OSAL_TRACE_DEBUG_LEVEL=<trace level>
- setprop debug.domx.trace_level <trace level> (Android only)
For example setprop debug.domx.trace_level 3 to set PROFILING level
The new value is taken into account only at init of a new component.
Change-Id: I04de66a6160c11e9339a8f5a63ca0676755a17e0
Signed-off-by: Frederic Turgis <f-turgis@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ducati faulty state is determined by the following
inference condition:
if(status<0 && errno==ENXIO)
{
//ducati in faulty state
}
After write call, errno was checked in wrong manner.
Also, write call returns number of bytes written.
This patch checks errno in case of write call failure
and detects faulty state of ducati. And it uses
status == nPacketSize as a tighter condition to validate
write call success.
Change-Id: I2062e128c4754b0faef2c33ca9465129105ade0c
Signed-off-by: Vidhoon Viswanathan <vidhoon@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
By default Camera proxy and DOMX components uses ION 1D
heap for buffer allocation. For 512MB system configuration,
ION 1D heap maynot available. So use tiler 1D buffers as
fallback mechanism. Applicable for both 1GB and 512MB
configuration.
Change-Id: Iff9b264f13d03f99975c4ff9dce9d474edeac34c
Signed-off-by: Devaraj Rangasamy <dev@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
since some kernels do not support OMX_IOCPVRREGISTER, we are
making the compilation on whether or not it is defined.
If OMX_IOCPVRREGISTER is defined in FS but return ENOTTY, this
means that kernel support for this new ioctl has not been merged
yet.
Change-Id: I691a0ba53a53c443efa5341dae93f429f60705d0
Signed-off-by: Tyler Luu <tluu@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rpmsg_omx requires clients to register gralloc (sgx) buffers
using seperate ioctl (OMX_IOCPVRREGISTER). Handles received
from regsiter need to be released using OMX_IOCIONUNREGISTER
when done.
the exploit of passing ion handles is no longer supported directly
to rpmsg is no longer supported. rpmsg mappings will fail if handles
are not first registered.
Change-Id: I8d2bad7a9a6a7c34a96bef494d4327e988c78e8b
Signed-off-by: Tyler Luu <tluu@ti.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Moving choose buffer logic to the beginning of
AllocateBuffer so we can use it to index tBufList
array when saving ion handle information
Fixes an issue missed by "domx: fix video record"
Change-Id: Icf5ddcda8b2ffdc67f5ac337b4e7b683b90c053f
Signed-off-by: Tyler Luu <tluu@ti.com>
|
|
|
|
|
|
|
|
|
| |
Pass registered buffer address to RPC_FreeBuffer in
PROXY_FreeBuffer. rpmsg expects a registered address to
be passed to it when mapping is required.
Change-Id: I50abeaf5a7cfc31298832294648a0b8991cea3ad
Signed-off-by: Tyler Luu <tluu@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With cpcam kernel changes for rpmsg driver, rpmsg omx
is requiring all buffers be registered and unregistered
starting here: http://review.omapzoom.org/#/c/20916
Since encoders are using this little trick of dynamically
reassigning handles for each input buffer, we will need
to register/unregister the handles every ETB.
Change-Id: Iaefcd8d3ba56605edfc398814bdec9a6524fa196
Signed-off-by: Tyler Luu <tluu@ti.com>
|
|
|
|
|
|
|
|
|
| |
need to register/unregister ion and gralloc handles with
rpmsg before sending. this includes shared buffers used
in get/set config and parameters.
Change-Id: I23e4c09349c9c4f87c06b65e270b320dba9f0372
Signed-off-by: Tyler Luu <tluu@ti.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. For OMX_TI_IndexUseNativeBuffers, properly set gralloc
usage for false case. If client set this index to true,
a subsequent set to false was not being handled causing
domx to misintrepret handles.
2. For OMX_TI_IndexUseBufferDescriptor, RPC SetParameters
needs to be called so Ducati also knows about the
descriptor. This index was previously only being handled
internally.
Change-Id: I928dda6d5ae9b76682c3b60dce4375a1accf09e4
Signed-off-by: Tyler Luu <tluu@ti.com>
|
|
|
|
|
|
|
|
| |
This fixes the address passed from PROXY_FreeBuffer to RPC_FreeBuffer to be the same
that is passed to RPC_UseBuffer from PROXY_UseBuffer.
Change-Id: I8581ec7a6abfafcb8ef11dd360a6114ba4d704d2
Signed-off-by: Pavel Nedev <pnedev@mm-sol.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The buffer sent from RPC calls (UseBuffer, AllocateBuffer, FreeBuffer)
will get mapped to approriate space depending on the map type that is
set in the packet.
Even though a pBuffer was sent in the packet, the map type
(RPC_OMX_MAP_INFO_TYPE) was set to RPC_OMX_MAP_INFO_NONE.
This resulted in conversion not being done in rpmsg.
This patch sets the RPC_OMX_MAP_INFO_TYPE correctly in the
packet to RPC_OMX_MAP_INFO_ONE_BUF. With this rpmsg will
convert the pBuffer address to ducati side (tiler) address.
Change-Id: I722b618687e178817e2e8ffdb9670e7a5f54d5e9
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
|