RE: [RESEND PATCH v9 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

2018-05-03 Thread Yeh, Andy
Hi Sakari, Thanks to add to your tree. And I am not familiar with the process. So I wonder how the patchset will be applied to the Linux media tree eventually? Regards, Andy -Original Message- From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] Sent: Thursday, May 3, 2018 5:37 AM

Re: [PATCH] saa7164: Fix driver name in debug output

2018-05-03 Thread kbuild test robot
/0day-ci/linux/commits/Brad-Love/saa7164-Fix-driver-name-in-debug-output/20180503-133636 base: git://linuxtv.org/media_tree.git master config: sparc64-allmodconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https

Re: [PATCH 26/28] venus: implementing multi-stream support

2018-05-03 Thread Stanimir Varbanov
Hi Vikash, Please write the comments for the chunk of code for which they are refer to. On 2.05.2018 10:40, Vikash Garodia wrote: Hello Stanimir, On 2018-04-24 18:14, Stanimir Varbanov wrote: This is implementing a multi-stream decoder support. The multi stream gives an option to use the

Re: [PATCH 2/2] cec: Kconfig coding style issue

2018-05-03 Thread Sakari Ailus
On Wed, May 02, 2018 at 06:19:30PM -0500, Brad Love wrote: > Use tabs instead of spaces and help is two-spaced after single tab. > > The incorrect spacing breaks menuconfig on older kernels. > > Signed-off-by: Brad Love Acked-by: Sakari Ailus

Re: [PATCH 1/2] intel-ipu3: Kconfig coding style issue

2018-05-03 Thread Sakari Ailus
On Wed, May 02, 2018 at 06:19:29PM -0500, Brad Love wrote: > Kconfig Help statements are two-spaced after a single tab. > > The incorrect spacing breaks menuconfig on older kernels. > > Signed-off-by: Brad Love Acked-by: Sakari Ailus --

Re: [RFCv12 PATCH 03/29] media-request: implement media requests

2018-05-03 Thread Hans Verkuil
On 03/05/18 00:24, Sakari Ailus wrote: > Hi Hans, > > On Tue, May 01, 2018 at 11:00:25AM +0200, Hans Verkuil wrote: >> From: Hans Verkuil >> >> Add initial media request support. >> >> Signed-off-by: Hans Verkuil >> --- >> drivers/media/Makefile

Re: atomisp: drop from staging ?

2018-05-03 Thread Sakari Ailus
On Mon, Apr 30, 2018 at 12:41:00PM +0300, Sakari Ailus wrote: > Hi Alan, > > On Sun, Apr 29, 2018 at 01:18:37AM +0100, Alan Cox wrote: > > > > I think this is going to be the best option. When I started cleaning up > > the atomisp code I had time to work on it. Then spectre/meltdown > > happened

Re: [RFCv12 PATCH 05/29] media-request: add media_request_find

2018-05-03 Thread Hans Verkuil
On 03/05/18 00:06, Sakari Ailus wrote: > Hi Hans, > > Thanks for the update. > > On Tue, May 01, 2018 at 11:00:27AM +0200, Hans Verkuil wrote: >> From: Hans Verkuil >> >> Add media_request_find() to find a request based on the file >> descriptor. > > What would you

[PATCH v3 10/11] media: vsp1: Support Interlaced display pipelines

2018-05-03 Thread Kieran Bingham
Calculate the top and bottom fields for the interlaced frames and utilise the extended display list command feature to implement the auto-field operations. This allows the DU to update the VSP2 registers dynamically based upon the currently processing field. Signed-off-by: Kieran Bingham

[PATCH v3 02/11] media: vsp1: Remove packed attributes from aligned structures

2018-05-03 Thread Kieran Bingham
The use of the packed attribute can cause a performance penalty for all accesses to the struct members, as the compiler will assume that the structure has the potential to have an unaligned base. These structures are all correctly aligned and contain no holes, thus the attribute is redundant and

[PATCH v3 00/11] R-Car DU Interlaced support through VSP1

2018-05-03 Thread Kieran Bingham
The Gen3 R-Car DU devices make use of the VSP to handle frame processing. In this series we implement support for handling interlaced pipelines by using the auto-fld feature of the VSP hardware. The implementation is preceded by some cleanup work and refactoring, through patches 1 to 6. These

[PATCH v3 07/11] media: vsp1: Use header display lists for all WPF outputs linked to the DU

