[PATCH v4 09/14] media: vimc: cap: Allocate and verify mplanar buffers

2019-04-25 Thread André Almeida
If the driver is in multiplanar mode, fill the vb2 structures with the planes sizes and verify it the sizes allocated to the planes are enough. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v4: none Change in v3: none Change in v2: - Use IS_MULTIPLANAR macro drivers/media

[PATCH v5 01/14] media: vimc: Remove unnecessary stream checks

2019-04-26 Thread André Almeida
Change the way subdevices check if the stream is running. Verify the stream pointer instead of src_frame. This makes easier to get rid of the void* and u8* in the subdevices structs. Also, remove redundant checks for stream. Signed-off-by: André Almeida Acked-by: Helen Koike --- Changes in v5

[PATCH v5 00/14] media: vimc: Add support for multiplanar formats

2019-04-26 Thread André Almeida
MULTIPLANAR(vcap))` - Add a new commit to propagate in the stream if the capture device is in multiplanar or singleplanar mode André Almeida (14): media: vimc: Remove unnecessary stream checks media: vimc: cap: Change vimc_cap_device.format type media: vimc: cap: Dynamically define st

[PATCH v5 02/14] media: vimc: cap: Change vimc_cap_device.format type

2019-04-26 Thread André Almeida
format support. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v5: none Change in v4: none Change in v3: none Change in v2: none drivers/media/platform/vimc/vimc-capture.c | 56 -- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/drivers

[PATCH v5 10/14] media: vimc: Add and use new struct vimc_frame

2019-04-26 Thread André Almeida
vimc_frame*. Change the frame in subdevices structs from u8* to vimc_frame. Signed-off-by: André Almeida Acked-by: Helen Koike --- Changes in v5: none Changes in v4: - Remove unused parameter `bool multiplanar` Changes in v3: - Refactor vimc_frame struct, now it have fewer fields with the

[PATCH v5 11/14] media: vimc: sen: Add support for multiplanar formats

2019-04-26 Thread André Almeida
This commit adapts vimc-sensor to handle multiplanar pixel formats, adapting the memory allocation and TPG configuration. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v5: none Changes in v4: - Correct `unsigned int ret` to `int ret` - Remove label `free_planes` from else

[PATCH v5 05/14] media: vimc: cap: refactor singleplanar as a subset of multiplanar

2019-04-26 Thread André Almeida
to single planar. This is implemented with v4l2_fmt_sp2mp_func(). Signed-off-by: André Almeida Acked-by: Helen Koike --- Changes in v5: none Changes in v4: - Add comment that was in wrong commit - Check the return of try_fmt function Changes in v3: - Commit title renamed - Get rid of `if

[PATCH v5 06/14] media: vimc: cap: Add handler for multiplanar fmt ioctls

2019-04-26 Thread André Almeida
Add functions to handle multiplanar format ioctls, calling the generic format ioctls functions when possible. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v5: none Change in v4: - Split from multiplanar parameter commit - Use `IS_MULTIPLANAR` instead of `multiplanar` - Move

[PATCH v5 12/14] media: vimc: sca: Add support for multiplanar formats

2019-04-26 Thread André Almeida
Change the scaling functions in order to scale planes. This change makes easier to support multiplanar pixel formats. Signed-off-by: André Almeida --- Changes in v5: - Remove bpp from vimc_sca_device - Changes where bpp var is declared at `vimc_sca_scale_pix` Changes in v4: - Rename `frame_size

[PATCH v5 09/14] media: vimc: cap: Allocate and verify mplanar buffers

2019-04-26 Thread André Almeida
If the driver is in multiplanar mode, fill the vb2 structures with the planes sizes and verify it the sizes allocated to the planes are enough. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v5: none Change in v4: none Change in v3: none Change in v2: - Use IS_MULTIPLANAR

[PATCH v5 14/14] media: vimc: Create multiplanar parameter

2019-04-26 Thread André Almeida
igned-off-by: André Almeida Acked-by: Helen Koike --- Changes in v5: none Change in v4: - Split commit with "Add handler for multiplanar fmt ioctls" Change in v3: - Squash commit with "Add handler for multiplanar fmt ioctls" - Remove functions that only did the `IS_MULTIPLA

[PATCH v5 03/14] media: vimc: cap: Dynamically define stream pixelformat

2019-04-26 Thread André Almeida
Define the pixelformat of the streamer depending to the mode (single/multiplanar). Add a macro to help checking if the device is in multilplanar mode. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v5: none Change in v4: none Change in v3: - Replace if with triaste operator

