Re: [PATCH] [media] omap3isp: don't call of_node_put

2016-09-28 Thread H. Nikolaus Schaller
ping ping. > Am 19.09.2016 um 11:55 schrieb H. Nikolaus Schaller : > > ping. > >> Am 08.09.2016 um 17:48 schrieb H. Nikolaus Schaller : >> >> of_node_put() has already been called inside of_graph_get_next_endpoint(). >> >> Otherwise we may get warnings like >> >> [ 10.118286] omap3isp 480bc

[RESEND][PATCH] [media] atmel-isc: start dma in some scenario

2016-09-28 Thread Songjun Wu
If a new vb buf is added to vb queue, the queue is empty and steaming, dma should be started. Signed-off-by: Songjun Wu --- drivers/media/platform/atmel/atmel-isc.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/me

Re: [PATCH v2 7/8] media: vidc: add Makefiles and Kconfig files

2016-09-28 Thread Stanimir Varbanov
Hi Hans, On 09/19/2016 01:35 PM, Hans Verkuil wrote: > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> Makefile and Kconfig files to build the video codec driver. >> >> Signed-off-by: Stanimir Varbanov >> --- >> drivers/media/platform/qcom/Kconfig | 8 >> drivers/media/platfo

Re: [PATCH v2 4/8] media: vidc: encoder: add video encoder files

2016-09-28 Thread Stanimir Varbanov
Hi Hans, On 09/19/2016 01:15 PM, Hans Verkuil wrote: > Many of my review comments for the decoder apply to the encoder as well, > so I won't repeat those. Sure, will address them too. > > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> This adds encoder part of the driver plus encoder contr

Re: [PATCH v2 3/8] media: vidc: decoder: add video decoder files

2016-09-28 Thread Stanimir Varbanov
Hi, On 09/19/2016 01:12 PM, Hans Verkuil wrote: > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> This consists of video decoder implementation plus decoder >> controls. >> >> Signed-off-by: Stanimir Varbanov >> --- >> drivers/media/platform/qcom/vidc/vdec.c | 1091 >>

Re: [PATCH v2 3/8] media: vidc: decoder: add video decoder files

2016-09-28 Thread Stanimir Varbanov
Hi Hans, Thanks for the comments! On 09/19/2016 01:04 PM, Hans Verkuil wrote: > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> This consists of video decoder implementation plus decoder >> controls. >> >> Signed-off-by: Stanimir Varbanov >> --- >> drivers/media/platform/qcom/vidc/vdec.c

Sure Opportunity.

2016-09-28 Thread j.heer
Hello, My name is James, a Trader, Auditor, Mentor, Investment Manager, Logistics Expert and General Business Man, I stay in London, UK. I contact you in respect of establishing a business relationship with you. There is a certain amount of money that belongs to me. I intend to take the money

[Patch 16/35] media: ti-vpe: vpe: Setup srcdst parameters in start_streaming

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar For deinterlacing operation, each operation needs 2 fields in the history. This is achieved by holding three buffers in ctx->src_vbs[0,1,2] (f,f-1,f-2) This is achieved by using the ctx->sequence which gets reset via the s_fmt ioctl. These buffers are dequeued in stream

[Patch 10/35] media: ti-vpe: Free vpdma buffers in vpe_release

2016-09-28 Thread Benoit Parrot
From: Harinarayan Bhatta Free vpdma buffers in vpe_release. Otherwise it was generating random backtrace. Signed-off-by: Harinarayan Bhatta Signed-off-by: Somnath Mukherjee Signed-off-by: Nikhil Devshatwar Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/vpe.c | 3 +++ 1 file

[Patch 12/35] media: ti-vpe: vpdma: Add abort channel desc and cleanup APIs

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar Whenever VPDMA processes a data descriptor of a list, it processes it and sets up the channel for the DMA transaction. List manager holds the descriptor in the list until the DMA is complete. If sync_on_channel descriptor, or another descriptor for the same channel is pres

[Patch 15/35] media: ti-vpe: vpe: configure line mode separately

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar Current driver configures the line mode of the DEI clients from the open function directly. Even if the newly created context is not yet scheduled, it updates some of the VPDMA registers. This causes a problem in multi instance use case where just opening the m2m device se

[Patch 20/35] media: ti-vpe: vpe: Added MODULE_DEVICE_TABLE hint

