Received: by 10.213.65.68 with SMTP id h4csp1588285imn; Mon, 26 Mar 2018 10:23:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELvJSZFzV+wa3WZ1WWXVdFHrDDVK0VoiUZZzqruckeOdfMq1EA6EI1m/ko3oGyBydYKVQEZ2 X-Received: by 10.101.70.8 with SMTP id v8mr28481803pgq.336.1522085018239; Mon, 26 Mar 2018 10:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522085018; cv=none; d=google.com; s=arc-20160816; b=Y+MCYUq57Bs5gSKOlN0fxHxQMPYDatMSE2usT5mLLwFP/vf3UDF9dI3pVGVm3lIveg 1JeGrDPJgRj4GF8eC0X2GqjvodfbjepFlWWkeg7wHNVOiOoczDX6pDUQo7cBhiT5juhu XM87FxxAPWrzb+hqoPb3YxJUbvRPMvVuEvesbiuZXxH4NXr/8WB8qnxa+iMdbONNmVDx lBZsavf4eORvSFM3MhJi6MLmHuLOxaCU+NP9Ci7MfkRNyKaZjsAYiecNVnSFYppGbHFg D1734VoGLzxqk2aoO0BRWQ7crLW7EZTnIWL2NrLYCxQF3pwhVgtdSwPY/tDQpjxlXKEN NiVw== 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:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=amMa3+CfcHDxMVMfxJDoPZ4e7dhdPZ8g8K7qDSX4FtM=; b=NqKgtUzyTOu5wp6/sA2CPyH0rowWStqZwl+FoeuFBqudg788hC3vgowG2S+qKGGyXA Ep4vePRo34FsCs4lQOtUSnpNTp5YkWM9Pc60GJRUl7QySyZBQY0xW7zC92lnmTOH+N4P epvP+9PAHx5Wac0TlzfI6No+7o76xOThyh2FlHQl5B0/kLdcC3x4zzluGPm/A2mEPtw1 9xK+lutmWojOIrZG0pjScGtmdL3CHLEhqo3eccgMFBBsqbQTbSV3znK0Sl7QP3l15WAd o6SJvfv0h5JheJGoudrz158g3aeu+cInoBwciVjP7N0i6s8D4po9DOinh5hhsbQxou2Z PUqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=HX0HsQGh; 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 u91-v6si15293773plb.698.2018.03.26.10.23.01; Mon, 26 Mar 2018 10:23:38 -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=HX0HsQGh; 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 S1752584AbeCZRV5 (ORCPT + 99 others); Mon, 26 Mar 2018 13:21:57 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:44549 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbeCZRVz (ORCPT ); Mon, 26 Mar 2018 13:21:55 -0400 Received: from avalon.localnet (unknown [210.3.99.147]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 3DA1E20381; Mon, 26 Mar 2018 19:19:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1522084769; bh=L01foKEvvgjcqnK3Rm4+UJV4XZoE8NAl/1GPvNOBrs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HX0HsQGh8JOaEsidexFhxR6BZDvPccblX0gPJAJ4P17PfTYd3wikxo7DAUI+MIWT5 ZVwViOQvB/xOX4UgUCJmQHfcgjd6KCCLaZI9Khd9LdjV+MnPu8FRG6EMRS3cjKotTx KJ9/WCzD2kDv6mpCpvYobTWzSo0xMtdql1GZgYFw= From: Laurent Pinchart To: Kieran Bingham Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham , stable@vger.kernel.org, open list Subject: Re: [PATCH] media: vsp1: Fix BRx conditional path in WPF Date: Mon, 26 Mar 2018 20:21:51 +0300 Message-ID: <3524048.Iptq6jntDe@avalon> Organization: Ideas on Board Oy In-Reply-To: <1522070958-24295-1-git-send-email-kieran.bingham@ideasonboard.com> References: <1522070958-24295-1-git-send-email-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kieran, Thank you for the patch. On Monday, 26 March 2018 16:29:17 EEST 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 Looking at commit 5d0beeec59e303c76160ddd67fa73dcfc5d76de0 I think your patch is correct. Reviewed-by: Laurent Pinchart and taken in my tree. > --- > 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; -- Regards, Laurent Pinchart