diff mbox

vb2: Add debug print for the output buffer planes lengths checks

Message ID 1377532073-12864-1-git-send-email-s.nawrocki@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Add debug print so it's easier to find any errors resulting from
the planes' configuration checks added in commit 8023ed09cb278004a2
"videobuf2-core: Verify planes lengths for output buffers".

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/v4l2-core/videobuf2-core.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart Aug. 27, 2013, 8:51 a.m. UTC | #1
Hi Sylwester,

Thank you for the patch.

On Monday 26 August 2013 17:47:53 Sylwester Nawrocki wrote:
> Add debug print so it's easier to find any errors resulting from
> the planes' configuration checks added in commit 8023ed09cb278004a2
> "videobuf2-core: Verify planes lengths for output buffers".
> 
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/v4l2-core/videobuf2-core.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c
> b/drivers/media/v4l2-core/videobuf2-core.c index de0e87f..6bffc96 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -1205,8 +1205,11 @@ static int __buf_prepare(struct vb2_buffer *vb, const
> struct v4l2_buffer *b) int ret;
> 
>  	ret = __verify_length(vb, b);
> -	if (ret < 0)
> +	if (ret < 0) {
> +		dprintk(1, "%s(): plane parameters verification failed: %d\n",
> +			__func__, ret);
>  		return ret;
> +	}
> 
>  	switch (q->memory) {
>  	case V4L2_MEMORY_MMAP:
Marek Szyprowski Aug. 27, 2013, 8:59 a.m. UTC | #2
Hello,

On 8/26/2013 5:47 PM, Sylwester Nawrocki wrote:
> Add debug print so it's easier to find any errors resulting from
> the planes' configuration checks added in commit 8023ed09cb278004a2
> "videobuf2-core: Verify planes lengths for output buffers".
>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
>   drivers/media/v4l2-core/videobuf2-core.c |    5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index de0e87f..6bffc96 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -1205,8 +1205,11 @@ static int __buf_prepare(struct vb2_buffer *vb, const struct v4l2_buffer *b)
>   	int ret;
>   
>   	ret = __verify_length(vb, b);
> -	if (ret < 0)
> +	if (ret < 0) {
> +		dprintk(1, "%s(): plane parameters verification failed: %d\n",
> +			__func__, ret);
>   		return ret;
> +	}
>   
>   	switch (q->memory) {
>   	case V4L2_MEMORY_MMAP:

Best regards
diff mbox

Patch

diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index de0e87f..6bffc96 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1205,8 +1205,11 @@  static int __buf_prepare(struct vb2_buffer *vb, const struct v4l2_buffer *b)
 	int ret;
 
 	ret = __verify_length(vb, b);
-	if (ret < 0)
+	if (ret < 0) {
+		dprintk(1, "%s(): plane parameters verification failed: %d\n",
+			__func__, ret);
 		return ret;
+	}
 
 	switch (q->memory) {
 	case V4L2_MEMORY_MMAP: