Commit bf5dbed6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (4901): Improve debug msgs to show fourcc and buffer length on video_ioctl2

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 177aaaf8
...@@ -342,7 +342,7 @@ static void dbgbuf(unsigned int cmd, struct video_device *vfd, ...@@ -342,7 +342,7 @@ static void dbgbuf(unsigned int cmd, struct video_device *vfd,
dbgarg (cmd, "%02ld:%02d:%02d.%08ld index=%d, type=%s, " dbgarg (cmd, "%02ld:%02d:%02d.%08ld index=%d, type=%s, "
"bytesused=%d, flags=0x%08d, " "bytesused=%d, flags=0x%08d, "
"field=%0d, sequence=%d, memory=%s, offset/userptr=0x%08lx\n", "field=%0d, sequence=%d, memory=%s, offset/userptr=0x%08lx, length=%d\n",
(p->timestamp.tv_sec/3600), (p->timestamp.tv_sec/3600),
(int)(p->timestamp.tv_sec/60)%60, (int)(p->timestamp.tv_sec/60)%60,
(int)(p->timestamp.tv_sec%60), (int)(p->timestamp.tv_sec%60),
...@@ -352,7 +352,7 @@ static void dbgbuf(unsigned int cmd, struct video_device *vfd, ...@@ -352,7 +352,7 @@ static void dbgbuf(unsigned int cmd, struct video_device *vfd,
p->bytesused,p->flags, p->bytesused,p->flags,
p->field,p->sequence, p->field,p->sequence,
prt_names(p->memory,v4l2_memory_names), prt_names(p->memory,v4l2_memory_names),
p->m.userptr); p->m.userptr, p->length);
dbgarg2 ("timecode= %02d:%02d:%02d type=%d, " dbgarg2 ("timecode= %02d:%02d:%02d type=%d, "
"flags=0x%08d, frames=%d, userbits=0x%08x\n", "flags=0x%08d, frames=%d, userbits=0x%08x\n",
tc->hours,tc->minutes,tc->seconds, tc->hours,tc->minutes,tc->seconds,
...@@ -369,9 +369,13 @@ static inline void dbgrect(struct video_device *vfd, char *s, ...@@ -369,9 +369,13 @@ static inline void dbgrect(struct video_device *vfd, char *s,
static inline void v4l_print_pix_fmt (struct video_device *vfd, static inline void v4l_print_pix_fmt (struct video_device *vfd,
struct v4l2_pix_format *fmt) struct v4l2_pix_format *fmt)
{ {
dbgarg2 ("width=%d, height=%d, format=0x%08x, field=%s, " dbgarg2 ("width=%d, height=%d, format=%c%c%c%c, field=%s, "
"bytesperline=%d sizeimage=%d, colorspace=%d\n", "bytesperline=%d sizeimage=%d, colorspace=%d\n",
fmt->width,fmt->height,fmt->pixelformat, fmt->width,fmt->height,
(fmt->pixelformat & 0xff),
(fmt->pixelformat >> 8) & 0xff,
(fmt->pixelformat >> 16) & 0xff,
(fmt->pixelformat >> 24) & 0xff,
prt_names(fmt->field,v4l2_field_names_FIXME), prt_names(fmt->field,v4l2_field_names_FIXME),
fmt->bytesperline,fmt->sizeimage,fmt->colorspace); fmt->bytesperline,fmt->sizeimage,fmt->colorspace);
}; };
...@@ -530,12 +534,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ...@@ -530,12 +534,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
} }
if (!ret) if (!ret)
dbgarg (cmd, "index=%d, type=%d, flags=%d, " dbgarg (cmd, "index=%d, type=%d, flags=%d, "
"description=%s," "pixelformat=%c%c%c%c, description='%s'\n",
" pixelformat=0x%8x\n",
f->index, f->type, f->flags, f->index, f->type, f->flags,
f->description, (f->pixelformat & 0xff),
f->pixelformat); (f->pixelformat >> 8) & 0xff,
(f->pixelformat >> 16) & 0xff,
(f->pixelformat >> 24) & 0xff,
f->description);
break; break;
} }
case VIDIOC_G_FMT: case VIDIOC_G_FMT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment