Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330748
b: refs/heads/master
c: 73cdc79
h: refs/heads/master
v: v3
  • Loading branch information
Ivaylo Petrov authored and Mauro Carvalho Chehab committed Aug 11, 2012
1 parent 394975e commit b39fece
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0810fd9c53c5a9b988687c091136e4f7ae34266e
refs/heads/master: 73cdc79f9327c2112dff085a439f8302a2bec3ec
27 changes: 25 additions & 2 deletions trunk/drivers/media/video/omap3isp/ispcsi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,20 @@ static const unsigned int csi2_input_fmts[] = {
V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8,
V4L2_MBUS_FMT_SGBRG10_1X10,
V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8,
V4L2_MBUS_FMT_YUYV8_2X8,
};

/* To set the format on the CSI2 requires a mapping function that takes
* the following inputs:
* - 2 different formats (at this time)
* - 3 different formats (at this time)
* - 2 destinations (mem, vp+mem) (vp only handled separately)
* - 2 decompression options (on, off)
* - 2 isp revisions (certain format must be handled differently on OMAP3630)
* Output should be CSI2 frame format code
* Array indices as follows: [format][dest][decompr][is_3630]
* Not all combinations are valid. 0 means invalid.
*/
static const u16 __csi2_fmt_map[2][2][2][2] = {
static const u16 __csi2_fmt_map[3][2][2][2] = {
/* RAW10 formats */
{
/* Output to memory */
Expand Down Expand Up @@ -147,6 +148,25 @@ static const u16 __csi2_fmt_map[2][2][2][2] = {
CSI2_USERDEF_8BIT_DATA1_DPCM10_VP },
},
},
/* YUYV8 2X8 formats */
{
/* Output to memory */
{
/* No DPCM decompression */
{ CSI2_PIX_FMT_YUV422_8BIT,
CSI2_PIX_FMT_YUV422_8BIT },
/* DPCM decompression */
{ 0, 0 },
},
/* Output to both */
{
/* No DPCM decompression */
{ CSI2_PIX_FMT_YUV422_8BIT_VP,
CSI2_PIX_FMT_YUV422_8BIT_VP },
/* DPCM decompression */
{ 0, 0 },
},
},
};

/*
Expand All @@ -173,6 +193,9 @@ static u16 csi2_ctx_map_format(struct isp_csi2_device *csi2)
case V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8:
fmtidx = 1;
break;
case V4L2_MBUS_FMT_YUYV8_2X8:
fmtidx = 2;
break;
default:
WARN(1, KERN_ERR "CSI2: pixel format %08x unsupported!\n",
fmt->code);
Expand Down

0 comments on commit b39fece

Please sign in to comment.