Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242186
b: refs/heads/master
c: 0e4c180
h: refs/heads/master
v: v3
  • Loading branch information
Sergio Aguirre authored and Mauro Carvalho Chehab committed Mar 22, 2011
1 parent 435acdc commit facd8af
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 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: 4be22b6a7f2f2b7eb6f7aab8902068a367cda8ba
refs/heads/master: 0e4c180d3e2cc11e248f29d4c604b6194739d05a
9 changes: 4 additions & 5 deletions trunk/drivers/media/video/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ static int soc_camera_set_fmt(struct soc_camera_device *icd,

icd->user_width = pix->width;
icd->user_height = pix->height;
icd->bytesperline = pix->bytesperline;
icd->sizeimage = pix->sizeimage;
icd->colorspace = pix->colorspace;
icd->field = pix->field;
if (ici->ops->init_videobuf)
Expand Down Expand Up @@ -661,14 +663,11 @@ static int soc_camera_g_fmt_vid_cap(struct file *file, void *priv,

pix->width = icd->user_width;
pix->height = icd->user_height;
pix->bytesperline = icd->bytesperline;
pix->sizeimage = icd->sizeimage;
pix->field = icd->field;
pix->pixelformat = icd->current_fmt->host_fmt->fourcc;
pix->bytesperline = soc_mbus_bytes_per_line(pix->width,
icd->current_fmt->host_fmt);
pix->colorspace = icd->colorspace;
if (pix->bytesperline < 0)
return pix->bytesperline;
pix->sizeimage = pix->height * pix->bytesperline;
dev_dbg(&icd->dev, "current_fmt->fourcc: 0x%08x\n",
icd->current_fmt->host_fmt->fourcc);
return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/media/soc_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ struct soc_camera_device {
struct device *pdev; /* Platform device */
s32 user_width;
s32 user_height;
u32 bytesperline; /* for padding, zero if unused */
u32 sizeimage;
enum v4l2_colorspace colorspace;
unsigned char iface; /* Host number */
unsigned char devnum; /* Device number per host */
Expand Down

0 comments on commit facd8af

Please sign in to comment.