From patchwork Mon Aug 20 09:49:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 1347891 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 12CC2DFF0F for ; Mon, 20 Aug 2012 09:49:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341Ab2HTJtg (ORCPT ); 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 ); Mon, 20 Aug 2012 05:49:35 -0400 Received: by wibhq12 with SMTP id hq12so3228314wib.1 for ; 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 To: linux-media@vger.kernel.org Cc: fabio.estevam@freescale.com, laurent.pinchart@ideasonboard.com, g.liakhovetski@gmx.de, mchehab@infradead.org, Javier Martin 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: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Javier Martin --- 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__); }