summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-11-07Camera_test: Reprocessing related updatesEmilian Peev
- Disable stream capture when reprocess starts. This was causing a deadlock when trying to access the tap-out. - Allows picture format configuration during stream capture which is needed when the client needs to select a different one before reprocess. Change-Id: Ie94ed7ee03c5c21e4e5b56aa60479cddc51f5ce8 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Add mechanism to explicitly set image streamingVladimir Petrov
- Add ability to explicitly set image streaming mode on buffer source thread. Change-Id: I96ad1b7b2a72b4d4764b6fc292730de99e084bb6 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Add support for reprocessing with buffer bordersEmilian Peev
- The header of the processed buffer should be set correctly in order for the camera component to properly match the start of the valid data. Depends on frameworks/av change I788dd738: http://review.omapzoom.org/#/c/29677/ Depends on hardware/libhardware change Ie37ab311: http://review.omapzoom.org/#/c/29676/ Change-Id: I003b7cfae41ddf6bb46661e0803a4fb1b60a99e6 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Add error handling during frame callbacksEmilian Peev
- ST can be abandoned by the client, so we need to handle this case inside 'handleFrameCallback' without crashing. - 'freeBufferList()' should only release buffers associated with it. Change-Id: Ib052aa6a6c2b5cb495d4e8bcc804cd3a3b87c95f Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Further reprocess optimizationsEmilian Peev
- Image port was disabled twice. There is no need for that since this is done during 'stopImageCapture()'. - Re-configuring extra data on the image port during image capture stop seems unneeded as well. The extra data on this port is always configured during image capture start. - Omit vector shot and extra data configurations during reprocessing. Change-Id: I4d766fff581c8043b4cc436882a35f0a87731a3c Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Don't wait on preview frames during reprocessEmilian Peev
- Preview frame wait condition is adding around 30-40 ms. to the reprocess execution time and this doesn't seem to be required by Ducati. Change-Id: I3b708c9d395aa8b9d85cc0289a705b254a5e09a0 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Adds reprocess related PPMsEmilian Peev
Change-Id: I019247d8175ae46be307616ae2011938f0b604b1 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera: Set minimum undequeuable on tap-inVladimir Petrov
- Will set the minimum undequeuable count on tap-in instead of setting "1", which in most cases is incorrect value. Change-Id: I145b12f86d410415f6ed67a058392c89adb6d3c6 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: BQ: Always write cropped NV12Vladimir Petrov
- Write cropped NV12 regardless of offset to handle cases where image is cropped and both top and left are zero. Change-Id: Id8789b2d9745a67916295819303ba7fa399e8826 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Fixes crop handling, locking of buffersDavid Schleef
- SurfaceTextureMapper->lock() writes an array of pointers. Providing just one causes stack corruption with NV12 buffers. - Fixes handling of buffers with crop. Change-Id: Ie792a31bc034d49d13f0ed7384e480c1ab945c08 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: BQ: Add support for writing croppedTyler Luu
- Add support for writing cropped buffers in camera_test return from surface texture. Camera_test needs to calculate the crop rectangle from the transform matrix. Using the calculated values camera_test will write the buffer accordingly. Change-Id: I8884f06a98ddf404343424a4bec4a82a22dc01fe Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Improve performance when queuing shotsEmilian Peev
- When queued shot is running and parameters like tap-out/ins don't change we could skip some of the overhead involved in triggering image capture using the new shots. Change-Id: I9738ed0abbc266da0354c216f852bc2f8971d58c Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Fix back to back normal captureTyler Luu
- With new logic in startImageCapture we have to set the buffer as IDLE before signaling end image capture. Change-Id: Ica4d1c222f9ce5f3bef8ada7c3cb8e6ca306d8d5 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: OMX: Change shot queue flowTyler Luu
- Since flow through base camera adapter has changed to make call flow for accumulating shots similar to regular capture, OMX capture needs to change it's slow a bit. We should be accumlating burst counters in UseBuffer and go through whole list of buffers trying to find an IDLE one when starting capture. Change-Id: I91bebbb176d29504631095b29ce2a15a44b79f39 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Init capture reference count logic to derived adaptersTyler Luu
- Moving initializing for capture reference count to derived adapters since useBuffers call for capture is going to called queuing shots as well. - This patch needs to include V4L adapter before merging on mainline. Change-Id: Ifc4986a68173234ec636ef943b62009f7df1e041 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Change state machine flow for queuing shotsTyler Luu
- Instead of having to have CameraHal deal with logic to queue shots, move the code flow to state machine and respective camera adapters, so they can interally handle it. Now call flow for queuing shots and regular capture should be the same from CameraHal perspective. Change-Id: I9a74008aeaabc8dd169c78f6a85201f50580d25c Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Avoid deadlocks when re-using a tapoutEmilian Peev
- Locking inside 'takePicture()' is sometimes possible when re-using the same SurfaceTexture. This is due to the blocking nature of the dequeue call inside 'BufferSourceAdapter::handleFrameReturn()' which does acquire 'mLock' upon entering. The solution is to handle this particular case by reusing the buffers that were previously allocated and avoiding any calls to the Adapter which might try to lock 'mLock'. Change-Id: I6c4e49fd84df2659c0466b6f89c88916f93a6b8d Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Fix erroneous free of image buffersTyler Luu
- We were freeing image buffers erroneously when camera adapter called freeImageBufs during the buffer size query call after we already cleared mBufferSourceAdapter_Out. This caused freeImageBufs to take an incorrect path. - When trying to figure out number of tap out buffers to allocate, use NO_BUFFERS_IMAGE_CAPTURE_SYSTEM_HEAP as the default when tap out hasn't been configured yet. Change-Id: I045ef357578c7eafd12fef58ef50542a711c8233 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Allocate buffers when source is setTyler Luu
- Allocate the buffers for a particular surface when it is set. This allows applications to set multiple surfaces before capturing or reprocessing, so they don't have to take the penalty of buffer allocation during. - Partialy revert change I0c1b8854. Depends on hardware/libhardware change I01831e05: http://review.omapzoom.org/#/c/28152/ Change-Id: I13aa2b19387e2a21f8ca08203b132154c14d481b Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Changes to NV12 and BAYER allocationTyler Luu
Adapting NV12 and BAYER system heap allocations to gralloc changes. - NV12-1D format is no longer supported. Instead, we are using existing NV12 format with the GRALLOC_USAGE_PRIVATE_0 usage flag to signal to gralloc we want allocations to come from the system heap. The same flag we are using for BAYER format also. Change-Id: Id47a8da1a5c0bde6e39125a8e0f243386cadabd5 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHAL : Fix crash if IPP not set by defaultAndriy Chepurnyy
Fix crash if IPP not set by default Change-Id: I329f3bf49fef2db2ec136e7755c27a01bcab373f Signed-off-by: Andriy Chepurnyy <x0155536@ti.com>
2012-11-07CameraHal: V4LCameraAdapter: Add support for MJPEGAnu Sundararajan
USBCameras support higher resolutions(above VGA) in MJPEG format only. V4LCameraAdapter has been modified to use MJPEG as the default pixel format. The incoming jpeg frames are decoded(into NV12) using libjpeg and then sent for rendering. Change-Id: Ie7f62abd7a7fad3bc1f01e048fe8f17f67890301 Signed-off-by: Saravanan Solaiyappan <saravanan.s@ti.com> Signed-off-by: Andriy Chepurnyy <x0155536@ti.com> Signed-off-by: Anu Sundararajan <sanuradha@ti.com>
2012-11-07V4LCameraAdapter: Adding support for JPEG decoding using libjpegAnu Sundararajan
Most of the USBCameras support higher resolutions in MJPEG format only. To decode MJPEG frames, this patch adds support for libjpeg. Change-Id: Ifef19a16fddcc8bd56894ed67829f76a63e86a97 Signed-off-by: Saravanan Solaiyappan <saravanan.s@ti.com> Signed-off-by: Andriy Chepurnyy <x0155536@ti.com> Signed-off-by: Anu Sundararajan <sanuradha@ti.com>
2012-11-07CameraHal: Image size query in initialized stateTyler Luu
- Do not allow image buffer size query while in initialized state. OMXCameraAdapter doesn't support this... Change-Id: Id66ce67f5cb3667ce883c0ebbd482e958146be08 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Set SurfaceTexture flags correctlyDavid Schleef
- To write to a buffer, one needs WRITE_OFTEN. Change-Id: I44ade4551c5f133960e51e7cd540c3a9adf57da4 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Use GRALLOC_USAGE_PRIVATE_0 for BayerVladimir Petrov
- In Bayer format set GRALLOC_USAGE_PRIVATE_0 usage flag to the graphics buffer allocator. Change-Id: I629803110ec6f18cc824c75c6d81450bb108dcff Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Add support to release tap in/outsVladimir Petrov
- Tell Camera hardware to release buffer sources befor sestroying them. Change-Id: I2a7e1c801516b14c9277a415d377131cc4443f6a Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Re-arrange creation of buffer sourcesVladimir Petrov
- The buffer source adapters should be re-created if changed some parameters. Change-Id: Ifd9e2c406adf8fbab11dcb530b87a8d01e490341 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Pre-set buffer sourceTyler Luu
- Change camera_test to pre-set all buffer sources during start preview instead of during takePicture/reprocess. - Omit pre-setting tap-in/-outs if the client doesn't use raw picture format. Depends on frameworks/native change I20c0f4a8: http://review.omapzoom.org/#/c/28901/ Change-Id: I8c0d29ffc5b21c56a2d79bc80cab910f55c7ca21 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Check return frames count before waiting on conditionEmilian Peev
- The Thread responsible for retrieving free buffers from the tapout is possible to miss some incoming signals and wait while buffers are available in the ST. Solution is to count all outgoing buffers and not wait on the condition when buffers are available. Change-Id: I31526dd334a08f52f0c6069cea847ae14e2cffbc Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Camera_test: Set burst frames for streamingVladimir Petrov
- Will set burst frames to "1" if missing. Change-Id: I3bf79a9d477b1e9a407b98b790258b85735655c0 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07CameraHal: Always set queued shot config in CPCAM modeVladimir Petrov
- Fixed deadlock in the case when application has ommiting to set shot parameters with any bracketing configuration in CPCAM mode. Should handle properly single shot and burst shot. Change-Id: I4f3e2b4ee5bc0aa9072d03da6f9edc4ba86253d8 Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
2012-11-07Bring test/CameraHal in sync with the camera HAL code we imported from TIJason Simmons
Keeping these two directories in sync will make it simpler to integrate future TI camera HAL patches. Change-Id: If9d01c214548acf4560936a802c75c046755102e
2012-11-07Fix error handling in caps queryNick Sanders
Framerate and resolution queries to V4L2 may return different formats or may not be specified. Avoid accessing the data before validating the return code, and avoid corrupt data on unusual formats. Change-Id: I525935192f36c635cbab8abc8d446a9c84812dae
2012-10-25Increase the limit of large DSS-composited layers to 2Jason Simmons
TI says that the limit of 1 large layer may be obsolete in the current kernel Change-Id: I6949079ccff6d8be03b055188c90e33f550746f6
2012-10-23Snapshot of TI's camera HAL development with adjustments to build in our treeJason Simmons
The head of TI's hardware/ti/omap4xxx/camera repository at the time of the snapshot was: commit 4447eaef6dc757aecab869054460ae87848e575e Author: Vladimir Petrov <vppetrov@mm-sol.com> Date: Thu Aug 16 19:13:03 2012 +0300 CameraHal: Add support to release tap in/outs Change-Id: Ia6bfefb427fe171067eddcab6d896683ff2d149f
2012-10-23Use SGX composition if there is more than one large (>720p) RGB32 layerJason Simmons
A previous change (fc13c9292160e3eb83fe5b4f191d1ccee2fd67d9) updated the HWC to skip any large layer other than the first. However, the logic in can_dss_render_all did not know about this rule. If there is more than one large layer, can_dss_render_all would select DSS-only composition, but some of the large layers would not be rendered. Change-Id: I03718fcf25f6bc57b43f6d39546e50e8a9d6fde9
2012-10-22Fix warnings due to updated definitions of hwc_* types in the HWC HAL interfaceJason Simmons
Change-Id: I8954125e75c1f0ee469ec035ebe0376139aef1e9
2012-10-22hwc: rgz: Fix using an invalid array index when there are no blitsGustavo Diaz Prado
When the regionizer decides there are no blits as a result of a given hwc geometry a -1 array index was being used to set the last blit async, this needs to be avoided if there are no blits. Change-Id: I3ce2f60a46096559c2ba308cf1d617a79731751e Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit 8d486cd705ffc33d6048880189e16fed387338fd)
2012-10-22hwc: Fix for losing first blit buffer handleGustavo Diaz Prado
There are certain situations where the regionizer decides it can handle all layers passed to it and no blits are generated as a result. This is caused by receiving more than two times the same geometry in the prepare, which makes the regionizer to not generate dirty regions (hence no blits). When this situation happens we are losing the first blit handle by assigning it to NULL incorrectly. This patch fixes the issue by checking if the sgx will be used for composition instead of checking if we have no blits. Change-Id: I68e87c386c98a8ca5047e1723c6c43db7c143447 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit ac81898f605ba0a6b5359de4d6565c61fcc3a36a)
2012-10-22hwc: rgz: Fix incorrect src rectangle calculation for scaled layersGustavo Diaz Prado
When scaling a layer, the blit is programmed in a way where the src rectangle uses the whole cropping rectangle coordinates and dimensions. However if the layer has a transform, the width and the height need to be swapped not only in the geometry but also in the src rectangle to match the new dimensions. This patch adds the missing width and height swapping for the src rectangle if the transformation is 90 or 270 degrees. Change-Id: Ia9d822b6698210573fff662f2fcb129dfc048bf7 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit a80084da8fb2c63a2e44ef9d4ce7598b7cad853f)
2012-10-22hwc: rgz: Allow scaling and rotation on the same blitGustavo Diaz Prado
Allow blitting layers that have scaling and a transformation now that the GC driver supports it. Change-Id: Iee5a34dc888656c47b3b514597b75868ccdc008a Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit c195634f79fb5a49b0caa33a4f9605a3aa40efe2)
2012-10-22hwc: rgz: Introduce scaling supportGustavo Diaz Prado
Adds scaling support to the regionizer code. Limitations: + When blending two layers with scaling two blits are issued instead of one. This is due to a Bltsville API limitation which prevents specifying two different scale modes for each source. + Support for scaling and rotation on the same blit is not possible yet due to a GC driver bug. Change-Id: Ie53157e527dacf639e42a72e371ef962f888131c Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit ad4ba4604f3f9bafed27c83b3c0a49d8731dddd7)
2012-10-22hwc: rgz: Refactor how the blit parameters are setGustavo Diaz Prado
This patch basically refactors the way the blit parameters are set per subregion. The intention is to make the code ready to introduce the scaling support easier and reduce greatly redundant code as well Change-Id: I2b32056bf2fec1b636fda1c8df9964d90d51192c Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit d8cd439184093184b21291c37702b3eb7c9c836b)
2012-10-22hwc: Check for >1 overlay used in idle timeoutTony Lofthouse
It was observed during ADTF runs than we get repeated redraws when there are no layers to render. This is because the check in prepare() will reset force_sgx to 0 when there are 1 or less layers. The side effect of this is to cause a redraw every idle period. Instead of doing this, account for the number of overlays used for the primary display before calling the invalidate() api. This logic should be satisfactory most current usecases. Change-Id: I4b9cb44ebe250a6a46a6da27a1db94e88d6f26f3 Signed-off-by: Tony Lofthouse <a0741364@ti.com> (cherry picked from commit c044e832219dd2aa81ae11e4ec883d09bf2fb885)
2012-10-22hwc: Fix incorrect tiler memory available checkGustavo Diaz Prado
When the buffers composed with DSS pipes use exactly the tiler1d memory available (like 4 fullscreen layers on Tablet 2), the prepare operation fails to assign a DSS pipe to the last buffer (even if it was possible) making it to be rendered by the GPU but without a pipe to show it. This patch fixes the incorrect memory check that caused this problem. Change-Id: Ibb147a468aa2e1622600a56f581013dc1e517777 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> Signed-off-by: Jonas Larsson <jonas.larsson@ti.com> (cherry picked from commit a9606e762f54eb433880561548d0cb4498a3951e)
2012-10-22hwc: Stop queuing compositions to disabled default displayDandawate Saket
When HDMI is the default screen it may not be attached even though the UI is active. UI compositions will keep coming but the DSS manager will have problems if being programmed with content incompatible with the intermediate display mode. The last_mode variable is reset to "0" when hdmi panel is not present. The on_tv variable indicates hdmi is default panel. So if both are set then we need to make the overlay number in composition to be "0". OMAPLFB will skip posting the composition to dss driver when overlay as "0". There are still possibly compositions in the DSSCOMP queue or in flight from PVR services to OMAPLFB so this behavior doesn't cover all cases - so this should be considered a work-around. kernel dependency: http://review.omapzoom.org/#/c/26982/ Change-Id: Idb6864aa57ebf6c403b91ea5b0e0865467008934 Signed-off-by: Dandawate Saket <dsaket@ti.com> Signed-off-by: Tony Lofthouse <tony.lofthouse@ti.com> (cherry picked from commit a4a35a6efdf146cad32d76e6e07327a983cec6a1)
2012-10-22hwc: rgz: Workaround, do not blit if there is a video layerGustavo Diaz Prado
This is a workaround for a performance degradation found while a video is playing and the GC320 is used at the same time. Avoid blitting if there is a NV12 layer in the hwc layer list. Change-Id: I12e789b9dd95e8b0d435aac1ae67ff65d4511396 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> (cherry picked from commit 52aa03dd27808e773f2133910ae233a1e4d42106)
2012-10-22hwc: HACK: wuxga panels will generate unscalable layersTony Lofthouse
During the transition from the recents panel to a selected application during the transition a layer which requires a scale down from 1920x1200 to 594x361 is generated. This satisfies the normal limits but with buffers of this size and also blending another 1920x1200 framebuffer. A VID1 underflow occurs. This work-around avoids scaling when layers are wider than 720p and are 4 byte RGB. These conditions have been reproduced in isolation with ADTF. Change-Id: If8fbc8f639abb89a0d736a3beabd2c12312ac3ac Signed-off-by: Tony Lofthouse <a0741364@ti.com> (cherry picked from commit 9e71cf37889ee95d03a1ad200741752b5efa4b43)
2012-10-22hwc: Add a bits per pixel function for RGB color spaceTony Lofthouse
Change-Id: I12d286ffe12c18bc9159a9bd1df65db43b63ac05 Signed-off-by: Tony Lofthouse <a0741364@ti.com> (cherry picked from commit d98182ec972e6083daec80f2271d2678abcc7b28)