22 months agoMerge pull request #1 in PSDKLA/omapdrmtest from GFXFORK/eric-omapdrmtest:bugfix... master
Gowtham Tammana [Thu, 14 Nov 2019 21:27:47 +0000 (15:27 -0600)]
Merge pull request #1 in PSDKLA/omapdrmtest from GFXFORK/eric-omapdrmtest:bugfix/a0850410/support-mesa-egl to master

* commit 'c287ddf9a8346ff5d18df7ab70cfd7bc438b62e5':
  util: update LDFLAGS for Mesa-based EGL

22 months agoutil: update LDFLAGS for Mesa-based EGL
Eric Ruei [Mon, 28 Oct 2019 13:43:47 +0000 (09:43 -0400)]
util: update LDFLAGS for Mesa-based EGL

- replace pvr_wlegl with wayland-egl

Signed-off-by: Eric Ruei <>
2 years agodisplay-kmscube: Add support for UYVY texture
Ramprasad N [Wed, 26 Sep 2018 09:17:37 +0000 (14:47 +0530)]
display-kmscube: Add support for UYVY texture

eglCreateImageKHR with EGL_LINUX_DMA_BUF_EXT attr supports
NV12 and YUYV formats. Add support for UYVY format.

Signed-off-by: Ramprasad N <>
3 years agoYUVRGBdisplay:Add application to display uyvy
Prasad, Ram [Wed, 10 May 2017 17:09:35 +0000 (17:09 +0000)]
YUVRGBdisplay:Add application to display uyvy

There is no IP in dra7x, am57x that generates uyvy data. To display this format
buffers with wayland , a file based application is added.
YUVRGBdisplay application reads one frame of raw YUV data at a time from a file
and submits to display.
The formats tested with this application are nv12, yuyv, uyvy and abgr32.
This application expects width, height and colorformat of raw file as arguments.

Examples to test this application

Displaying a yuyv file with kms
YUVRGBdisplay -s 32:1920x1080 yuyv_720x480.raw -W 720 -H 480 -c yuyv

Displaying a uyvy file with wayland backend
YUVRGBdisplay -w 1920x1080 uyvy_640x480.raw -W 640 -H 480 -c uyvy

Displaying a NV12 file with kmscube backend
YUVRGBdisplay --kmscube --connector 32 nv12_352x288.raw -W 352 -H 288 -c nv12

Displaying a ABGR32 file with wayland backend
YUVRGBdisplay -w 1280x800 argb32_1920x1080.raw -W 1920 -H 1080 -c abgr32

Signed-off-by: Ramprasad N <>
3 years agodisplay-wayland: Add UYVY buffers support
Ramprasad N [Wed, 4 Jul 2018 10:50:17 +0000 (16:20 +0530)]
display-wayland: Add UYVY buffers support

UYVY buffers are supported as textures.

Signed-off-by: Ramprasad N <>
3 years agodisplay-wayland: Replace scaler with viewporter
Prasad, Ram [Tue, 5 Jun 2018 17:36:30 +0000 (17:36 +0000)]
display-wayland: Replace scaler with viewporter

scaler protocol is no more supported with wayland-protocols
and has been replaced with viewporter protocols

Signed-off-by: Ramprasad N <>
3 years agoAndroid: fix build issue with Android O
Vishal Mahaveer [Thu, 25 Jan 2018 21:51:16 +0000 (21:51 +0000)]
Android: fix build issue with Android O

Include header file needed for major/minor function
calls in Android O.

Signed-off-by: Vishal Mahaveer <>
Signed-off-by: Nikhil Devshatwar <>
4 years agoviddec3test: dce_buf_lock & unlock of OutBuf_fd
Amai Prashanth Kumar [Tue, 12 Sep 2017 12:59:15 +0000 (12:59 +0000)]
viddec3test: dce_buf_lock & unlock of OutBuf_fd

Earlier the dce_buf_lock and dce_buf_unlock
for OutBuf_fd was done based on eof flag.
Resulting memory leak during long run.
This patch handles the buffer locking &
unlocking properly. Along with code cleanup.

Signed-off-by: Amai Prashanth Kumar <>
Signed-off-by: Karthik Ramanan <>
4 years agodisplay-wayland: enable cropping support
Subhajit Paul [Tue, 12 Sep 2017 12:27:10 +0000 (12:27 +0000)]
display-wayland: enable cropping support

On Wayland, the video was displayed along
with the padded region resulting green-strip
in edges. This patch will crop the padded
region being displayed.

Signed-off-by: Subhajit Paul <>
Signed-off-by: Amai Prashanth Kumar <>
4 years agoviddec3test: fixed --inloop Segmentation fault issue.
Amai Prashanth Kumar [Thu, 7 Sep 2017 16:24:16 +0000 (16:24 +0000)]
viddec3test: fixed --inloop Segmentation fault issue.

Signed-off-by: Amai Prashanth Kumar <>
Signed-off-by: Karthik Ramanan <>
4 years agoviddec3test:Handling outBufsInUseFlag for interlaced contents
Prasad, Ram [Thu, 7 Sep 2017 15:25:14 +0000 (15:25 +0000)]
viddec3test:Handling outBufsInUseFlag for interlaced contents

