diff options
| -rw-r--r-- | drivers/media/v4l2-core/v4l2-ioctl.c | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index f81bda1a48ec..7658586fe5f4 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c | |||
| @@ -243,7 +243,6 @@ static void v4l_print_format(const void *arg, bool write_only) | |||
| 243 | const struct v4l2_vbi_format *vbi; | 243 | const struct v4l2_vbi_format *vbi; |
| 244 | const struct v4l2_sliced_vbi_format *sliced; | 244 | const struct v4l2_sliced_vbi_format *sliced; |
| 245 | const struct v4l2_window *win; | 245 | const struct v4l2_window *win; |
| 246 | const struct v4l2_clip *clip; | ||
| 247 | unsigned i; | 246 | unsigned i; |
| 248 | 247 | ||
| 249 | pr_cont("type=%s", prt_names(p->type, v4l2_type_names)); | 248 | pr_cont("type=%s", prt_names(p->type, v4l2_type_names)); |
| @@ -253,7 +252,7 @@ static void v4l_print_format(const void *arg, bool write_only) | |||
| 253 | pix = &p->fmt.pix; | 252 | pix = &p->fmt.pix; |
| 254 | pr_cont(", width=%u, height=%u, " | 253 | pr_cont(", width=%u, height=%u, " |
| 255 | "pixelformat=%c%c%c%c, field=%s, " | 254 | "pixelformat=%c%c%c%c, field=%s, " |
| 256 | "bytesperline=%u sizeimage=%u, colorspace=%d\n", | 255 | "bytesperline=%u, sizeimage=%u, colorspace=%d\n", |
| 257 | pix->width, pix->height, | 256 | pix->width, pix->height, |
| 258 | (pix->pixelformat & 0xff), | 257 | (pix->pixelformat & 0xff), |
| 259 | (pix->pixelformat >> 8) & 0xff, | 258 | (pix->pixelformat >> 8) & 0xff, |
| @@ -284,20 +283,14 @@ static void v4l_print_format(const void *arg, bool write_only) | |||
| 284 | case V4L2_BUF_TYPE_VIDEO_OVERLAY: | 283 | case V4L2_BUF_TYPE_VIDEO_OVERLAY: |
| 285 | case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: | 284 | case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: |
| 286 | win = &p->fmt.win; | 285 | win = &p->fmt.win; |
| 287 | pr_cont(", wxh=%dx%d, x,y=%d,%d, field=%s, " | 286 | /* Note: we can't print the clip list here since the clips |
| 288 | "chromakey=0x%08x, bitmap=%p, " | 287 | * pointer is a userspace pointer, not a kernelspace |
| 289 | "global_alpha=0x%02x\n", | 288 | * pointer. */ |
| 290 | win->w.width, win->w.height, | 289 | pr_cont(", wxh=%dx%d, x,y=%d,%d, field=%s, chromakey=0x%08x, clipcount=%u, clips=%p, bitmap=%p, global_alpha=0x%02x\n", |
| 291 | win->w.left, win->w.top, | 290 | win->w.width, win->w.height, win->w.left, win->w.top, |
| 292 | prt_names(win->field, v4l2_field_names), | 291 | prt_names(win->field, v4l2_field_names), |
| 293 | win->chromakey, win->bitmap, win->global_alpha); | 292 | win->chromakey, win->clipcount, win->clips, |
| 294 | clip = win->clips; | 293 | win->bitmap, win->global_alpha); |
| 295 | for (i = 0; i < win->clipcount; i++) { | ||
| 296 | printk(KERN_DEBUG "clip %u: wxh=%dx%d, x,y=%d,%d\n", | ||
| 297 | i, clip->c.width, clip->c.height, | ||
| 298 | clip->c.left, clip->c.top); | ||
| 299 | clip = clip->next; | ||
| 300 | } | ||
| 301 | break; | 294 | break; |
| 302 | case V4L2_BUF_TYPE_VBI_CAPTURE: | 295 | case V4L2_BUF_TYPE_VBI_CAPTURE: |
| 303 | case V4L2_BUF_TYPE_VBI_OUTPUT: | 296 | case V4L2_BUF_TYPE_VBI_OUTPUT: |
| @@ -332,7 +325,7 @@ static void v4l_print_framebuffer(const void *arg, bool write_only) | |||
| 332 | 325 | ||
| 333 | pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, " | 326 | pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, " |
| 334 | "height=%u, pixelformat=%c%c%c%c, " | 327 | "height=%u, pixelformat=%c%c%c%c, " |
| 335 | "bytesperline=%u sizeimage=%u, colorspace=%d\n", | 328 | "bytesperline=%u, sizeimage=%u, colorspace=%d\n", |
| 336 | p->capability, p->flags, p->base, | 329 | p->capability, p->flags, p->base, |
| 337 | p->fmt.width, p->fmt.height, | 330 | p->fmt.width, p->fmt.height, |
| 338 | (p->fmt.pixelformat & 0xff), | 331 | (p->fmt.pixelformat & 0xff), |
| @@ -353,7 +346,7 @@ static void v4l_print_modulator(const void *arg, bool write_only) | |||
| 353 | const struct v4l2_modulator *p = arg; | 346 | const struct v4l2_modulator *p = arg; |
| 354 | 347 | ||
| 355 | if (write_only) | 348 | if (write_only) |
| 356 | pr_cont("index=%u, txsubchans=0x%x", p->index, p->txsubchans); | 349 | pr_cont("index=%u, txsubchans=0x%x\n", p->index, p->txsubchans); |
| 357 | else | 350 | else |
| 358 | pr_cont("index=%u, name=%.*s, capability=0x%x, " | 351 | pr_cont("index=%u, name=%.*s, capability=0x%x, " |
| 359 | "rangelow=%u, rangehigh=%u, txsubchans=0x%x\n", | 352 | "rangelow=%u, rangehigh=%u, txsubchans=0x%x\n", |
| @@ -445,13 +438,13 @@ static void v4l_print_buffer(const void *arg, bool write_only) | |||
| 445 | for (i = 0; i < p->length; ++i) { | 438 | for (i = 0; i < p->length; ++i) { |
| 446 | plane = &p->m.planes[i]; | 439 | plane = &p->m.planes[i]; |
| 447 | printk(KERN_DEBUG | 440 | printk(KERN_DEBUG |
| 448 | "plane %d: bytesused=%d, data_offset=0x%08x " | 441 | "plane %d: bytesused=%d, data_offset=0x%08x, " |
| 449 | "offset/userptr=0x%lx, length=%d\n", | 442 | "offset/userptr=0x%lx, length=%d\n", |
| 450 | i, plane->bytesused, plane->data_offset, | 443 | i, plane->bytesused, plane->data_offset, |
| 451 | plane->m.userptr, plane->length); | 444 | plane->m.userptr, plane->length); |
| 452 | } | 445 | } |
| 453 | } else { | 446 | } else { |
| 454 | pr_cont("bytesused=%d, offset/userptr=0x%lx, length=%d\n", | 447 | pr_cont(", bytesused=%d, offset/userptr=0x%lx, length=%d\n", |
| 455 | p->bytesused, p->m.userptr, p->length); | 448 | p->bytesused, p->m.userptr, p->length); |
| 456 | } | 449 | } |
| 457 | 450 | ||
| @@ -504,6 +497,8 @@ static void v4l_print_streamparm(const void *arg, bool write_only) | |||
| 504 | c->capability, c->outputmode, | 497 | c->capability, c->outputmode, |
| 505 | c->timeperframe.numerator, c->timeperframe.denominator, | 498 | c->timeperframe.numerator, c->timeperframe.denominator, |
| 506 | c->extendedmode, c->writebuffers); | 499 | c->extendedmode, c->writebuffers); |
| 500 | } else { | ||
| 501 | pr_cont("\n"); | ||
| 507 | } | 502 | } |
| 508 | } | 503 | } |
| 509 | 504 | ||
| @@ -734,11 +729,11 @@ static void v4l_print_frmsizeenum(const void *arg, bool write_only) | |||
| 734 | p->type); | 729 | p->type); |
| 735 | switch (p->type) { | 730 | switch (p->type) { |
| 736 | case V4L2_FRMSIZE_TYPE_DISCRETE: | 731 | case V4L2_FRMSIZE_TYPE_DISCRETE: |
| 737 | pr_cont(" wxh=%ux%u\n", | 732 | pr_cont(", wxh=%ux%u\n", |
| 738 | p->discrete.width, p->discrete.height); | 733 | p->discrete.width, p->discrete.height); |
| 739 | break; | 734 | break; |
| 740 | case V4L2_FRMSIZE_TYPE_STEPWISE: | 735 | case V4L2_FRMSIZE_TYPE_STEPWISE: |
| 741 | pr_cont(" min=%ux%u, max=%ux%u, step=%ux%u\n", | 736 | pr_cont(", min=%ux%u, max=%ux%u, step=%ux%u\n", |
| 742 | p->stepwise.min_width, p->stepwise.min_height, | 737 | p->stepwise.min_width, p->stepwise.min_height, |
| 743 | p->stepwise.step_width, p->stepwise.step_height, | 738 | p->stepwise.step_width, p->stepwise.step_height, |
| 744 | p->stepwise.max_width, p->stepwise.max_height); | 739 | p->stepwise.max_width, p->stepwise.max_height); |
| @@ -764,12 +759,12 @@ static void v4l_print_frmivalenum(const void *arg, bool write_only) | |||
| 764 | p->width, p->height, p->type); | 759 | p->width, p->height, p->type); |
| 765 | switch (p->type) { | 760 | switch (p->type) { |
| 766 | case V4L2_FRMIVAL_TYPE_DISCRETE: | 761 | case V4L2_FRMIVAL_TYPE_DISCRETE: |
| 767 | pr_cont(" fps=%d/%d\n", | 762 | pr_cont(", fps=%d/%d\n", |
| 768 | p->discrete.numerator, | 763 | p->discrete.numerator, |
| 769 | p->discrete.denominator); | 764 | p->discrete.denominator); |
| 770 | break; | 765 | break; |
| 771 | case V4L2_FRMIVAL_TYPE_STEPWISE: | 766 | case V4L2_FRMIVAL_TYPE_STEPWISE: |
| 772 | pr_cont(" min=%d/%d, max=%d/%d, step=%d/%d\n", | 767 | pr_cont(", min=%d/%d, max=%d/%d, step=%d/%d\n", |
| 773 | p->stepwise.min.numerator, | 768 | p->stepwise.min.numerator, |
| 774 | p->stepwise.min.denominator, | 769 | p->stepwise.min.denominator, |
| 775 | p->stepwise.max.numerator, | 770 | p->stepwise.max.numerator, |
| @@ -807,8 +802,8 @@ static void v4l_print_event(const void *arg, bool write_only) | |||
| 807 | pr_cont("value64=%lld, ", c->value64); | 802 | pr_cont("value64=%lld, ", c->value64); |
| 808 | else | 803 | else |
| 809 | pr_cont("value=%d, ", c->value); | 804 | pr_cont("value=%d, ", c->value); |
| 810 | pr_cont("flags=0x%x, minimum=%d, maximum=%d, step=%d," | 805 | pr_cont("flags=0x%x, minimum=%d, maximum=%d, step=%d, " |
| 811 | " default_value=%d\n", | 806 | "default_value=%d\n", |
| 812 | c->flags, c->minimum, c->maximum, | 807 | c->flags, c->minimum, c->maximum, |
| 813 | c->step, c->default_value); | 808 | c->step, c->default_value); |
| 814 | break; | 809 | break; |
| @@ -845,7 +840,7 @@ static void v4l_print_freq_band(const void *arg, bool write_only) | |||
| 845 | const struct v4l2_frequency_band *p = arg; | 840 | const struct v4l2_frequency_band *p = arg; |
| 846 | 841 | ||
| 847 | pr_cont("tuner=%u, type=%u, index=%u, capability=0x%x, " | 842 | pr_cont("tuner=%u, type=%u, index=%u, capability=0x%x, " |
| 848 | "rangelow=%u, rangehigh=%u, modulation=0x%x\n", | 843 | "rangelow=%u, rangehigh=%u, modulation=0x%x\n", |
| 849 | p->tuner, p->type, p->index, | 844 | p->tuner, p->type, p->index, |
| 850 | p->capability, p->rangelow, | 845 | p->capability, p->rangelow, |
| 851 | p->rangehigh, p->modulation); | 846 | p->rangehigh, p->modulation); |
