From patchwork Thu Nov 27 01:25:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takanari Hayama X-Patchwork-Id: 5391021 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0142EC11AC for ; Thu, 27 Nov 2014 01:25:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C6EE201EC for ; Thu, 27 Nov 2014 01:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55907201C8 for ; Thu, 27 Nov 2014 01:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752913AbaK0BZR (ORCPT ); Wed, 26 Nov 2014 20:25:17 -0500 Received: from mail-pd0-f182.google.com ([209.85.192.182]:49888 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753218AbaK0BZP (ORCPT ); Wed, 26 Nov 2014 20:25:15 -0500 Received: by mail-pd0-f182.google.com with SMTP id r10so3821787pdi.41 for ; Wed, 26 Nov 2014 17:25:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ru3arqnVIwh5UDjutMgolwiRUoVHVlBduK7joCu4O34=; b=YInhWrSShMAOiCP0MDR08YXvnN/gzR9ZP1ctJPP+ruvJuzk5DfWqMzugtbNh72s0KE nV9CZY8IwobYHGd2ZviGCe81Q21b7zTH0RRAAOQ/K8g1F505foPFqDh8kRmwl9m7Jc+x BJczG2y+6fkDu0u2HiV/xw3D3KyATjxMRZPh4A8Vj7pTxyFZNS+3Sb3CVt3bzqGHvZ9b HZ03v8Scmf2mZyVHj06bJzDNooZKoNlFhGmNZYOhbn6n2ysqZdSFLyrdZ1AdkHNFGzxr tQfIiMvPiTvxwwmmmmPFzKqTddISLTmHLgBZKjI1IFXrmNhijLkcstSn4Cm2Woh2ZMgg 5Wmg== X-Gm-Message-State: ALoCoQkJlq0ve17moUE4qHaFNmS5sszPG+HYp5L19doA2G40A+dUHVFmJww/Py+TeHUwgfL1tpnp X-Received: by 10.70.98.161 with SMTP id ej1mr30277533pdb.91.1417051514649; Wed, 26 Nov 2014 17:25:14 -0800 (PST) Received: from tyrell.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id qc8sm5413554pdb.70.2014.11.26.17.25.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Nov 2014 17:25:12 -0800 (PST) From: Takanari Hayama To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH v2 2/2] v4l: vsp1: Always enable virtual RPF when BRU is in use Date: Thu, 27 Nov 2014 10:25:02 +0900 Message-Id: <1417051502-30169-3-git-send-email-taki@igel.co.jp> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1417051502-30169-1-git-send-email-taki@igel.co.jp> References: <1417051502-30169-1-git-send-email-taki@igel.co.jp> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Regardless of a number of inputs, we should always enable virtual RPF when BRU is used. This allows the case when there's only one input to BRU, and a size of the input is smaller than a size of an output of BRU. Signed-off-by: Takanari Hayama Acked-by: Laurent Pinchart --- drivers/media/platform/vsp1/vsp1_wpf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index 6e05776..cb17c4d 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c @@ -92,19 +92,20 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) return 0; } - /* Sources. If the pipeline has a single input configure it as the - * master layer. Otherwise configure all inputs as sub-layers and - * select the virtual RPF as the master layer. + /* Sources. If the pipeline has a single input and BRU is not used, + * configure it as the master layer. Otherwise configure all + * inputs as sub-layers and select the virtual RPF as the master + * layer. */ for (i = 0; i < pipe->num_inputs; ++i) { struct vsp1_rwpf *input = pipe->inputs[i]; - srcrpf |= pipe->num_inputs == 1 + srcrpf |= (!pipe->bru && pipe->num_inputs == 1) ? VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index) : VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index); } - if (pipe->num_inputs > 1) + if (pipe->bru || pipe->num_inputs > 1) srcrpf |= VI6_WPF_SRCRPF_VIRACT_MST; vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, srcrpf);