Message ID | 1413268013-8437-4-git-send-email-ykaneko0929@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Hello. On 10/14/2014 10:26 AM, Yoshihiro Kaneko wrote: > From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > The scaling function had been forbidden for the capture format of > NV16 until now. With this patch, a horizontal scaling-up function > is supported to the capture format of NV16. a vertical scaling-up > by the capture format of NV16 is forbidden for the H/W specification. s/for/by/? > Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> > --- > drivers/media/platform/soc_camera/rcar_vin.c | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c > index 00bc98d..bf3588f 100644 > --- a/drivers/media/platform/soc_camera/rcar_vin.c > +++ b/drivers/media/platform/soc_camera/rcar_vin.c [...] > @@ -1622,9 +1622,19 @@ static int rcar_vin_set_fmt(struct soc_camera_device *icd, > if (priv->error_flag == false) > priv->error_flag = true; > else { > - if ((pixfmt == V4L2_PIX_FMT_NV16) && (pix->width & 0x1F)) { > - dev_err(icd->parent, "Specified width error in NV16 format.\n"); > - return -EINVAL; > + if (pixfmt == V4L2_PIX_FMT_NV16) { > + if (pix->width & 0x1F) { > + dev_err(icd->parent, > + "Specified width error in NV16 format. " You should indent the string more to the right, preferrably starting it under 'icd'. > + "Please specify the multiple of 32.\n"); Do not break the string like this. scripts/checkpatch.pl has been taught to not complain about long strings. > + return -EINVAL; > + } > + if (pix->height != cam->height) { > + dev_err(icd->parent, > + "Vertical scaling-up error in NV16 format. " > + "Please specify input height size.\n"); Same here. Not breaking the lines helps to find the error messages in the code. [...] WBR, Sergei -- 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
On Tue, Oct 14, 2014 at 04:57:53PM +0400, Sergei Shtylyov wrote: > Hello. > > On 10/14/2014 10:26 AM, Yoshihiro Kaneko wrote: > > >From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > >The scaling function had been forbidden for the capture format of > >NV16 until now. With this patch, a horizontal scaling-up function > >is supported to the capture format of NV16. a vertical scaling-up > >by the capture format of NV16 is forbidden for the H/W specification. > > s/for/by/? > How about the following text? Up until now scaling has been forbidden for the NV16 capture format. This patch adds support for horizontal scaling-up for NV16. Vertical scaling-up for NV16 is forbidden for by the H/W specification. > >Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > >Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> > >--- > > drivers/media/platform/soc_camera/rcar_vin.c | 19 +++++++++++++++---- > > 1 file changed, 15 insertions(+), 4 deletions(-) > > >diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c > >index 00bc98d..bf3588f 100644 > >--- a/drivers/media/platform/soc_camera/rcar_vin.c > >+++ b/drivers/media/platform/soc_camera/rcar_vin.c > [...] > >@@ -1622,9 +1622,19 @@ static int rcar_vin_set_fmt(struct soc_camera_device *icd, > > if (priv->error_flag == false) > > priv->error_flag = true; > > else { > >- if ((pixfmt == V4L2_PIX_FMT_NV16) && (pix->width & 0x1F)) { > >- dev_err(icd->parent, "Specified width error in NV16 format.\n"); > >- return -EINVAL; > >+ if (pixfmt == V4L2_PIX_FMT_NV16) { > >+ if (pix->width & 0x1F) { > >+ dev_err(icd->parent, > >+ "Specified width error in NV16 format. " > > You should indent the string more to the right, preferrably starting it > under 'icd'. > > >+ "Please specify the multiple of 32.\n"); > > Do not break the string like this. scripts/checkpatch.pl has been taught > to not complain about long strings. > > >+ return -EINVAL; > >+ } > >+ if (pix->height != cam->height) { > >+ dev_err(icd->parent, > >+ "Vertical scaling-up error in NV16 format. " > >+ "Please specify input height size.\n"); > > Same here. Not breaking the lines helps to find the error messages in the > code. > > [...] > > WBR, Sergei > > -- > 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 > -- 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
Hello Sergei, Thank you for your comment. I'll update this patch. Thanks, Kaneko 2014-10-14 21:57 GMT+09:00 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>: > Hello. > > On 10/14/2014 10:26 AM, Yoshihiro Kaneko wrote: > >> From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > >> The scaling function had been forbidden for the capture format of >> NV16 until now. With this patch, a horizontal scaling-up function >> is supported to the capture format of NV16. a vertical scaling-up >> by the capture format of NV16 is forbidden for the H/W specification. > > > s/for/by/? > >> Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> >> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> >> --- >> drivers/media/platform/soc_camera/rcar_vin.c | 19 +++++++++++++++---- >> 1 file changed, 15 insertions(+), 4 deletions(-) > > >> diff --git a/drivers/media/platform/soc_camera/rcar_vin.c >> b/drivers/media/platform/soc_camera/rcar_vin.c >> index 00bc98d..bf3588f 100644 >> --- a/drivers/media/platform/soc_camera/rcar_vin.c >> +++ b/drivers/media/platform/soc_camera/rcar_vin.c > > [...] >> >> @@ -1622,9 +1622,19 @@ static int rcar_vin_set_fmt(struct >> soc_camera_device *icd, >> if (priv->error_flag == false) >> priv->error_flag = true; >> else { >> - if ((pixfmt == V4L2_PIX_FMT_NV16) && (pix->width & 0x1F)) >> { >> - dev_err(icd->parent, "Specified width error in >> NV16 format.\n"); >> - return -EINVAL; >> + if (pixfmt == V4L2_PIX_FMT_NV16) { >> + if (pix->width & 0x1F) { >> + dev_err(icd->parent, >> + "Specified width error in NV16 format. " > > > You should indent the string more to the right, preferrably starting it > under 'icd'. > >> + "Please specify the multiple of 32.\n"); > > > Do not break the string like this. scripts/checkpatch.pl has been taught > to not complain about long strings. > >> + return -EINVAL; >> + } >> + if (pix->height != cam->height) { >> + dev_err(icd->parent, >> + "Vertical scaling-up error in NV16 format. >> " >> + "Please specify input height size.\n"); > > > Same here. Not breaking the lines helps to find the error messages in the > code. > > [...] > > WBR, Sergei > -- 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
Hello. On 10/15/2014 08:52 AM, Simon Horman wrote: >>> From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> >>> The scaling function had been forbidden for the capture format of >>> NV16 until now. With this patch, a horizontal scaling-up function >>> is supported to the capture format of NV16. a vertical scaling-up >>> by the capture format of NV16 is forbidden for the H/W specification. >> s/for/by/? > How about the following text? > Up until now scaling has been forbidden for the NV16 capture format. This > patch adds support for horizontal scaling-up for NV16. Vertical scaling-up > for NV16 is forbidden for by the H/W specification. "For by", hehe? Were you trying to keep every happy? :-) WBR, Sergei -- 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
On Wed, Oct 15, 2014 at 06:40:06PM +0400, Sergei Shtylyov wrote: > Hello. > > On 10/15/2014 08:52 AM, Simon Horman wrote: > > >>>From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > >>>The scaling function had been forbidden for the capture format of > >>>NV16 until now. With this patch, a horizontal scaling-up function > >>>is supported to the capture format of NV16. a vertical scaling-up > >>>by the capture format of NV16 is forbidden for the H/W specification. > > >> s/for/by/? > > >How about the following text? > > >Up until now scaling has been forbidden for the NV16 capture format. This > >patch adds support for horizontal scaling-up for NV16. Vertical scaling-up > >for NV16 is forbidden for by the H/W specification. > > "For by", hehe? Were you trying to keep every happy? :-) Maybe :^) Kaneko-san, can you change "for by" to "by" ? -- 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
2014-10-16 13:55 GMT+09:00 Simon Horman <horms@verge.net.au>: > On Wed, Oct 15, 2014 at 06:40:06PM +0400, Sergei Shtylyov wrote: >> Hello. >> >> On 10/15/2014 08:52 AM, Simon Horman wrote: >> >> >>>From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> >> >> >>>The scaling function had been forbidden for the capture format of >> >>>NV16 until now. With this patch, a horizontal scaling-up function >> >>>is supported to the capture format of NV16. a vertical scaling-up >> >>>by the capture format of NV16 is forbidden for the H/W specification. >> >> >> s/for/by/? >> >> >How about the following text? >> >> >Up until now scaling has been forbidden for the NV16 capture format. This >> >patch adds support for horizontal scaling-up for NV16. Vertical scaling-up >> >for NV16 is forbidden for by the H/W specification. >> >> "For by", hehe? Were you trying to keep every happy? :-) > > Maybe :^) > > Kaneko-san, can you change "for by" to "by" ? I got it. -- 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
diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 00bc98d..bf3588f 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -648,7 +648,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) /* output format */ switch (icd->current_fmt->host_fmt->fourcc) { case V4L2_PIX_FMT_NV16: - iowrite32(ALIGN(ALIGN(cam->width, 0x20) * cam->height, 0x80), + iowrite32(ALIGN((cam->out_width * cam->out_height), 0x80), priv->base + VNUVAOF_REG); dmr = VNDMR_DTMD_YCSEP; output_is_yuv = true; @@ -1622,9 +1622,19 @@ static int rcar_vin_set_fmt(struct soc_camera_device *icd, if (priv->error_flag == false) priv->error_flag = true; else { - if ((pixfmt == V4L2_PIX_FMT_NV16) && (pix->width & 0x1F)) { - dev_err(icd->parent, "Specified width error in NV16 format.\n"); - return -EINVAL; + if (pixfmt == V4L2_PIX_FMT_NV16) { + if (pix->width & 0x1F) { + dev_err(icd->parent, + "Specified width error in NV16 format. " + "Please specify the multiple of 32.\n"); + return -EINVAL; + } + if (pix->height != cam->height) { + dev_err(icd->parent, + "Vertical scaling-up error in NV16 format. " + "Please specify input height size.\n"); + return -EINVAL; + } } } @@ -1670,6 +1680,7 @@ static int rcar_vin_set_fmt(struct soc_camera_device *icd, case V4L2_PIX_FMT_YUYV: case V4L2_PIX_FMT_RGB565: case V4L2_PIX_FMT_RGB555X: + case V4L2_PIX_FMT_NV16: /* horizontal scaling-up only is supported */ can_scale = true; break; default: