Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: media/pci: don't set description for ENUM_FMT

The V4L2 core sets the description for the driver in order to ensure
consistent naming.

So drop the strscpy of the description in drivers. Also remove any
description strings in driver-internal structures since those are
no longer needed.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
2169e6da 009cb7d5

+17 -131
+2 -14
drivers/media/common/saa7146/saa7146_video.c
··· 20 20 /* format descriptions for capture and preview */ 21 21 static struct saa7146_format formats[] = { 22 22 { 23 - .name = "RGB-8 (3-3-2)", 24 23 .pixelformat = V4L2_PIX_FMT_RGB332, 25 24 .trans = RGB08_COMPOSED, 26 25 .depth = 8, 27 26 .flags = 0, 28 27 }, { 29 - .name = "RGB-16 (5/B-6/G-5/R)", 30 28 .pixelformat = V4L2_PIX_FMT_RGB565, 31 29 .trans = RGB16_COMPOSED, 32 30 .depth = 16, 33 31 .flags = 0, 34 32 }, { 35 - .name = "RGB-24 (B-G-R)", 36 33 .pixelformat = V4L2_PIX_FMT_BGR24, 37 34 .trans = RGB24_COMPOSED, 38 35 .depth = 24, 39 36 .flags = 0, 40 37 }, { 41 - .name = "RGB-32 (B-G-R)", 42 38 .pixelformat = V4L2_PIX_FMT_BGR32, 43 39 .trans = RGB32_COMPOSED, 44 40 .depth = 32, 45 41 .flags = 0, 46 42 }, { 47 - .name = "RGB-32 (R-G-B)", 48 43 .pixelformat = V4L2_PIX_FMT_RGB32, 49 44 .trans = RGB32_COMPOSED, 50 45 .depth = 32, 51 46 .flags = 0, 52 47 .swap = 0x2, 53 48 }, { 54 - .name = "Greyscale-8", 55 49 .pixelformat = V4L2_PIX_FMT_GREY, 56 50 .trans = Y8, 57 51 .depth = 8, 58 52 .flags = 0, 59 53 }, { 60 - .name = "YUV 4:2:2 planar (Y-Cb-Cr)", 61 54 .pixelformat = V4L2_PIX_FMT_YUV422P, 62 55 .trans = YUV422_DECOMPOSED, 63 56 .depth = 16, 64 57 .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, 65 58 }, { 66 - .name = "YVU 4:2:0 planar (Y-Cb-Cr)", 67 59 .pixelformat = V4L2_PIX_FMT_YVU420, 68 60 .trans = YUV420_DECOMPOSED, 69 61 .depth = 12, 70 62 .flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR, 71 63 }, { 72 - .name = "YUV 4:2:0 planar (Y-Cb-Cr)", 73 64 .pixelformat = V4L2_PIX_FMT_YUV420, 74 65 .trans = YUV420_DECOMPOSED, 75 66 .depth = 12, 76 67 .flags = FORMAT_IS_PLANAR, 77 68 }, { 78 - .name = "YUV 4:2:2 (U-Y-V-Y)", 79 69 .pixelformat = V4L2_PIX_FMT_UYVY, 80 70 .trans = YUV422_COMPOSED, 81 71 .depth = 16, ··· 137 147 } 138 148 vv->ov.win = fmt.fmt.win; 139 149 140 - DEB_D("%dx%d+%d+%d %s field=%s\n", 150 + DEB_D("%dx%d+%d+%d 0x%08x field=%s\n", 141 151 vv->ov.win.w.width, vv->ov.win.w.height, 142 152 vv->ov.win.w.left, vv->ov.win.w.top, 143 - vv->ov_fmt->name, v4l2_field_names[vv->ov.win.field]); 153 + vv->ov_fmt->pixelformat, v4l2_field_names[vv->ov.win.field]); 144 154 145 155 if (0 != (ret = saa7146_enable_overlay(fh))) { 146 156 DEB_D("enabling overlay failed: %d\n", ret); ··· 505 515 { 506 516 if (f->index >= ARRAY_SIZE(formats)) 507 517 return -EINVAL; 508 - strscpy((char *)f->description, formats[f->index].name, 509 - sizeof(f->description)); 510 518 f->pixelformat = formats[f->index].pixelformat; 511 519 return 0; 512 520 }
-19
drivers/media/pci/bt8xx/bttv-driver.c
··· 503 503 packed pixel formats must come first */ 504 504 static const struct bttv_format formats[] = { 505 505 { 506 - .name = "8 bpp, gray", 507 506 .fourcc = V4L2_PIX_FMT_GREY, 508 507 .btformat = BT848_COLOR_FMT_Y8, 509 508 .depth = 8, 510 509 .flags = FORMAT_FLAGS_PACKED, 511 510 },{ 512 - .name = "8 bpp, dithered color", 513 511 .fourcc = V4L2_PIX_FMT_HI240, 514 512 .btformat = BT848_COLOR_FMT_RGB8, 515 513 .depth = 8, 516 514 .flags = FORMAT_FLAGS_PACKED | FORMAT_FLAGS_DITHER, 517 515 },{ 518 - .name = "15 bpp RGB, le", 519 516 .fourcc = V4L2_PIX_FMT_RGB555, 520 517 .btformat = BT848_COLOR_FMT_RGB15, 521 518 .depth = 16, 522 519 .flags = FORMAT_FLAGS_PACKED, 523 520 },{ 524 - .name = "15 bpp RGB, be", 525 521 .fourcc = V4L2_PIX_FMT_RGB555X, 526 522 .btformat = BT848_COLOR_FMT_RGB15, 527 523 .btswap = 0x03, /* byteswap */ 528 524 .depth = 16, 529 525 .flags = FORMAT_FLAGS_PACKED, 530 526 },{ 531 - .name = "16 bpp RGB, le", 532 527 .fourcc = V4L2_PIX_FMT_RGB565, 533 528 .btformat = BT848_COLOR_FMT_RGB16, 534 529 .depth = 16, 535 530 .flags = FORMAT_FLAGS_PACKED, 536 531 },{ 537 - .name = "16 bpp RGB, be", 538 532 .fourcc = V4L2_PIX_FMT_RGB565X, 539 533 .btformat = BT848_COLOR_FMT_RGB16, 540 534 .btswap = 0x03, /* byteswap */ 541 535 .depth = 16, 542 536 .flags = FORMAT_FLAGS_PACKED, 543 537 },{ 544 - .name = "24 bpp RGB, le", 545 538 .fourcc = V4L2_PIX_FMT_BGR24, 546 539 .btformat = BT848_COLOR_FMT_RGB24, 547 540 .depth = 24, 548 541 .flags = FORMAT_FLAGS_PACKED, 549 542 },{ 550 - .name = "32 bpp RGB, le", 551 543 .fourcc = V4L2_PIX_FMT_BGR32, 552 544 .btformat = BT848_COLOR_FMT_RGB32, 553 545 .depth = 32, 554 546 .flags = FORMAT_FLAGS_PACKED, 555 547 },{ 556 - .name = "32 bpp RGB, be", 557 548 .fourcc = V4L2_PIX_FMT_RGB32, 558 549 .btformat = BT848_COLOR_FMT_RGB32, 559 550 .btswap = 0x0f, /* byte+word swap */ 560 551 .depth = 32, 561 552 .flags = FORMAT_FLAGS_PACKED, 562 553 },{ 563 - .name = "4:2:2, packed, YUYV", 564 554 .fourcc = V4L2_PIX_FMT_YUYV, 565 555 .btformat = BT848_COLOR_FMT_YUY2, 566 556 .depth = 16, 567 557 .flags = FORMAT_FLAGS_PACKED, 568 558 },{ 569 - .name = "4:2:2, packed, UYVY", 570 559 .fourcc = V4L2_PIX_FMT_UYVY, 571 560 .btformat = BT848_COLOR_FMT_YUY2, 572 561 .btswap = 0x03, /* byteswap */ 573 562 .depth = 16, 574 563 .flags = FORMAT_FLAGS_PACKED, 575 564 },{ 576 - .name = "4:2:2, planar, Y-Cb-Cr", 577 565 .fourcc = V4L2_PIX_FMT_YUV422P, 578 566 .btformat = BT848_COLOR_FMT_YCrCb422, 579 567 .depth = 16, ··· 569 581 .hshift = 1, 570 582 .vshift = 0, 571 583 },{ 572 - .name = "4:2:0, planar, Y-Cb-Cr", 573 584 .fourcc = V4L2_PIX_FMT_YUV420, 574 585 .btformat = BT848_COLOR_FMT_YCrCb422, 575 586 .depth = 12, ··· 576 589 .hshift = 1, 577 590 .vshift = 1, 578 591 },{ 579 - .name = "4:2:0, planar, Y-Cr-Cb", 580 592 .fourcc = V4L2_PIX_FMT_YVU420, 581 593 .btformat = BT848_COLOR_FMT_YCrCb422, 582 594 .depth = 12, ··· 583 597 .hshift = 1, 584 598 .vshift = 1, 585 599 },{ 586 - .name = "4:1:1, planar, Y-Cb-Cr", 587 600 .fourcc = V4L2_PIX_FMT_YUV411P, 588 601 .btformat = BT848_COLOR_FMT_YCrCb411, 589 602 .depth = 12, ··· 590 605 .hshift = 2, 591 606 .vshift = 0, 592 607 },{ 593 - .name = "4:1:0, planar, Y-Cb-Cr", 594 608 .fourcc = V4L2_PIX_FMT_YUV410, 595 609 .btformat = BT848_COLOR_FMT_YCrCb411, 596 610 .depth = 9, ··· 597 613 .hshift = 2, 598 614 .vshift = 2, 599 615 },{ 600 - .name = "4:1:0, planar, Y-Cr-Cb", 601 616 .fourcc = V4L2_PIX_FMT_YVU410, 602 617 .btformat = BT848_COLOR_FMT_YCrCb411, 603 618 .depth = 9, ··· 604 621 .hshift = 2, 605 622 .vshift = 2, 606 623 },{ 607 - .name = "raw scanlines", 608 624 .fourcc = -1, 609 625 .btformat = BT848_COLOR_FMT_RAW, 610 626 .depth = 8, ··· 2482 2500 return -EINVAL; 2483 2501 2484 2502 f->pixelformat = formats[i].fourcc; 2485 - strscpy(f->description, formats[i].name, sizeof(f->description)); 2486 2503 2487 2504 return i; 2488 2505 }
+4 -4
drivers/media/pci/bt8xx/bttv-risc.c
··· 699 699 const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm; 700 700 struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); 701 701 702 - dprintk("%d: buffer field: %s format: %s size: %dx%d\n", 702 + dprintk("%d: buffer field: %s format: 0x%08x size: %dx%d\n", 703 703 btv->c.nr, v4l2_field_names[buf->vb.field], 704 - buf->fmt->name, buf->vb.width, buf->vb.height); 704 + buf->fmt->fourcc, buf->vb.width, buf->vb.height); 705 705 706 706 /* packed pixel modes */ 707 707 if (buf->fmt->flags & FORMAT_FLAGS_PACKED) { ··· 860 860 struct bttv_buffer *buf) 861 861 { 862 862 /* check interleave, bottom+top fields */ 863 - dprintk("%d: overlay fields: %s format: %s size: %dx%d\n", 863 + dprintk("%d: overlay fields: %s format: 0x%08x size: %dx%d\n", 864 864 btv->c.nr, v4l2_field_names[buf->vb.field], 865 - fmt->name, ov->w.width, ov->w.height); 865 + fmt->fourcc, ov->w.width, ov->w.height); 866 866 867 867 /* calculate geometry */ 868 868 bttv_calc_geo(btv,&buf->geo,ov->w.width,ov->w.height,
-1
drivers/media/pci/bt8xx/bttvp.h
··· 99 99 extern const struct bttv_tvnorm bttv_tvnorms[]; 100 100 101 101 struct bttv_format { 102 - char *name; 103 102 int fourcc; /* video4linux 2 */ 104 103 int btformat; /* BT848_COLOR_FMT_* */ 105 104 int btswap; /* BT848_COLOR_CTL_* */
-5
drivers/media/pci/cobalt/cobalt-v4l2.c
··· 688 688 { 689 689 switch (f->index) { 690 690 case 0: 691 - strscpy(f->description, "YUV 4:2:2", sizeof(f->description)); 692 691 f->pixelformat = V4L2_PIX_FMT_YUYV; 693 692 break; 694 693 case 1: 695 - strscpy(f->description, "RGB24", sizeof(f->description)); 696 694 f->pixelformat = V4L2_PIX_FMT_RGB24; 697 695 break; 698 696 case 2: 699 - strscpy(f->description, "RGB32", sizeof(f->description)); 700 697 f->pixelformat = V4L2_PIX_FMT_BGR32; 701 698 break; 702 699 default: ··· 890 893 { 891 894 switch (f->index) { 892 895 case 0: 893 - strscpy(f->description, "YUV 4:2:2", sizeof(f->description)); 894 896 f->pixelformat = V4L2_PIX_FMT_YUYV; 895 897 break; 896 898 case 1: 897 - strscpy(f->description, "RGB32", sizeof(f->description)); 898 899 f->pixelformat = V4L2_PIX_FMT_BGR32; 899 900 break; 900 901 default:
-1
drivers/media/pci/cx23885/cx23885-417.c
··· 1339 1339 if (f->index != 0) 1340 1340 return -EINVAL; 1341 1341 1342 - strscpy(f->description, "MPEG", sizeof(f->description)); 1343 1342 f->pixelformat = V4L2_PIX_FMT_MPEG; 1344 1343 1345 1344 return 0;
+2 -5
drivers/media/pci/cx23885/cx23885-video.c
··· 67 67 #define FORMAT_FLAGS_PACKED 0x01 68 68 static struct cx23885_fmt formats[] = { 69 69 { 70 - .name = "4:2:2, packed, YUYV", 71 70 .fourcc = V4L2_PIX_FMT_YUYV, 72 71 .depth = 16, 73 72 .flags = FORMAT_FLAGS_PACKED, ··· 410 411 default: 411 412 BUG(); 412 413 } 413 - dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", 414 + dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", 414 415 buf, buf->vb.vb2_buf.index, 415 - dev->width, dev->height, dev->fmt->depth, dev->fmt->name, 416 + dev->width, dev->height, dev->fmt->depth, dev->fmt->fourcc, 416 417 (unsigned long)buf->risc.dma); 417 418 return 0; 418 419 } ··· 646 647 if (unlikely(f->index >= ARRAY_SIZE(formats))) 647 648 return -EINVAL; 648 649 649 - strscpy(f->description, formats[f->index].name, 650 - sizeof(f->description)); 651 650 f->pixelformat = formats[f->index].fourcc; 652 651 653 652 return 0;
-1
drivers/media/pci/cx23885/cx23885.h
··· 127 127 V4L2_STD_PAL_60 | V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK) 128 128 129 129 struct cx23885_fmt { 130 - char *name; 131 130 u32 fourcc; /* v4l2 format id */ 132 131 int depth; 133 132 int flags;
+2 -5
drivers/media/pci/cx25821/cx25821-video.c
··· 35 35 36 36 static const struct cx25821_fmt formats[] = { 37 37 { 38 - .name = "4:1:1, packed, Y41P", 39 38 .fourcc = V4L2_PIX_FMT_Y41P, 40 39 .depth = 12, 41 40 .flags = FORMAT_FLAGS_PACKED, 42 41 }, { 43 - .name = "4:2:2, packed, YUYV", 44 42 .fourcc = V4L2_PIX_FMT_YUYV, 45 43 .depth = 16, 46 44 .flags = FORMAT_FLAGS_PACKED, ··· 213 215 break; 214 216 } 215 217 216 - dprintk(2, "[%p/%d] buffer_prep - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", 218 + dprintk(2, "[%p/%d] buffer_prep - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", 217 219 buf, buf->vb.vb2_buf.index, chan->width, chan->height, 218 - chan->fmt->depth, chan->fmt->name, 220 + chan->fmt->depth, chan->fmt->fourcc, 219 221 (unsigned long)buf->risc.dma); 220 222 221 223 return ret; ··· 309 311 if (unlikely(f->index >= ARRAY_SIZE(formats))) 310 312 return -EINVAL; 311 313 312 - strscpy(f->description, formats[f->index].name, sizeof(f->description)); 313 314 f->pixelformat = formats[f->index].fourcc; 314 315 315 316 return 0;
-1
drivers/media/pci/cx25821/cx25821.h
··· 83 83 #define VID_CHANNEL_NUM 8 84 84 85 85 struct cx25821_fmt { 86 - char *name; 87 86 u32 fourcc; /* v4l2 format id */ 88 87 int depth; 89 88 int flags;
-2
drivers/media/pci/cx88/cx88-blackbird.c
··· 805 805 if (f->index != 0) 806 806 return -EINVAL; 807 807 808 - strscpy(f->description, "MPEG", sizeof(f->description)); 809 808 f->pixelformat = V4L2_PIX_FMT_MPEG; 810 - f->flags = V4L2_FMT_FLAG_COMPRESSED; 811 809 return 0; 812 810 } 813 811
+3 -14
drivers/media/pci/cx88/cx88-video.c
··· 69 69 70 70 static const struct cx8800_fmt formats[] = { 71 71 { 72 - .name = "8 bpp, gray", 73 72 .fourcc = V4L2_PIX_FMT_GREY, 74 73 .cxformat = ColorFormatY8, 75 74 .depth = 8, 76 75 .flags = FORMAT_FLAGS_PACKED, 77 76 }, { 78 - .name = "15 bpp RGB, le", 79 77 .fourcc = V4L2_PIX_FMT_RGB555, 80 78 .cxformat = ColorFormatRGB15, 81 79 .depth = 16, 82 80 .flags = FORMAT_FLAGS_PACKED, 83 81 }, { 84 - .name = "15 bpp RGB, be", 85 82 .fourcc = V4L2_PIX_FMT_RGB555X, 86 83 .cxformat = ColorFormatRGB15 | ColorFormatBSWAP, 87 84 .depth = 16, 88 85 .flags = FORMAT_FLAGS_PACKED, 89 86 }, { 90 - .name = "16 bpp RGB, le", 91 87 .fourcc = V4L2_PIX_FMT_RGB565, 92 88 .cxformat = ColorFormatRGB16, 93 89 .depth = 16, 94 90 .flags = FORMAT_FLAGS_PACKED, 95 91 }, { 96 - .name = "16 bpp RGB, be", 97 92 .fourcc = V4L2_PIX_FMT_RGB565X, 98 93 .cxformat = ColorFormatRGB16 | ColorFormatBSWAP, 99 94 .depth = 16, 100 95 .flags = FORMAT_FLAGS_PACKED, 101 96 }, { 102 - .name = "24 bpp RGB, le", 103 97 .fourcc = V4L2_PIX_FMT_BGR24, 104 98 .cxformat = ColorFormatRGB24, 105 99 .depth = 24, 106 100 .flags = FORMAT_FLAGS_PACKED, 107 101 }, { 108 - .name = "32 bpp RGB, le", 109 102 .fourcc = V4L2_PIX_FMT_BGR32, 110 103 .cxformat = ColorFormatRGB32, 111 104 .depth = 32, 112 105 .flags = FORMAT_FLAGS_PACKED, 113 106 }, { 114 - .name = "32 bpp RGB, be", 115 107 .fourcc = V4L2_PIX_FMT_RGB32, 116 108 .cxformat = ColorFormatRGB32 | ColorFormatBSWAP | 117 109 ColorFormatWSWAP, 118 110 .depth = 32, 119 111 .flags = FORMAT_FLAGS_PACKED, 120 112 }, { 121 - .name = "4:2:2, packed, YUYV", 122 113 .fourcc = V4L2_PIX_FMT_YUYV, 123 114 .cxformat = ColorFormatYUY2, 124 115 .depth = 16, 125 116 .flags = FORMAT_FLAGS_PACKED, 126 117 }, { 127 - .name = "4:2:2, packed, UYVY", 128 118 .fourcc = V4L2_PIX_FMT_UYVY, 129 119 .cxformat = ColorFormatYUY2 | ColorFormatBSWAP, 130 120 .depth = 16, ··· 479 489 break; 480 490 } 481 491 dprintk(2, 482 - "[%p/%d] buffer_prepare - %dx%d %dbpp \"%s\" - dma=0x%08lx\n", 483 - buf, buf->vb.vb2_buf.index, 484 - core->width, core->height, dev->fmt->depth, dev->fmt->name, 492 + "[%p/%d] %s - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", 493 + buf, buf->vb.vb2_buf.index, __func__, 494 + core->width, core->height, dev->fmt->depth, dev->fmt->fourcc, 485 495 (unsigned long)buf->risc.dma); 486 496 return 0; 487 497 } ··· 819 829 if (unlikely(f->index >= ARRAY_SIZE(formats))) 820 830 return -EINVAL; 821 831 822 - strscpy(f->description, formats[f->index].name, sizeof(f->description)); 823 832 f->pixelformat = formats[f->index].fourcc; 824 833 825 834 return 0;
-1
drivers/media/pci/cx88/cx88.h
··· 99 99 /* static data */ 100 100 101 101 struct cx8800_fmt { 102 - const char *name; 103 102 u32 fourcc; /* v4l2 format id */ 104 103 int depth; 105 104 int flags;
-1
drivers/media/pci/dt3155/dt3155.c
··· 306 306 if (f->index) 307 307 return -EINVAL; 308 308 f->pixelformat = V4L2_PIX_FMT_GREY; 309 - strscpy(f->description, "8-bit Greyscale", sizeof(f->description)); 310 309 return 0; 311 310 } 312 311
-3
drivers/media/pci/meye/meye.c
··· 1104 1104 if (f->index == 0) { 1105 1105 /* standard YUV 422 capture */ 1106 1106 f->flags = 0; 1107 - strscpy(f->description, "YUV422", sizeof(f->description)); 1108 1107 f->pixelformat = V4L2_PIX_FMT_YUYV; 1109 1108 } else { 1110 1109 /* compressed MJPEG capture */ 1111 - f->flags = V4L2_FMT_FLAG_COMPRESSED; 1112 - strscpy(f->description, "MJPEG", sizeof(f->description)); 1113 1110 f->pixelformat = V4L2_PIX_FMT_MJPEG; 1114 1111 } 1115 1112
-2
drivers/media/pci/saa7134/saa7134-empress.c
··· 91 91 if (f->index != 0) 92 92 return -EINVAL; 93 93 94 - strscpy(f->description, "MPEG TS", sizeof(f->description)); 95 94 f->pixelformat = V4L2_PIX_FMT_MPEG; 96 - f->flags = V4L2_FMT_FLAG_COMPRESSED; 97 95 return 0; 98 96 } 99 97
+4 -24
drivers/media/pci/saa7134/saa7134-video.c
··· 90 90 91 91 static struct saa7134_format formats[] = { 92 92 { 93 - .name = "8 bpp gray", 94 93 .fourcc = V4L2_PIX_FMT_GREY, 95 94 .depth = 8, 96 95 .pm = 0x06, 97 96 },{ 98 - .name = "15 bpp RGB, le", 99 97 .fourcc = V4L2_PIX_FMT_RGB555, 100 98 .depth = 16, 101 99 .pm = 0x13 | 0x80, 102 100 },{ 103 - .name = "15 bpp RGB, be", 104 101 .fourcc = V4L2_PIX_FMT_RGB555X, 105 102 .depth = 16, 106 103 .pm = 0x13 | 0x80, 107 104 .bswap = 1, 108 105 },{ 109 - .name = "16 bpp RGB, le", 110 106 .fourcc = V4L2_PIX_FMT_RGB565, 111 107 .depth = 16, 112 108 .pm = 0x10 | 0x80, 113 109 },{ 114 - .name = "16 bpp RGB, be", 115 110 .fourcc = V4L2_PIX_FMT_RGB565X, 116 111 .depth = 16, 117 112 .pm = 0x10 | 0x80, 118 113 .bswap = 1, 119 114 },{ 120 - .name = "24 bpp RGB, le", 121 115 .fourcc = V4L2_PIX_FMT_BGR24, 122 116 .depth = 24, 123 117 .pm = 0x11, 124 118 },{ 125 - .name = "24 bpp RGB, be", 126 119 .fourcc = V4L2_PIX_FMT_RGB24, 127 120 .depth = 24, 128 121 .pm = 0x11, 129 122 .bswap = 1, 130 123 },{ 131 - .name = "32 bpp RGB, le", 132 124 .fourcc = V4L2_PIX_FMT_BGR32, 133 125 .depth = 32, 134 126 .pm = 0x12, 135 127 },{ 136 - .name = "32 bpp RGB, be", 137 128 .fourcc = V4L2_PIX_FMT_RGB32, 138 129 .depth = 32, 139 130 .pm = 0x12, 140 131 .bswap = 1, 141 132 .wswap = 1, 142 133 },{ 143 - .name = "4:2:2 packed, YUYV", 144 134 .fourcc = V4L2_PIX_FMT_YUYV, 145 135 .depth = 16, 146 136 .pm = 0x00, 147 137 .bswap = 1, 148 138 .yuv = 1, 149 139 },{ 150 - .name = "4:2:2 packed, UYVY", 151 140 .fourcc = V4L2_PIX_FMT_UYVY, 152 141 .depth = 16, 153 142 .pm = 0x00, 154 143 .yuv = 1, 155 144 },{ 156 - .name = "4:2:2 planar, Y-Cb-Cr", 157 145 .fourcc = V4L2_PIX_FMT_YUV422P, 158 146 .depth = 16, 159 147 .pm = 0x09, ··· 150 162 .hshift = 1, 151 163 .vshift = 0, 152 164 },{ 153 - .name = "4:2:0 planar, Y-Cb-Cr", 154 165 .fourcc = V4L2_PIX_FMT_YUV420, 155 166 .depth = 12, 156 167 .pm = 0x0a, ··· 158 171 .hshift = 1, 159 172 .vshift = 1, 160 173 },{ 161 - .name = "4:2:0 planar, Y-Cb-Cr", 162 174 .fourcc = V4L2_PIX_FMT_YVU420, 163 175 .depth = 12, 164 176 .pm = 0x0a, ··· 706 720 return err; 707 721 708 722 dev->ovfield = dev->win.field; 709 - video_dbg("start_preview %dx%d+%d+%d %s field=%s\n", 710 - dev->win.w.width, dev->win.w.height, 711 - dev->win.w.left, dev->win.w.top, 712 - dev->ovfmt->name, v4l2_field_names[dev->ovfield]); 723 + video_dbg("%s %dx%d+%d+%d 0x%08x field=%s\n", __func__, 724 + dev->win.w.width, dev->win.w.height, 725 + dev->win.w.left, dev->win.w.top, 726 + dev->ovfmt->fourcc, v4l2_field_names[dev->ovfield]); 713 727 714 728 /* setup window + clipping */ 715 729 set_size(dev, TASK_B, dev->win.w.width, dev->win.w.height, ··· 1766 1780 if (f->index >= FORMATS) 1767 1781 return -EINVAL; 1768 1782 1769 - strscpy(f->description, formats[f->index].name, 1770 - sizeof(f->description)); 1771 - 1772 1783 f->pixelformat = formats[f->index].fourcc; 1773 1784 1774 1785 return 0; ··· 1781 1798 1782 1799 if ((f->index >= FORMATS) || formats[f->index].planar) 1783 1800 return -EINVAL; 1784 - 1785 - strscpy(f->description, formats[f->index].name, 1786 - sizeof(f->description)); 1787 1801 1788 1802 f->pixelformat = formats[f->index].fourcc; 1789 1803
-1
drivers/media/pci/saa7134/saa7134.h
··· 98 98 }; 99 99 100 100 struct saa7134_format { 101 - char *name; 102 101 unsigned int fourcc; 103 102 unsigned int depth; 104 103 unsigned int pm;
-1
drivers/media/pci/saa7164/saa7164-encoder.c
··· 503 503 if (f->index != 0) 504 504 return -EINVAL; 505 505 506 - strscpy(f->description, "MPEG", sizeof(f->description)); 507 506 f->pixelformat = V4L2_PIX_FMT_MPEG; 508 507 509 508 return 0;
-7
drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
··· 822 822 switch (dev_type) { 823 823 case SOLO_DEV_6010: 824 824 f->pixelformat = V4L2_PIX_FMT_MPEG4; 825 - strscpy(f->description, "MPEG-4 part 2", 826 - sizeof(f->description)); 827 825 break; 828 826 case SOLO_DEV_6110: 829 827 f->pixelformat = V4L2_PIX_FMT_H264; 830 - strscpy(f->description, "H.264", sizeof(f->description)); 831 828 break; 832 829 } 833 830 break; 834 831 case 1: 835 832 f->pixelformat = V4L2_PIX_FMT_MJPEG; 836 - strscpy(f->description, "MJPEG", sizeof(f->description)); 837 833 break; 838 834 default: 839 835 return -EINVAL; 840 836 } 841 - 842 - f->flags = V4L2_FMT_FLAG_COMPRESSED; 843 - 844 837 return 0; 845 838 } 846 839
-2
drivers/media/pci/solo6x10/solo6x10-v4l2.c
··· 458 458 return -EINVAL; 459 459 460 460 f->pixelformat = V4L2_PIX_FMT_UYVY; 461 - strscpy(f->description, "UYUV 4:2:2 Packed", sizeof(f->description)); 462 - 463 461 return 0; 464 462 } 465 463
-2
drivers/media/pci/sta2x11/sta2x11_vip.c
··· 560 560 if (f->index != 0) 561 561 return -EINVAL; 562 562 563 - strscpy(f->description, "4:2:2, packed, UYVY", sizeof(f->description)); 564 563 f->pixelformat = V4L2_PIX_FMT_UYVY; 565 - f->flags = 0; 566 564 return 0; 567 565 } 568 566
-13
drivers/media/pci/tw68/tw68-video.c
··· 34 34 */ 35 35 static const struct tw68_format formats[] = { 36 36 { 37 - .name = "15 bpp RGB, le", 38 37 .fourcc = V4L2_PIX_FMT_RGB555, 39 38 .depth = 16, 40 39 .twformat = ColorFormatRGB15, 41 40 }, { 42 - .name = "15 bpp RGB, be", 43 41 .fourcc = V4L2_PIX_FMT_RGB555X, 44 42 .depth = 16, 45 43 .twformat = ColorFormatRGB15 | ColorFormatBSWAP, 46 44 }, { 47 - .name = "16 bpp RGB, le", 48 45 .fourcc = V4L2_PIX_FMT_RGB565, 49 46 .depth = 16, 50 47 .twformat = ColorFormatRGB16, 51 48 }, { 52 - .name = "16 bpp RGB, be", 53 49 .fourcc = V4L2_PIX_FMT_RGB565X, 54 50 .depth = 16, 55 51 .twformat = ColorFormatRGB16 | ColorFormatBSWAP, 56 52 }, { 57 - .name = "24 bpp RGB, le", 58 53 .fourcc = V4L2_PIX_FMT_BGR24, 59 54 .depth = 24, 60 55 .twformat = ColorFormatRGB24, 61 56 }, { 62 - .name = "24 bpp RGB, be", 63 57 .fourcc = V4L2_PIX_FMT_RGB24, 64 58 .depth = 24, 65 59 .twformat = ColorFormatRGB24 | ColorFormatBSWAP, 66 60 }, { 67 - .name = "32 bpp RGB, le", 68 61 .fourcc = V4L2_PIX_FMT_BGR32, 69 62 .depth = 32, 70 63 .twformat = ColorFormatRGB32, 71 64 }, { 72 - .name = "32 bpp RGB, be", 73 65 .fourcc = V4L2_PIX_FMT_RGB32, 74 66 .depth = 32, 75 67 .twformat = ColorFormatRGB32 | ColorFormatBSWAP | 76 68 ColorFormatWSWAP, 77 69 }, { 78 - .name = "4:2:2 packed, YUYV", 79 70 .fourcc = V4L2_PIX_FMT_YUYV, 80 71 .depth = 16, 81 72 .twformat = ColorFormatYUY2, 82 73 }, { 83 - .name = "4:2:2 packed, UYVY", 84 74 .fourcc = V4L2_PIX_FMT_UYVY, 85 75 .depth = 16, 86 76 .twformat = ColorFormatYUY2 | ColorFormatBSWAP, ··· 763 773 { 764 774 if (f->index >= FORMATS) 765 775 return -EINVAL; 766 - 767 - strscpy(f->description, formats[f->index].name, 768 - sizeof(f->description)); 769 776 770 777 f->pixelformat = formats[f->index].fourcc; 771 778
-1
drivers/media/pci/tw68/tw68.h
··· 85 85 }; 86 86 87 87 struct tw68_format { 88 - char *name; 89 88 u32 fourcc; 90 89 u32 depth; 91 90 u32 twformat;
-1
include/media/drv-intf/saa7146_vv.h
··· 32 32 #define FORMAT_IS_PLANAR 0x2 33 33 34 34 struct saa7146_format { 35 - char *name; 36 35 u32 pixelformat; 37 36 u32 trans; 38 37 u8 depth;