When outBufsInUseFlag is set in case of  interlaced
streams, for second field decoding, new output buffer
should not be sent but the buffer which was sent for first
field decoding needs to be sent.
Thsi patch takes care of this issue.

Signed-off-by: Ramprasad N <>
4 years agoviddec3test: Set correct padding width height for MPEG4
Ramprasad N [Wed, 26 Jul 2017 04:39:46 +0000 (10:09 +0530)]
viddec3test: Set correct padding width height for MPEG4

Signed-off-by: Ramprasad N <>
Signed-off-by: Karthik Ramanan <>
4 years agov4l2: Make sure v4l2_format stack variable is initialized
Benoit Parrot [Mon, 24 Jul 2017 19:23:10 +0000 (19:23 +0000)]
v4l2: Make sure v4l2_format stack variable is initialized

When using v4l2_format variable allocated on the stack make
sure it is zeroed-out to prevent unexpected behavior.

Signed-off-by: Benoit Parrot <>
4 years agocapturevpedisplay: Use single plane for input format
Benoit Parrot [Mon, 24 Jul 2017 19:23:09 +0000 (19:23 +0000)]
capturevpedisplay: Use single plane for input format

As VIP cannot handle multiplane buffer make sure that the shared
buffers are allocated as single plane entities.
The VPE output buffers can be set to use muliplane buffers as needed.

Signed-off-by: Benoit Parrot <>
4 years agovpe-common: Use single plane buffer for NV12 by default
Benoit Parrot [Mon, 24 Jul 2017 19:23:08 +0000 (19:23 +0000)]
vpe-common: Use single plane buffer for NV12 by default

Signed-off-by: Benoit Parrot <>
4 years agocapturevpedisplay: Use single plane buffer by default
Benoit Parrot [Mon, 24 Jul 2017 19:23:07 +0000 (19:23 +0000)]
capturevpedisplay: Use single plane buffer by default

Signed-off-by: Benoit Parrot <>
4 years agovpe: Remove unnecessary G_FMT call
Benoit Parrot [Mon, 24 Jul 2017 19:23:06 +0000 (19:23 +0000)]
vpe: Remove unnecessary G_FMT call

Remove superfluous G_FMT call prior to calling S_FMT as it would
force to manually zero out returned parameter value we don't need.
Using S_FMT and specifying only what we need should yield acceptable
default values for the part we don't care about.

This is standard v4l2 behavior.

Signed-off-by: Benoit Parrot <>
4 years agodmabuftest: Fix spacing and compile warning
Benoit Parrot [Mon, 24 Jul 2017 19:23:05 +0000 (19:23 +0000)]
dmabuftest: Fix spacing and compile warning

Signed-off-by: Benoit Parrot <>
4 years agocaturevpedisplay: Fix compile warning
Benoit Parrot [Mon, 24 Jul 2017 19:23:04 +0000 (19:23 +0000)]
caturevpedisplay: Fix compile warning

Signed-off-by: Benoit Parrot <>
4 years agofilevpedisplay: Fix compile warning
Benoit Parrot [Mon, 24 Jul 2017 19:23:03 +0000 (19:23 +0000)]
filevpedisplay: Fix compile warning

Signed-off-by: Benoit Parrot <>
4 years agov4l2: Fix white-space issue and compile warning
Benoit Parrot [Mon, 24 Jul 2017 19:23:02 +0000 (19:23 +0000)]
v4l2: Fix white-space issue and compile warning

Signed-off-by: Benoit Parrot <>
4 years agovpe-common: Fix white-space issue and compile warning
Benoit Parrot [Mon, 24 Jul 2017 19:23:01 +0000 (19:23 +0000)]
vpe-common: Fix white-space issue and compile warning

Signed-off-by: Benoit Parrot <>
4 years agodisplay-kms: Fix compile warning
Benoit Parrot [Mon, 24 Jul 2017 19:23:00 +0000 (19:23 +0000)]
display-kms: Fix compile warning

Signed-off-by: Benoit Parrot <>
4 years agovpe-common: Disable crop
Benoit Parrot [Mon, 24 Jul 2017 19:22:59 +0000 (19:22 +0000)]
vpe-common: Disable crop

With VPE the CROP IOCTL has been deprecated for a while now.
And here it is not need so removing it.

Signed-off-by: Benoit Parrot <>
4 years agodisplay-kms: Call SetCrtc at init time
Nikhil Devshatwar [Thu, 4 May 2017 09:38:01 +0000 (15:08 +0530)]
display-kms: Call SetCrtc at init time

Some monitors have a preferred mode which can be different than
the application selected mode.
It might be the case the selected mode is not
It is expected that the DRM application should set the right mode
before starting to use any of the planes.

Make sure that the display-kms backend sets up the right mode by
calling setCrtc before using any of the planes.
This is done by allocating a buffer and calling post_buffer as part
of the init hook.

Fixes: LCPD-9401
Signed-off-by: Nikhil Devshatwar <>
4 years agodisplay-kmscube: Add support for RGB texture
Ramprasad N [Thu, 4 May 2017 07:46:11 +0000 (13:16 +0530)]
display-kmscube: Add support for RGB texture

For RGB as texture on kmscube, gbm_bo import from
a dmabuf-fd is required. This is followed by creating
eglImage with EGL_NATIVE_PIXMAP_KHR as target.

