Re: [PATCH 1/3] [media] v4l: tegra: Add NVIDIA Tegra VI driver

2015-09-22 Thread Bryan Wu
On 09/22/2015 04:47 AM, Thierry Reding wrote: On Mon, Sep 21, 2015 at 11:55:53AM -0700, Bryan Wu wrote: [...] +static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) +{ + struct tegra_csi_device *csi = to_csi(subdev); + struct tegra_channel *chan = subdev->host_priv;

[PATCH v3 01/21] Revert "[media] media: media controller entity framework enhancements for ALSA"

2015-09-22 Thread Shuah Khan
This reverts commit ed64cf1e182fb30fe67652386c0880fcf3302f97. This patch is no longer necessary as the entity register callback is implemented at media_device level. Signed-off-by: Shuah Khan --- drivers/media/media-device.c | 7 --- include/media/media-entity.h | 4

[PATCH v3 07/21] media: Media Controller non-locking __media_entity_pipeline_start/stop()

2015-09-22 Thread Shuah Khan
Add non-locking __media_entity_pipeline_start/stop() interfaces to be called from code paths that hold the graph_mutex. For this change, the media_entity_pipeline_start() routine is renamed to __media_entity_pipeline_start() minus the graph_mutex lock and unlock. media_entity_pipeline_start() now

Re: [Linux-kernel] Renesas Lager: Device Tree entries for VIN HDMI input, version 2

2015-09-22 Thread William Towle
Hi Simon, On Thu, 13 Aug 2015, William Towle wrote: > (Obsoletes corresponding parts of "HDMI and Composite capture on > Lager...", published previously) > To follow: >[PATCH 1/3] ARM: shmobile: lager dts: Add entries for VIN HDMI input >[PATCH 2/3] media: adv7604: automatic

[PATCH v3 20/21] media: media: dvb-frontend fix enable_source error legs

2015-09-22 Thread Shuah Khan
When enable_source finds the tuner busy, do dvb_generic_release(). In addition, when dvb_frontend_start() fails, call disable_source to release tuner. Signed-off-by: Shuah Khan --- drivers/media/dvb-core/dvb_frontend.c | 9 +++-- 1 file changed, 7 insertions(+), 2

[PATCH v3 21/21] sound/usb: Update ALSA driver to use Managed Media Controller API

2015-09-22 Thread Shuah Khan
Change ALSA driver to use Managed ~media Managed Controller API to share tuner with DVB and V4L2 drivers that control AU0828 media device. Media device is created based on a newly added field value in the struct snd_usb_audio_quirk. Using this approach, the media controller API usage can be added

[PATCH v3 08/21] media: v4l-core add v4l_enable/disable_media_tuner() helper functions

2015-09-22 Thread Shuah Khan
Add a new interfaces to be used by v4l-core to invoke enable source and disable_source handlers in the media_device. The enable_source helper function invokes the enable_source handler to find tuner entity connected to the decoder and check is it is available or busy. If tuner is available, link

[PATCH v3 14/21] media: dvb-frontend invoke enable/disable_source handlers

2015-09-22 Thread Shuah Khan
Checking for tuner availability from frontend thread start disrupts video stream. Change to check for tuner and start pipeline from frontend open instead and stop pipeline from frontend release. In addition, make a change to invoke enable_source and disable_source handlers to check for tuner

[PATCH v3 10/21] media: au8522 change to create MC pad for ALSA Audio Out

2015-09-22 Thread Shuah Khan
Add new pad for ALSA Audio Out to au8522_media_pads. Signed-off-by: Shuah Khan --- drivers/media/dvb-frontends/au8522.h | 1 + drivers/media/dvb-frontends/au8522_decoder.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/dvb-frontends/au8522.h

[PATCH v3 16/21] media: au0828 video change to use v4l_enable_media_tuner()

2015-09-22 Thread Shuah Khan
au0828 is changed to use v4l_enable_media_tuner() to check for tuner availability from vidioc_g_tuner(), and au0828_v4l2_close(), before changing tuner settings. If tuner isn't free, return busy condition from vidioc_g_tuner() and in au0828_v4l2_close() tuner is left untouched without powering

[PATCH v3 19/21] media: au0828 implement enable_source and disable_source handlers

2015-09-22 Thread Shuah Khan
Implements enable_source and disable_source handlers for other drivers (v4l2-core, dvb-core, and ALSA) to use to check for tuner connected to the decoder and activate the link if tuner is free, and deactivate and free the tuner when it is no longer needed. Signed-off-by: Shuah Khan

[PATCH v3 09/21] media: Move au8522_media_pads enum to au8522.h from au8522_priv.h

2015-09-22 Thread Shuah Khan
Move the au8522_media_pads enum to au8522.h from au8522_priv.h. This will allow au0828-core to use these defines instead of hard-coding the pad values when it creates media graph linking decode pads to other entities. Signed-off-by: Shuah Khan ---

[PATCH v3 15/21] media: au0828 video remove au0828_enable_analog_tuner()

2015-09-22 Thread Shuah Khan
au0828_enable_analog_tuner() is no longer needed with v4l2-core and au0828-video invoking enable_source and disable_source handlers. In addition, it is unnecessary to check for tuner availability in queue_setup() as v4l2-core handles the tuner availability checks. Signed-off-by: Shuah Khan

[PATCH v3 03/21] media: Add ALSA Media Controller devnodes

2015-09-22 Thread Shuah Khan
Add ALSA Media Controller capture, playback, and mixer devnode defines. Signed-off-by: Shuah Khan --- include/uapi/linux/media.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 4e816be..4a30ea3

[PATCH v3 12/21] media: au0828 fix au0828_create_media_graph() entity checks

2015-09-22 Thread Shuah Khan
au0828_create_media_graph() checks if entity.links is null or not to determine, if vbi_dev and vdev entities have been registered. Checking entity.parent field is right way, as parent field gets initialized when entity is registered. Fix it to check entity.parent field. Signed-off-by: Shuah Khan

[PATCH v3 02/21] media: Media Controller register/unregister entity_notify API

2015-09-22 Thread Shuah Khan
Add new interfaces to register and unregister entity_notify hook to media device to allow drivers to take appropriate actions when as new entities get added to the shared media device.When a new entity is registered, all registered entity_notify hooks are invoked to allow drivers or modules that

[PATCH v3 05/21] media: Media Controller fix to not let stream_count go negative

2015-09-22 Thread Shuah Khan
Add a range check to not let the stream_count become negative. Wthout this check, calls to stop pipeline when there is no active pipeline will result in stream_count < 0 condition and lock and preventing link state (activate/deactivate) changes. This will happen from error leg in start pipeline

[PATCH v3 06/21] media: Media Controller export non locking __media_entity_setup_link()

2015-09-22 Thread Shuah Khan
Export __media_entity_setup_link() to be used from code paths that hold the graph_mutex. Signed-off-by: Shuah Khan --- drivers/media/media-entity.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index

[PATCH v3 11/21] media: au0828 Use au8522_media_pads enum for pad defines

2015-09-22 Thread Shuah Khan
Change au0828-core to use au8522_media_pads enum defines instead of hard-coding the pad values when it creates media graph linking decode pads to other entities. Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-core.c | 11 +++ 1 file changed, 7

[PATCH v3 13/21] media: Change v4l-core to check for tuner availability

2015-09-22 Thread Shuah Khan
Change s_input, s_fmt, s_tuner, s_frequency, querystd, s_hw_freq_seek, and vb2_internal_streamon interfaces that alter the tuner configuration to check for tuner availability by calling v4l_enable_media_tuner(). If tuner isn't free, return -EBUSY. v4l_disable_media_tuner() is called from

[PATCH v3 17/21] media: au0828 change to use Managed Media Controller API

2015-09-22 Thread Shuah Khan
Change au0828 to use Managed Media Controller API to coordinate creating/deleting media device on parent usb device it shares with the snd-usb-audio driver. With this change, au0828 uses media_device_get_devres() to allocate a new media device devres or return an existing one, if it finds one.

[PATCH v3 04/21] media: Media Controller enable/disable source handler API

2015-09-22 Thread Shuah Khan
Add new fields to struct media_device to add enable_source, and disable_source handlers, and source_priv to stash driver private data that is need to run these handlers. The enable_source handler finds source entity for the passed in entity and check if it is available, and activate the link using

[PATCH v3 18/21] media: au0828 change to register/unregister entity_notify hook

2015-09-22 Thread Shuah Khan
au0828 registers entity_notify hook to create media graph for the device. This handler runs whenvere a new entity gets added to the media device. It creates necessary links from video, vbi, and ALSA entities to decoder and links tuner and decoder entities. As this handler runs as entities get

[PATCH v3 00/21] Update ALSA, and au0828 drivers to use Managed Media Controller API

2015-09-22 Thread Shuah Khan
This patch series updates ALSA driver, and au0828 core driver to use Managed Media controller API to share tuner. Please note that Managed Media Controller API and DVB and V4L2 drivers updates to use Media Controller API have been added in a prior patch series. Media Controller API is enhanced

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Sakari Ailus
Hi Tiffany, (Robin and Hans cc'd.) On Mon, Sep 21, 2015 at 08:26:11PM +0800, Tiffany Lin wrote: > vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > But in dma_sync_sg_for_device, it use lengths of each SG entries > before dma_map_sg_attrs. dma_map_sg_attrs will concatenate >

Re: [RFC PATCH v5 5/8] media: videobuf2: Change queue_setup argument

2015-09-22 Thread Junghak Sung
On 09/22/2015 10:44 PM, Hans Verkuil wrote: Hi Junghak, On 22-09-15 15:30, Junghak Sung wrote: Replace struct v4l2_format * with vb2_format * to make queue_setup() for common use. struct vb2_format { unsigned inttype; unsigned intpixelformat; unsigned int

Re: [RFC PATCH v5 7/8] media: videobuf2: Prepare to divide videobuf2

2015-09-22 Thread Junghak Sung
On 09/22/2015 11:48 PM, Hans Verkuil wrote: Hi Junghak, This looks pretty good! I have a few small comments below, but overall it is much improved. On 22-09-15 15:30, Junghak Sung wrote: Prepare to divide videobuf2 - Separate vb2 trace events from v4l2 trace event. - Make wrapper functions

Re: [RFC PATCH v5 8/8] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2

2015-09-22 Thread Junghak Sung
On 09/22/2015 11:58 PM, Hans Verkuil wrote: Hi Junghak, A few small comments... On 22-09-15 15:30, Junghak Sung wrote: Move v4l2-specific stuff from videobu2-core to videobuf2-v4l2 without doing any functional changes. I feel the introduction of v4l2_buf_ops falls under functional

[PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree

2015-09-22 Thread Bryan Wu
Following device tree support for Tegra VI now: - "vi" node which might have 6 ports/endpoints - in TPG mode, "vi" node don't need to define any ports/endpoints - ports/endpoints defines the link between VI and external sensors. Signed-off-by: Bryan Wu ---

[PATCH 0/3 RFC v3] media: platform: add NVIDIA Tegra VI driver

2015-09-22 Thread Bryan Wu
This patchset add and enable V4L2 driver for latest NVIDIA Tegra Video Input hardware controller. It's based on the staging/work branch of Thierry Reding Tegra upstream kernel github repo, which is based on 4.2-rc1. (https://github.com/thierryreding/linux/tree/staging/work) v4: - fix all the

Re: [PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree

2015-09-22 Thread Bryan Wu
On 09/22/2015 05:17 AM, Thierry Reding wrote: Hi Bryan, This patchset really needs to be Cc'ed to linux-te...@vger.kernel.org, it's becoming impossible to track it otherwise. My bad, I copied and pasted old git send-email command line. On Mon, Sep 21, 2015 at 11:55:54AM -0700, Bryan Wu

[PATCH 1/3] [media] v4l: tegra: Add NVIDIA Tegra VI driver

2015-09-22 Thread Bryan Wu
NVIDIA Tegra processor contains a powerful Video Input (VI) hardware controller which can support up to 6 MIPI CSI camera sensors. This patch adds a V4L2 media controller and capture driver to support Tegra VI hardware. It's verified with Tegra built-in test pattern generator. Signed-off-by:

[PATCH 3/3] Documentation: DT bindings: add VI and CSI bindings

2015-09-22 Thread Bryan Wu
Signed-off-by: Bryan Wu --- .../bindings/gpu/nvidia,tegra20-host1x.txt | 211 - 1 file changed, 205 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt

cron job: media_tree daily build: ERRORS

2015-09-22 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Wed Sep 23 04:00:14 CEST 2015 git branch: test git hash: 9ddf9071ea17b83954358b2dac42b34e5857a9af gcc

Re: [PATCH] [media] tvp5150: add support for asynchronous probing

2015-09-22 Thread Lad, Prabhakar
On Mon, Sep 21, 2015 at 12:23 PM, Javier Martinez Canillas wrote: > Allow the subdevice to be probed asynchronously. > > Signed-off-by: Javier Martinez Canillas > Acked-by: Lad, Prabhakar Cheers, --Prabhakar Lad -- To

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Sakari Ailus
Hi Robin, On Tue, Sep 22, 2015 at 04:37:17PM +0100, Robin Murphy wrote: > Hi Hans, > > On 21/09/15 14:13, Hans Verkuil wrote: > >Hi Tiffany! > > > >On 21-09-15 14:26, Tiffany Lin wrote: > >>vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > >>But in dma_sync_sg_for_device, it

Re: [RFC 0/9] Unrestricted media entity ID range support

2015-09-22 Thread Sakari Ailus
Hi Mauro, Mauro Carvalho Chehab wrote: Em Sun, 20 Sep 2015 10:26:09 +0300 Sakari Ailus escreveu: Hi Mauro, Mauro Carvalho Chehab wrote: Hi Sakari, On Fri, 11 Sep 2015 13:09:03 +0300 Sakari Ailus wrote: Hi all, This patchset

Re: [RFC PATCH v5 0/8] Refactoring Videobuf2 for common use

2015-09-22 Thread Junghak Sung
Dear Hans, I tried to make a patch to fix the compile errors below. If you can not wait for next round, you can resolve the compile errors below with attached patch file. But, I'm not sure that this patch can resolve really ALL compile problems. So, if you don't mind and if you can, please, send

Re: [RFC 0/9] Unrestricted media entity ID range support

2015-09-22 Thread Mauro Carvalho Chehab
Em Wed, 23 Sep 2015 00:56:05 +0300 Sakari Ailus escreveu: > Hi Mauro, > > Mauro Carvalho Chehab wrote: > > Em Sun, 20 Sep 2015 10:26:09 +0300 > > Sakari Ailus escreveu: > > > >> Hi Mauro, > >> > >> Mauro Carvalho Chehab wrote: > >>>

[PATCH] [media] media-entity: Don't use var length arrays

2015-09-22 Thread Mauro Carvalho Chehab
The graph traversal algorithm currently uses two variable-length arrays that are dynamically allocated at the stack: drivers/media/media-entity.c:238:17: warning: Variable length array is used. drivers/media/media-entity.c:239:17: warning: Variable length array is used. Those

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Daniel Kurtz
Hi Sakari, On Wed, Sep 23, 2015 at 4:37 AM, Sakari Ailus wrote: > Hi Robin, > > On Tue, Sep 22, 2015 at 04:37:17PM +0100, Robin Murphy wrote: >> Hi Hans, >> >> On 21/09/15 14:13, Hans Verkuil wrote: >> >Hi Tiffany! >> > >> >On 21-09-15 14:26, Tiffany Lin wrote: >>

Re: [PATCH 1/3] [media] v4l: tegra: Add NVIDIA Tegra VI driver

2015-09-22 Thread Hans Verkuil
Hi Bryan, Thanks for this v3 patch series. It looks very good now. I have a few comments, I think they are trivial to add and then I would just wait for the new MC code to be merged. I hope it will be soon, but it's a bit unpredictable. On 21-09-15 20:55, Bryan Wu wrote: > NVIDIA Tegra processor

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-22 Thread Andrzej Hajda
On 09/21/2015 03:42 PM, David Howells wrote: > Andrzej Hajda wrote: > >> Semantic patch finds comparisons of types: >> unsigned < 0 >> unsigned >= 0 >> The former is always false, the latter is always true. >> Such comparisons are useless,

[PATCH] [media] cx231xx: fix bulk transfer mode

2015-09-22 Thread Terry Heo
The current cx231xx driver doesn't work with bulk transfer mode. This patch makes it possible to use bulk transfer mode. Signed-off-by: Terry Heo --- drivers/media/usb/cx231xx/cx231xx-core.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git

[GIT PULL FOR v4.4] More fixes/enhancements

2015-09-22 Thread Hans Verkuil
More fixes and enhancements. Note the v4l2-ctrls fix that has a CC to stable for 3.17 and up. Regards, Hans The following changes since commit 9ddf9071ea17b83954358b2dac42b34e5857a9af: Merge tag 'v4.3-rc1' into patchwork (2015-09-13 11:10:12 -0300) are available in the git

[RFC PATCH v5 8/8] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2

2015-09-22 Thread Junghak Sung
Move v4l2-specific stuff from videobu2-core to videobuf2-v4l2 without doing any functional changes. Signed-off-by: Junghak Sung Signed-off-by: Geunyoung Kim Acked-by: Seung-Woo Kim Acked-by: Inki Dae

[RFC PATCH v5 5/8] media: videobuf2: Change queue_setup argument

2015-09-22 Thread Junghak Sung
Replace struct v4l2_format * with vb2_format * to make queue_setup() for common use. struct vb2_format { unsigned inttype; unsigned intpixelformat; unsigned intwidth; unsigned intheight; unsigned intnum_planes; unsigned int

[RFC PATCH v5 1/8] media: videobuf2: Replace videobuf2-core with videobuf2-v4l2

2015-09-22 Thread Junghak Sung
Make videobuf2-v4l2 as a wrapper of videobuf2-core for v4l2-use. And replace videobuf2-core.h with videobuf2-v4l2.h. This renaming change should be accompanied by the modifications of all device drivers that include videobuf2-core.h. It can be done with just running this shell script. replace() {

[RFC PATCH v5 6/8] media: videobuf2: Replace v4l2-specific data with vb2 data.

2015-09-22 Thread Junghak Sung
Simple changes that replace v4l2-specific data with vb2 data in videobuf2-core. enum v4l2_buf_type --> int enum v4l2_memory --> enum vb2_memory VIDEO_MAX_FRAME --> VB2_MAX_FRAME VIDEO_MAX_PLANES --> VB2_MAX_PLANES struct v4l2_fh *owner --> void *owner V4L2_TYPE_IS_MULTIPLANAR() --> is_multiplanar

[RFC PATCH v5 7/8] media: videobuf2: Prepare to divide videobuf2

2015-09-22 Thread Junghak Sung
Prepare to divide videobuf2 - Separate vb2 trace events from v4l2 trace event. - Make wrapper functions that will move to v4l2-side - Make vb2_core_* functions that remain in vb2 core side - Rename internal functions as vb2_* Signed-off-by: Junghak Sung Signed-off-by:

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread tiffany lin
Hi Sakari, On Tue, 2015-09-22 at 15:07 +0300, Sakari Ailus wrote: > Hi Tiffany, > > On Tue, Sep 22, 2015 at 06:19:25PM +0800, tiffany lin wrote: > > Hi Hans, > > > > On Mon, 2015-09-21 at 15:13 +0200, Hans Verkuil wrote: > > > Hi Tiffany! > > > > > > On 21-09-15 14:26, Tiffany Lin wrote: > > >

Re: [RFC PATCH v5 5/8] media: videobuf2: Change queue_setup argument

2015-09-22 Thread Hans Verkuil
Hi Junghak, On 22-09-15 15:30, Junghak Sung wrote: > Replace struct v4l2_format * with vb2_format * to make queue_setup() > for common use. > > struct vb2_format { > unsigned inttype; > unsigned intpixelformat; > unsigned intwidth; > unsigned intheight; >

[RFC PATCH v5 3/8] media: videobuf2: Restructure vb2_buffer (2/3)

2015-09-22 Thread Junghak Sung
Modify all device drivers related with previous change that restructures vb2_buffer for common use. Signed-off-by: Junghak Sung Signed-off-by: Geunyoung Kim Acked-by: Seung-Woo Kim Acked-by: Inki Dae

[RFC PATCH v5 0/8] Refactoring Videobuf2 for common use

2015-09-22 Thread Junghak Sung
Hello everybody, This is the 5th round for refactoring Videobuf2(a.k.a VB2). The purpose of this patch series is to separate existing VB2 framework into core part and V4L2 specific part. So that not only V4L2 but also other frameworks can use them to manage buffer and utilize queue. Why do we

[RFC PATCH v5 2/8] media: videobuf2: Restructure vb2_buffer (1/3)

2015-09-22 Thread Junghak Sung
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer. Add new member variables - bytesused, length, offset, userptr, fd, data_offset - to struct vb2_plane in order to cover all information of v4l2_plane. struct vb2_plane { unsigned intbytesused;

Re: [Patch v2] media: v4l2-ctrls: Fix 64bit support in get_ctrl()

2015-09-22 Thread Sakari Ailus
On Mon, Sep 21, 2015 at 11:03:21AM -0500, Benoit Parrot wrote: > When trying to use v4l2_ctrl_g_ctrl_int64() to retrieve a > V4L2_CTRL_TYPE_INTEGER64 type value the internal helper function > get_ctrl() would prematurely exits because for this control type > the 'is_int' flag is not set. This

Re: [PATCH 1/3] [media] v4l: tegra: Add NVIDIA Tegra VI driver

2015-09-22 Thread Thierry Reding
On Mon, Sep 21, 2015 at 11:55:53AM -0700, Bryan Wu wrote: [...] > +static int tegra_csi_s_stream(struct v4l2_subdev *subdev, int enable) > +{ > + struct tegra_csi_device *csi = to_csi(subdev); > + struct tegra_channel *chan = subdev->host_priv; > + enum tegra_csi_port_num port_num =

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-22 Thread Jacek Anaszewski
On 09/22/2015 11:13 AM, Andrzej Hajda wrote: On 09/21/2015 03:42 PM, David Howells wrote: Andrzej Hajda wrote: Semantic patch finds comparisons of types: unsigned < 0 unsigned >= 0 The former is always false, the latter is always

Driver private field for struct dmxdev_filter

2015-09-22 Thread Divneil Rai WADHAWAN
Hello, I am working on a solution, where the dvb demuxer solution is partly based on LDVB demux framework. Due to some constraints posed by the lower layers of software stack, fops have been over-written. I have allocated driver private per filter structure which I want to use in conjuction

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread tiffany lin
Hi Hans, On Mon, 2015-09-21 at 15:13 +0200, Hans Verkuil wrote: > Hi Tiffany! > > On 21-09-15 14:26, Tiffany Lin wrote: > > vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > > But in dma_sync_sg_for_device, it use lengths of each SG entries > > before dma_map_sg_attrs.

Re: [RFC PATCH v5 0/8] Refactoring Videobuf2 for common use

2015-09-22 Thread Hans Verkuil
Mauro asked if I could make a pull request for patches 1-4, but while compiling it I got these errors and warnings: In file included from /home/hans/work/build/media-git/include/linux/interrupt.h:5:0, from

Re: [RFC PATCH v5 6/8] media: videobuf2: Replace v4l2-specific data with vb2 data.

2015-09-22 Thread Hans Verkuil
On 22-09-15 15:30, Junghak Sung wrote: > Simple changes that replace v4l2-specific data with vb2 data > in videobuf2-core. > > enum v4l2_buf_type --> int > enum v4l2_memory --> enum vb2_memory > VIDEO_MAX_FRAME --> VB2_MAX_FRAME > VIDEO_MAX_PLANES --> VB2_MAX_PLANES > struct v4l2_fh *owner -->

[RFC v2 4/4] vivid: add support for reduced frame rate in video capture

2015-09-22 Thread Prashant Laddha
With this patch, vivid capture thread can now generate a video with frame rate reduced by a factor of 1000 / 1001. This option can be selected using a control Reduced Framerate from gui. Cc: Hans Verkuil Signed-off-by: Prashant Laddha ---

[RFC v2 3/4] vivid-capture: add control for reduced frame rate

2015-09-22 Thread Prashant Laddha
A boolean control Reduced Framerate is added to vivid controls for controlling the reduced fps option for vivid capture from gui. Cc: Hans Verkuil Signed-off-by: Prashant Laddha --- drivers/media/platform/vivid/vivid-core.h | 1 +

[RFC v2 2/4] vivid: add support for reduced fps in video out

2015-09-22 Thread Prashant Laddha
If reduced fps flag is set then check if other necessary conditions are true for the given bt timing. If yes, then reduce the frame rate. For vivid transmitter, timeperframe_vid_out controls the frame rate. Adjusting the timeperframe_vid_out by scaling down pixel clock by factor of 1000 / 1001.

Re: [RFC PATCH v5 8/8] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2

2015-09-22 Thread Hans Verkuil
Hi Junghak, A few small comments... On 22-09-15 15:30, Junghak Sung wrote: > Move v4l2-specific stuff from videobu2-core to videobuf2-v4l2 > without doing any functional changes. I feel the introduction of v4l2_buf_ops falls under functional changes. Is it possible to do that change in a

Re: [PATCH 3/3] Documentation: DT bindings: add VI and CSI bindings

2015-09-22 Thread Thierry Reding
On Mon, Sep 21, 2015 at 11:55:55AM -0700, Bryan Wu wrote: > Signed-off-by: Bryan Wu > --- > .../bindings/gpu/nvidia,tegra20-host1x.txt | 211 > - > 1 file changed, 205 insertions(+), 6 deletions(-) > > diff --git

Re: [PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree

2015-09-22 Thread Thierry Reding
Hi Bryan, This patchset really needs to be Cc'ed to linux-te...@vger.kernel.org, it's becoming impossible to track it otherwise. On Mon, Sep 21, 2015 at 11:55:54AM -0700, Bryan Wu wrote: [...] > diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi > b/arch/arm64/boot/dts/nvidia/tegra210.dtsi >

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Sakari Ailus
Hi Tiffany, On Tue, Sep 22, 2015 at 06:19:25PM +0800, tiffany lin wrote: > Hi Hans, > > On Mon, 2015-09-21 at 15:13 +0200, Hans Verkuil wrote: > > Hi Tiffany! > > > > On 21-09-15 14:26, Tiffany Lin wrote: > > > vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. > > > But in

Re: [RFC 0/9] Unrestricted media entity ID range support

2015-09-22 Thread Mauro Carvalho Chehab
Em Sun, 20 Sep 2015 10:26:09 +0300 Sakari Ailus escreveu: > Hi Mauro, > > Mauro Carvalho Chehab wrote: > > Hi Sakari, > > > > On Fri, 11 Sep 2015 13:09:03 +0300 > > Sakari Ailus wrote: > > > >> Hi all, > >> > >> This patchset adds an

Re: [PATCH 3/3] Documentation: DT bindings: add VI and CSI bindings

2015-09-22 Thread Thierry Reding
On Mon, Sep 21, 2015 at 11:55:55AM -0700, Bryan Wu wrote: > Signed-off-by: Bryan Wu > --- > .../bindings/gpu/nvidia,tegra20-host1x.txt | 211 > - > 1 file changed, 205 insertions(+), 6 deletions(-) Also you probably want to include

[RFC v2 1/4] v4l2-dv-timings: add condition checks for reduced fps

2015-09-22 Thread Prashant Laddha
Added a helper function to check necessary conditions required for reduced fps. The reduced fps is supported for CVT and CEA861 timings. CVT supports reduced fps only if reduced blanking v2 (indicated by vsync = 8) is true. Whereas CEA861 supports reduced fps if V4L2_DV_FL_CAN_REDUCE_FPS flag is

[RFC v2 0/4] vivid: reduced fps support

2015-09-22 Thread Prashant Laddha
Hi, Please find RFC v2 for adding reduced fps support in vivid video transmit and receive. Changes since v1: 1. Added helper function to check if all necessary conditions for reduced fps are met. 2. This function can now common for vivid-vid-out and vivid-vid-cap 3. Same helper function can

Re: [RFC PATCH v5 7/8] media: videobuf2: Prepare to divide videobuf2

2015-09-22 Thread Hans Verkuil
Hi Junghak, This looks pretty good! I have a few small comments below, but overall it is much improved. On 22-09-15 15:30, Junghak Sung wrote: > Prepare to divide videobuf2 > - Separate vb2 trace events from v4l2 trace event. > - Make wrapper functions that will move to v4l2-side > - Make

Re: [RESEND PATCH] media: vb2: Fix vb2_dc_prepare do not correct sync data to device

2015-09-22 Thread Robin Murphy
Hi Hans, On 21/09/15 14:13, Hans Verkuil wrote: Hi Tiffany! On 21-09-15 14:26, Tiffany Lin wrote: vb2_dc_prepare use the number of SG entries dma_map_sg_attrs return. But in dma_sync_sg_for_device, it use lengths of each SG entries before dma_map_sg_attrs. dma_map_sg_attrs will concatenate