From patchwork Sat Jun 18 09:00:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12886249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D667DC433EF for ; Sat, 18 Jun 2022 09:02:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7WBUbipTj7oB1EVnq5U2emhe1Qtnhp9LDW/JwyYEVeM=; b=w47Quo84St+X4h SwYGpXLY/F4Jbv8292APYnqGLecr0NaOGdHIB2RM0+y1FTx0WNX9ywY+mIFsMwULJ7zR52bqSjZKA wl1o8TH6WyfAn8Erp6Q/xmdXJrkfD5RsHi5Y+Ptf2hKjQCZ6tMJK8rYDiTwxOt8xLxQSR8ldCyjm7 mkp/7TNSlNSKfrgrZu2igRhLlPrIbvnm6McdBuM/QsVknfYIvsbBwmQ3/otbdpMJtW/g1lUvhke+i +wp0byD5XVbFQxK0gZWxy36SDyMJWwzPoQQ0+u0coJ/6RfAZMM5agoy4ldn7nSM9b8x1LOeTLZ6Qq 28yzyOncSVamo+IeJzMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UK7-00ApVi-OK; Sat, 18 Jun 2022 09:00:55 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2UJz-00ApRs-Ha; Sat, 18 Jun 2022 09:00:49 +0000 Received: from localhost.localdomain ([37.4.249.155]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N5G5b-1nag5b0d5J-011CtC; Sat, 18 Jun 2022 11:00:38 +0200 From: Stefan Wahren To: Greg Kroah-Hartman Cc: Peter Robinson , Phil Elwell , Adrien Thierry , bcm-kernel-feedback-list@broadcom.com, Gaston Gonzalez , linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH RFC] staging: vchiq: provide testing instructions Date: Sat, 18 Jun 2022 11:00:02 +0200 Message-Id: <20220618090002.20663-1-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:1HrNdWdIUWuWs9K1Glfo9N2C+oGKtKjAw6QgQjoeqr7/lqAaBYO klOpAeAsYDOuRlxuJ/SiehhGihYLP4yYo16ZmCwERCRelwQ6C13kbTaEhc7VMx5H2KMuXe3 nFGxqSQMGTQ3+rM6sjMJ2rQRh/Wrd41kRARpqqEl8PMAIwS+9n3aPR5tOdT+PI8DV9o3eTp rnJNsT+DTW99Pb2pYSrrw== X-UI-Out-Filterresults: notjunk:1;V03:K0:WX5uRx6/GC4=:gN+3Pc0bcMxgk8+6WVhek+ UqOkpDySp+H4bRiXTCw5Cv37RkZuaZq8jBDVjEnG6I8c6HrQkMzdkdJCgP3B6v0E6Dx5xLyVs JwrZM+T+8nd9gdgMGrxlaqoBSkTDevuPYKwdjSgVqHdjgAXEM3xYOt+Nx3s7k5Ufrjgvm11QT UcZuzLPvs5ygAYV33A4KD3my8L/U9qsLW4lk+StBVyup3ZjJLhtPP6Q3kisw/ZeTZnHSQOdJb KYHb5JWxEeGPH8wve+XUCHOq8+DeDoSpPNAeteEJTQyb3MOuXchzZw8LqVdIiaSP1nVwoi6GW Hpyo1UjjFTuzBf2IhhyeXE7fiXCH4f5/PYleSjJsjoC0ugKMgg9cgxm04hfEnE5zPvehD2Lji 8tac1gLUORWs68LVtsbkGcD08BNntDlgp3kv1PU6UN0J0/aW+PVvk+yyZrJu1GCwOhVx6zqF2 GnAlqPteZAvHYgA+DI1M1SgrFTXs37xUm4v79SDzk1LzOIhTg0H2zHO00DxExm0UU/4O+ncr7 xQrR/ihBWXrUWUQPuPlEXvB13hRcnPV814gO9QslK7P4VTXfk9yW3GLm4U1N/fDdWlq1PXQOv vDGsPu367l6VWsL4Eqf1+qJtDhCpaspSAbJdR7Mp+G0saxYcrwCHaACSwUeIAdqBeUfF51Ksd YSKj0TjJ4HCU0nRemuMdIQaEbXO2zGhbFg7ow2xb4EN7cTyagVz46q9yAFaeUr21woqBtY1Fm nvIO7hPG0Tn5tcYIrcyeky+5dolnkL+67558ErBcdw4Qcc+LliY4RThYlqE= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220618_020047_937272_D09F0BE0 X-CRM114-Status: GOOD ( 16.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This small document should to help kernel developer to test their changes on the VCHIQ driver. Signed-off-by: Stefan Wahren --- .../staging/vc04_services/interface/TESTING | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 drivers/staging/vc04_services/interface/TESTING diff --git a/drivers/staging/vc04_services/interface/TESTING b/drivers/staging/vc04_services/interface/TESTING new file mode 100644 index 000000000000..a6d63efcbcb9 --- /dev/null +++ b/drivers/staging/vc04_services/interface/TESTING @@ -0,0 +1,82 @@ +This document contains some hints to test the function of the VCHIQ driver +without having additional hardware to the Raspberry Pi. + +* Requirements & limitations + +Testing the VCHIQ driver requires a Raspberry Pi with one of the following SoC: + - BCM2835 ( e.g. Raspberry Pi Zero W ) + - BCM2836 ( e.g. Raspberry Pi 2 ) + - BCM2837 ( e.g. Raspberry Pi 3 B+ ) + +The BCM2711 used in the Raspberry Pi 4 is currently not supported in the +mainline kernel. + +There are no specific requirements to the VideoCore firmware to get VCHIQ +working. + +The test scenarios described in this document based on the tool vchiq_test. +Its source code is available here: https://github.com/raspberrypi/userland + +* Configuration + +Here are the most common kernel configurations: + + 1. BCM2835 target SoC (ARM 32 bit) + + Just use bcm2835_defconfig which already has VCHIQ enabled. + + 2. BCM2836/7 target SoC (ARM 32 bit) + + Use the multi_v7_defconfig as a base and then enable all VCHIQ options. + + 3. BCM2837 target SoC (ARM 64 bit) + + Use the defconfig as a base and then enable all VCHIQ options. + +* Scenarios + + * Initial test + + Check the driver is probed and /dev/vchiq is created + + * Functional test + + Command: vchiq_test -f 10 + + Expected output: + Functional test - iters:10 + ======== iteration 1 ======== + Testing bulk transfer for alignment. + Testing bulk transfer at PAGE_SIZE. + ... + + * Ping test + + Command: vchiq_test -p 1 + + Expected output: + Ping test - service:echo, iters:1, version 3 + vchi ping (size 0) -> 57.000000us + vchi ping (size 0, 0 async, 0 oneway) -> 122.000000us + vchi bulk (size 0, 0 async, 0 oneway) -> 546.000000us + vchi bulk (size 0, 0 oneway) -> 230.000000us + vchi ping (size 0) -> 49.000000us + vchi ping (size 0, 0 async, 0 oneway) -> 70.000000us + vchi bulk (size 0, 0 async, 0 oneway) -> 296.000000us + vchi bulk (size 0, 0 oneway) -> 266.000000us + vchi ping (size 0, 1 async, 0 oneway) -> 65.000000us + vchi bulk (size 0, 0 oneway) -> 456.000000us + vchi ping (size 0, 2 async, 0 oneway) -> 74.000000us + vchi bulk (size 0, 0 oneway) -> 640.000000us + vchi ping (size 0, 10 async, 0 oneway) -> 125.000000us + vchi bulk (size 0, 0 oneway) -> 2309.000000us + vchi ping (size 0, 0 async, 1 oneway) -> 70.000000us + vchi ping (size 0, 0 async, 2 oneway) -> 76.000000us + vchi ping (size 0, 0 async, 10 oneway) -> 105.000000us + vchi ping (size 0, 10 async, 10 oneway) -> 165.000000us + vchi ping (size 0, 100 async, 0 oneway) -> nanus + vchi bulk (size 0, 0 oneway) -> nanus + vchi ping (size 0, 0 async, 100 oneway) -> nanus + vchi ping (size 0, 100 async, 100 oneway) -> infus + vchi ping (size 0, 200 async, 0 oneway) -> infus + ...