All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
@ 2012-03-14 15:02 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-03-14 15:02 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: linux-sh

Newer CEU versions, e.g., the one, used on sh7372, support image sizes
larger than 2560x1920. Retrieve maximum sizes from platform properties.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/media/video/sh_mobile_ceu_camera.c |   35 +++++++++++++++++++++------
 include/media/sh_mobile_ceu.h              |    2 +
 2 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index f854d85..424dfac 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -112,6 +112,10 @@ struct sh_mobile_ceu_dev {
 
 	u32 cflcr;
 
+	/* static max sizes either from platform data or default */
+	int max_width;
+	int max_height;
+
 	enum v4l2_field field;
 	int sequence;
 
@@ -1081,7 +1085,15 @@ static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, unsigned int
 		if (ret < 0)
 			return ret;
 
-		while ((mf.width > 2560 || mf.height > 1920) && shift < 4) {
+		/*
+		 * All currently existing CEU implementations support 2560x1920
+		 * or larger frames. If the sensor is proposing too big a frame,
+		 * don't bother with possibly supportred by the CEU larger
+		 * sizes, just try VGA multiples. If needed, this can be
+		 * adjusted in the future.
+		 */
+		while ((mf.width > pcdev->max_width ||
+			mf.height > pcdev->max_height) && shift < 4) {
 			/* Try 2560x1920, 1280x960, 640x480, 320x240 */
 			mf.width	= 2560 >> shift;
 			mf.height	= 1920 >> shift;
@@ -1377,6 +1389,8 @@ static int client_s_crop(struct soc_camera_device *icd, struct v4l2_crop *crop,
 static int client_s_fmt(struct soc_camera_device *icd,
 			struct v4l2_mbus_framefmt *mf, bool ceu_can_scale)
 {
+	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+	struct sh_mobile_ceu_dev *pcdev = ici->priv;
 	struct sh_mobile_ceu_cam *cam = icd->host_priv;
 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
 	struct device *dev = icd->parent;
@@ -1410,8 +1424,8 @@ static int client_s_fmt(struct soc_camera_device *icd,
 	if (ret < 0)
 		return ret;
 
-	max_width = min(cap.bounds.width, 2560);
-	max_height = min(cap.bounds.height, 1920);
+	max_width = min(cap.bounds.width, pcdev->max_width);
+	max_height = min(cap.bounds.height, pcdev->max_height);
 
 	/* Camera set a format, but geometry is not precise, try to improve */
 	tmp_w = mf->width;
@@ -1551,7 +1565,7 @@ static int sh_mobile_ceu_set_crop(struct soc_camera_device *icd,
 	if (ret < 0)
 		return ret;
 
-	if (mf.width > 2560 || mf.height > 1920)
+	if (mf.width > pcdev->max_width || mf.height > pcdev->max_height)
 		return -EINVAL;
 
 	/* 4. Calculate camera scales */
@@ -1834,6 +1848,8 @@ static int sh_mobile_ceu_set_fmt(struct soc_camera_device *icd,
 static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
 				 struct v4l2_format *f)
 {
+	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+	struct sh_mobile_ceu_dev *pcdev = ici->priv;
 	const struct soc_camera_format_xlate *xlate;
 	struct v4l2_pix_format *pix = &f->fmt.pix;
 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
@@ -1854,8 +1870,8 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
 	/* FIXME: calculate using depth and bus width */
 
 	/* CFSZR requires height and width to be 4-pixel aligned */
-	v4l_bound_align_image(&pix->width, 2, 2560, 2,
-			      &pix->height, 4, 1920, 2, 0);
+	v4l_bound_align_image(&pix->width, 2, pcdev->max_width, 2,
+			      &pix->height, 4, pcdev->max_height, 2, 0);
 
 	width = pix->width;
 	height = pix->height;
@@ -1890,8 +1906,8 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
 			 * requested a bigger rectangle, it will not return a
 			 * smaller one.
 			 */
-			mf.width = 2560;
-			mf.height = 1920;
+			mf.width = pcdev->max_width;
+			mf.height = pcdev->max_height;
 			ret = v4l2_device_call_until_err(sd->v4l2_dev,
 					soc_camera_grp_id(icd), video,
 					try_mbus_fmt, &mf);
@@ -2082,6 +2098,9 @@ static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev)
 		goto exit_kfree;
 	}
 
+	pcdev->max_width = pcdev->pdata->max_width ? : 2560;
+	pcdev->max_height = pcdev->pdata->max_height ? : 1920;
+
 	base = ioremap_nocache(res->start, resource_size(res));
 	if (!base) {
 		err = -ENXIO;
diff --git a/include/media/sh_mobile_ceu.h b/include/media/sh_mobile_ceu.h
index 48413b4..a90a765 100644
--- a/include/media/sh_mobile_ceu.h
+++ b/include/media/sh_mobile_ceu.h
@@ -18,6 +18,8 @@ struct sh_mobile_ceu_companion {
 
 struct sh_mobile_ceu_info {
 	unsigned long flags;
+	int max_width;
+	int max_height;
 	struct sh_mobile_ceu_companion *csi2;
 };
 
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
@ 2012-03-14 15:02 ` Guennadi Liakhovetski
  0 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-03-14 15:02 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: linux-sh

Newer CEU versions, e.g., the one, used on sh7372, support image sizes
larger than 2560x1920. Retrieve maximum sizes from platform properties.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/media/video/sh_mobile_ceu_camera.c |   35 +++++++++++++++++++++------
 include/media/sh_mobile_ceu.h              |    2 +
 2 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index f854d85..424dfac 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -112,6 +112,10 @@ struct sh_mobile_ceu_dev {
 
 	u32 cflcr;
 
+	/* static max sizes either from platform data or default */
+	int max_width;
+	int max_height;
+
 	enum v4l2_field field;
 	int sequence;
 
@@ -1081,7 +1085,15 @@ static int sh_mobile_ceu_get_formats(struct soc_camera_device *icd, unsigned int
 		if (ret < 0)
 			return ret;
 
-		while ((mf.width > 2560 || mf.height > 1920) && shift < 4) {
+		/*
+		 * All currently existing CEU implementations support 2560x1920
+		 * or larger frames. If the sensor is proposing too big a frame,
+		 * don't bother with possibly supportred by the CEU larger
+		 * sizes, just try VGA multiples. If needed, this can be
+		 * adjusted in the future.
+		 */
+		while ((mf.width > pcdev->max_width ||
+			mf.height > pcdev->max_height) && shift < 4) {
 			/* Try 2560x1920, 1280x960, 640x480, 320x240 */
 			mf.width	= 2560 >> shift;
 			mf.height	= 1920 >> shift;
@@ -1377,6 +1389,8 @@ static int client_s_crop(struct soc_camera_device *icd, struct v4l2_crop *crop,
 static int client_s_fmt(struct soc_camera_device *icd,
 			struct v4l2_mbus_framefmt *mf, bool ceu_can_scale)
 {
+	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+	struct sh_mobile_ceu_dev *pcdev = ici->priv;
 	struct sh_mobile_ceu_cam *cam = icd->host_priv;
 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
 	struct device *dev = icd->parent;
@@ -1410,8 +1424,8 @@ static int client_s_fmt(struct soc_camera_device *icd,
 	if (ret < 0)
 		return ret;
 
-	max_width = min(cap.bounds.width, 2560);
-	max_height = min(cap.bounds.height, 1920);
+	max_width = min(cap.bounds.width, pcdev->max_width);
+	max_height = min(cap.bounds.height, pcdev->max_height);
 
 	/* Camera set a format, but geometry is not precise, try to improve */
 	tmp_w = mf->width;
@@ -1551,7 +1565,7 @@ static int sh_mobile_ceu_set_crop(struct soc_camera_device *icd,
 	if (ret < 0)
 		return ret;
 
-	if (mf.width > 2560 || mf.height > 1920)
+	if (mf.width > pcdev->max_width || mf.height > pcdev->max_height)
 		return -EINVAL;
 
 	/* 4. Calculate camera scales */
@@ -1834,6 +1848,8 @@ static int sh_mobile_ceu_set_fmt(struct soc_camera_device *icd,
 static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
 				 struct v4l2_format *f)
 {
+	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
+	struct sh_mobile_ceu_dev *pcdev = ici->priv;
 	const struct soc_camera_format_xlate *xlate;
 	struct v4l2_pix_format *pix = &f->fmt.pix;
 	struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
@@ -1854,8 +1870,8 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
 	/* FIXME: calculate using depth and bus width */
 
 	/* CFSZR requires height and width to be 4-pixel aligned */
-	v4l_bound_align_image(&pix->width, 2, 2560, 2,
-			      &pix->height, 4, 1920, 2, 0);
+	v4l_bound_align_image(&pix->width, 2, pcdev->max_width, 2,
+			      &pix->height, 4, pcdev->max_height, 2, 0);
 
 	width = pix->width;
 	height = pix->height;
@@ -1890,8 +1906,8 @@ static int sh_mobile_ceu_try_fmt(struct soc_camera_device *icd,
 			 * requested a bigger rectangle, it will not return a
 			 * smaller one.
 			 */
-			mf.width = 2560;
-			mf.height = 1920;
+			mf.width = pcdev->max_width;
+			mf.height = pcdev->max_height;
 			ret = v4l2_device_call_until_err(sd->v4l2_dev,
 					soc_camera_grp_id(icd), video,
 					try_mbus_fmt, &mf);
@@ -2082,6 +2098,9 @@ static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev)
 		goto exit_kfree;
 	}
 
+	pcdev->max_width = pcdev->pdata->max_width ? : 2560;
+	pcdev->max_height = pcdev->pdata->max_height ? : 1920;
+
 	base = ioremap_nocache(res->start, resource_size(res));
 	if (!base) {
 		err = -ENXIO;
diff --git a/include/media/sh_mobile_ceu.h b/include/media/sh_mobile_ceu.h
index 48413b4..a90a765 100644
--- a/include/media/sh_mobile_ceu.h
+++ b/include/media/sh_mobile_ceu.h
@@ -18,6 +18,8 @@ struct sh_mobile_ceu_companion {
 
 struct sh_mobile_ceu_info {
 	unsigned long flags;
+	int max_width;
+	int max_height;
 	struct sh_mobile_ceu_companion *csi2;
 };
 
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] ARM: mach-shmobile: sh7372 CEU supports up to 8188x8188 images
  2012-03-14 15:02 ` Guennadi Liakhovetski
@ 2012-03-14 15:02   ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-03-14 15:02 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: linux-sh

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

This patch we can push some time after the first one in this series gets 
in, no breakage is caused.

 arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
 arch/arm/mach-shmobile/board-mackerel.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index aab0a34..f67aa03 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
 
 static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
 	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
+	.max_width = 8188,
+	.max_height = 8188,
 	.csi2 = &csi2,
 };
 
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 9b42fbd..f790772 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
 
 static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
 	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
+	.max_width = 8188,
+	.max_height = 8188,
 };
 
 static struct resource ceu_resources[] = {
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] ARM: mach-shmobile: sh7372 CEU supports up to 8188x8188 images
@ 2012-03-14 15:02   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-03-14 15:02 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: linux-sh

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---

This patch we can push some time after the first one in this series gets 
in, no breakage is caused.

 arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
 arch/arm/mach-shmobile/board-mackerel.c |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index aab0a34..f67aa03 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
 
 static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
 	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
+	.max_width = 8188,
+	.max_height = 8188,
 	.csi2 = &csi2,
 };
 
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 9b42fbd..f790772 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
 
 static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
 	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
+	.max_width = 8188,
+	.max_height = 8188,
 };
 
 static struct resource ceu_resources[] = {
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
  2012-03-14 15:02 ` Guennadi Liakhovetski
@ 2012-03-21 10:52   ` Laurent Pinchart
  -1 siblings, 0 replies; 14+ messages in thread
From: Laurent Pinchart @ 2012-03-21 10:52 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, linux-sh

Hi Guennadi,

On Wednesday 14 March 2012 16:02:20 Guennadi Liakhovetski wrote:
> Newer CEU versions, e.g., the one, used on sh7372, support image sizes
> larger than 2560x1920. Retrieve maximum sizes from platform properties.

Isn't there a way you could query the CEU version at runtime instead ?

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
@ 2012-03-21 10:52   ` Laurent Pinchart
  0 siblings, 0 replies; 14+ messages in thread
From: Laurent Pinchart @ 2012-03-21 10:52 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, linux-sh

Hi Guennadi,

On Wednesday 14 March 2012 16:02:20 Guennadi Liakhovetski wrote:
> Newer CEU versions, e.g., the one, used on sh7372, support image sizes
> larger than 2560x1920. Retrieve maximum sizes from platform properties.

Isn't there a way you could query the CEU version at runtime instead ?

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
  2012-03-21 10:52   ` Laurent Pinchart
@ 2012-03-21 10:59     ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-03-21 10:59 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Linux Media Mailing List, linux-sh

Hi Laurent

On Wed, 21 Mar 2012, Laurent Pinchart wrote:

> Hi Guennadi,
> 
> On Wednesday 14 March 2012 16:02:20 Guennadi Liakhovetski wrote:
> > Newer CEU versions, e.g., the one, used on sh7372, support image sizes
> > larger than 2560x1920. Retrieve maximum sizes from platform properties.
> 
> Isn't there a way you could query the CEU version at runtime instead ?

I'm not aware of any. And even if it were possible, I'm not sure putting 
tables with "version - feature-set" tables into the driver proper would be 
a very good idea. It used to be like that (or almost like that with 
dependencies on the chip-type) in other drivers (e.g., shdma) and we 
dropped it in favour of platform data.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
@ 2012-03-21 10:59     ` Guennadi Liakhovetski
  0 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-03-21 10:59 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Linux Media Mailing List, linux-sh

Hi Laurent

On Wed, 21 Mar 2012, Laurent Pinchart wrote:

> Hi Guennadi,
> 
> On Wednesday 14 March 2012 16:02:20 Guennadi Liakhovetski wrote:
> > Newer CEU versions, e.g., the one, used on sh7372, support image sizes
> > larger than 2560x1920. Retrieve maximum sizes from platform properties.
> 
> Isn't there a way you could query the CEU version at runtime instead ?

I'm not aware of any. And even if it were possible, I'm not sure putting 
tables with "version - feature-set" tables into the driver proper would be 
a very good idea. It used to be like that (or almost like that with 
dependencies on the chip-type) in other drivers (e.g., shdma) and we 
dropped it in favour of platform data.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
  2012-03-21 10:59     ` Guennadi Liakhovetski
@ 2012-03-21 11:06       ` Laurent Pinchart
  -1 siblings, 0 replies; 14+ messages in thread
From: Laurent Pinchart @ 2012-03-21 11:06 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, linux-sh

Hi Guennadi,

On Wednesday 21 March 2012 11:59:59 Guennadi Liakhovetski wrote:
> On Wed, 21 Mar 2012, Laurent Pinchart wrote:
> > On Wednesday 14 March 2012 16:02:20 Guennadi Liakhovetski wrote:
> > > Newer CEU versions, e.g., the one, used on sh7372, support image sizes
> > > larger than 2560x1920. Retrieve maximum sizes from platform properties.
> > 
> > Isn't there a way you could query the CEU version at runtime instead ?
> 
> I'm not aware of any. And even if it were possible, I'm not sure putting
> tables with "version - feature-set" tables into the driver proper would be
> a very good idea. It used to be like that (or almost like that with
> dependencies on the chip-type) in other drivers (e.g., shdma) and we
> dropped it in favour of platform data.

I would have voted for doing it the other way around. The driver should know 
about the different hardware versions it supports. Putting that in platform 
data just moves the burden to board code developers and duplicates the 
information in lots of places. At worse, if you can't detect the version at 
runtime, I would put a version field in the platform data and map that to 
hardware features in the driver.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version
@ 2012-03-21 11:06       ` Laurent Pinchart
  0 siblings, 0 replies; 14+ messages in thread
From: Laurent Pinchart @ 2012-03-21 11:06 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, linux-sh

Hi Guennadi,

On Wednesday 21 March 2012 11:59:59 Guennadi Liakhovetski wrote:
> On Wed, 21 Mar 2012, Laurent Pinchart wrote:
> > On Wednesday 14 March 2012 16:02:20 Guennadi Liakhovetski wrote:
> > > Newer CEU versions, e.g., the one, used on sh7372, support image sizes
> > > larger than 2560x1920. Retrieve maximum sizes from platform properties.
> > 
> > Isn't there a way you could query the CEU version at runtime instead ?
> 
> I'm not aware of any. And even if it were possible, I'm not sure putting
> tables with "version - feature-set" tables into the driver proper would be
> a very good idea. It used to be like that (or almost like that with
> dependencies on the chip-type) in other drivers (e.g., shdma) and we
> dropped it in favour of platform data.

I would have voted for doing it the other way around. The driver should know 
about the different hardware versions it supports. Putting that in platform 
data just moves the burden to board code developers and duplicates the 
information in lots of places. At worse, if you can't detect the version at 
runtime, I would put a version field in the platform data and map that to 
hardware features in the driver.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: mach-shmobile: sh7372 CEU supports up to 8188x8188 images
  2012-03-14 15:02   ` Guennadi Liakhovetski
@ 2012-04-08 11:23     ` Guennadi Liakhovetski
  -1 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-08 11:23 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: linux-sh, Rafael J. Wysocki, Paul Mundt

On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:

> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> 
> This patch we can push some time after the first one in this series gets 
> in, no breakage is caused.

Patch 1/2 from this series is now in the mainline, so, also this patch can 
be applied now. Not sure whether this qualifies as a fix (in the sense, 
that the default maximum sizes of 2560x1920, used without this patch are 
wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
accordingly.

Thanks
Guennadi

>  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
>  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> index aab0a34..f67aa03 100644
> --- a/arch/arm/mach-shmobile/board-ap4evb.c
> +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  	.csi2 = &csi2,
>  };
>  
> diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> index 9b42fbd..f790772 100644
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  };
>  
>  static struct resource ceu_resources[] = {
> -- 
> 1.7.2.5
> 
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: mach-shmobile: sh7372 CEU supports up to 8188x8188 images
@ 2012-04-08 11:23     ` Guennadi Liakhovetski
  0 siblings, 0 replies; 14+ messages in thread
From: Guennadi Liakhovetski @ 2012-04-08 11:23 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: linux-sh, Rafael J. Wysocki, Paul Mundt

On Wed, 14 Mar 2012, Guennadi Liakhovetski wrote:

> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
> 
> This patch we can push some time after the first one in this series gets 
> in, no breakage is caused.

Patch 1/2 from this series is now in the mainline, so, also this patch can 
be applied now. Not sure whether this qualifies as a fix (in the sense, 
that the default maximum sizes of 2560x1920, used without this patch are 
wrong for sh7372). Please, either push for 3.4 or queue for 3.5 
accordingly.

Thanks
Guennadi

>  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
>  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> index aab0a34..f67aa03 100644
> --- a/arch/arm/mach-shmobile/board-ap4evb.c
> +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  	.csi2 = &csi2,
>  };
>  
> diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> index 9b42fbd..f790772 100644
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  };
>  
>  static struct resource ceu_resources[] = {
> -- 
> 1.7.2.5
> 
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: mach-shmobile: sh7372 CEU supports up to 8188x8188 images
  2012-03-14 15:02   ` Guennadi Liakhovetski
@ 2012-04-16  1:55     ` Simon Horman
  -1 siblings, 0 replies; 14+ messages in thread
From: Simon Horman @ 2012-04-16  1:55 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, linux-sh

On Wed, Mar 14, 2012 at 04:02:24PM +0100, Guennadi Liakhovetski wrote:
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Reviewed-by: Simon Horman <horms@verge.net.au>

> ---
> 
> This patch we can push some time after the first one in this series gets 
> in, no breakage is caused.
> 
>  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
>  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> index aab0a34..f67aa03 100644
> --- a/arch/arm/mach-shmobile/board-ap4evb.c
> +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  	.csi2 = &csi2,
>  };
>  
> diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> index 9b42fbd..f790772 100644
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  };
>  
>  static struct resource ceu_resources[] = {
> -- 
> 1.7.2.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ARM: mach-shmobile: sh7372 CEU supports up to 8188x8188 images
@ 2012-04-16  1:55     ` Simon Horman
  0 siblings, 0 replies; 14+ messages in thread
From: Simon Horman @ 2012-04-16  1:55 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: Linux Media Mailing List, linux-sh

On Wed, Mar 14, 2012 at 04:02:24PM +0100, Guennadi Liakhovetski wrote:
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Reviewed-by: Simon Horman <horms@verge.net.au>

> ---
> 
> This patch we can push some time after the first one in this series gets 
> in, no breakage is caused.
> 
>  arch/arm/mach-shmobile/board-ap4evb.c   |    2 ++
>  arch/arm/mach-shmobile/board-mackerel.c |    2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
> index aab0a34..f67aa03 100644
> --- a/arch/arm/mach-shmobile/board-ap4evb.c
> +++ b/arch/arm/mach-shmobile/board-ap4evb.c
> @@ -1009,6 +1009,8 @@ static struct sh_mobile_ceu_companion csi2 = {
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  	.csi2 = &csi2,
>  };
>  
> diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
> index 9b42fbd..f790772 100644
> --- a/arch/arm/mach-shmobile/board-mackerel.c
> +++ b/arch/arm/mach-shmobile/board-mackerel.c
> @@ -1270,6 +1270,8 @@ static void mackerel_camera_del(struct soc_camera_device *icd)
>  
>  static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
>  	.flags = SH_CEU_FLAG_USE_8BIT_BUS,
> +	.max_width = 8188,
> +	.max_height = 8188,
>  };
>  
>  static struct resource ceu_resources[] = {
> -- 
> 1.7.2.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-04-16  1:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-14 15:02 [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version Guennadi Liakhovetski
2012-03-14 15:02 ` Guennadi Liakhovetski
2012-03-14 15:02 ` [PATCH 2/2] ARM: mach-shmobile: sh7372 CEU supports up to 8188x8188 images Guennadi Liakhovetski
2012-03-14 15:02   ` Guennadi Liakhovetski
2012-04-08 11:23   ` Guennadi Liakhovetski
2012-04-08 11:23     ` Guennadi Liakhovetski
2012-04-16  1:55   ` Simon Horman
2012-04-16  1:55     ` Simon Horman
2012-03-21 10:52 ` [PATCH 1/2] V4L: sh_mobile_ceu_camera: maximum image size depends on the hardware version Laurent Pinchart
2012-03-21 10:52   ` Laurent Pinchart
2012-03-21 10:59   ` Guennadi Liakhovetski
2012-03-21 10:59     ` Guennadi Liakhovetski
2012-03-21 11:06     ` Laurent Pinchart
2012-03-21 11:06       ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.