To demonstrate this feature filevpedisplay can be used

filevpesiplay airshow_p352x288.yuv 352 288 nv12 720 480 abgr32 0 0 352 288 0 1
 --kmscube --connector 36 --fps 10

vpe output with is added as texture on kmscube.

Signed-off-by: Ramprasad N <>
4 years agofilevpedisplay: Change argument numbers for kmscube support
Ramprasad N [Thu, 4 May 2017 06:43:32 +0000 (12:13 +0530)]
filevpedisplay: Change argument numbers for kmscube support

filevpedisplay expects exactly 16 arguments. To test
filevpedisplay with kmscube as backend arguments required is
more than 16. Added check to return error if arguments are less
than 16.

Added changes to scale vpe output to display resolution.
If the vpe output resolution is greater than display resolution, then it
resulted in failure with kernel backtraces.

Also added code to SetCrtc first before SetPlane to avoid failure with
kernel backtraces.

Signed-off-by: Ramprasad N <>
4 years agodisplay-wayland:Create a thread to dispatch events
Ramprasad N [Thu, 4 May 2017 10:32:01 +0000 (16:02 +0530)]
display-wayland:Create a thread to dispatch events

Dispatching events to queue happens in a different thread.

With earlier approach, dispatch blocks from starting next
frame rendering until frame-sync callback for current
frame comes.

Signed-off-by: Ramprasad N <>
4 years agodisplay-wayland: Add frame-listener and dispatch
Ramprasad N [Mon, 24 Apr 2017 11:38:49 +0000 (17:08 +0530)]
display-wayland: Add frame-listener and dispatch

When dmabuftest or viddec3test with wayland-backend is run infinitely, after few minutes
application halts and prints "Broken pipe" error.
The reason for this issue is when client draws and sends events much faster
than server,it results in even queue overflows and when this happens
connection between client and server closes.
With dispatch and frame_listener makes sure synchronization between client and server.
Client can render next frame only after previous frame is displayed
and main queue will never overflow.

Signed-off-by: Ramprasad N <>
4 years also check for libavcodec library
Denys Dmytriyenko [Thu, 17 Nov 2016 00:52:36 +0000 (19:52 -0500)] also check for libavcodec library

Required for av_bitstream_filter_close and such.

Signed-off-by: Denys Dmytriyenko <>
4 years agodisplay-kms and display-kmscube: handle usecase where display is disabled [Tue, 7 Feb 2017 03:58:21 +0000 (03:58 +0000)]
display-kms and display-kmscube: handle usecase where display is disabled

In some usecases HDMI is connected but is disabled by default.
In such scenario, connector->encoder_id and encoder->crtc_id
may be 0. This patch iterates over all possible encoders and
CRTCs to find and store the encoder and CRTC accordingly.

Signed-off-by: Eric Ruei <>
4 years agoviddec3test:Window position setting no more supported with weston
Ramprasad N [Fri, 25 Nov 2016 11:34:59 +0000 (17:04 +0530)]
viddec3test:Window position setting no more supported with weston

Signed-off-by: Ramprasad N <>
4 years agoviddec3test:fd is initialized in display-wayland
Ramprasad N [Fri, 25 Nov 2016 11:32:17 +0000 (17:02 +0530)]
viddec3test:fd is initialized in display-wayland

Signed-off-by: Ramprasad N <>
4 years agodisplay-kmscube: refined to use dma-buf import feature
Subhajit Paul [Thu, 15 Sep 2016 14:11:30 +0000 (19:41 +0530)]
display-kmscube: refined to use dma-buf import feature

Signed-off-by: Subhajit Paul <>
4 years agoRevert "configure: disable kmscube"
Subhajit Paul [Fri, 4 Nov 2016 06:59:25 +0000 (12:29 +0530)]
Revert "configure: disable kmscube"

Enabled YUV video import as EGLImage feature. Re-enabling kmscube

This reverts commit 9c2c714ab7f75a829faa3bec0e5b25a158946819.

4 years agovidenc2test: add JPEG encoder
Gou, Hongmei [Wed, 9 Nov 2016 03:56:29 +0000 (03:56 +0000)]
videnc2test: add JPEG encoder

Signed-off-by: Hongmei Gou <>
4 years agoMakefile: Fix libraries link order.
Karthik Ramanan [Mon, 31 Oct 2016 09:56:42 +0000 (15:26 +0530)]
Makefile: Fix libraries link order.

On Poky based builds, without this change, it results in the following error:

undefined reference to symbol 'av_bitstream_filter_init@@LIBAVCODEC_54'

Signed-off-by: Karthik Ramanan <>
4 years agoviddec3test: Fix dual decode Segfault in prerolling
Pooja Prajod [Fri, 30 Sep 2016 14:35:49 +0000 (20:05 +0530)]
viddec3test: Fix dual decode Segfault in prerolling

avFormatContext cannot be static according to new API usage.
Make it local variable to avoid segfaults in multiple
decode usecase.

Signed-off-by: Pooja Prajod <>
4 years agoAdd signal handler for viddec3test and videnc2test
Pooja Prajod [Thu, 29 Sep 2016 15:00:22 +0000 (20:30 +0530)]
Add signal handler for viddec3test and videnc2test

