Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447335 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2016-07-20 18:10 +0200 |
| Last post | 2016-07-21 01:30 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-20 18:10 +0200
Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message Sakari Ailus <sakari.ailus@iki.fi> - 2016-07-20 22:00 +0200
Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-21 01:00 +0200
Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message Sakari Ailus <sakari.ailus@iki.fi> - 2016-07-21 01:10 +0200
Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-21 01:30 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2016-07-20 18:10 +0200 |
| Subject | [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message |
| Message-ID | <rX2en-3Bs-37@gated-at.bofh.it> |
If the VIDIOC_QBUF ioctl fails due a wrong dmabuf length, it's
useful to get the invalid and minimum lengths as a debug info.
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, minimum length 410880
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
Changes in v2:
- Use %u instead of %d (Sakari Ailus)
- Include min_length (Sakari Ailus)
drivers/media/v4l2-core/videobuf2-core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index b6fbc04f9699..bbba50d6e1ad 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1227,8 +1227,10 @@ 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 %u for plane %d, "
+ "minimum length %u\n",
+ planes[plane].length, plane,
+ vb->planes[plane].min_length);
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 22:00 +0200 |
| Subject | Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message |
| Message-ID | <rX5OV-5J8-5@gated-at.bofh.it> |
| In reply to | #1447335 |
On Wed, Jul 20, 2016 at 12:07:55PM -0400, Javier Martinez Canillas wrote:
> If the VIDIOC_QBUF ioctl fails due a wrong dmabuf length, it's
> useful to get the invalid and minimum lengths as a debug info.
>
> 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, minimum length 410880
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
> Changes in v2:
> - Use %u instead of %d (Sakari Ailus)
> - Include min_length (Sakari Ailus)
>
> drivers/media/v4l2-core/videobuf2-core.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index b6fbc04f9699..bbba50d6e1ad 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -1227,8 +1227,10 @@ 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 %u for plane %d, "
> + "minimum length %u\n",
You shouldn't split strings. It breaks grep.
With that changed,
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> + planes[plane].length, plane,
> + vb->planes[plane].min_length);
> dma_buf_put(dbuf);
> ret = -EINVAL;
> goto err;
--
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-21 01:00 +0200 |
| Subject | Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message |
| Message-ID | <rX8D8-7wq-13@gated-at.bofh.it> |
| In reply to | #1447425 |
Hello Sakari,
On 07/20/2016 03:52 PM, Sakari Ailus wrote:
> On Wed, Jul 20, 2016 at 12:07:55PM -0400, Javier Martinez Canillas wrote:
>> If the VIDIOC_QBUF ioctl fails due a wrong dmabuf length, it's
>> useful to get the invalid and minimum lengths as a debug info.
>>
>> 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, minimum length 410880
>>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> ---
>>
>> Changes in v2:
>> - Use %u instead of %d (Sakari Ailus)
>> - Include min_length (Sakari Ailus)
>>
>> drivers/media/v4l2-core/videobuf2-core.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
>> index b6fbc04f9699..bbba50d6e1ad 100644
>> --- a/drivers/media/v4l2-core/videobuf2-core.c
>> +++ b/drivers/media/v4l2-core/videobuf2-core.c
>> @@ -1227,8 +1227,10 @@ 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 %u for plane %d, "
>> + "minimum length %u\n",
>
> You shouldn't split strings. It breaks grep.
>
Yes I know but if I didn't split the line, it would had been longer than
the max 80 character per line convention. On those situations I follow
what's already done in the file for consistency and most strings in the
videobuf2-core file, whose lines are over 80 characters, are being split.
But if having a longer line is preferred, I'll happily re-spin the patch.
> With that changed,
>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>
>> + planes[plane].length, plane,
>> + vb->planes[plane].min_length);
>> dma_buf_put(dbuf);
>> ret = -EINVAL;
>> goto err;
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
[toc] | [prev] | [next] | [standalone]
| From | Sakari Ailus <sakari.ailus@iki.fi> |
|---|---|
| Date | 2016-07-21 01:10 +0200 |
| Subject | Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message |
| Message-ID | <rX8MO-7OR-27@gated-at.bofh.it> |
| In reply to | #1447526 |
Hi Javier,
On Wed, Jul 20, 2016 at 06:56:52PM -0400, Javier Martinez Canillas wrote:
> Hello Sakari,
>
> On 07/20/2016 03:52 PM, Sakari Ailus wrote:
> > On Wed, Jul 20, 2016 at 12:07:55PM -0400, Javier Martinez Canillas wrote:
> >> If the VIDIOC_QBUF ioctl fails due a wrong dmabuf length, it's
> >> useful to get the invalid and minimum lengths as a debug info.
> >>
> >> 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, minimum length 410880
> >>
> >> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> >>
> >> ---
> >>
> >> Changes in v2:
> >> - Use %u instead of %d (Sakari Ailus)
> >> - Include min_length (Sakari Ailus)
> >>
> >> drivers/media/v4l2-core/videobuf2-core.c | 6 ++++--
> >> 1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> >> index b6fbc04f9699..bbba50d6e1ad 100644
> >> --- a/drivers/media/v4l2-core/videobuf2-core.c
> >> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> >> @@ -1227,8 +1227,10 @@ 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 %u for plane %d, "
> >> + "minimum length %u\n",
> >
> > You shouldn't split strings. It breaks grep.
> >
>
> Yes I know but if I didn't split the line, it would had been longer than
> the max 80 character per line convention. On those situations I follow
> what's already done in the file for consistency and most strings in the
> videobuf2-core file, whose lines are over 80 characters, are being split.
>
> But if having a longer line is preferred, I'll happily re-spin the patch.
I guess in videobuf2's case it's that the strings contain lots of format
specifiers --- it's not that useful to be able to grep those. I think this
case is a borderline one.
Up to you. You've got my ack.
> > With that changed,
> >
> > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> >
> >> + planes[plane].length, plane,
> >> + vb->planes[plane].min_length);
> >> dma_buf_put(dbuf);
> >> ret = -EINVAL;
> >> goto err;
> >
>
> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
--
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-21 01:30 +0200 |
| Subject | Re: [PATCH v2] [media] vb2: include lengths in dmabuf qbuf debug message |
| Message-ID | <rX969-7Vf-1@gated-at.bofh.it> |
| In reply to | #1447529 |
Hello Sakari,
On 07/20/2016 07:08 PM, Sakari Ailus wrote:
> Hi Javier,
>
> On Wed, Jul 20, 2016 at 06:56:52PM -0400, Javier Martinez Canillas wrote:
>> Hello Sakari,
>>
>> On 07/20/2016 03:52 PM, Sakari Ailus wrote:
>>> On Wed, Jul 20, 2016 at 12:07:55PM -0400, Javier Martinez Canillas wrote:
>>>> If the VIDIOC_QBUF ioctl fails due a wrong dmabuf length, it's
>>>> useful to get the invalid and minimum lengths as a debug info.
>>>>
>>>> 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, minimum length 410880
>>>>
>>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>
>>>> ---
>>>>
>>>> Changes in v2:
>>>> - Use %u instead of %d (Sakari Ailus)
>>>> - Include min_length (Sakari Ailus)
>>>>
>>>> drivers/media/v4l2-core/videobuf2-core.c | 6 ++++--
>>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
>>>> index b6fbc04f9699..bbba50d6e1ad 100644
>>>> --- a/drivers/media/v4l2-core/videobuf2-core.c
>>>> +++ b/drivers/media/v4l2-core/videobuf2-core.c
>>>> @@ -1227,8 +1227,10 @@ 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 %u for plane %d, "
>>>> + "minimum length %u\n",
>>>
>>> You shouldn't split strings. It breaks grep.
>>>
>>
>> Yes I know but if I didn't split the line, it would had been longer than
>> the max 80 character per line convention. On those situations I follow
>> what's already done in the file for consistency and most strings in the
>> videobuf2-core file, whose lines are over 80 characters, are being split.
>>
>> But if having a longer line is preferred, I'll happily re-spin the patch.
>
> I guess in videobuf2's case it's that the strings contain lots of format
> specifiers --- it's not that useful to be able to grep those. I think this
> case is a borderline one.
>
Yes, lots of format specifiers as you said. Which also makes harder to grep
the messages verbatim and someone would had to grep a sub-string anyways or
figure the specifier for each variable to be able to grep the complete line.
So I would prefer to kept the line split as is if you don't mind.
> Up to you. You've got my ack.
>
Thanks a lot.
>>> With that changed,
>>>
>>> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
>>>
>>>> + planes[plane].length, plane,
>>>> + vb->planes[plane].min_length);
>>>> dma_buf_put(dbuf);
>>>> ret = -EINVAL;
>>>> goto err;
>>>
>>
>> Best regards,
>> --
>> Javier Martinez Canillas
>> Open Source Group
>> Samsung Research America
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web