2018-05-03 Thread Kieran Bingham
Header mode display lists are now supported on all WPF outputs. To support extended headers and auto-fld capabilities for interlaced mode handling only header mode display lists can be used. Disable the headerless display list configuration, and remove the dead code. Signed-off-by: Kieran

[PATCH v3 03/11] media: vsp1: Rename dl_child to dl_next

2018-05-03 Thread Kieran Bingham
Both vsp1_dl_list_commit() and __vsp1_dl_list_put() walk the display list chain referencing the nodes as children, when in reality they are siblings. Update the terminology to 'dl_next' to be consistent with the vsp1_video_pipeline_run() usage. Signed-off-by: Kieran Bingham

[PATCH v3 06/11] media: vsp1: Provide VSP1 feature helper macro

2018-05-03 Thread Kieran Bingham
The VSP1 devices define their specific capabilities through features marked in their device info structure. Various parts of the code read this info structure to infer if the features are available. Wrap this into a more readable vsp1_feature(vsp1, f) macro to ensure that usage is consistent

[PATCH v3 01/11] media: vsp1: drm: Fix minor grammar error

2018-05-03 Thread Kieran Bingham
The pixel format is 'unsupported'. Fix the small debug message which incorrectly declares this. Signed-off-by: Kieran Bingham --- drivers/media/platform/vsp1/vsp1_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v3 05/11] media: vsp1: Clean up DLM objects on error

2018-05-03 Thread Kieran Bingham
If there is an error allocating a display list within a DLM object the existing display lists are not free'd, and neither is the DL body pool. Use the existing vsp1_dlm_destroy() function to clean up on error. Signed-off-by: Kieran Bingham ---

[PATCH v3 09/11] media: vsp1: Provide support for extended command pools

2018-05-03 Thread Kieran Bingham
VSPD and VSP-DL devices can provide extended display lists supporting extended command display list objects. These extended commands require their own dma memory areas for a header and body specific to the command type. Implement a command pool to allocate all necessary memory in a single DMA

[PATCH v3 04/11] media: vsp1: Remove unused display list structure field

2018-05-03 Thread Kieran Bingham
The vsp1 reference in the vsp1_dl_body structure is not used. Remove it. Signed-off-by: Kieran Bingham --- drivers/media/platform/vsp1/vsp1_dl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_dl.c

[PATCH v3 08/11] media: vsp1: Add support for extended display list headers

