diff options
author | Jonathan Corbet <corbet@lwn.net> | 2006-12-01 13:37:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-10 06:05:31 -0500 |
commit | a66d23368068d6027feedc010304d510e6d1fe56 (patch) | |
tree | 01dafb7ad67524c516922a379f079cbe91e1466c /drivers/media/video/cafe_ccic.c | |
parent | bf5dbed6b499787809c78710b209efc76939592b (diff) |
V4L/DVB (4908): Remove the fake RGB32 format from cafe_ccic
Remove RGB32, useful for debugging, but with no place in production.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r-- | drivers/media/video/cafe_ccic.c | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 30864dac26a3..9d9844e22951 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -612,16 +612,6 @@ static void cafe_ctlr_image(struct cafe_camera *cam) | |||
612 | C0_DF_MASK); | 612 | C0_DF_MASK); |
613 | break; | 613 | break; |
614 | 614 | ||
615 | /* | ||
616 | * For "fake rgb32" get the image pitch right. | ||
617 | */ | ||
618 | case V4L2_PIX_FMT_RGB32: | ||
619 | cafe_reg_write_mask(cam, REG_IMGPITCH, fmt->bytesperline/2, | ||
620 | IMGP_YP_MASK); | ||
621 | imgsz = ((fmt->height << IMGSZ_V_SHIFT) & IMGSZ_V_MASK) | | ||
622 | ((fmt->bytesperline/2) & IMGSZ_H_MASK); | ||
623 | cafe_reg_write(cam, REG_IMGSIZE, imgsz); | ||
624 | /* fall into ... */ | ||
625 | case V4L2_PIX_FMT_RGB444: | 615 | case V4L2_PIX_FMT_RGB444: |
626 | cafe_reg_write_mask(cam, REG_CTRL0, | 616 | cafe_reg_write_mask(cam, REG_CTRL0, |
627 | C0_DF_RGB|C0_RGBF_444|C0_RGB4_XRGB, | 617 | C0_DF_RGB|C0_RGBF_444|C0_RGB4_XRGB, |
@@ -902,11 +892,8 @@ static int cafe_alloc_dma_bufs(struct cafe_camera *cam, int loadtime) | |||
902 | cafe_set_config_needed(cam, 1); | 892 | cafe_set_config_needed(cam, 1); |
903 | if (loadtime) | 893 | if (loadtime) |
904 | cam->dma_buf_size = dma_buf_size; | 894 | cam->dma_buf_size = dma_buf_size; |
905 | else { | 895 | else |
906 | cam->dma_buf_size = cam->pix_format.sizeimage; | 896 | cam->dma_buf_size = cam->pix_format.sizeimage; |
907 | if (cam->pix_format.pixelformat == V4L2_PIX_FMT_RGB32) | ||
908 | cam->dma_buf_size /= 2; | ||
909 | } | ||
910 | if (n_dma_bufs > 3) | 897 | if (n_dma_bufs > 3) |
911 | n_dma_bufs = 3; | 898 | n_dma_bufs = 3; |
912 | 899 | ||
@@ -1751,26 +1738,6 @@ static struct video_device cafe_v4l_template = { | |||
1751 | * Interrupt handler stuff | 1738 | * Interrupt handler stuff |
1752 | */ | 1739 | */ |
1753 | 1740 | ||
1754 | /* | ||
1755 | * Create RGB32 from RGB444 so it can be displayed before the applications | ||
1756 | * know about the latter format. | ||
1757 | */ | ||
1758 | static void cafe_fake_rgb32(struct cafe_camera *cam, char *dest, char *src) | ||
1759 | { | ||
1760 | int i; | ||
1761 | u16 *ssrc = (u16 *) src; | ||
1762 | |||
1763 | /* RGB444 version */ | ||
1764 | for (i = 0; i < cam->pix_format.sizeimage; i += 4) { | ||
1765 | // dest[0] = (*ssrc & 0xf000) >> 8; | ||
1766 | dest[0] = (*ssrc & 0x000f) << 4; | ||
1767 | dest[1] = (*ssrc & 0x00f0); | ||
1768 | dest[2] = (*ssrc & 0x0f00) >> 4; | ||
1769 | dest[3] = (*ssrc & 0xf000); /* Alpha */ | ||
1770 | dest += 4; | ||
1771 | ssrc++; | ||
1772 | } | ||
1773 | } | ||
1774 | 1741 | ||
1775 | 1742 | ||
1776 | static void cafe_frame_tasklet(unsigned long data) | 1743 | static void cafe_frame_tasklet(unsigned long data) |
@@ -1800,11 +1767,8 @@ static void cafe_frame_tasklet(unsigned long data) | |||
1800 | */ | 1767 | */ |
1801 | sbuf = list_entry(cam->sb_avail.next, | 1768 | sbuf = list_entry(cam->sb_avail.next, |
1802 | struct cafe_sio_buffer, list); | 1769 | struct cafe_sio_buffer, list); |
1803 | if (cam->pix_format.pixelformat == V4L2_PIX_FMT_RGB32) | 1770 | memcpy(sbuf->buffer, cam->dma_bufs[bufno], |
1804 | cafe_fake_rgb32(cam, sbuf->buffer, cam->dma_bufs[bufno]); | 1771 | cam->pix_format.sizeimage); |
1805 | else | ||
1806 | memcpy(sbuf->buffer, cam->dma_bufs[bufno], | ||
1807 | cam->pix_format.sizeimage); | ||
1808 | sbuf->v4lbuf.bytesused = cam->pix_format.sizeimage; | 1772 | sbuf->v4lbuf.bytesused = cam->pix_format.sizeimage; |
1809 | sbuf->v4lbuf.sequence = cam->buf_seq[bufno]; | 1773 | sbuf->v4lbuf.sequence = cam->buf_seq[bufno]; |
1810 | sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_QUEUED; | 1774 | sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_QUEUED; |