[PATCH v5 08/14] media: vimc: cap: Add multiplanar default format

2019-04-26 Thread André Almeida
vimc already have a default single planar format. Add a multiplanar default pixel format to perform those same actions. Change where the default pixelformat is set to make sure that the vcap is with the right capabilities. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v5

[PATCH v5 07/14] media: vimc: cap: Add multiplanar formats

2019-04-26 Thread André Almeida
Add multiplanar formats to be exposed to the userspace as supported formats. Since we don't want to support multiplanar formats when the driver is in singleplanar mode, we only access the multiplanar formats array if the multiplanar mode is enabled. Signed-off-by: André Almeida Acked-by:

[PATCH v5 04/14] media: Move sp2mp functions to v4l2-common

2019-04-26 Thread André Almeida
Move sp2mp functions from vivid code to v4l2-common as it will be reused by vimc driver for multiplanar support. Signed-off-by: André Almeida Acked-by: Helen Koike --- Changes in v5: none Changes in v4: none Changes in v3: - Change commit order - Reword comments Changes in v2: - Fix

[PATCH v5 13/14] media: vimc: cap: Add support for multiplanar formats

2019-04-26 Thread André Almeida
Adapt vimc-capture to support multiplanar formats, copying each plane to the correct buffer. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v5: none Change in v4: - Move variables to inside the for loop - Change `plane_size` type from `unsigned int` to `size_t` Change in v3

[PATCH] media: vimc: Remove or modify stream checks

2019-05-30 Thread André Almeida
Controller Framework doesn't allow two streaming on the same media pipeline at the same time. Signed-off-by: André Almeida Acked-by: Helen Koike --- drivers/media/platform/vimc/vimc-debayer.c | 5 + drivers/media/platform/vimc/vimc-scaler.c | 7 ++- drivers/media/platform/vimc/vimc-sensor.c

Re: [ANN] Patchwork version upgrade

2019-05-31 Thread André Almeida
If one tries to access a page that doesn't exists (e.g. [1]), the page shows that Django is on debug mode. According to Django documentation[2], is not a good idea running with debugging enabled on production environment. To fix this, just change the `DEBUG = True` to `DEBUG = False` on `settings.p

[PATCH] vivid: add vertical down sampling to imagesize calc

2019-02-04 Thread André Almeida
To correctly set the size of the image in a plane, it's needed to divide the height of image by the vertical down sampling factor. This was only happening in vivid_try_fmt_vid_cap(), but now it applied in others sizeimage calculations as well. Signed-off-by: André Almeida --- drivers/

Fwd: Re: [PATCH v2 2/2] media: Introduce helpers to fill pixel format structs

2019-02-11 Thread André Almeida
. Signed-off-by: Ezequiel Garcia I've used the function v4l2_fill_pixfmt_mp in vimc to set multiplanar formats in vidioc_s_fmt and worked correctly. Tested-by: André Almeida --- This patch depends on "[PATCH 1/2] rockchip/vpu: Rename pixel format helpers" so avoid name collisio

Re: [PATCH 5/8] media: vimc: stream: cleanup frame field from struct vimc_stream

2019-03-07 Thread André Almeida
and with v4l2-compliance --streaming=5 -d /dev/videoX and no regressions where found. On 3/6/19 7:42 PM, Helen Koike wrote: There is no need to have the frame field in the vimc_stream struct. Signed-off-by: Helen Koike Tested-by: André Almeida --- drivers/media/platform/vimc/vimc-strea

Re: [PATCH 7/8] media: vimc: stream: init/terminate the first entity

2019-03-07 Thread André Almeida
=5 -d /dev/videoX and no regressions where found. Tested-by: André Almeida --- drivers/media/platform/vimc/vimc-streamer.c | 25 - 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/platform/vimc

Re: [PATCH 8/8] media: vimc: propagate pixel format in the stream

2019-03-07 Thread André Almeida
ideoX and no regressions where found. Tested-by: André Almeida --- drivers/media/platform/vimc/vimc-capture.c | 76 +++-- drivers/media/platform/vimc/vimc-common.c | 307 drivers/media/platform/vimc/vimc-common.h | 13 + drivers/media/platform/vimc/vimc-deba

[PATCH v3 01/14] media: vimc: Remove unnecessary stream checks

2019-04-24 Thread André Almeida
Change the way subdevices check if the stream is running. Verify the stream pointer instead of src_frame. This makes easier to get rid of the void* and u8* in the subdevices structs. Also, remove redundant checks for stream. Signed-off-by: André Almeida Acked-by: Helen Koike --- Changes in v3

