Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250298
b: refs/heads/master
c: 4bc90de
h: refs/heads/master
v: v3
  • Loading branch information
Teresa Gámez authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent 4ed6065 commit 75429eb
Show file tree
Hide file tree
Showing 2 changed files with 13 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: a1de7a00ae6169973f188a2e6690e34d84613853
refs/heads/master: 4bc90dea7be181cd876500b1d766faaa77c3d493
14 changes: 12 additions & 2 deletions trunk/drivers/media/video/mt9m111.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,20 @@ static int mt9m111_setup_rect(struct i2c_client *client,
static int mt9m111_setup_pixfmt(struct i2c_client *client, u16 outfmt)
{
int ret;
u16 mask = MT9M111_OUTFMT_PROCESSED_BAYER | MT9M111_OUTFMT_RGB |
MT9M111_OUTFMT_BYPASS_IFP | MT9M111_OUTFMT_SWAP_RGB_EVEN |
MT9M111_OUTFMT_RGB565 | MT9M111_OUTFMT_RGB555 |
MT9M111_OUTFMT_SWAP_YCbCr_Cb_Cr |
MT9M111_OUTFMT_SWAP_YCbCr_C_Y;

ret = reg_write(OUTPUT_FORMAT_CTRL2_A, outfmt);
ret = reg_read(OUTPUT_FORMAT_CTRL2_A);
if (ret >= 0)
ret = reg_write(OUTPUT_FORMAT_CTRL2_A, (ret & ~mask) | outfmt);
if (!ret)
ret = reg_write(OUTPUT_FORMAT_CTRL2_B, outfmt);
ret = reg_read(OUTPUT_FORMAT_CTRL2_B);
if (ret >= 0)
ret = reg_write(OUTPUT_FORMAT_CTRL2_B, (ret & ~mask) | outfmt);

return ret;
}

Expand Down

0 comments on commit 75429eb

Please sign in to comment.