This patch adds a signal handler for SIGINT signal.
This is a sample handler which can be extended further.

Signed-off-by: Pooja Prajod <>
5 years agodmabuftest: Fix latency profiling using monotonic time
Nikhil Devshatwar [Wed, 7 Sep 2016 06:47:19 +0000 (12:17 +0530)]
dmabuftest: Fix latency profiling using monotonic time

V4L2 driver uses monotonic timestamp to report the frame capture
time. While the application is using system time to calculate the

Due to this, the latencies reported with '--debug' option are too high.
Fix this by using monotonic timestamp for comparison.

Signed-off-by: Nikhil Devshatwar <>
5 years agoAndroid: add initial support for Android build
Vishal Mahaveer [Sat, 2 Jul 2016 02:54:32 +0000 (21:54 -0500)]
Android: add initial support for Android build

Add support for building dmabuftest and v4l2capturedisplay with
Android build system.

Signed-off-by: Vishal Mahaveer <>
5 years agodemux: fix segmentation fault with avformat_close_input
Karthik Ramanan [Tue, 24 May 2016 11:44:43 +0000 (17:14 +0530)]
demux: fix segmentation fault with avformat_close_input

Signed-off-by: Karthik Ramanan <>
5 years agodisplay-wayland: Add scaler interface
Nikhil Devshatwar [Tue, 17 May 2016 13:43:10 +0000 (19:13 +0530)]
display-wayland: Add scaler interface

Add the missing scaler protocol and interface files.
These are useful for scaling video buffers while
displaying in the wayland client.

Fixes: b9447df8eb "display-wayland: Wayland backend implementation"
Signed-off-by: Nikhil Devshatwar <>
5 years agoutil/viddec3test: Update use of deprecated APIs and enums
Karthik Ramanan [Tue, 17 May 2016 10:54:52 +0000 (16:24 +0530)]
util/viddec3test: Update use of deprecated APIs and enums

Signed-off-by: Karthik Ramanan <>
5 years agoutil/demux: update use of deprecated API
Denys Dmytriyenko [Fri, 11 Sep 2015 16:57:56 +0000 (12:57 -0400)]
util/demux: update use of deprecated API

Signed-off-by: Denys Dmytriyenko <>
5 years agoconfigure: disable kmscube
Anand Balagopalakrishnan [Sun, 24 Jan 2016 08:46:10 +0000 (14:16 +0530)]
configure: disable kmscube

kmscube support requires proprietary EGL extensions EGL_RAW_VIDEO_TI_DMABUF
which is not supported in DDK 1.14.

Future versions of DDK will support the standard EGL extension
EXT_image_dma_buf_import which is ratified by Khronos. This will require
corresponding changes to the application.

Till then, disable kmscube in omapdrmtest.

Signed-off-by: Anand Balagopalakrishnan <>
5 years agodisplay-wayland: Wayland backend implementation
Nikhil Devshatwar [Wed, 9 Sep 2015 08:54:01 +0000 (14:24 +0530)]
display-wayland: Wayland backend implementation

Add new backend for the display interface.
Add the drm client protocol and client protocol files
* Use omap_bo to allocate video buffers
* Use wl_drm_create(_planar)_buffer APIs for wayland buffers
Update the Makefile and dependencies
Add the viewport to scale based on -w SIZE

Signed-off-by: Nikhil Devshatwar <>
5 years agodisplay-kms: Add no master support
Nikhil Devshatwar [Tue, 12 Apr 2016 09:15:21 +0000 (14:45 +0530)]
display-kms: Add no master support

Signed-off-by: Nikhil Devshatwar <>
5 years agoAdd more checks to detect certain process call errors and exit
Pooja Prajod [Thu, 11 Feb 2016 11:48:58 +0000 (17:18 +0530)]
Add more checks to detect certain process call errors and exit

application needs to free the resources and exit.

Signed-off-by: Pooja Prajod <>
6 years agoviddec3test: move a global variable to demux structure
Harinarayan Bhatta [Mon, 24 Aug 2015 11:04:05 +0000 (16:34 +0530)]
viddec3test: move a global variable to demux structure

Fixes a failure in dual-decode case.

Signed-off-by: Harinarayan Bhatta <>
6 years agovpe: Correct the colorspace field
Nikhil Devshatwar [Mon, 3 Aug 2015 05:08:19 +0000 (10:38 +0530)]
vpe: Correct the colorspace field

Correct the colorspace field
Fix the build error
Fixes: (562a2c8d "vpe: Pass correct colorspace to s_fmt ioctl")

Signed-off-by: Nikhil Devshatwar <>
6 years agodisplay-kmscube: fix race condition for buffer to face mapping
Nikhil Devshatwar [Mon, 27 Jul 2015 13:32:40 +0000 (19:02 +0530)]
display-kmscube: fix race condition for buffer to face mapping

When disp_get_vid_buffers is called, all the buffers allocated in
one such call are grouped and are assigned a face number.
Any of these buffers will always be rendered on this face.

This function is not reentrant as it uses the num_face field of disp.
Because of this, if two of these functions are being executed in parallel,
sometimes, buffers in pool get assigned a different face number.

Because of this, randomly a buffer for some other face gets rendered
causing flicker.

Protect the function with the mutex lock so that the buffer to face number
allocation is done correctly, hence avoiding the flicker.