[PATCH v3 00/14] media: vimc: Add support for multiplanar formats

2019-04-24 Thread André Almeida
ate in the stream if the capture device is in multiplanar or singleplanar mode André Almeida (14): media: vimc: Remove unnecessary stream checks media: vimc: cap: Change vimc_cap_device.format type media: vimc: cap: Dynamically define stream pixelformat media: Move sp2mp functions to v4l2-com

[PATCH v3 04/14] media: Move sp2mp functions to v4l2-common

2019-04-24 Thread André Almeida
Move sp2mp functions from vivid code to v4l2-common as it will be reused by vimc driver for multiplanar support. Signed-off-by: André Almeida --- Changes in v3: - Change commit order - Reword comments Changes in v2: - Fix indentation - Change the style of comments. Functions now have a shorter

[PATCH v3 02/14] media: vimc: cap: Change vimc_cap_device.format type

2019-04-24 Thread André Almeida
format support. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v3: none Change in v2: none drivers/media/platform/vimc/vimc-capture.c | 56 -- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/drivers/media/platform/vimc/vimc-capture.c b

[PATCH v3 06/14] media: vimc: cap: Add multiplanar formats

2019-04-24 Thread André Almeida
Add multiplanar formats to be exposed to the userspace as supported formats. Since we don't want to support multiplanar formats when the driver is in singleplanar mode, we only access the multiplanar formats array if the multiplanar mode is enabled. Signed-off-by: André Almeida Acked-by:

[PATCH v3 05/14] media: vimc: cap: refactor singleplanar as a subset of multiplanar

2019-04-24 Thread André Almeida
to single planar. This is implemented with v4l2_fmt_sp2mp_func(). Signed-off-by: André Almeida --- Changes in v3: - Commit title renamed - Get rid of `if (IS_MULTIPLANAR(vcap))` checks and functions to do this check Changes in v2: - Make more clear that the generic function

[PATCH v3 03/14] media: vimc: cap: Dynamically define stream pixelformat

2019-04-24 Thread André Almeida
Define the pixelformat of the streamer depending to the mode (single/multiplanar). Add a macro to help checking if the device is in multilplanar mode. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v3: - Replace if with triaste operator Change in v2: - Add a macro to check if

[PATCH v3 07/14] media: vimc: cap: Add multiplanar default format

2019-04-24 Thread André Almeida
vimc already have a default single planar format. Add a multiplanar default pixel format to perform those same actions. Change where the default pixelformat is set to make sure that the vcap is with the right capabilities. Signed-off-by: André Almeida --- Change in v3: - Fix typo on commit

[PATCH v3 09/14] media: vimc: Propagate multiplanar state in the stream

2019-04-24 Thread André Almeida
Add a multiplanar flag in vimc_stream in order to propagate the state (singleplanar/multiplanar) to subdevices at the stream. Signed-off-by: André Almeida --- Change in v3: - Use ternary operator to get code more simple Change in v2: - New commit drivers/media/platform/vimc/vimc-capture.c

[PATCH v3 08/14] media: vimc: cap: Allocate and verify mplanar buffers

2019-04-24 Thread André Almeida
If the driver is in multiplanar mode, fill the vb2 structures with the planes sizes and verify it the sizes allocated to the planes are enough. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v3: none Change in v2: - Use IS_MULTIPLANAR macro drivers/media/platform/vimc/vimc

[PATCH v3 11/14] media: vimc: sen: Add support for multiplanar formats

2019-04-24 Thread André Almeida
This commit adapts vimc-sensor to handle multiplanar pixel formats, adapting the memory allocation and TPG configuration. Signed-off-by: André Almeida --- Changes in v3: - Adapt to new vimc_frame Changes in v2: - Fix alignment issues - Remove unnecessary variable assignment - Reuse and share

[PATCH v3 13/14] media: vimc: cap: Add support for multiplanar formats

2019-04-24 Thread André Almeida
Adapt vimc-capture to support multiplanar formats, copying each plane to the correct buffer. Signed-off-by: André Almeida --- Change in v3: - Adapt to new vimc_frame Change in v2: none drivers/media/platform/vimc/vimc-capture.c | 16 +++- 1 file changed, 11 insertions(+), 5

[PATCH v3 12/14] media: vimc: sca: Add support for multiplanar formats