2018-05-03 Thread Kieran Bingham
Extended display list headers allow pre and post command lists to be executed by the VSP pipeline. This provides the base support for features such as AUTO_FLD (for interlaced support) and AUTO_DISP (for supporting continuous camera preview pipelines. Signed-off-by: Kieran Bingham

[PATCH v3 11/11] drm: rcar-du: Support interlaced video output through vsp1

2018-05-03 Thread Kieran Bingham
Use the newly exposed VSP1 interface to enable interlaced frame support through the VSP1 lif pipelines. Signed-off-by: Kieran Bingham --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 3 +++ 2 files changed, 4

Re: [PATCH v3 10/11] media: vsp1: Support Interlaced display pipelines

2018-05-03 Thread Kieran Bingham
Hi Reviewers ... Comments inline ... On 03/05/18 09:44, Kieran Bingham wrote: > Calculate the top and bottom fields for the interlaced frames and > utilise the extended display list command feature to implement the > auto-field operations. This allows the DU to update the VSP2 registers >

Re: [PATCH v6 05/17] media: rkisp1: add Rockchip ISP1 subdev driver

2018-05-03 Thread Baruch Siach
Hi Jacob, On Thu, Mar 08, 2018 at 05:47:55PM +0800, Jacob Chen wrote: > +static int rkisp1_isp_sd_s_power(struct v4l2_subdev *sd, int on) > +{ > + struct rkisp1_device *isp_dev = sd_to_isp_dev(sd); > + int ret; > + > + v4l2_dbg(1, rkisp1_debug, _dev->v4l2_dev, "s_power: %d\n", on); >

[PATCH 02/15] dma-fence: Make ->enable_signaling optional

2018-05-03 Thread Daniel Vetter
Many drivers have a trivial implementation for ->enable_signaling. Let's make it optional by assuming that signalling is already available when the callback isn't present. Reviewed-by: Christian König Signed-off-by: Daniel Vetter Cc: Sumit

Re: imx-media: MT9P031 Capture issues on IMX6

2018-05-03 Thread Ibtsam Ul-Haq
Hi Fabio, On Thu, Apr 19, 2018 at 7:08 PM, Fabio Estevam wrote: > On Thu, Apr 19, 2018 at 1:55 PM, Ibtsam Ul-Haq > wrote: > >> I can see by using a logic analyzer that the PIXCLK does not look >> nice. It looks similar to the issue mentioned here:

Re: [PATCH v2 00/12] media: ov5640: Misc cleanup and improvements

2018-05-03 Thread Maxime Ripard
Hi, On Wed, May 02, 2018 at 11:11:55AM -0700, Sam Bobrowicz wrote: > > On Wednesday, 25 April 2018 01:11:19 EEST Sam Bobrowicz wrote: > >> FYI, still hard at work on this. Did some more experiments last week > >> that seemed to corroborate the clock tree in the spreadsheet. It also > >> seems

[PATCH] [media] dvbdev: add a mutex protecting the "mdev" pointer

2018-05-03 Thread Max Kellermann
During destruction, a race condition in dvb_media_controller_disable_source() can cause a kernel crash, because the "mdev" pointer has been read successfully while another task executes dvb_usb_media_device_unregister(), which destroys the object. Example for such a crash: general protection

[PATCH 04/15] dma-fence: Make ->wait callback optional

2018-05-03 Thread Daniel Vetter
Almost everyone uses dma_fence_default_wait. v2: Also remove the BUG_ON(!ops->wait) (Chris). Reviewed-by: Christian König (v1) Signed-off-by: Daniel Vetter Cc: Chris Wilson Cc: Sumit Semwal

[PATCH 03/15] dma-fence: Allow wait_any_timeout for all fences

2018-05-03 Thread Daniel Vetter
When this was introduced in commit a519435a96597d8cd96123246fea4ae5a6c90b02 Author: Christian König Date: Tue Oct 20 16:34:16 2015 +0200 dma-buf/fence: add fence_wait_any_timeout function v2 there was a restriction added that this only works if the dma-fence

[PATCH 15/15] dma-fence: Polish kernel-doc for dma-fence.c

2018-05-03 Thread Daniel Vetter
- Intro section that links to how this is exposed to userspace. - Lots more hyperlinks. - Minor clarifications and style polish Signed-off-by: Daniel Vetter Cc: Sumit Semwal Cc: Gustavo Padovan Cc:

[PATCHv13 27/28] vivid: add request support

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add support for requests to vivid. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivid/vivid-core.c| 8 drivers/media/platform/vivid/vivid-kthread-cap.c | 12

[PATCHv13 28/28] RFC: media-requests: add debugfs node

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Keep track of the number of requests and request objects of a media device. Helps to verify that all request-related memory is freed. Signed-off-by: Hans Verkuil --- drivers/media/media-device.c | 41

[PATCHv13 19/28] videobuf2-core: add request helper functions

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add a new helper function to tell if a request object is a buffer. Add a new helper function that returns true if a media_request contains at least one buffer. Signed-off-by: Hans Verkuil ---

Re: [PATCH v4 03/14] media: ov772x: allow i2c controllers without I2C_FUNC_PROTOCOL_MANGLING

2018-05-03 Thread jacopo mondi
Hi Akinobu, On Mon, Apr 30, 2018 at 02:13:02AM +0900, Akinobu Mita wrote: > The ov772x driver only works when the i2c controller have > I2C_FUNC_PROTOCOL_MANGLING. However, many i2c controller drivers don't > support it. > > The reason that the ov772x requires I2C_FUNC_PROTOCOL_MANGLING is that

[PATCH v9 8/8] media: vsp1: Move video configuration to a cached dlb

2018-05-03 Thread Kieran Bingham
We are now able to configure a pipeline directly into a local display list body. Take advantage of this fact, and create a cacheable body to store the configuration of the pipeline in the video object. vsp1_video_pipeline_run() is now the last user of the pipe->dl object. Convert this function to

[PATCH v9 5/8] media: vsp1: Use reference counting for bodies

2018-05-03 Thread Kieran Bingham
Extend the display list body with a reference count, allowing bodies to be kept as long as a reference is maintained. This provides the ability to keep a cached copy of bodies which will not change, so that they can be re-applied to multiple display lists. Signed-off-by: Kieran Bingham

[PATCH v9 2/8] media: vsp1: Protect bodies against overflow

2018-05-03 Thread Kieran Bingham
The body write function relies on the code never asking it to write more than the entries available in the list. Currently with each list body containing 256 entries, this is fine, but we can reduce this number greatly saving memory. In preparation of this add a level of protection to catch any

[PATCH v9 7/8] media: vsp1: Adapt entities to configure into a body

2018-05-03 Thread Kieran Bingham
Currently the entities store their configurations into a display list. Adapt this such that the code can be configured into a body directly, allowing greater flexibility and control of the content. All users of vsp1_dl_list_write() are removed in this process, thus it too is removed. A helper,

[PATCH v9 3/8] media: vsp1: Provide a body pool

2018-05-03 Thread Kieran Bingham
Each display list allocates a body to store register values in a dma accessible buffer from a dma_alloc_wc() allocation. Each of these results in an entry in the IOMMU TLB, and a large number of display list allocations adds pressure to this resource. Reduce TLB pressure on the IPMMUs by

[PATCH v4 08/11] media: vsp1: Add support for extended display list headers

2018-05-03 Thread Kieran Bingham
Extended display list headers allow pre and post command lists to be executed by the VSP pipeline. This provides the base support for features such as AUTO_FLD (for interlaced support) and AUTO_DISP (for supporting continuous camera preview pipelines. Signed-off-by: Kieran Bingham

[PATCH v4 09/11] media: vsp1: Provide support for extended command pools

2018-05-03 Thread Kieran Bingham
VSPD and VSP-DL devices can provide extended display lists supporting extended command display list objects. These extended commands require their own dma memory areas for a header and body specific to the command type. Implement a command pool to allocate all necessary memory in a single DMA

[PATCH v4 04/11] media: vsp1: Remove unused display list structure field

2018-05-03 Thread Kieran Bingham
The vsp1 reference in the vsp1_dl_body structure is not used. Remove it. Signed-off-by: Kieran Bingham --- drivers/media/platform/vsp1/vsp1_dl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_dl.c

[PATCH v4 03/11] media: vsp1: Rename dl_child to dl_next

2018-05-03 Thread Kieran Bingham
Both vsp1_dl_list_commit() and __vsp1_dl_list_put() walk the display list chain referencing the nodes as children, when in reality they are siblings. Update the terminology to 'dl_next' to be consistent with the vsp1_video_pipeline_run() usage. Signed-off-by: Kieran Bingham

[PATCH v4 02/11] media: vsp1: Remove packed attributes from aligned structures

2018-05-03 Thread Kieran Bingham
The use of the packed attribute can cause a performance penalty for all accesses to the struct members, as the compiler will assume that the structure has the potential to have an unaligned base. These structures are all correctly aligned and contain no holes, thus the attribute is redundant and

[PATCH v4 10/11] media: vsp1: Support Interlaced display pipelines

2018-05-03 Thread Kieran Bingham
Calculate the top and bottom fields for the interlaced frames and utilise the extended display list command feature to implement the auto-field operations. This allows the DU to update the VSP2 registers dynamically based upon the currently processing field. Signed-off-by: Kieran Bingham

[PATCH v4 00/11] R-Car DU Interlaced support through VSP1

2018-05-03 Thread Kieran Bingham
The Gen3 R-Car DU devices make use of the VSP to handle frame processing. In this series we implement support for handling interlaced pipelines by using the auto-fld feature of the VSP hardware. The implementation is preceded by some cleanup work and refactoring, through patches 1 to 6. These

[PATCH v4 07/11] media: vsp1: Use header display lists for all WPF outputs linked to the DU

2018-05-03 Thread Kieran Bingham
Header mode display lists are now supported on all WPF outputs. To support extended headers and auto-fld capabilities for interlaced mode handling only header mode display lists can be used. Disable the headerless display list configuration, and remove the dead code. Signed-off-by: Kieran

[PATCH v4 06/11] media: vsp1: Provide VSP1 feature helper macro

2018-05-03 Thread Kieran Bingham
The VSP1 devices define their specific capabilities through features marked in their device info structure. Various parts of the code read this info structure to infer if the features are available. Wrap this into a more readable vsp1_feature(vsp1, f) macro to ensure that usage is consistent

[PATCH v4 05/11] media: vsp1: Clean up DLM objects on error

2018-05-03 Thread Kieran Bingham
If there is an error allocating a display list within a DLM object the existing display lists are not free'd, and neither is the DL body pool. Use the existing vsp1_dlm_destroy() function to clean up on error. Signed-off-by: Kieran Bingham ---

[PATCH v4 11/11] drm: rcar-du: Support interlaced video output through vsp1

2018-05-03 Thread Kieran Bingham
Use the newly exposed VSP1 interface to enable interlaced frame support through the VSP1 lif pipelines. Signed-off-by: Kieran Bingham --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 1 + drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 3 +++ 2 files changed, 4

[PATCH v4 01/11] media: vsp1: drm: Fix minor grammar error

2018-05-03 Thread Kieran Bingham
The pixel format is 'unsupported'. Fix the small debug message which incorrectly declares this. Signed-off-by: Kieran Bingham --- drivers/media/platform/vsp1/vsp1_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] v4l2-dev.h: fix doc warning

2018-05-03 Thread Sakari Ailus
On Thu, May 03, 2018 at 02:47:10PM +0200, Hans Verkuil wrote: > Fix this warning when building the docs: > > include/media/v4l2-dev.h:42: warning: Enum value 'VFL_TYPE_MAX' not described > in enum 'vfl_devnode_type' > > Signed-off-by: Hans Verkuil Acked-by: Sakari

[PATCHv13 16/28] videobuf2-core: embed media_request_object

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Make vb2_buffer a request object. Signed-off-by: Hans Verkuil --- include/media/videobuf2-core.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index

[PATCHv13 01/28] v4l2-device.h: always expose mdev

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil The mdev field is only present if CONFIG_MEDIA_CONTROLLER is set. But since we will need to pass the media_device to vb2 and the control framework it is very convenient to just make this field available all the time. If CONFIG_MEDIA_CONTROLLER is not

[PATCHv13 15/28] vb2: store userspace data in vb2_v4l2_buffer

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil The userspace-provided plane data needs to be stored in vb2_v4l2_buffer. Currently this information is applied by __fill_vb2_buffer() which is called by the core prepare_buf and qbuf functions, but when using requests these functions aren't called yet

[PATCHv13 13/28] v4l2-ctrls: support g/s_ext_ctrls for requests

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. The v4l2_ctrls_find_req_obj() function is responsible for finding the request from the fd. Signed-off-by: Hans Verkuil ---

[PATCHv13 08/28] v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add a 'bool from_other_dev' argument: set to true if the two handlers refer to different devices (e.g. it is true when inheriting controls from a subdev into a main v4l2 bridge driver). This will be used later when implementing support for the request

[PATCHv13 23/28] media: vim2m: add media device

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Request API requires a media node. Add one to the vim2m driver so we can use requests with it. This probably needs a bit more work to correctly represent m2m hardware in the media topology. Signed-off-by: Hans Verkuil ---

[PATCHv13 12/28] v4l2-ctrls: add core request support

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Integrate the request support. This adds the v4l2_ctrl_request_complete and v4l2_ctrl_request_setup functions to complete a request and (as a helper function) to apply a request to the hardware. It takes care of queuing requests and correctly chaining

[PATCHv13 10/28] v4l2-ctrls: alloc memory for p_req

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil To store request data the handler_new_ref() allocates memory for it if needed. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ctrls.c | 20 1 file changed, 16 insertions(+), 4 deletions(-)

[PATCHv13 18/28] videobuf2-v4l2: integrate with media requests

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil This implements the V4L2 part of the request support. The main change is that vb2_qbuf and vb2_prepare_buf now have a new media_device pointer. This required changes to several drivers that did not use the vb2_ioctl_qbuf/prepare_buf helper functions.

[PATCHv13 20/28] videobuf2-v4l2: add vb2_request_queue/validate helpers

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil The generic vb2_request_validate helper function checks if there are buffers in the request and if so, prepares (validates) all objects in the request. The generic vb2_request_queue helper function queues all buffer objects in the validated request.

[PATCHv13 22/28] Documentation: v4l: document request API

2018-05-03 Thread Hans Verkuil
From: Alexandre Courbot Document the request API for V4L2 devices, and amend the documentation of system calls influenced by it. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil ---

[PATCHv13 26/28] vivid: add mc

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add support for the media_device to vivid. This is a prerequisite for request support. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivid/vivid-core.c | 61 +++

[PATCHv13 17/28] videobuf2-core: integrate with media requests

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Buffers can now be prepared or queued for a request. A buffer is unbound from the request at vb2_buffer_done time or when the queue is cancelled. Signed-off-by: Hans Verkuil --- .../media/common/videobuf2/videobuf2-core.c |

[PATCHv13 11/28] v4l2-ctrls: use ref in helper instead of ctrl

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil The next patch needs the reference to a control instead of the control itself, so change struct v4l2_ctrl_helper accordingly. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ctrls.c | 18 +- 1 file

[PATCHv13 25/28] vim2m: support requests

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add support for requests to vim2m. Signed-off-by: Hans Verkuil --- drivers/media/platform/vim2m.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/drivers/media/platform/vim2m.c

[PATCHv13 21/28] v4l2-mem2mem: add vb2_m2m_request_queue

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil For mem2mem devices we have to make sure that v4l2_m2m_try_schedule() is called whenever a request is queued. We do that by creating a vb2_m2m_request_queue() helper that should be used instead of the 'normal' vb2_request_queue() helper. The m2m helper

[PATCHv13 24/28] vim2m: use workqueue

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil v4l2_ctrl uses mutexes, so we can't setup a ctrl_handler in interrupt context. Switch to a workqueue instead. Signed-off-by: Hans Verkuil --- drivers/media/platform/vim2m.c | 15 +-- 1 file changed, 13

[PATCHv13 14/28] videodev2.h: Add request_fd field to v4l2_buffer

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil When queuing buffers allow for passing the request that should be associated with this buffer. If V4L2_BUF_FLAG_REQUEST_FD is set, then request_fd is used as the file descriptor. If a buffer is stored in a request, but not yet queued to the driver,

[PATCH] media: imx: add 16-bit grayscale support

2018-05-03 Thread Philipp Zabel
Since commit 50b0f0aee839 ("gpu: ipu-csi: add 10/12-bit grayscale support to mbus_code_to_bus_cfg") the IPU CSI can be configured to capture 10-bit and 12-bit grayscale formats, expanded to 16-bit grayscale, in bayer/generic data mode. This patch adds support for V4L2_PIX_FMT_Y16 captured from

Re: [PATCH v4 02/14] media: ov772x: correct setting of banding filter

2018-05-03 Thread jacopo mondi
Hi Akinobu, thanks for the patch On Mon, Apr 30, 2018 at 02:13:01AM +0900, Akinobu Mita wrote: > The banding filter ON/OFF is controlled via bit 5 of COM8 register. It > is attempted to be enabled in ov772x_set_params() by the following line. > > ret = ov772x_mask_set(client, COM8,

Re: [PATCH v3 10/11] media: vsp1: Support Interlaced display pipelines

2018-05-03 Thread Kieran Bingham
Hi Laurent, On 03/05/18 12:13, Laurent Pinchart wrote: > Hi Kieran, >>> + } else { >>> + vsp1_rpf_write(rpf, dlb, VI6_RPF_SRCM_ADDR_Y, mem.addr[0]); >>> + vsp1_rpf_write(rpf, dlb, VI6_RPF_SRCM_ADDR_C0, mem.addr[1]); >>> + vsp1_rpf_write(rpf, dlb,

Re: [PATCH v3 0/8] R-Car DU: Support CRC calculation

2018-05-03 Thread Daniel Vetter
On Thu, May 3, 2018 at 2:06 PM, Laurent Pinchart wrote: > Hi Dave, > > Ping ? Not aware of any crc core work going on in drm, so has my ack. Worst case we do a topic branch or something like that (since I guess you'll do a pull request anyway on the v4l side).

Re: [PATCH v11 2/4] v4l: cadence: Add Cadence MIPI-CSI2 RX driver

2018-05-03 Thread Maxime Ripard
Hi! Thanks for your review, On Thu, May 03, 2018 at 12:54:57PM +0200, Hans Verkuil wrote: > > +static int csi2rx_stop(struct csi2rx_priv *csi2rx) > > +{ > > + unsigned int i; > > + > > + clk_prepare_enable(csi2rx->p_clk); > > + clk_disable_unprepare(csi2rx->sys_clk); > > + > > + for (i =

Re: [PATCH v11 2/4] v4l: cadence: Add Cadence MIPI-CSI2 RX driver

2018-05-03 Thread Hans Verkuil
On 03/05/18 17:13, Maxime Ripard wrote: > Hi! > > Thanks for your review, > > On Thu, May 03, 2018 at 12:54:57PM +0200, Hans Verkuil wrote: >>> +static int csi2rx_stop(struct csi2rx_priv *csi2rx) >>> +{ >>> + unsigned int i; >>> + >>> + clk_prepare_enable(csi2rx->p_clk); >>> +

Re: [PATCH 1/2] dt-bindings: media: Add "upside-down" property to tell sensor orientation

2018-05-03 Thread Sebastian Reichel
Hi, On Thu, May 03, 2018 at 12:31:14AM +0300, Sakari Ailus wrote: > Camera sensors are occasionally mounted upside down. In order to use such > a sensor without having to turn every image upside down separately, most > camera sensors support reversing the readout order by setting both >

[PATCH v2] saa7164: Fix driver name in debug output

2018-05-03 Thread Brad Love
This issue was reported by a user who downloaded a corrupt saa7164 firmware, then went looking for a valid xc5000 firmware to fix the error displayed...but the device in question has no xc5000, thus after much effort, the wild goose chase eventually led to a support call. The xc5000 has nothing

[PATCHv13 02/28] uapi/linux/media.h: add request API

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Define the public request API. This adds the new MEDIA_IOC_REQUEST_ALLOC ioctl to allocate a request and two ioctls that operate on a request in order to queue the contents of the request to the driver and to re-initialize the request. Signed-off-by:

[PATCHv13 03/28] media-request: implement media requests

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add initial media request support: 1) Add MEDIA_IOC_REQUEST_ALLOC ioctl support to media-device.c 2) Add struct media_request to store request objects. 3) Add struct media_request_object to represent a request object. 4) Add

[PATCHv13 04/28] media-request: add media_request_get_by_fd

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add media_request_get_by_fd() to find a request based on the file descriptor. The caller has to call media_request_put() for the returned request since this function increments the refcount. Signed-off-by: Hans Verkuil ---

[PATCHv13 00/28] Request API

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Hi all, This is version 13 of the Request API series. The main changes compared to v12 are: - Replaced media_request_cancel with a new vb2 op buf_request_complete - No longer allow adding a prepared buffer to a request (see TODO below) - Updated and

[PATCHv13 09/28] v4l2-ctrls: prepare internal structs for request API

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Embed and initialize a media_request_object in struct v4l2_ctrl_handler. Add a p_req field to struct v4l2_ctrl_ref that will store the request value. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot

[PATCHv13 06/28] v4l2-dev: lock req_queue_mutex

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil We need to serialize streamon/off with queueing new requests. These ioctls may trigger the cancellation of a streaming operation, and that should not be mixed with queuing a new request at the same time. Also TRY/S_EXT_CTRLS needs this lock to

[PATCHv13 07/28] videodev2.h: add request_fd field to v4l2_ext_controls

2018-05-03 Thread Hans Verkuil
From: Alexandre Courbot If 'which' is V4L2_CTRL_WHICH_REQUEST_VAL, then the 'request_fd' field can be used to specify a request for the G/S/TRY_EXT_CTRLS ioctls. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil

[PATCHv13 05/28] media-request: add media_request_object_find

2018-05-03 Thread Hans Verkuil
From: Hans Verkuil Add media_request_object_find to find a request object inside a request based on ops and/or priv values. Objects of the same type (vb2 buffer, control handler) will have the same ops value. And objects that refer to the same 'parent' object (e.g. the

[PATCH v9 6/8] media: vsp1: Refactor display list configure operations

2018-05-03 Thread Kieran Bingham
The entities provide a single .configure operation which configures the object into the target display list, based on the vsp1_entity_params selection. Split the configure function into three parts, '.configure_stream()', '.configure_frame()', and '.configure_partition()' to facilitate splitting

[PATCH v9 4/8] media: vsp1: Convert display lists to use new body pool

2018-05-03 Thread Kieran Bingham
Adapt the dl->body0 object to use an object from the body pool. This greatly reduces the pressure on the TLB for IPMMU use cases, as all of the lists use a single allocation for the main body. The CLU and LUT objects pre-allocate a pool containing three bodies, allowing a userspace update before

[PATCH v9 0/8] vsp1: TLB optimisation and DL caching

2018-05-03 Thread Kieran Bingham
Each display list currently allocates an area of DMA memory to store register settings for the VSP1 to process. Each of these allocations adds pressure to the IPMMU TLB entries. We can reduce the pressure by pre-allocating larger areas and dividing the area across multiple bodies represented as a

[PATCH v9 1/8] media: vsp1: Reword uses of 'fragment' as 'body'

2018-05-03 Thread Kieran Bingham
Throughout the codebase, the term 'fragment' is used to represent a display list body. This term duplicates the 'body' which is already in use. The datasheet references these objects as a body, therefore replace all mentions of a fragment with a body, along with the corresponding pluralised

Re: [PATCH 1/2] dt-bindings: media: Add "upside-down" property to tell sensor orientation

2018-05-03 Thread Sakari Ailus
Hi Sebastian, On Thu, May 03, 2018 at 05:26:59PM +0200, Sebastian Reichel wrote: > Hi, > > On Thu, May 03, 2018 at 12:31:14AM +0300, Sakari Ailus wrote: > > Camera sensors are occasionally mounted upside down. In order to use such > > a sensor without having to turn every image upside down

Re: [PATCH v4 08/14] media: ov772x: support device tree probing

2018-05-03 Thread jacopo mondi
Akinobu, a very minor thing, please consider this only if you have to resend. On Mon, Apr 30, 2018 at 02:13:07AM +0900, Akinobu Mita wrote: > The ov772x driver currently only supports legacy platform data probe. > This change enables device tree probing. > > Note that the platform data probe

Re: [PATCH v4 10/14] media: ov772x: reconstruct s_frame_interval()

2018-05-03 Thread jacopo mondi
Hi Akinobu, thank you for the patch On Mon, Apr 30, 2018 at 02:13:09AM +0900, Akinobu Mita wrote: > This splits the s_frame_interval() in subdev video ops into selecting the > frame interval and setting up the registers. > > This is a preparatory change to avoid accessing registers under power

Re: [PATCH v4 12/14] media: ov772x: avoid accessing registers under power saving mode

2018-05-03 Thread jacopo mondi
Hi Akinobu, let me see if I got this right... On Mon, Apr 30, 2018 at 02:13:11AM +0900, Akinobu Mita wrote: > The set_fmt() in subdev pad ops, the s_ctrl() for subdev control handler, > and the s_frame_interval() in subdev video ops could be called when the > device is under power saving mode.

Re: [PATCH 02/15] dma-fence: Make ->enable_signaling optional

2018-05-03 Thread Chris Wilson
Quoting Daniel Vetter (2018-05-03 15:25:50) > @@ -560,7 +567,7 @@ dma_fence_init(struct dma_fence *fence, const struct > dma_fence_ops *ops, >spinlock_t *lock, u64 context, unsigned seqno) > { > BUG_ON(!lock); > - BUG_ON(!ops || !ops->wait || !ops->enable_signaling

Re: [PATCH 2/9] cx231xx: Use board profile values for addresses

2018-05-03 Thread Brad Love
Hi Matthias, On 2018-04-23 12:50, Brad Love wrote: > Hi Matthias, > > > > On 2018-04-19 12:10, Matthias Schwarzott wrote: >> Am 17.04.2018 um 18:39 schrieb Brad Love: >>> Replace all usage of hard coded values with >>> the proper field from the board profile. >>> >> Hi Brad, >> >> will there be

[PATCH] media: imx-csi: fix burst size for 16 bit

2018-05-03 Thread Jan Luebbe
A burst_size of 4 does not work for the 16 bit passthrough formats, so we use 8 instead. Signed-off-by: Jan Luebbe --- drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c

[PATCH 1/2] media: imx: capture: refactor enum_/try_fmt

2018-05-03 Thread Jan Luebbe
By checking and handling the internal IPU formats (ARGB or AYUV) first, we don't need to check whether it's a bayer format, as we can default to passing the input format on in all other cases. This simplifies handling the different configurations for RGB565 between parallel and MIPI CSI-2, as we

[PATCH 0/2] media: imx: add capture support for RGB565_2X8 on parallel bus

2018-05-03 Thread Jan Luebbe
The IPU can only capture RGB565 with two 8-bit cycles in bayer/generic mode on the parallel bus, compared to a specific mode on MIPI CSI-2. To handle this, we extend imx_media_pixfmt with a cycles per pixel field, which is used for generic formats on the parallel bus. Before actually adding

[PATCH 2/2] media: imx: add support for RGB565_2X8 on parallel bus

2018-05-03 Thread Jan Luebbe
The IPU can only capture RGB565 with two 8-bit cycles in bayer/generic mode on the parallel bus, compared to a specific mode on MIPI CSI-2. To handle this, we extend imx_media_pixfmt with a cycles per pixel field, which is used for generic formats on the parallel bus. Based on the selected format

Re: [PATCH] media: imx-csi: fix burst size for 16 bit

2018-05-03 Thread Philipp Zabel
On Thu, 2018-05-03 at 18:32 +0200, Jan Luebbe wrote: > A burst_size of 4 does not work for the 16 bit passthrough formats, so > we use 8 instead. > > Signed-off-by: Jan Luebbe > --- > drivers/staging/media/imx/imx-media-csi.c | 2 +- > 1 file changed, 1 insertion(+), 1

  1   2   >