From patchwork Fri Sep 18 20:26:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11786241 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5227F112E for ; Fri, 18 Sep 2020 20:26:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15E3D2085B for ; Fri, 18 Sep 2020 20:26:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="iec4uTaS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726118AbgIRU0W (ORCPT ); Fri, 18 Sep 2020 16:26:22 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:41302 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgIRU0W (ORCPT ); Fri, 18 Sep 2020 16:26:22 -0400 Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1012DA1D; Fri, 18 Sep 2020 22:26:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600460780; bh=w5KudxK37avfe1btWv5TNhq2/dwZVGEJodKtdg5AAlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iec4uTaSnAelzIOmnHHcIbuAd3fY0AK+1I/GlFCXCDIajybdIn67FE8mAJQdYfRDx Pyzqj9k2zyHx0ehHtCljC5tv5hm+mc2LYIMTBGC/33eGbQhu72wBK1yObVn2woZl2v eKyE/h3e13BsJMDSUGuEzgeqCot34FEMbsIZ9IRw= From: Kieran Bingham To: Laurent Pinchart , linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham Subject: [PATCH 1/3] scripts: vsp-lib.sh: Remove unused variable Date: Fri, 18 Sep 2020 21:26:14 +0100 Message-Id: <20200918202616.55977-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918202616.55977-1-kieran.bingham@ideasonboard.com> References: <20200918202616.55977-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The dev identifier is not used until after a media device has been selected, at which point the vsp1_device function is re-called. Remove the redundant assignment. Signed-off-by: Kieran Bingham --- scripts/vsp-lib.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index a8898e80a879..04a8127f6073 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -1040,8 +1040,6 @@ test_init() { local best_mdev= for mdev in /dev/media* ; do - dev=$(vsp1_device $mdev) - local match='true' for feature in $features ; do $(vsp1_has_feature "$feature") || { From patchwork Fri Sep 18 20:26:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11786245 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12545112E for ; Fri, 18 Sep 2020 20:26:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D21F220866 for ; Fri, 18 Sep 2020 20:26:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="W2VBGV0R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726218AbgIRU00 (ORCPT ); Fri, 18 Sep 2020 16:26:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgIRU00 (ORCPT ); Fri, 18 Sep 2020 16:26:26 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54181C0613CE for ; Fri, 18 Sep 2020 13:26:25 -0700 (PDT) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B39D7B1A; Fri, 18 Sep 2020 22:26:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600460780; bh=Ep93qXfQLfLgO5VailPeNB01dskRAe2VAtZkbIUti+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W2VBGV0RsGiTX3YuWDZETHrbmp5klUmvbwTo7daRlLhLhUGp9AuBaDSJZPFUs7rNb A8Lp9gf//KAFg/EK76rBy50G4Qdfg/pwZtPVkDKL4ud8u4hF7Pqhxa7XMYsPDFqm6t CQnE0TlILYFVdZq+qtqci1Swb2Es4xFCm1+9rTBE= From: Kieran Bingham To: Laurent Pinchart , linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham Subject: [PATCH 2/3] tests: Skip unbind/bind tests when not root Date: Fri, 18 Sep 2020 21:26:15 +0100 Message-Id: <20200918202616.55977-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918202616.55977-1-kieran.bingham@ideasonboard.com> References: <20200918202616.55977-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The user must be root to be able to perform the unbind/bind cycle. Skip this test when the user does not have root privilidges. Signed-off-by: Kieran Bingham --- tests/vsp-unit-test-0026.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/vsp-unit-test-0026.sh b/tests/vsp-unit-test-0026.sh index 0e013cec881b..88038f3fdebf 100755 --- a/tests/vsp-unit-test-0026.sh +++ b/tests/vsp-unit-test-0026.sh @@ -41,6 +41,12 @@ test_copy() { test_main() { local format + if [ ! "$(id -u)" = 0 ] ; then + # Root is required to run unbind tests + test_complete skip + return + fi + # Unbind and rebind VSPs individually for v in $vsps; do unbind_vsp $v From patchwork Fri Sep 18 20:26:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11786243 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5811C112E for ; Fri, 18 Sep 2020 20:26:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FD0320866 for ; Fri, 18 Sep 2020 20:26:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="rVf1s9HN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726298AbgIRU0Y (ORCPT ); Fri, 18 Sep 2020 16:26:24 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:41308 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgIRU0X (ORCPT ); Fri, 18 Sep 2020 16:26:23 -0400 Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 88106E42; Fri, 18 Sep 2020 22:26:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600460781; bh=fP782SS8WOYxrS3s9vLC3XzWLsx7ohpBTh4QH5npSEA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rVf1s9HNPvNf9BfVhzGHbO18Ab5fmxriBdZhVc9rmFZyH8HL9j9zurXMM53r+YKbK HikMEzCBChaWHtBZVc2jIFOOVQA5kcADUfIF9ExcxxH6dTaz7kf1Q0GpWNLDkB2SGg vS9qnL2+VTmxRISHPG4Gvy/R9hkXLy19ck9IFMLg= From: Kieran Bingham To: Laurent Pinchart , linux-renesas-soc@vger.kernel.org Cc: Kieran Bingham Subject: [PATCH 3/3] tests: unbind/bind: Only test non display VSPs Date: Fri, 18 Sep 2020 21:26:16 +0100 Message-Id: <20200918202616.55977-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918202616.55977-1-kieran.bingham@ideasonboard.com> References: <20200918202616.55977-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Only perform bind/unbind testing on VSPs which expose a media-device. Unbinding a VSP which is connected to a DU causes the display pipeline to fail, and is not currently supported. Signed-off-by: Kieran Bingham --- tests/vsp-unit-test-0026.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/vsp-unit-test-0026.sh b/tests/vsp-unit-test-0026.sh index 88038f3fdebf..4185bb23d05b 100755 --- a/tests/vsp-unit-test-0026.sh +++ b/tests/vsp-unit-test-0026.sh @@ -10,7 +10,14 @@ features="rpf.0 wpf.0" vsp1_driver=/sys/bus/platform/drivers/vsp1 -vsps=$(cd /sys/bus/platform/devices/; ls | grep vsp) + +# List all VSPs with a media device. +# This exludes VSP devices used by the DU. +list_vsps() { + for mdev in /dev/media* ; do + echo -n $(vsp1_device $mdev) | grep vsp + done +} unbind_vsp() { echo $1 > $vsp1_driver/unbind @@ -48,7 +55,7 @@ test_main() { fi # Unbind and rebind VSPs individually - for v in $vsps; do + for v in $(list_vsps); do unbind_vsp $v bind_vsp $v done