Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306460
b: refs/heads/master
c: 914f05c
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed May 15, 2012
1 parent 565eb34 commit 1e4d19f
Show file tree
Hide file tree
Showing 4 changed files with 11 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: b0a461ff1b476067c24131ea0b2a40571592f761
refs/heads/master: 914f05c8118e17d65c4626ae3ed2edcf79f00031
2 changes: 2 additions & 0 deletions trunk/drivers/media/video/mx2_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,8 @@ static int __devinit mx2_camera_probe(struct platform_device *pdev)
pcdev->soc_host.priv = pcdev;
pcdev->soc_host.v4l2_dev.dev = &pdev->dev;
pcdev->soc_host.nr = pdev->id;
if (cpu_is_mx25())
pcdev->soc_host.capabilities = SOCAM_HOST_CAP_STRIDE;

pcdev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev);
if (IS_ERR(pcdev->alloc_ctx)) {
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/media/video/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ static int soc_camera_try_fmt(struct soc_camera_device *icd,
dev_dbg(icd->pdev, "TRY_FMT(%c%c%c%c, %ux%u)\n",
pixfmtstr(pix->pixelformat), pix->width, pix->height);

pix->bytesperline = 0;
pix->sizeimage = 0;
if (!(ici->capabilities & SOCAM_HOST_CAP_STRIDE)) {
pix->bytesperline = 0;
pix->sizeimage = 0;
}

ret = ici->ops->try_fmt(icd, f);
if (ret < 0)
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/media/soc_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,15 @@ struct soc_camera_device {
};
};

/* Host supports programmable stride */
#define SOCAM_HOST_CAP_STRIDE (1 << 0)

struct soc_camera_host {
struct v4l2_device v4l2_dev;
struct list_head list;
struct mutex host_lock; /* Protect during probing */
unsigned char nr; /* Host number */
u32 capabilities;
void *priv;
const char *drv_name;
struct soc_camera_host_ops *ops;
Expand Down

0 comments on commit 1e4d19f

Please sign in to comment.