Signed-off-by: Nikhil Devshatwar <>
6 years agovpe: Pass correct colorspace to s_fmt ioctl
Nikhil Devshatwar [Mon, 3 Aug 2015 04:52:45 +0000 (10:22 +0530)]
vpe: Pass correct colorspace to s_fmt ioctl

Without passing correct colorspace, the RGB formats will not work.
This would lead to image corruption when displaying in the RGB format.
The colorspace is derived from the fourcc, but not passed to the s_fmt ioctl.
Correct this.

Signed-off-by: Nikhil Devshatwar <>
6 years agodmabuftest: Use single planar buffers
Nikhil Devshatwar [Wed, 26 Nov 2014 09:03:50 +0000 (14:33 +0530)]
dmabuftest: Use single planar buffers

VIP driver does not support multiplanar buffers.
For NV12 format, UV plane is assumed to be contiguous
with the Y plane.

Therefore, use all the single planar buffers
So that DRM also allocates single planar and VIP can consume them
for NV12 capture.

Signed-off-by: Nikhil Devshatwar <>
6 years agocapturevpedisplay: Request interlaced capture and pass field ids
Nikhil Devshatwar [Wed, 5 Nov 2014 09:30:48 +0000 (15:00 +0530)]
capturevpedisplay: Request interlaced capture and pass field ids

Currently the VIP S_FMT ioctl does not specify the field type of
the capture. Request for alternate field type.
Also, the field type of captured buffer is returned by the driver.
Pass this field type when queuing buffers for the VPE source.

Signed-off-by: Nikhil Devshatwar <>
6 years agov4l2: Add latency measurement
Nikhil Devshatwar [Thu, 25 Sep 2014 09:06:07 +0000 (14:36 +0530)]
v4l2: Add latency measurement

To profile the driver capture latency and display latency,
Calculate the latencies at QBUF and DQBUF ioctls

Print the latencies only when --debug is passed.

Signed-off-by: Nikhil Devshatwar <>
6 years agodmabuftest: Return from thread if streamon fails
Nikhil Devshatwar [Fri, 26 Sep 2014 09:58:47 +0000 (15:28 +0530)]
dmabuftest: Return from thread if streamon fails

Currently failed streamon is ignored and the app tries to perform
QBUF and DQBUF ioctls flooding the output with errors.

This can be avoided if the thread exits gracefully with an error.

Signed-off-by: Nikhil Devshatwar <>
6 years agodmabuftest: Remove switch thread logic
Nikhil Devshatwar [Wed, 3 Sep 2014 12:55:16 +0000 (18:25 +0530)]
dmabuftest: Remove switch thread logic

With the kmscube display, multiple captures need not be switched
All of the videos(upto six) can be rendered on the cube.

Remove the display thread logic so that all the threads
post the captured buffer to display library.

Also remove the fullscreen / overlay mode of displaying

Signed-off-by: Nikhil Devshatwar <>
6 years agodisplay-kmscube: Render full video buffer
Nikhil Devshatwar [Wed, 3 Sep 2014 11:31:46 +0000 (17:01 +0530)]
display-kmscube: Render full video buffer

The co-ordinates of texture values only use the 80% of the buffer as texture
Due to this, cropped video gets displayed
Fix this by changing the co-ordinates to 100%

Signed-off-by: Nikhil Devshatwar <>
6 years agodisplay-kmscube: Render multiple videos on cube faces
Nikhil Devshatwar [Wed, 3 Sep 2014 07:17:31 +0000 (12:47 +0530)]
display-kmscube: Render multiple videos on cube faces

Earlier implementation renders only one video on all the 6 faces of cube.
This patch enhances the library by adding support for:

* Using multiple textures
    - Create an egl image and a texture once for every buffer object
    - Extend buffer_kmscube to store the texture name and the associated face.
    - All buffers allocated by one call to disp_get_vid_buffers are grouped
      for one face

* Multithreaded post_vid_buffer
    - As the buffers would be posted by multiple threads asynchronously,
      post_vid_buffer would just update the buffer to be used for next
      rendereing and wait
    - Extend display_kmscube to store the current buffer for each face
    - If the video threads are less than 6, then the textures are repeated
      on the multiple faces.
    - Also, the post_vid_buffer waits till the buffer is being used by the
      GPU for texturing the face.

