From patchwork Tue Mar 14 19:02:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 9624223 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 654D760492 for ; Tue, 14 Mar 2017 19:06:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59A032857B for ; Tue, 14 Mar 2017 19:06:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D8022857D; Tue, 14 Mar 2017 19:06:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE8D92851D for ; Tue, 14 Mar 2017 19:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751772AbdCNTGk (ORCPT ); Tue, 14 Mar 2017 15:06:40 -0400 Received: from smtp-4.sys.kth.se ([130.237.48.193]:37396 "EHLO smtp-4.sys.kth.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751489AbdCNTGi (ORCPT ); Tue, 14 Mar 2017 15:06:38 -0400 Received: from smtp-4.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-4.sys.kth.se (Postfix) with ESMTP id 5F0953479; Tue, 14 Mar 2017 20:06:36 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-4.sys.kth.se ([127.0.0.1]) by smtp-4.sys.kth.se (smtp-4.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id U1VnSChfj7t6; Tue, 14 Mar 2017 20:06:35 +0100 (CET) X-KTH-Auth: niso [89.233.230.99] X-KTH-mail-from: niklas.soderlund+renesas@ragnatech.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by smtp-4.sys.kth.se (Postfix) with ESMTPSA id 51D1E33CF; Tue, 14 Mar 2017 20:06:35 +0100 (CET) From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Laurent Pinchart , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, tomoharu.fukawa.eb@renesas.com, Sakari Ailus , Geert Uytterhoeven , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v3 11/27] rcar-vin: do not allow changing scaling and composing while streaming Date: Tue, 14 Mar 2017 20:02:52 +0100 Message-Id: <20170314190308.25790-12-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170314190308.25790-1-niklas.soderlund+renesas@ragnatech.se> References: <20170314190308.25790-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is possible on Gen2 to change the registers controlling composing and scaling while the stream is running. Is however not a good idea to do so and could result in trouble. There are also no good reason to allow this, remove immediate reflection in hardware registers from vidioc_s_selection and only configure scaling and composing when the stream starts. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/rcar-vin/rcar-v4l2.c | 3 --- drivers/media/platform/rcar-vin/rcar-vin.h | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/platform/rcar-vin/rcar-dma.c b/drivers/media/platform/rcar-vin/rcar-dma.c index 286aafab533cda9d..ef029e4c7882322e 100644 --- a/drivers/media/platform/rcar-vin/rcar-dma.c +++ b/drivers/media/platform/rcar-vin/rcar-dma.c @@ -514,7 +514,7 @@ static void rvin_set_coeff(struct rvin_dev *vin, unsigned short xs) rvin_write(vin, p_set->coeff_set[23], VNC8C_REG); } -void rvin_crop_scale_comp(struct rvin_dev *vin) +static void rvin_crop_scale_comp(struct rvin_dev *vin) { u32 xs, ys; diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index e14f0aff8ceecc68..919040e40aec60f6 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -442,9 +442,6 @@ static int rvin_s_selection(struct file *file, void *fh, return -EINVAL; } - /* HW supports modifying configuration while running */ - rvin_crop_scale_comp(vin); - return 0; } diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h b/drivers/media/platform/rcar-vin/rcar-vin.h index 6bf2e4ff8f6076c7..f1251c013d1d2d80 100644 --- a/drivers/media/platform/rcar-vin/rcar-vin.h +++ b/drivers/media/platform/rcar-vin/rcar-vin.h @@ -175,7 +175,4 @@ void rvin_v4l2_remove(struct rvin_dev *vin); const struct rvin_video_format *rvin_format_from_pixel(u32 pixelformat); -/* Cropping, composing and scaling */ -void rvin_crop_scale_comp(struct rvin_dev *vin); - #endif