2019-04-24 Thread André Almeida
Change the scaling functions in order to scale planes. This change makes easier to support multiplanar pixel formats. Signed-off-by: André Almeida --- Change in v3: - Adapt to new vimc_frame Changes in v2: - Move the TODO comment to vimc-capture - Reuse and share the code to free the memory of

[PATCH v3 14/14] media: vimc: Create multiplanar parameter and ioctls

2019-04-24 Thread André Almeida
t the same time. Add functions to handle multiplanar format ioctls, calling the generic format ioctls functions when possible. Signed-off-by: André Almeida --- Change in v3: - Squash commit with "Add handler for multiplanar fmt ioctls" - Remove functions that only did the `IS_MULTIPLAN

[PATCH v3 10/14] media: vimc: Add and use new struct vimc_frame

2019-04-24 Thread André Almeida
vimc_frame*. Change the frame in subdevices structs from u8* to vimc_frame. Signed-off-by: André Almeida --- Changes in v3: - Refactor vimc_frame struct, now it have fewer fields with the same content - Refactor vimc_fill_frame to be more simple Change in v2: - Fix alignment issues drivers

Re: [PATCH v3 14/14] media: vimc: Create multiplanar parameter and ioctls

2019-04-24 Thread André Almeida
Hello Helen, Thanks for your review! On 4/24/19 6:32 PM, Helen Koike wrote: > Hi André, > > Thanks for the patch, please see my comments below. > > On 4/24/19 10:56 AM, André Almeida wrote: >> Create multiplanar kernel module parameter to define if the driver is >> run

Re: [PATCH v3 14/14] media: vimc: Create multiplanar parameter and ioctls

2019-04-25 Thread André Almeida
On 4/24/19 8:19 PM, Helen Koike wrote: > > On 4/24/19 8:03 PM, André Almeida wrote: >> Hello Helen, >> >> Thanks for your review! >> >> On 4/24/19 6:32 PM, Helen Koike wrote: >>> Hi André, >>> >>> Thanks for the patch, please se

[PATCH v4 00/14] media: vimc: Add support for multiplanar formats

2019-04-25 Thread André Almeida
agate in the stream if the capture device is in multiplanar or singleplanar mode André Almeida (14): media: vimc: Remove unnecessary stream checks media: vimc: cap: Change vimc_cap_device.format type media: vimc: cap: Dynamically define stream pixelformat media: Move sp2mp functions to v4l2-com

[PATCH v4 03/14] media: vimc: cap: Dynamically define stream pixelformat

2019-04-25 Thread André Almeida
Define the pixelformat of the streamer depending to the mode (single/multiplanar). Add a macro to help checking if the device is in multilplanar mode. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v4: none Change in v3: - Replace if with triaste operator Change in v2: - Add

[PATCH v4 04/14] media: Move sp2mp functions to v4l2-common

2019-04-25 Thread André Almeida
Move sp2mp functions from vivid code to v4l2-common as it will be reused by vimc driver for multiplanar support. Signed-off-by: André Almeida --- Changes in v4: none Changes in v3: - Change commit order - Reword comments Changes in v2: - Fix indentation - Change the style of comments

[PATCH v4 06/14] media: vimc: cap: Add handler for multiplanar fmt ioctls

2019-04-25 Thread André Almeida
Add functions to handle multiplanar format ioctls, calling the generic format ioctls functions when possible. Signed-off-by: André Almeida --- Change in v4: - Split from multiplanar parameter commit - Use `IS_MULTIPLANAR` instead of `multiplanar` - Move "Functions to handle..." t

[PATCH v4 02/14] media: vimc: cap: Change vimc_cap_device.format type

2019-04-25 Thread André Almeida
format support. Signed-off-by: André Almeida Acked-by: Helen Koike --- Change in v4: none Change in v3: none Change in v2: none drivers/media/platform/vimc/vimc-capture.c | 56 -- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/drivers/media/platform/vimc/vimc

[PATCH v4 07/14] media: vimc: cap: Add multiplanar formats

2019-04-25 Thread André Almeida
Add multiplanar formats to be exposed to the userspace as supported formats. Since we don't want to support multiplanar formats when the driver is in singleplanar mode, we only access the multiplanar formats array if the multiplanar mode is enabled. Signed-off-by: André Almeida Acked-by:

[PATCH v4 05/14] media: vimc: cap: refactor singleplanar as a subset of multiplanar

2019-04-25 Thread André Almeida
to single planar. This is implemented with v4l2_fmt_sp2mp_func(). Signed-off-by: André Almeida --- Changes in v4: - Add comment that was in wrong commit - Check the return of try_fmt function Changes in v3: - Commit title renamed - Get rid of `if (IS_MULTIPLANAR(vcap))` checks and functions to do

[PATCH v4 08/14] media: vimc: cap: Add multiplanar default format

2019-04-25 Thread André Almeida
vimc already have a default single planar format. Add a multiplanar default pixel format to perform those same actions. Change where the default pixelformat is set to make sure that the vcap is with the right capabilities. Signed-off-by: André Almeida --- Change in v4: none Changes in v3: - Fix

[PATCH v4 01/14] media: vimc: Remove unnecessary stream checks

2019-04-25 Thread André Almeida
Change the way subdevices check if the stream is running. Verify the stream pointer instead of src_frame. This makes easier to get rid of the void* and u8* in the subdevices structs. Also, remove redundant checks for stream. Signed-off-by: André Almeida Acked-by: Helen Koike --- Changes in v4

[PATCH v4 12/14] media: vimc: sca: Add support for multiplanar formats

2019-04-25 Thread André Almeida
Change the scaling functions in order to scale planes. This change makes easier to support multiplanar pixel formats. Signed-off-by: André Almeida --- Changes in v4: - Rename `frame_size` to `plane_size` - Correct `unsigned int ret` to `int ret` - Remove label `free_planes` from else scope

[PATCH v4 11/14] media: vimc: sen: Add support for multiplanar formats

2019-04-25 Thread André Almeida
This commit adapts vimc-sensor to handle multiplanar pixel formats, adapting the memory allocation and TPG configuration. Signed-off-by: André Almeida --- Changes in v4: - Correct `unsigned int ret` to `int ret` - Remove label `free_planes` from else scope Changes in v3: - Adapt to new

[PATCH v4 13/14] media: vimc: cap: Add support for multiplanar formats

2019-04-25 Thread André Almeida
Adapt vimc-capture to support multiplanar formats, copying each plane to the correct buffer. Signed-off-by: André Almeida --- Change in v4: - Move variables to inside the for loop - Change `plane_size` type from `unsigned int` to `size_t` Change in v3: - Adapt to new vimc_frame Change in v2

[PATCH v4 14/14] media: vimc: Create multiplanar parameter

2019-04-25 Thread André Almeida
igned-off-by: André Almeida --- Change in v4: - Split commit with "Add handler for multiplanar fmt ioctls" Change in v3: - Squash commit with "Add handler for multiplanar fmt ioctls" - Remove functions that only did the `IS_MULTIPLANAR(vcap)` check - Assign ioctls accordi

[PATCH v4 10/14] media: vimc: Add and use new struct vimc_frame

2019-04-25 Thread André Almeida
vimc_frame*. Change the frame in subdevices structs from u8* to vimc_frame. Signed-off-by: André Almeida --- Changes in v4: - Remove unused parameter `bool multiplanar` Changes in v3: - Refactor vimc_frame struct, now it have fewer fields with the same content - Refactor vimc_fill_frame to be

[PATCH] v4l2-compliance: split node at testNode() in two nodes

2019-08-08 Thread André Almeida
support they. Split the node on testNode and related functions in two arguments: struct node node and struct node node_m2m_cap. For now, use the same node in both arguments. Signed-off-by: André Almeida --- Hello, This is an effort to support topologies with video loopback (i.e. an output

Re: [PATCH] v4l2-compliance: split node at testNode() in two nodes

2019-08-08 Thread André Almeida
On 8/8/19 10:02 PM, André Almeida wrote: > v4l2-compliance tests deals with memory-to-memory devices (m2m) like > they are a single device, through the struct node. This is indeed the > most usual case. However, there are m2m devices that have two > separated devices for the capture q

Re: [PATCH] media: vimc: upon streaming, check that the pipeline starts with a source entity

2019-08-29 Thread André Almeida
Hello Dafna, Thanks for your patch! On 8/29/19 8:00 AM, Dafna Hirschfeld wrote: > Userspace can disable links and create pipelines that > do not start with a source entity. Trying to stream > from such a pipeline should fail with -EPIPE > currently this is not handled and cause kernel crash. > >

Re: [PATCH v2] media: add a subsystem profile documentation

2019-09-18 Thread André Almeida
Hello Mauro, On 9/18/19 10:59 AM, Mauro Carvalho Chehab wrote: > Document the basic policies of the media subsystem profile. > > Signed-off-by: Mauro Carvalho Chehab > --- > Documentation/media/index.rst | 1 + > .../media/maintainer-entry-profile.rst| 157