Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443519 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2016-07-14 17:20 +0200 |
| Last post | 2016-07-20 15:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] [media] vb2: include length in dmabuf qbuf debug message Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-14 17:20 +0200
Re: [PATCH] [media] vb2: include length in dmabuf qbuf debug message Sakari Ailus <sakari.ailus@iki.fi> - 2016-07-20 15:10 +0200
Re: [PATCH] [media] vb2: include length in dmabuf qbuf debug message Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-20 15:40 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-07-14 17:20 +0200 |
| Subject | [PATCH] [media] vb2: include length in dmabuf qbuf debug message |
| Message-ID | <rUQAF-2UX-9@gated-at.bofh.it> |
If the the VIDIOC_QBUF ioctl fails due a wrong dmabuf length,
it's useful to get the invalid length as a debug information.
Before this patch:
vb2-core: __qbuf_dmabuf: invalid dmabuf length for plane 1
After this patch:
vb2-core: __qbuf_dmabuf: invalid dmabuf length 221248 for plane 1
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/v4l2-core/videobuf2-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index ca8ffeb56d72..97d1483e0f7a 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1228,8 +1228,8 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const void *pb)
planes[plane].length = dbuf->size;
if (planes[plane].length < vb->planes[plane].min_length) {
- dprintk(1, "invalid dmabuf length for plane %d\n",
- plane);
+ dprintk(1, "invalid dmabuf length %d for plane %d\n",
+ planes[plane].length, plane);
dma_buf_put(dbuf);
ret = -EINVAL;
goto err;
--
2.5.5
[toc] | [next] | [standalone]
| From | Sakari Ailus <sakari.ailus@iki.fi> |
|---|---|
| Date | 2016-07-20 15:10 +0200 |
| Message-ID | <rWZq9-1Q9-3@gated-at.bofh.it> |
| In reply to | #1443519 |
Hi Javier,
Thanks for the patch!
On Thu, Jul 14, 2016 at 11:09:34AM -0400, Javier Martinez Canillas wrote:
> If the the VIDIOC_QBUF ioctl fails due a wrong dmabuf length,
> it's useful to get the invalid length as a debug information.
>
> Before this patch:
>
> vb2-core: __qbuf_dmabuf: invalid dmabuf length for plane 1
>
> After this patch:
>
> vb2-core: __qbuf_dmabuf: invalid dmabuf length 221248 for plane 1
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
> drivers/media/v4l2-core/videobuf2-core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index ca8ffeb56d72..97d1483e0f7a 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -1228,8 +1228,8 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const void *pb)
> planes[plane].length = dbuf->size;
>
> if (planes[plane].length < vb->planes[plane].min_length) {
> - dprintk(1, "invalid dmabuf length for plane %d\n",
> - plane);
> + dprintk(1, "invalid dmabuf length %d for plane %d\n",
%u, please. You might want to print the minimum length as well.
> + planes[plane].length, plane);
> dma_buf_put(dbuf);
> ret = -EINVAL;
> goto err;
--
Kind regards,
Sakari Ailus
e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
[toc] | [prev] | [next] | [standalone]
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-07-20 15:40 +0200 |
| Message-ID | <rWZTb-21W-13@gated-at.bofh.it> |
| In reply to | #1447215 |
Hello Sakari,
On 07/20/2016 09:03 AM, Sakari Ailus wrote:
> Hi Javier,
>
> Thanks for the patch!
>
Thanks for your feedback.
> On Thu, Jul 14, 2016 at 11:09:34AM -0400, Javier Martinez Canillas wrote:
>> If the the VIDIOC_QBUF ioctl fails due a wrong dmabuf length,
>> it's useful to get the invalid length as a debug information.
>>
>> Before this patch:
>>
>> vb2-core: __qbuf_dmabuf: invalid dmabuf length for plane 1
>>
>> After this patch:
>>
>> vb2-core: __qbuf_dmabuf: invalid dmabuf length 221248 for plane 1
>>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>>
>> drivers/media/v4l2-core/videobuf2-core.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
>> index ca8ffeb56d72..97d1483e0f7a 100644
>> --- a/drivers/media/v4l2-core/videobuf2-core.c
>> +++ b/drivers/media/v4l2-core/videobuf2-core.c
>> @@ -1228,8 +1228,8 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const void *pb)
>> planes[plane].length = dbuf->size;
>>
>> if (planes[plane].length < vb->planes[plane].min_length) {
>> - dprintk(1, "invalid dmabuf length for plane %d\n",
>> - plane);
>> + dprintk(1, "invalid dmabuf length %d for plane %d\n",
>
> %u, please. You might want to print the minimum length as well.
>
Right, it should be %u indeed. Ok, I'll add the min_length as well in v2.
>> + planes[plane].length, plane);
>> dma_buf_put(dbuf);
>> ret = -EINVAL;
>> goto err;
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web