Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124314
b: refs/heads/master
c: a2c8c68
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent ffc060d commit ecd1893
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 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: b3d7b2ad9cd7612354d921ba948ab6514699519c
refs/heads/master: a2c8c68cca3dbb0c87f5034ab8ea29350174ec4a
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/pxa_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,11 @@ static int pxa_camera_set_fmt_cap(struct soc_camera_device *icd,
static int pxa_camera_try_fmt_cap(struct soc_camera_device *icd,
struct v4l2_format *f)
{
int ret = pxa_camera_try_bus_param(icd, f->fmt.pix.pixelformat);

if (ret < 0)
return ret;

/* limit to pxa hardware capabilities */
if (f->fmt.pix.height < 32)
f->fmt.pix.height = 32;
Expand Down Expand Up @@ -1039,7 +1044,6 @@ static struct soc_camera_host_ops pxa_soc_camera_host_ops = {
.reqbufs = pxa_camera_reqbufs,
.poll = pxa_camera_poll,
.querycap = pxa_camera_querycap,
.try_bus_param = pxa_camera_try_bus_param,
.set_bus_param = pxa_camera_set_bus_param,
};

Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/sh_mobile_ceu_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,11 @@ static int sh_mobile_ceu_set_fmt_cap(struct soc_camera_device *icd,
static int sh_mobile_ceu_try_fmt_cap(struct soc_camera_device *icd,
struct v4l2_format *f)
{
int ret = sh_mobile_ceu_try_bus_param(icd, f->fmt.pix.pixelformat);

if (ret < 0)
return ret;

/* FIXME: calculate using depth and bus width */

if (f->fmt.pix.height < 4)
Expand Down Expand Up @@ -546,7 +551,6 @@ static struct soc_camera_host_ops sh_mobile_ceu_host_ops = {
.reqbufs = sh_mobile_ceu_reqbufs,
.poll = sh_mobile_ceu_poll,
.querycap = sh_mobile_ceu_querycap,
.try_bus_param = sh_mobile_ceu_try_bus_param,
.set_bus_param = sh_mobile_ceu_set_bus_param,
.init_videobuf = sh_mobile_ceu_init_videobuf,
};
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/media/video/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ static int soc_camera_try_fmt_vid_cap(struct file *file, void *priv,
return -EINVAL;
}

/* test physical bus parameters */
ret = ici->ops->try_bus_param(icd, f->fmt.pix.pixelformat);
if (ret)
return ret;

/* limit format to hardware capabilities */
ret = ici->ops->try_fmt_cap(icd, f);

Expand Down
1 change: 0 additions & 1 deletion trunk/include/media/soc_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ struct soc_camera_host_ops {
struct soc_camera_device *);
int (*reqbufs)(struct soc_camera_file *, struct v4l2_requestbuffers *);
int (*querycap)(struct soc_camera_host *, struct v4l2_capability *);
int (*try_bus_param)(struct soc_camera_device *, __u32);
int (*set_bus_param)(struct soc_camera_device *, __u32);
unsigned int (*poll)(struct file *, poll_table *);
};
Expand Down

0 comments on commit ecd1893

Please sign in to comment.