2016-09-28 Thread Benoit Parrot
ti_vpe module currently does not get loaded automatically. Added MODULE_DEVICE_TABLE hint to the driver to assist. Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/vpe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platfor

[Patch 18/35] media: ti-vpe: vpe: Add RGB565 and RGB5551 support

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar VPE hardware can generate output in RGB565 or in RGB5551 format. Add these formats in the supported format list for CAPTURE stream. Also, for RGB5551 format, the alpha component is not processed, so the alpha value is taken from the default color. Set the default color to

[Patch 17/35] media: ti-vpe: vpe: Post next descriptor only for list complete IRQ

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar vpe_irq checks for the possible interrupt sources and prints the errors for the DEI_ERROR and DS_UV interrupts. But it also post the next descriptor list irrespective of whichever interrupt has occurred. Because of this, driver may release the buffers even before DMA is c

[Patch 09/35] media: ti-vpe: vpe: Return NULL for invalid buffer type

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar get_q_data can be called with different values for type e.g. vpe_try_crop calls it with the buffer type which gets passed from user space Framework doesn't check wheather its correct type or not If user space passes wrong type, kernel should not crash. Return NULL when th

[Patch 27/35] media: ti-vpe: vpe: Fix line stride for output motion vector

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar For deinterlacing operation, VPE hardware uses motion vectors. MV calculated in the previous iteration are used for next interation. Therefore driver allocates two motion vectors in ping-pong fashion. For every transaction, one MV is DMAed in and one is DMAed out. All the

[Patch 33/35] media: ti-vpe: Make colorspace converter library into its own module

2016-09-28 Thread Benoit Parrot
In preparation to add colorspace conversion support to VIP, we need to turn csc.c into its own kernel module. Signed-off-by: Benoit Parrot --- drivers/media/platform/Kconfig | 4 drivers/media/platform/ti-vpe/Makefile | 4 +++- drivers/media/platform/ti-vpe/csc.c| 16 +

[Patch 30/35] media: ti-vpe: scaler: Add debug support for multi-instance

2016-09-28 Thread Benoit Parrot
Since there might be more then one instance it is better to show the base address when dumping registers to help with debugging. Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/sc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/ti-vpe/sc.c b/drivers

[Patch 24/35] media: ti-vpe: vpe: Fix vb2 buffer cleanup

2016-09-28 Thread Benoit Parrot
When stop_streaming is called we need to cleanup the queued vb2 buffers properly. This was not previously being done which caused kernel warning when the application using the resources was killed. Kernel warnings were also generated on successful completion of a de-interlacing case as well as upon

[Patch 28/35] media: ti-vpe: vpe: Enable DMABUF export

2016-09-28 Thread Benoit Parrot
Allow VPE to be able to export DMA buffer. Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/vpe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 3e1b8b1ccb7c..875da06acd67 100644 --- a/drivers/med