* Render thread
    - disp_open starts a render thread which initializes gbm and gl
    - The same thread will continue in a loop, where it reads from the
      current buffers array and updates the textures accordingly.
    - The textures are created from this thread if the buffer is being
      rendered first time (it won't have valid texture name)
    - This ensures that all the gl calls are called from a single thread

Signed-off-by: Nikhil Devshatwar <>
7 years agovidenc2: Adding encoding completion msgs
Pradeep Venkatasubbarao [Mon, 1 Sep 2014 04:03:10 +0000 (09:33 +0530)]
videnc2: Adding encoding completion msgs

Signed-off-by: Pradeep Venkatasubbarao <>
7 years agoUse the EGLImage configuration provided by eglext.h
Anand Balagopalakrishnan [Sat, 30 Aug 2014 12:13:27 +0000 (17:43 +0530)]
Use the EGLImage configuration provided by eglext.h

Signed-off-by: Anand Balagopalakrishnan <>
7 years agodisplay-kms: Removed unnecessary include of libdce
Karthik Ramanan [Fri, 15 Aug 2014 07:40:34 +0000 (13:10 +0530)]
display-kms: Removed unnecessary include of libdce

Signed-off-by: Karthik Ramanan <>
7 years ago[VIDENC] Adding Video encoder
Pradeep Venkatasubbarao [Fri, 25 Jul 2014 07:11:11 +0000 (12:41 +0530)]
[VIDENC] Adding Video encoder

This patch enables Accelerated(IVAHD) video encoding.
Currently tested for H264 and MPEG4 content.

Signed-off-by: Pradeep Venkatasubbarao <>
7 years agoVPE: util: Add NV12 support to VPE library
Nikhil Devshatwar [Wed, 30 Jul 2014 14:51:19 +0000 (20:21 +0530)]
VPE: util: Add NV12 support to VPE library

Current VPE library doesn't support NV12 as output format
App fails with Seg fault when trying to convert to NV12 format
Add this support

Signed-off-by: Nikhil Devshatwar <>
7 years agoutils: Wait after the buffer is posted
Nikhil Devshatwar [Mon, 30 Jun 2014 11:14:00 +0000 (16:44 +0530)]
utils: Wait after the buffer is posted

In utils library, post_*_buffer functions call the display specific
implementation and calls the maintain_playback_rate to force the FPS
The wait call should happen *after* the buffers are posted, not before

Correct this
This ensures that the buffer is not reused again immediately after
posting for display.

Signed-off-by: Nikhil Devshatwar <>
7 years agoAddition of new demo "kmscube with video"
Karthik Ramanan [Fri, 13 Jun 2014 08:40:28 +0000 (14:10 +0530)]
Addition of new demo "kmscube with video"

This patch adds support for a new demo, which is to render video
on the face of the kmscube.

   viddec3test <video_file> --kmscube --connector <connector id>

There are other options that are are supported, please refer to
viddec3test --help for further details

The main additions in this patch are:
 * Added support for allocation of the buffers via DRM
 * Added support for the allocated buffers
 * Added support for specifying the connector ID on the command line

Signed-off-by: Karthik Ramanan <>
7 years agoviddec3test: Fix for double free corruption error for dual decode-display usecase
Amarinder Bindra [Wed, 9 Apr 2014 10:33:21 +0000 (16:03 +0530)]
viddec3test: Fix for double free corruption error for dual decode-display usecase

Changed the elementary stream descriptor from global to include the
information in the demux structure as for dual decode usecase, the global
variable is overwritten by the second file and results in the memory free
The esds data (elementary stream descriptor) is required by the mpeg4 streams
only, so removing the call that introduces delay in reading the file for other
types of streams like h264, etc.

Signed-off-by: Amarinder Bindra <>
7 years agocapturevpedisplay: added usage details
alaganraj [Fri, 4 Apr 2014 09:14:24 +0000 (14:44 +0530)]
capturevpedisplay: added usage details

added command line arguments usage details

Signed-off-by: alaganraj <>
7 years agofilevpedisplay: added usage details
alaganraj [Fri, 4 Apr 2014 08:55:52 +0000 (14:25 +0530)]
filevpedisplay: added usage details

added command line arguments usage details

Signed-off-by: alaganraj <>
7 years agodmabuftest: Remove misplaced error message
Nikhil Devshatwar [Fri, 4 Apr 2014 14:30:39 +0000 (20:00 +0530)]
dmabuftest: Remove misplaced error message

Signed-off-by: Nikhil Devshatwar <>
7 years agocapturevpedisplay: Integrating vpe with vip and display module
alaganraj [Thu, 27 Mar 2014 12:05:58 +0000 (17:35 +0530)]
capturevpedisplay: Integrating vpe with vip and display module

vip captures the frames, which queued to vpe for processing
(scaling, deinterlace, csc), result will be displayed on LCD.

Signed-off-by: alaganraj <>
7 years agofilevpedisplay: vpe process the input from file and display
alaganraj [Thu, 27 Mar 2014 11:58:28 +0000 (17:28 +0530)]
filevpedisplay: vpe process the input from file and display

vpe gets input frames from file, process it (scaling, deinterlace, csc)
and displays output contents on LCD.

Signed-off-by: alaganraj <>
7 years agoutil: vpe: vpe specific common functions
alaganraj [Thu, 27 Mar 2014 11:50:06 +0000 (17:20 +0530)]
util: vpe: vpe specific common functions

used to integrate vpe with other modules.

Input buffer must be allocated in application, queue it to vpe
by passing buffer index

Output buffer allocated in vpe_output_init() as vpe output intended
to display on LCD.

Signed-off-by: alaganraj <>
7 years agoAdded buf_lock and buf_unlock APIs in copycodec and yuvcopy test cases.
Pradeep Venkatasubbarao [Thu, 27 Mar 2014 12:31:40 +0000 (18:01 +0530)]
Added buf_lock and buf_unlock APIs in copycodec and yuvcopy test cases.

Fixed the issue of copycodec failure. omap_dmabuf_map was
not not done on input and output buffers

Signed-off-by: Pradeep Venkatasubbarao <>
7 years agoviddec3test: Removed print statement for all cases except in inloop case
Amarinder Bindra [Thu, 27 Mar 2014 13:59:46 +0000 (19:29 +0530)]
viddec3test: Removed print statement for all cases except in inloop case

Removed the print statement for the default decode display that is originally
required for inloop scenario for the viddectest. Added a conditional check for
inloop test before printing this statement

Signed-off-by: Amarinder Bindra <>
7 years agodmabuftest: Capture simultaneously display one
Nikhil Devshatwar [Sun, 5 Jan 2014 19:08:37 +0000 (00:38 +0530)]
dmabuftest: Capture simultaneously display one

This patch adds a feature to capture from multiple devices
in parallel thread.
At a time, only one thread is allowed to post buffers for the display.
By default, only one capture is assumed, number of captures specified
by command line argument 'multi'

Signed-off-by: Nikhil Devshatwar <>
7 years agov4l2: Fix conflict between libdrm and v4l2 fourcc
Nikhil Devshatwar [Wed, 12 Mar 2014 13:40:52 +0000 (19:10 +0530)]
v4l2: Fix conflict between libdrm and v4l2 fourcc

For ARGB8888 format, libdrm(AR24) and v4l2 framework(RGB4)
both use different fourcc.
This patch sets fourcc to RGB4 when calling v4l2 ioctl for
AR24 color format.

Signed-off-by: Nikhil Devshatwar <>
7 years agodmabuftest: Use 6 buffers instead of 3
Nikhil Devshatwar [Sun, 5 Jan 2014 16:36:27 +0000 (22:06 +0530)]
dmabuftest: Use 6 buffers instead of 3

Use 6 buffers instead of 3
Queue all the buffers before calling stream ON

Signed-off-by: Nikhil Devshatwar <>
7 years agoviddec3test:Add support looped test
Pradeep Venkatasubbarao [Fri, 21 Mar 2014 08:55:13 +0000 (14:25 +0530)]
viddec3test:Add support looped test

This patch adds support for testing in a loop as below.

1.      Open drm, display, dce devices once during init
2.      Allocate dce buffers, input buffers
3.      Viddec3_create
4.      Viddec3_control/process till eof
5.      Viddec3_delete
6.      Got to 2 till loop iterations.
7.      Close drm, display, dce devices once during deinit

example usage:
viddec3test -s <id>:wxh <file> --inloop --fps 30

The test runs infinitely until the user interrupts it.

Signed-off-by: Pradeep Venkatasubbarao <>
7 years agoViddec3test: Fix flush issue in co-planar buffers.
Pradeep Venkatasubbarao [Fri, 21 Mar 2014 06:38:18 +0000 (12:08 +0530)]
Viddec3test: Fix flush issue in co-planar buffers.

For single planar, the flush mechanism was returning the same buffer
again when the process call was called during flush.
Resetting the number of output buffers to 0 in addition to number of inBufs
resolves the issue. Libdce counts the number of address translations based
these counts.

Signed-off-by: Amarinder Bindra <>
Signed-off-by: Pradeep Venkatasubbarao <>
7 years agoAdapt copycodectest and yuvcopytest to libdce
Pradeep Venkatasubbarao [Thu, 20 Mar 2014 10:19:14 +0000 (15:49 +0530)]
Adapt copycodectest and yuvcopytest to libdce

closed dmabuf handles that were opened by the application.
Used new dsp_dce_alloc and dsp_dce_free functions as per new libdce.

Signed-off-by: Pradeep Venkatasubbarao <>
7 years agoviddec3test: close file descriptor created for input buffer
Amarinder Bindra [Thu, 13 Mar 2014 07:48:46 +0000 (13:18 +0530)]
viddec3test: close file descriptor created for input buffer

omap_bo_dmabuf creates a dup file descriptor for the caller to use
the buffers. The caller needs to explicitly close the dup fd to avoid
any fd leak. Adding the close of fd for the input buffer stream.

Signed-off-by: Amarinder Bindra <>
7 years agoviddec3test: Close the duplicate fd's created from omap_bo_dmabuf
Amarinder Bindra [Tue, 11 Mar 2014 13:57:27 +0000 (19:27 +0530)]
viddec3test: Close the duplicate fd's created from omap_bo_dmabuf

omap_bo_dmabuf creates a dup fd for the application and the user
must close the fd after it is done with the usage otherwise there
would be file descriptors leak.
Also, cleaned up the code for the decoder_close function to delete
the decoder related in the correct order.

Signed-off-by: Amarinder Bindra <>
7 years agoviddec3test: Add support for multi-thread for multiple decode
Amarinder Bindra [Thu, 16 Jan 2014 12:42:16 +0000 (18:12 +0530)]
viddec3test: Add support for multi-thread for multiple decode

For dual decode, use the pthreads to use the viddec3test application
as a multithread application rather than doing the the process calls
in a sequential way.

Signed-off-by: Ram Prasad <>
Signed-off-by: Amarinder Bindra <>
7 years agodisplay-kms: removed debug printf from post_vid_buffer
Chandramohan [Fri, 13 Dec 2013 10:12:05 +0000 (15:42 +0530)]
display-kms: removed debug printf from post_vid_buffer

Signed-off-by: Chandramohan <>
7 years agoAdded updated
Pradeep Venkatasubbarao [Fri, 13 Dec 2013 06:14:42 +0000 (11:44 +0530)]
Added updated

Signed-off-by: Pradeep Venkatasubbarao <>
7 years agoAdded copycodectest and yuvcopy test source files
Pradeep Venkatasubbarao [Fri, 13 Dec 2013 06:12:57 +0000 (11:42 +0530)]
Added copycodectest and yuvcopy test source files

Signed-off-by: Pradeep Venkatasubbarao <>
7 years agodisp-kms: Add support for dual capture
Nikhil Devshatwar [Thu, 5 Dec 2013 22:15:32 +0000 (03:45 +0530)]
disp-kms: Add support for dual capture

Using '--dual' option, two different video nodes can be openeed
Running the loopback in a thred with common display.
One thread runs in full screen while other is overlayed on top of it.

Signed-off-by: Nikhil Devshatwar <>
7 years agodisp-kms: Add noScale flag for overlays
Nikhil Devshatwar [Thu, 5 Dec 2013 22:15:31 +0000 (03:45 +0530)]
disp-kms: Add noScale flag for overlays

This flag is used by post_vid_buffer to decide between
wheather a buffer is displayed as full screen or as overlay.

In case, of overlay, x and y are used as position co ordinates
of the overlay.

Also, added a function to set overlay to use plane[1] and set Z order

Signed-off-by: Nikhil Devshatwar <>
7 years agodmabuftest: Don't call omap_bo_dmabuf multiple times
Nikhil Devshatwar [Thu, 5 Dec 2013 22:15:30 +0000 (03:45 +0530)]
dmabuftest: Don't call omap_bo_dmabuf multiple times

Each call to omap_bo_dmabuf returns a duplicated dmabuf fd
Therefore, fd from reqbuf (exported first time) will not match with
fd of the same buffer while queueing due to dup(fd)
Using buffer->fd array for saving dmabuf fds

Signed-off-by: Nikhil Devshatwar <>
7 years agodmabuftest: Enable dmabuftest app
Nikhil Devshatwar [Thu, 5 Dec 2013 22:15:29 +0000 (03:45 +0530)]
dmabuftest: Enable dmabuftest app

Fixed picking host machine kernel headers problem
Using AC_CHECK_HEADERS for this
Removing check for struct member to check support for dmabuf

Signed-off-by: Nikhil Devshatwar <>
7 years agoutil/demuxer: Fix the memory leak
Amarinder Bindra [Tue, 8 Oct 2013 14:35:02 +0000 (20:05 +0530)]
util/demuxer: Fix the memory leak

Free the memory for esds_data aloocated during demux_init once the
demux_deinit is called.

Signed-off-by: Amarinder Bindra <>
7 years agov4l2capturedisplay: New capture and display app
Nikhil Devshatwar [Wed, 25 Sep 2013 16:25:18 +0000 (21:55 +0530)]
v4l2capturedisplay: New capture and display app

This is a new app which captures buffers from v4l2 device and
displays via drm in fullscreeen.
Currently only memory mapped buffers are handled
Also, only YUYV format is supported for capture

Corrected coding style
Removed unused functions, debug code

Signed-off-by: Nikhil Devshatwar <>
7 years agoviddec3test: Add the flush mechanism after end of file
Amarinder Bindra [Tue, 1 Oct 2013 10:54:24 +0000 (16:24 +0530)]
viddec3test: Add the flush mechanism after end of file

When the end of file is encountered, the buffers need to be unlocked
and freed by adding the flush mechanism via the codec.
This adds the mechanism and removes the code where the fd were unlocked
during the decoder close.

Signed-off-by: Amarinder Bindra <>
7 years agodisp-kms: Add support for deletion of the devices
Amarinder Bindra [Tue, 24 Sep 2013 14:50:36 +0000 (20:20 +0530)]
disp-kms: Add support for deletion of the devices

Added the support for deleting the devices and the file descriptor
used by the kms display. Also added the reference counting for the
displays to check before deleting the global file descriptor which
is used by all the displays.

Signed-off-by: Amarinder Bindra <>
7 years agodisp-kms: Add support for dual display
Amarinder Bindra [Tue, 24 Sep 2013 14:14:34 +0000 (19:44 +0530)]
disp-kms: Add support for dual display

For dual display, a single file descriptor or fd could be used for by the two
displays so that it has master permissions for display planes, hence using a
single global file descriptor for kms display.
Adding the mechanism where the second display or connector uses a different

Signed-off-by: Amarinder Bindra <>
7 years agoRevert "dual display fix"
Amarinder Bindra [Thu, 3 Oct 2013 10:43:56 +0000 (16:13 +0530)]
Revert "dual display fix"

This reverts commit 246defbe8856c8ad9786ab8c13e6b0fa2c45b47c.

8 years agodual display fix
Amarinder Bindra [Sun, 22 Sep 2013 09:31:09 +0000 (15:01 +0530)]
dual display fix

Signed-off-by: Amarinder Bindra <>
8 years agoMakefile Fix for build issue
Chandramohan C [Fri, 6 Sep 2013 09:57:01 +0000 (09:57 +0000)]
Makefile Fix for build issue

Added -lm -lavcodec in to avoid the linking issue

Signed-off-by: Chandramohan <>