Received: by 10.213.65.68 with SMTP id h4csp1389547imn; Mon, 26 Mar 2018 06:41:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELtahyJEG97enVWWTtm36W/0Tg7RfSPSz1SMNJZwLC2RP3lHPYqVk8Y+un/eiB8ePQPakibJ X-Received: by 2002:a17:902:7586:: with SMTP id j6-v6mr26658982pll.352.1522071677015; Mon, 26 Mar 2018 06:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522071676; cv=none; d=google.com; s=arc-20160816; b=FlU1HqoKeao3He9jPNJdjay9qxCtknyBsQHupag6iXIt7jxSw/CE56mNe/n7nSpWBD ddE6ke7v/uxO81lfr5jGMmLRJB+GRfVZPbjFR+0jI4mFR1nbem/hPlrlUyRbvVLtIW1v pONLg5KSc0Eax6qsrt3I/pEFM2j9G18UW/0q4yarXeeDKv+6bDsiQR1254wYyBNSt042 c6Q5GbbOXT9/EwigOE4CV7+gr8JFYY49Cg9NJBP9Khgpq4cguHEux2NICOnromm2OlzU 9QPufN7nx+a9hJwrVC52z+TMPZUVxogno5C1rUlivLMf6HD7Zm8jnFya1C9h0tA+p2Aw qqqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:reply-to:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=f34492AQsxOmYG0aTa/eD2bHuAVaUzkSIC/afVr1aB4=; b=H5XJ1aIZQdpwy1kSWKXgx2LRCuN8I8m6bL3YsjPyY2U7Tq6SCGaXNxURYeHVCGzv7U HbuAPnmbQeGnyg+oMJMiXkFoqQwAqdTCU+GFOUNz7oMEkhScc0ojqtgs1eoPlqjVXxOF bNGmoYJtZ9e+UxQbQeUmSoCWT3e6knZGbNCztZA+gB4yMVzQFN61eMCtOzedokZbiulz rx6qzEuIx/urPvh/DykobliXPetsYD0m3s03nHPdrA6wlteUGxHExrlUTqcJnQoPeiY5 kW9WvMRJrhtFQcD/kccTepIKCspMIfxk/vVTZehgcVMKgRTDYBPE8sUWKLE6YqG87jt4 wlFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=qhzPkG3+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33-v6si12604772pli.410.2018.03.26.06.41.01; Mon, 26 Mar 2018 06:41:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=qhzPkG3+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751806AbeCZNj5 (ORCPT + 99 others); Mon, 26 Mar 2018 09:39:57 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:43063 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750955AbeCZNjz (ORCPT ); Mon, 26 Mar 2018 09:39:55 -0400 Received: from [192.168.0.20] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 9710D20226; Mon, 26 Mar 2018 15:37:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1522071450; bh=vy0abyReX17V34HDcCmVA2LblqPFRae6nyqvikJNiRw=; h=Subject:To:Cc:References:Reply-To:From:Date:In-Reply-To:From; b=qhzPkG3+7kH7EbHD0osNoY9KrGcpYW5ATTwlQ+zrjky4OOIkPQbp8nvatJ+mTOk5F NT8H3u1ap47KVisQhzWZ0kE6bTXpz266MrPLdO7zavbjQG/7n51tqQ+t/ajO0xN2Av Dp6+UjLKwdcoLltqkWFQLfcPGGcn5UBya85PYmbw= Subject: Re: [PATCH] media: vsp1: Fix BRx conditional path in WPF To: Kieran Bingham , Laurent Pinchart , mchehab@kernel.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham , stable@vger.kernel.org, open list References: <1522070958-24295-1-git-send-email-kieran.bingham@ideasonboard.com> Reply-To: kieran.bingham@ideasonboard.com From: Kieran Bingham Organization: Ideas on Board Message-ID: Date: Mon, 26 Mar 2018 14:39:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1522070958-24295-1-git-send-email-kieran.bingham@ideasonboard.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry, This should have been from my +renesas to support Renesas' statistics and filtering of course. On 26/03/18 14:29, Kieran Bingham wrote: > When a BRx is provided by a pipeline, the WPF must determine the master > layer. Currently the condition to check this identifies pipe->bru || > pipe->num_inputs > 1. > > The code then moves on to dereference pipe->bru, thus the check fails > static analysers on the possibility that pipe->num_inputs could be > greater than 1 without pipe->bru being set. > > The reality is that the pipeline must have a BRx to support more than > one input, thus this could never cause a fault - however it also > identifies that the num_inputs > 1 check is redundant. > > Remove the redundant check - and always configure the master layer > appropriately when we have a BRx configured in our pipeline. > > Fixes: 6134148f6098 ("v4l: vsp1: Add support for the BRS entity") > Cc: stable@vger.kernel.org > > Suggested-by: Mauro Carvalho Chehab > Signed-off-by: Kieran Bingham And thus: Signed-off-by: Kieran Bingham > --- > drivers/media/platform/vsp1/vsp1_wpf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c > index f7f3b4b2c2de..8bd6b2f1af15 100644 > --- a/drivers/media/platform/vsp1/vsp1_wpf.c > +++ b/drivers/media/platform/vsp1/vsp1_wpf.c > @@ -452,7 +452,7 @@ static void wpf_configure(struct vsp1_entity *entity, > : VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index); > } > > - if (pipe->bru || pipe->num_inputs > 1) > + if (pipe->bru) > srcrpf |= pipe->bru->type == VSP1_ENTITY_BRU > ? VI6_WPF_SRCRPF_VIRACT_MST > : VI6_WPF_SRCRPF_VIRACT2_MST; >