From patchwork Wed Nov 26 06:19:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takanari Hayama X-Patchwork-Id: 5384251 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3770F9FAAF for ; Wed, 26 Nov 2014 06:20:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62BA7201EF for ; Wed, 26 Nov 2014 06:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83FC3201FA for ; Wed, 26 Nov 2014 06:20:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752350AbaKZGUH (ORCPT ); Wed, 26 Nov 2014 01:20:07 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:53597 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752344AbaKZGUE (ORCPT ); Wed, 26 Nov 2014 01:20:04 -0500 Received: by mail-pa0-f52.google.com with SMTP id eu11so2189154pac.25 for ; Tue, 25 Nov 2014 22:20:03 -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=r4Q+NRAlDweaMZ9oZa/YbQsS9LTW0Zp9/M0bFYT2rc4=; b=mcisoWzYI+LHYXO3uUKR0cNMS89ZjUevwtFHwcB+y+ROAeFmm2CLXmK6q+PRbUm1D0 XmWOjmUsr27aP0Ziqs/vy5BfsQjKlFdOOwV0YgWgE7s1NJdpOu44aSyVTr0nZD9nxgkw pjRx/X+GJPrcMkLT2cYuQj9PJF0p05uSyX0qat+hR6hlC0kqY3K17R3/Mi8/YRbXV9Pt 1k2J+09D/jMiR0ZUlpwiiNz2Y//NOBqvtXbv4o8F2sD9Kuha+OiQAFplZiiB6bVllvH6 jhMkoG/JlwmyFxmBCzNokp34OLZOM5pTodfWK/s2FfGbAmN+5lwuAOFkAlJA6EyGDIqY i8Qg== X-Gm-Message-State: ALoCoQnjIfdbnLTMvd4wYDZArPsC7z5D0rcd6XHI2yGo7611n/0Rcyxfdyq6XyF7GrDCLD4V5005 X-Received: by 10.66.254.195 with SMTP id ak3mr49333754pad.150.1416982803796; Tue, 25 Nov 2014 22:20:03 -0800 (PST) Received: from tyrell.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id ir2sm3178301pbc.57.2014.11.25.22.20.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 22:20:02 -0800 (PST) From: Takanari Hayama To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 2/2] v4l: vsp1: Always enable virtual RPF when BRU is in use Date: Wed, 26 Nov 2014 15:19:52 +0900 Message-Id: <1416982792-11917-3-git-send-email-taki@igel.co.jp> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1416982792-11917-1-git-send-email-taki@igel.co.jp> References: <1416982792-11917-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 --- 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..29ea28b 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);