Message ID | 1345456164-12995-1-git-send-email-javier.martin@vista-silicon.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1T3Oc8-0005NR-7Y for patchwork@linuxtv.org; Mon, 20 Aug 2012 11:49:40 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for <patchwork@linuxtv.org> id 1T3Oc6-00029S-Ik; Mon, 20 Aug 2012 11:49:40 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341Ab2HTJtg (ORCPT <rfc822;patchwork@linuxtv.org>); Mon, 20 Aug 2012 05:49:36 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:39298 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751063Ab2HTJtf (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 20 Aug 2012 05:49:35 -0400 Received: by wibhq12 with SMTP id hq12so3228314wib.1 for <linux-media@vger.kernel.org>; Mon, 20 Aug 2012 02:49:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=ioOKCBhmPp47Ocnwk6ghaSQR6Ss512iTQzSbU80Ry/M=; b=gscq5duJg8YIKTF0FkaB2KlCIbDkBQeAYjVnoMJEhj69A2g2aaWZWoXsNeeFj9tCWY ihlITnRIbIJ7RG73KVGS9j6aF/FzN1sf9x5MXyaJ2NDqWfss+ebQFyaruhUlCfzms7kl PfPcll7mGu5EGrmvYe0RPibejr49+nxz+hQPTNqZVR2XAqJgqqgI1FncaiPbBcjnYpWE /S+gTBnURKm4tRYJZJVkT54/Ym/8DebdbtWDbTiXUPymQh2JLvRg/O1ZqbuwbzR/x9nu O7oJIOD//fb473LVlybyOkFhfk82cWRgKYiAGtcCVA+T/MDqUFi9U5Wz5TE8wZxcJ4cL MdWw== Received: by 10.180.84.164 with SMTP id a4mr27581981wiz.12.1345456174113; Mon, 20 Aug 2012 02:49:34 -0700 (PDT) Received: from piscis.vsilicon.net (122.251.106.212.dynamic.jazztel.es. [212.106.251.122]) by mx.google.com with ESMTPS id ck9sm40385432wib.2.2012.08.20.02.49.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Aug 2012 02:49:33 -0700 (PDT) From: Javier Martin <javier.martin@vista-silicon.com> To: linux-media@vger.kernel.org Cc: fabio.estevam@freescale.com, laurent.pinchart@ideasonboard.com, g.liakhovetski@gmx.de, mchehab@infradead.org, Javier Martin <javier.martin@vista-silicon.com> Subject: [PATCH v3] media: mx2_camera: Don't modify non volatile parameters in try_fmt. Date: Mon, 20 Aug 2012 11:49:24 +0200 Message-Id: <1345456164-12995-1-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmkuk8ef6O8N95oa9ruA5mepbyWekZqBnmpSCE2JneSsBonTHvmlbKOnu05QHVD4pEXyzCQ Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.8.20.93914 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1600_1699 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Javier Martin
Aug. 20, 2012, 9:49 a.m. UTC
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
---
Changes since v2:
- Add Signed-off-by line.
---
drivers/media/video/mx2_camera.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Comments
Hi, Guennadi,did you pick this one? Regards. On 20 August 2012 11:49, Javier Martin <javier.martin@vista-silicon.com> wrote: > Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> > --- > Changes since v2: > - Add Signed-off-by line. > > --- > drivers/media/video/mx2_camera.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c > index 2a33bcb..88dcae6 100644 > --- a/drivers/media/video/mx2_camera.c > +++ b/drivers/media/video/mx2_camera.c > @@ -1385,6 +1385,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, > __u32 pixfmt = pix->pixelformat; > struct soc_camera_host *ici = to_soc_camera_host(icd->parent); > struct mx2_camera_dev *pcdev = ici->priv; > + struct mx2_fmt_cfg *emma_prp; > unsigned int width_limit; > int ret; > > @@ -1447,12 +1448,12 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, > __func__, pcdev->s_width, pcdev->s_height); > > /* If the sensor does not support image size try PrP resizing */ > - pcdev->emma_prp = mx27_emma_prp_get_format(xlate->code, > + emma_prp = mx27_emma_prp_get_format(xlate->code, > xlate->host_fmt->fourcc); > > memset(pcdev->resizing, 0, sizeof(pcdev->resizing)); > if ((mf.width != pix->width || mf.height != pix->height) && > - pcdev->emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { > + emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { > if (mx2_emmaprp_resize(pcdev, &mf, pix, false) < 0) > dev_dbg(icd->parent, "%s: can't resize\n", __func__); > } > -- > 1.7.9.5 >
Hi Javier On Mon, 3 Sep 2012, javier Martin wrote: > Hi, > Guennadi,did you pick this one? Wanted to do so, but > Regards. > > On 20 August 2012 11:49, Javier Martin <javier.martin@vista-silicon.com> wrote: > > Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> > > --- > > Changes since v2: > > - Add Signed-off-by line. > > > > --- > > drivers/media/video/mx2_camera.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c > > index 2a33bcb..88dcae6 100644 > > --- a/drivers/media/video/mx2_camera.c > > +++ b/drivers/media/video/mx2_camera.c > > @@ -1385,6 +1385,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, > > __u32 pixfmt = pix->pixelformat; > > struct soc_camera_host *ici = to_soc_camera_host(icd->parent); > > struct mx2_camera_dev *pcdev = ici->priv; > > + struct mx2_fmt_cfg *emma_prp; > > unsigned int width_limit; > > int ret; > > > > @@ -1447,12 +1448,12 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, > > __func__, pcdev->s_width, pcdev->s_height); > > > > /* If the sensor does not support image size try PrP resizing */ > > - pcdev->emma_prp = mx27_emma_prp_get_format(xlate->code, > > + emma_prp = mx27_emma_prp_get_format(xlate->code, > > xlate->host_fmt->fourcc); > > > > memset(pcdev->resizing, 0, sizeof(pcdev->resizing)); Doesn't the above line also have to be removed? Thanks Guennadi > > if ((mf.width != pix->width || mf.height != pix->height) && > > - pcdev->emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { > > + emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { > > if (mx2_emmaprp_resize(pcdev, &mf, pix, false) < 0) > > dev_dbg(icd->parent, "%s: can't resize\n", __func__); > > } > > -- > > 1.7.9.5 --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 5 Sep 2012, Guennadi Liakhovetski wrote: > Hi Javier > > On Mon, 3 Sep 2012, javier Martin wrote: > > > Hi, > > Guennadi,did you pick this one? > > Wanted to do so, but I've applied this your patch with only that "memset()" line additionally removed. If this is ok with you, no need to re-send. Thanks Guennadi > > Regards. > > > > On 20 August 2012 11:49, Javier Martin <javier.martin@vista-silicon.com> wrote: > > > Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> > > > --- > > > Changes since v2: > > > - Add Signed-off-by line. > > > > > > --- > > > drivers/media/video/mx2_camera.c | 5 +++-- > > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c > > > index 2a33bcb..88dcae6 100644 > > > --- a/drivers/media/video/mx2_camera.c > > > +++ b/drivers/media/video/mx2_camera.c > > > @@ -1385,6 +1385,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, > > > __u32 pixfmt = pix->pixelformat; > > > struct soc_camera_host *ici = to_soc_camera_host(icd->parent); > > > struct mx2_camera_dev *pcdev = ici->priv; > > > + struct mx2_fmt_cfg *emma_prp; > > > unsigned int width_limit; > > > int ret; > > > > > > @@ -1447,12 +1448,12 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, > > > __func__, pcdev->s_width, pcdev->s_height); > > > > > > /* If the sensor does not support image size try PrP resizing */ > > > - pcdev->emma_prp = mx27_emma_prp_get_format(xlate->code, > > > + emma_prp = mx27_emma_prp_get_format(xlate->code, > > > xlate->host_fmt->fourcc); > > > > > > memset(pcdev->resizing, 0, sizeof(pcdev->resizing)); > > Doesn't the above line also have to be removed? > > Thanks > Guennadi > > > > if ((mf.width != pix->width || mf.height != pix->height) && > > > - pcdev->emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { > > > + emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { > > > if (mx2_emmaprp_resize(pcdev, &mf, pix, false) < 0) > > > dev_dbg(icd->parent, "%s: can't resize\n", __func__); > > > } > > > -- > > > 1.7.9.5 > > --- > Guennadi Liakhovetski, Ph.D. > Freelance Open-Source Software Developer > http://www.open-technology.de/ > --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 5 September 2012 10:29, Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote: > On Wed, 5 Sep 2012, Guennadi Liakhovetski wrote: > >> Hi Javier >> >> On Mon, 3 Sep 2012, javier Martin wrote: >> >> > Hi, >> > Guennadi,did you pick this one? >> >> Wanted to do so, but > > I've applied this your patch with only that "memset()" line additionally > removed. If this is ok with you, no need to re-send. It's OK, thanks for fixing that for me. Regards.
diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 2a33bcb..88dcae6 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -1385,6 +1385,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, __u32 pixfmt = pix->pixelformat; struct soc_camera_host *ici = to_soc_camera_host(icd->parent); struct mx2_camera_dev *pcdev = ici->priv; + struct mx2_fmt_cfg *emma_prp; unsigned int width_limit; int ret; @@ -1447,12 +1448,12 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, __func__, pcdev->s_width, pcdev->s_height); /* If the sensor does not support image size try PrP resizing */ - pcdev->emma_prp = mx27_emma_prp_get_format(xlate->code, + emma_prp = mx27_emma_prp_get_format(xlate->code, xlate->host_fmt->fourcc); memset(pcdev->resizing, 0, sizeof(pcdev->resizing)); if ((mf.width != pix->width || mf.height != pix->height) && - pcdev->emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { + emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { if (mx2_emmaprp_resize(pcdev, &mf, pix, false) < 0) dev_dbg(icd->parent, "%s: can't resize\n", __func__); }