[Patch 25/35] media: ti-vpe: vpdma: Fix race condition for firmware loading

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar vpdma_create API is supposed to allocated the struct vpdma_data and return it to the driver. Also, it would call the callback function when the VPDMA firmware is loaded. Typically, VPE driver have following function call: dev->vpdma = vpdma_create(pdev, firmware_load_

[Patch 34/35] media: ti-vpe: csc: Add debug support for multi-instance

2016-09-28 Thread Benoit Parrot
Since there might be more then one instance it is better to show the base address when dumping registers to help with debugging. Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/csc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/ti-vpe/csc.c b/drive

[Patch 29/35] media: ti-vpe: Make scaler library into its own module

2016-09-28 Thread Benoit Parrot
In preparation to add scaler support into VIP we need to turn sc.c into its own kernel module. Add support for multiple SC memory block as VIP contains 2 scaler instances. This is done by passing the resource name to sc_create() and modify the vpe invocation accordingly. Signed-off-by: Benoit Par

[Patch 31/35] media: ti-vpe: vpe: Make sure frame size dont exceed scaler capacity

2016-09-28 Thread Benoit Parrot
When scaler is to be used we need to make sure that the input and output frame size do not exceed the maximum frame sizes that the scaler h/w can handle otherwise streaming stall as the scaler cannot proceed. The scaler buffer is limited to 2047 pixels (i.e. 11 bits) when attempting anything large

[Patch 32/35] media: ti-vpe: vpdma: Add RAW8 and RAW16 data types

2016-09-28 Thread Benoit Parrot
Add RAW8 and RAW16 data type to VPDMA. To handle RAW format we are re-using the YUV CBY422 vpdma data type so that we use the vpdma to re-order the incoming bytes, as the VIP parser assumes that the first byte presented on the bus is the MSB of a 2 bytes value. RAW8 handles from 1 to 8 bits. RAW16

[Patch 35/35] media: ti-vpe: vpe: Add proper support single and multi-plane buffer

2016-09-28 Thread Benoit Parrot
The VPE was restricting the number of plane per buffer based on the fact that if a particular format had color separation it was meant to need 2 planes. However NV12/NV16 are color separate format which are meant to be presented in a single contiguous buffer/plane. It could also be presented in a

[Patch 21/35] media: ti-vpe: vpdma: Corrected YUV422 data type label.

2016-09-28 Thread Benoit Parrot
The YUV data type definition below are taken from both the TRM and i839 Errata information. Use the correct data type considering byte reordering of components. Added the 2 missing YUV422 variant. Also since the single use of "C" in the 422 case to mean "Cr" (i.e. V component). It was decided to e

[Patch 23/35] media: ti-vpe: sc: Fix incorrect optimization

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar Current scaler library implementation of sc_set_hs_coeffs and sc_set_vs_coeffs tries to return immediately if the calculated coefficient index is already being used. As the same scaler block is going to be used for all the VPE contexts, even if the calculated index is sam

[Patch 22/35] media: ti-vpe: vpdma: RGB data type yield inverted data

2016-09-28 Thread Benoit Parrot
The VPDMA RGB data type definition have been updated to match with Errata i839. But some of the ARGB definition appeared to be wrong in the document also. As they would yield RGBA instead. They have been corrected based on experimentation. Signed-off-by: Benoit Parrot --- drivers/media/platform

[Patch 26/35] media: ti-vpe: vpdma: Use bidirectional cached buffers

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar VPDMA buffer will be used by CPU as well as by the VPDMA. CPU will write/update the VPDMA descriptors containing data about the video buffer DMA addresses. VPDMA will write the "write descriptor" containing the data about the DMA operation. When mapping/unmapping the buff

[Patch 11/35] media: ti-vpe: vpdma: Add support for setting max width height

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar Add a helper function to be able to set the maximum VPDMA transfer size to limit potential buffer overrun. Added enums for max_width and max_height fields of the outbound data descriptor. Changed vpdma_add_out_dtd to accept two more arguments for max width and height. M

[Patch 19/35] media: ti-vpe: vpdma: allocate and maintain hwlist

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar VPDMA block used in ti-vip and ti-vpe modules have support for up to 8 hardware descriptor lists. A descriptor list can be submitted to any of the 8 lists (as long as it's not busy). When multiple clients want to transfer data in parallel, its easier to allocate one list

[Patch 13/35] media: ti-vpe: vpdma: Make list post atomic operation

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar Writing to the "VPDMA list attribute" register is considered as a list post. This informs the VPDMA firmware to load the list from the address which should be taken from the "VPDMA list address" register. As these two register writes are dependent, it is important that th

[Patch 14/35] media: ti-vpe: vpdma: Clear IRQs for individual lists

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar VPDMA IRQs are registered for multiple lists When clearing an IRQ for a list interrupt, all the IRQs for the individual lists are to be cleared separately. Signed-off-by: Nikhil Devshatwar Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/vpdma.c | 6 +++--

[Patch 08/35] media: ti-vpe: Increasing max buffer height and width

2016-09-28 Thread Benoit Parrot
From: Harinarayan Bhatta Increasing max buffer height and width to allow for padded buffers. Signed-off-by: Harinarayan Bhatta Signed-off-by: Nikhil Devshatwar Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/vpe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Patch 06/35] media: ti-vpe: vpe: Do not perform job transaction atomically

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar Current VPE driver does not start the job until all the buffers for a transaction are not queued. When running in multiple context, this might increase the processing latency. Alternate solution would be to try to continue the same context as long as buffers for the trans

[Patch 07/35] media: ti-vpe: Add support for SEQ_TB buffers

2016-09-28 Thread Benoit Parrot
From: Nikhil Devshatwar The video source can generate the data in the SEQ_TB buffer format. In the case of TI SoC, the IVA_HD can generate the interlaced content in the SEQ_TB buffer format. This is the format where the top and bottom field data can be contained in a single buffer. For example, f

[Patch 05/35] media: ti-vpe: Use line average de-interlacing for first 2 frames

2016-09-28 Thread Benoit Parrot
From: Archit Taneja For n input fields, the VPE de-interlacer creates n - 2 progressive frames. To support this, we use line average mode of de-interlacer for the first 2 input fields to generate 2 progressive frames. We then revert back to the preferred EDI method, and create n - 2 frames, crea

[Patch 04/35] media: ti-vpe: vpdma: Fix bus error when vpdma is writing a descriptor

2016-09-28 Thread Benoit Parrot
On DRA7 since l3_noc event are being reported it was found that when the write descriptor was being written it was consistently causing bus error events. The write address was improperly programmed. Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/vpdma_priv.h | 5 +++-- 1 file ch

[Patch 03/35] media: ti-vpe: vpdma: Add helper to set a background color

2016-09-28 Thread Benoit Parrot
Add a helper to set the background color during vpdma transfer. This is needed when VPDMA is generating 32 bits RGB format to have the Alpha channel set to an appropriate value. Signed-off-by: Benoit Parrot --- drivers/media/platform/ti-vpe/vpdma.c | 10 ++ drivers/media/platform/ti-vpe/

[Patch 02/35] media: ti-vpe: vpdma: Add multi-instance and multi-client support

2016-09-28 Thread Benoit Parrot
The VPDMA (Video Port DMA) as found in devices such as DRA7xx is used for both the Video Processing Engine (VPE) and the Video Input Port (VIP). Some devices may have multiple VIP instances each with its own VPDMA engine. Within VIP two slices can use a single VPDMA engine simultaneously. So suppor

[Patch 01/35] media: ti-vpe: vpdma: Make vpdma library into its own module

2016-09-28 Thread Benoit Parrot
The VPDMA (Video Port DMA) as found in devices such as DRA7xx is used for both the Video Processing Engine (VPE) and the Video Input Port (VIP). In preparation for this we need to turn vpdma into its own kernel module. Signed-off-by: Benoit Parrot --- drivers/media/platform/Kconfig | 6

[Patch 00/35] media: ti-vpe: fixes and enhancements

2016-09-28 Thread Benoit Parrot
This patch series is to publish a number of enhancements we have been carrying for a while. A number of bug fixes and feature enhancements have been included. We also need to prepare the way for the introduction of the VIP (Video Input Port) driver (coming soon) which has internal IP module in co

Re: [PATCH -next] staging: media: stih-cec: remove unused including

2016-09-28 Thread Benjamin Gaignard
Acked-by: Benjamin Gaignard 2016-09-28 17:13 GMT+02:00 Wei Yongjun : > From: Wei Yongjun > > Remove including that don't need it. > > Signed-off-by: Wei Yongjun > --- > drivers/staging/media/st-cec/stih-cec.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/staging/media/st-cec

[PATCH -next] staging: media: stih-cec: remove unused including

2016-09-28 Thread Wei Yongjun
From: Wei Yongjun Remove including that don't need it. Signed-off-by: Wei Yongjun --- drivers/staging/media/st-cec/stih-cec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c index 2143448..b0aee1d 100644 ---

[RFC/PATCH 30/45] media: usb: uvc: remove unnecessary & operation

2016-09-28 Thread Felipe Balbi
Now that usb_endpoint_maxp() only returns the lowest 11 bits from wMaxPacketSize, we can remove the & operation from this driver. Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Felipe Balbi --- drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[RFC/PATCH 13/45] media: usbtv: core: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Felipe Balbi --- drivers/media/usb/usbtv/usbtv-core.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/usbtv/u

[RFC/PATCH 14/45] media: usb: uvc: make use of new usb_endpoint_maxp_mult()

2016-09-28 Thread Felipe Balbi
We have introduced a helper to calculate multiplier value from wMaxPacketSize. Start using it. Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Signed-off-by: Felipe Balbi --- drivers/media/usb/uvc/uvc_video.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/me

Re: [GIT PULL FOR v4.10] smiapp cleanups, fixes and runtime PM support

2016-09-28 Thread Sakari Ailus
Hi Mauro, On Tue, Sep 27, 2016 at 05:04:05PM +0300, Sakari Ailus wrote: > Hi Mauro, > > Here are a number of cleanups and some fixes plus runtime PM support for the > smiapp driver. > > Please pull. Please ignore this pull request, I'll send a new one in the near future. Runtime PM support will