From patchwork Wed Mar 15 22:01:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 9626795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70C4D60244 for ; Wed, 15 Mar 2017 22:01:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62447283C9 for ; Wed, 15 Mar 2017 22:01:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 565AE28420; Wed, 15 Mar 2017 22:01:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46BD828452 for ; Wed, 15 Mar 2017 22:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753558AbdCOWBi (ORCPT ); Wed, 15 Mar 2017 18:01:38 -0400 Received: from anholt.net ([50.246.234.109]:50104 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752493AbdCOWBi (ORCPT ); Wed, 15 Mar 2017 18:01:38 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 6DA4310A1CE5; Wed, 15 Mar 2017 15:01:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aPsuJInzesPe; Wed, 15 Mar 2017 15:01:31 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id D83E310A0652; Wed, 15 Mar 2017 15:01:30 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id B92362E7B68; Wed, 15 Mar 2017 15:01:29 -0700 (PDT) From: Eric Anholt To: Mauro Carvalho Chehab Cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-media@vger.kernel.org, Mauro Carvalho Chehab , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver In-Reply-To: <20170315110128.37e2bc5a@vento.lan> References: <20170127215503.13208-1-eric@anholt.net> <20170315110128.37e2bc5a@vento.lan> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 15 Mar 2017 15:01:29 -0700 Message-ID: <87a88m19om.fsf@eliezer.anholt.net> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Mauro Carvalho Chehab writes: > Em Fri, 27 Jan 2017 13:54:57 -0800 > Eric Anholt escreveu: > >> Here's my first pass at importing the camera driver. There's a bunch >> of TODO left to it, most of which is documented, and the rest being >> standard checkpatch fare. >> >> Unfortunately, when I try modprobing it on my pi3, the USB network >> device dies, consistently. I'm not sure what's going on here yet, but >> I'm going to keep working on some debug of it. I've unfortunately >> changed a lot of variables (pi3 vs pi2, upstream vs downstream, vchi's >> updates while in staging, 4.9 vs 4.4), so I probably won't figure it >> out today. >> >> Note that the "Update the driver to the current VCHI API" patch will >> conflict with the outstanding "Add vchi_queue_kernel_message and >> vchi_queue_user_message" series, but the fix should be pretty obvious >> when that lands. >> >> I built this against 4.10-rc1, but a merge with staging-next was clean >> and still built fine. > > I'm trying it, building from the linux-next branch of the staging > tree. No joy. > > That's what happens when I modprobe it: > > [ 991.841549] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned. > [ 991.842931] vchiq_get_state: g_state.remote == NULL > [ 991.843437] vchiq_get_state: g_state.remote == NULL > [ 991.843940] vchiq_get_state: g_state.remote == NULL > [ 991.844444] vchiq_get_state: g_state.remote == NULL > [ 991.844947] vchiq_get_state: g_state.remote == NULL > [ 991.845451] vchiq_get_state: g_state.remote == NULL > [ 991.845954] vchiq_get_state: g_state.remote == NULL > [ 991.846457] vchiq_get_state: g_state.remote == NULL > [ 991.846961] vchiq_get_state: g_state.remote == NULL > [ 991.847464] vchiq_get_state: g_state.remote == NULL > [ 991.847969] vchiq: vchiq_initialise: videocore not initialized > > [ 991.847973] mmal_vchiq: Failed to initialise VCHI instance (status=-1) Yeah, this failure mode sucks. I'm guessing you don't have a VCHI node in the DT? Patch attached. I haven't followed up on getting the DT documented so that it can be merged, and it sounds like Michael has some plans for changing how VCHI and VCHI's consumers get attached to each other so that it's not DT-based anyway. From 9488974b836b1fba7d32af34d612151872f9ce0d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 3 Oct 2016 11:23:34 -0700 Subject: [PATCH] ARM: bcm2835: Add VCHIQ to the DT. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi index caf2707680c1..f5fb5c5aa07a 100644 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi @@ -26,6 +26,14 @@ firmware = <&firmware>; #power-domain-cells = <1>; }; + + vchiq { + compatible = "brcm,bcm2835-vchiq"; + reg = <0x7e00b840 0xf>; + interrupts = <0 2>; + cache-line-size = <32>; + firmware = <&firmware>; + }; }; };