Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1601429 > unrolled thread

Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver

Started byMauro Carvalho Chehab <mchehab@s-opensource.com>
First post2017-03-15 15:10 +0100
Last post2017-03-20 13:00 +0100
Articles 18 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-15 15:10 +0100
    Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-03-15 23:00 +0100
    Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Eric Anholt <eric@anholt.net> - 2017-03-15 23:10 +0100
      Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-16 02:20 +0100
        Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Michael Zoran <mzoran@crowfest.net> - 2017-03-16 02:50 +0100
          Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-16 10:40 +0100
            Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Eric Anholt <eric@anholt.net> - 2017-03-18 01:40 +0100
              Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-19 18:00 +0100
                Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Michael Zoran <mzoran@crowfest.net> - 2017-03-19 18:10 +0100
                  Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-20 02:20 +0100
                    Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-20 12:10 +0100
                      Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Michael Zoran <mzoran@crowfest.net> - 2017-03-20 12:10 +0100
                        Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-20 16:10 +0100
                          Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Michael Zoran <mzoran@crowfest.net> - 2017-03-20 16:20 +0100
                            Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-20 17:00 +0100
                              Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Michael Zoran <mzoran@crowfest.net> - 2017-03-20 17:10 +0100
                                Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-03-22 18:20 +0100
                      Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver Stefan Wahren <stefan.wahren@i2se.com> - 2017-03-20 13:00 +0100

#1601429 — Re: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-15 15:10 +0100
SubjectRe: [PATCH 0/6] staging: BCM2835 MMAL V4L2 camera driver
Message-ID<tlhMK-gZ-33@gated-at.bofh.it>
Em Fri, 27 Jan 2017 13:54:57 -0800
Eric Anholt <eric@anholt.net> 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)


Thanks,
Mauro

[toc] | [next] | [standalone]


#1601773

FromStefan Wahren <stefan.wahren@i2se.com>
Date2017-03-15 23:00 +0100
Message-ID<tlp7A-5du-25@gated-at.bofh.it>
In reply to#1601429
Hi Mauro,

> Mauro Carvalho Chehab <mchehab@s-opensource.com> hat am 15. März 2017 um 15:01 geschrieben:
> 
> 
> Em Fri, 27 Jan 2017 13:54:57 -0800
> Eric Anholt <eric@anholt.net> 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)
> 

only a guess, but did you add the vchiq node to the device tree?

vchiq: vchiq@7e00b840 {
    compatible = "brcm,bcm2835-vchiq";
    reg = <0x7e00b840 0xf>;
    interrupts = <0 2>;
    cache-line-size = <32>;
    firmware = <&firmware>;
};

For a Raspberry Pi 3 you will need cache-line-size to be 64.

Regards
Stefan

> 
> Thanks,
> Mauro
> 
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

[toc] | [prev] | [next] | [standalone]


#1601774

FromEric Anholt <eric@anholt.net>
Date2017-03-15 23:10 +0100
Message-ID<tlphf-5w5-1@gated-at.bofh.it>
In reply to#1601429

[Multipart message — attachments visible in raw view] — view raw

Mauro Carvalho Chehab <mchehab@s-opensource.com> writes:

> Em Fri, 27 Jan 2017 13:54:57 -0800
> Eric Anholt <eric@anholt.net> 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 <eric@anholt.net>
Date: Mon, 3 Oct 2016 11:23:34 -0700
Subject: [PATCH] ARM: bcm2835: Add VCHIQ to the DT.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 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>;
+		};
 	};
 };
 
-- 
2.11.0

[toc] | [prev] | [next] | [standalone]


#1601829

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-16 02:20 +0100
Message-ID<tlsf7-7A8-7@gated-at.bofh.it>
In reply to#1601774

[Multipart message — attachments visible in raw view] — view raw

Em Wed, 15 Mar 2017 15:01:29 -0700
Eric Anholt <eric@anholt.net> escreveu:

> Mauro Carvalho Chehab <mchehab@s-opensource.com> writes:
> 
> > Em Fri, 27 Jan 2017 13:54:57 -0800
> > Eric Anholt <eric@anholt.net> 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.

No, I didn't. Thanks! Applied it but, unfortunately, didn't work.
Perhaps I'm missing some other patch. I'm compiling it from
the Greg's staging tree (branch staging-next):
	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/log/?h=staging-next

Btw, as I'm running Raspbian, and didn't want to use compat32 bits, 
I'm compiling the Kernel as an arm32 bits Kernel.

I did a small trick to build the DTB on arm32:

	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts arch/arm/boot/dts/bcm2837-rpi-3-b.dts
	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837.dtsi arch/arm/boot/dts/bcm2837.dtsi
	git checkout arch/arm/boot/dts/Makefile
	sed "s,bcm2835-rpi-zero.dtb,bcm2835-rpi-zero.dtb bcm2837-rpi-3-b.dtb," a && mv a arch/arm/boot/dts/Makefile

> 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.

I see.

> 
> From 9488974b836b1fba7d32af34d612151872f9ce0d Mon Sep 17 00:00:00 2001
> From: Eric Anholt <eric@anholt.net>
> Date: Mon, 3 Oct 2016 11:23:34 -0700
> Subject: [PATCH] ARM: bcm2835: Add VCHIQ to the DT.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
>  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>;
> +		};
>  	};
>  };
>  



Thanks,
Mauro

[toc] | [prev] | [next] | [standalone]


#1601836

FromMichael Zoran <mzoran@crowfest.net>
Date2017-03-16 02:50 +0100
Message-ID<tlsI9-7Ou-7@gated-at.bofh.it>
In reply to#1601829
On Wed, 2017-03-15 at 22:08 -0300, Mauro Carvalho Chehab wrote:

> No, I didn't. Thanks! Applied it but, unfortunately, didn't work.
> Perhaps I'm missing some other patch. I'm compiling it from
> the Greg's staging tree (branch staging-next):
> 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.
> git/log/?h=staging-next
> 
> Btw, as I'm running Raspbian, and didn't want to use compat32 bits, 
> I'm compiling the Kernel as an arm32 bits Kernel.
> 
> I did a small trick to build the DTB on arm32:
> 
> 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837.dtsi
> arch/arm/boot/dts/bcm2837.dtsi
> 	git checkout arch/arm/boot/dts/Makefile
> 	sed "s,bcm2835-rpi-zero.dtb,bcm2835-rpi-zero.dtb bcm2837-rpi-3-
> b.dtb," a && mv a arch/arm/boot/dts/Makefile
> 

Two other hacks are currently needed to get the camera to work:

1. Add this to config.txt(This required to get the firmware to detect
the camera)

start_x=1
gpu_mem=128

2. VC4 is incompatible with the firmware at this time, so you need 
to presently munge the build configuration. What you do is leave
simplefb in the build config(I'm assuming you already have that), but
you will need to remove VC4 from the config.

The firmware currently adds a node for a simplefb for debugging
purposes to show the boot log.  Surprisingly, this is still good enough
for basic usage and testing.  

The only remaining issue is that since simplefb is intented for
debugging, you wan't be able to use many of the RPI specific
applications.  

I've been using cheese and ffmpeg to test the camera which are not RPI
specific.

[toc] | [prev] | [next] | [standalone]


#1602136

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-16 10:40 +0100
Message-ID<tlA30-4H0-21@gated-at.bofh.it>
In reply to#1601836
Em Wed, 15 Mar 2017 18:46:24 -0700
Michael Zoran <mzoran@crowfest.net> escreveu:

> On Wed, 2017-03-15 at 22:08 -0300, Mauro Carvalho Chehab wrote:
> 
> > No, I didn't. Thanks! Applied it but, unfortunately, didn't work.
> > Perhaps I'm missing some other patch. I'm compiling it from
> > the Greg's staging tree (branch staging-next):
> > 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.
> > git/log/?h=staging-next
> > 
> > Btw, as I'm running Raspbian, and didn't want to use compat32 bits, 
> > I'm compiling the Kernel as an arm32 bits Kernel.
> > 
> > I did a small trick to build the DTB on arm32:
> > 
> > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> > arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837.dtsi
> > arch/arm/boot/dts/bcm2837.dtsi
> > 	git checkout arch/arm/boot/dts/Makefile
> > 	sed "s,bcm2835-rpi-zero.dtb,bcm2835-rpi-zero.dtb bcm2837-rpi-3-
> > b.dtb," a && mv a arch/arm/boot/dts/Makefile
> >   
> 
> Two other hacks are currently needed to get the camera to work:
> 
> 1. Add this to config.txt(This required to get the firmware to detect
> the camera)
> 
> start_x=1
> gpu_mem=128

I had this already.

> 
> 2. VC4 is incompatible with the firmware at this time, so you need 
> to presently munge the build configuration. What you do is leave
> simplefb in the build config(I'm assuming you already have that), but
> you will need to remove VC4 from the config.
> 
> The firmware currently adds a node for a simplefb for debugging
> purposes to show the boot log.  Surprisingly, this is still good enough
> for basic usage and testing.  

That solved the issue. Thanks! It would be good to add a notice
about that at the TODO, not let it build if DRM_VC4.

Please consider applying the enclosed path.

> The only remaining issue is that since simplefb is intented for
> debugging, you wan't be able to use many of the RPI specific
> applications.  
> 
> I've been using cheese and ffmpeg to test the camera which are not RPI
> specific.

I did a quick test with camorama and qv4l2. it worked with both.

Thanks,
Mauro


[PATCH] staging: bcm2835-camera: make it dependent of !DRM_VC4

Currently, if DRM_VC4 is enabled, this driver doesn't work,
as the firmware doesn't support having both enabled at the
same time.

Document that and prevent it to be built if !DRM_VC4.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

diff --git a/drivers/staging/vc04_services/bcm2835-camera/Kconfig b/drivers/staging/vc04_services/bcm2835-camera/Kconfig
index b8b01aa4e426..678dc2efb91a 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/Kconfig
+++ b/drivers/staging/vc04_services/bcm2835-camera/Kconfig
@@ -2,6 +2,8 @@ config VIDEO_BCM2835
 	tristate "BCM2835 Camera"
 	depends on MEDIA_SUPPORT
 	depends on VIDEO_V4L2 && (ARCH_BCM2835 || COMPILE_TEST)
+	# Currently, firmware is incompatible with VC4 DRM driver
+	depends on !DRM_VC4
 	select BCM2835_VCHIQ
 	select VIDEOBUF2_VMALLOC
 	select BTREE
diff --git a/drivers/staging/vc04_services/bcm2835-camera/TODO b/drivers/staging/vc04_services/bcm2835-camera/TODO
index 61a509992b9a..fec70a1cc4a3 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/TODO
+++ b/drivers/staging/vc04_services/bcm2835-camera/TODO
@@ -37,3 +37,4 @@ v4l2 module after VCHI loads.
 This was a temporary workaround for a bug that was fixed mid-2014, and
 we should remove it before stabilizing the driver.
 
+6) Make firmware compatible with both DRM_VC4 and VIDEO_BCM2835.

[toc] | [prev] | [next] | [standalone]


#1603677

FromEric Anholt <eric@anholt.net>
Date2017-03-18 01:40 +0100
Message-ID<tmazv-6vO-5@gated-at.bofh.it>
In reply to#1602136

[Multipart message — attachments visible in raw view] — view raw

Mauro Carvalho Chehab <mchehab@s-opensource.com> writes:

> Em Wed, 15 Mar 2017 18:46:24 -0700
> Michael Zoran <mzoran@crowfest.net> escreveu:
>
>> On Wed, 2017-03-15 at 22:08 -0300, Mauro Carvalho Chehab wrote:
>> 
>> > No, I didn't. Thanks! Applied it but, unfortunately, didn't work.
>> > Perhaps I'm missing some other patch. I'm compiling it from
>> > the Greg's staging tree (branch staging-next):
>> > 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.
>> > git/log/?h=staging-next
>> > 
>> > Btw, as I'm running Raspbian, and didn't want to use compat32 bits, 
>> > I'm compiling the Kernel as an arm32 bits Kernel.
>> > 
>> > I did a small trick to build the DTB on arm32:
>> > 
>> > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
>> > arch/arm/boot/dts/bcm2837-rpi-3-b.dts
>> > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837.dtsi
>> > arch/arm/boot/dts/bcm2837.dtsi
>> > 	git checkout arch/arm/boot/dts/Makefile
>> > 	sed "s,bcm2835-rpi-zero.dtb,bcm2835-rpi-zero.dtb bcm2837-rpi-3-
>> > b.dtb," a && mv a arch/arm/boot/dts/Makefile
>> >   
>> 
>> Two other hacks are currently needed to get the camera to work:
>> 
>> 1. Add this to config.txt(This required to get the firmware to detect
>> the camera)
>> 
>> start_x=1
>> gpu_mem=128
>
> I had this already.
>
>> 
>> 2. VC4 is incompatible with the firmware at this time, so you need 
>> to presently munge the build configuration. What you do is leave
>> simplefb in the build config(I'm assuming you already have that), but
>> you will need to remove VC4 from the config.
>> 
>> The firmware currently adds a node for a simplefb for debugging
>> purposes to show the boot log.  Surprisingly, this is still good enough
>> for basic usage and testing.  
>
> That solved the issue. Thanks! It would be good to add a notice
> about that at the TODO, not let it build if DRM_VC4.
>
> Please consider applying the enclosed path.

The VC4 incompatibility (camera firmware's AWB ends up briefly using the
GPU, without coordinating with the Linux driver) is supposed to be fixed
in current firmware
(https://github.com/raspberrypi/firmware/issues/760#issuecomment-287391025)

[toc] | [prev] | [next] | [standalone]


#1604030

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-19 18:00 +0100
Message-ID<tmMlr-58-9@gated-at.bofh.it>
In reply to#1603677
Em Fri, 17 Mar 2017 17:34:36 -0700
Eric Anholt <eric@anholt.net> escreveu:

> Mauro Carvalho Chehab <mchehab@s-opensource.com> writes:
> 
> > Em Wed, 15 Mar 2017 18:46:24 -0700
> > Michael Zoran <mzoran@crowfest.net> escreveu:
> >
> >> On Wed, 2017-03-15 at 22:08 -0300, Mauro Carvalho Chehab wrote:
> >> 
> >> > No, I didn't. Thanks! Applied it but, unfortunately, didn't work.
> >> > Perhaps I'm missing some other patch. I'm compiling it from
> >> > the Greg's staging tree (branch staging-next):
> >> > 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.
> >> > git/log/?h=staging-next
> >> > 
> >> > Btw, as I'm running Raspbian, and didn't want to use compat32 bits, 
> >> > I'm compiling the Kernel as an arm32 bits Kernel.
> >> > 
> >> > I did a small trick to build the DTB on arm32:
> >> > 
> >> > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
> >> > arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> >> > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837.dtsi
> >> > arch/arm/boot/dts/bcm2837.dtsi
> >> > 	git checkout arch/arm/boot/dts/Makefile
> >> > 	sed "s,bcm2835-rpi-zero.dtb,bcm2835-rpi-zero.dtb bcm2837-rpi-3-
> >> > b.dtb," a && mv a arch/arm/boot/dts/Makefile
> >> >   
> >> 
> >> Two other hacks are currently needed to get the camera to work:
> >> 
> >> 1. Add this to config.txt(This required to get the firmware to detect
> >> the camera)
> >> 
> >> start_x=1
> >> gpu_mem=128
> >
> > I had this already.
> >
> >> 
> >> 2. VC4 is incompatible with the firmware at this time, so you need 
> >> to presently munge the build configuration. What you do is leave
> >> simplefb in the build config(I'm assuming you already have that), but
> >> you will need to remove VC4 from the config.
> >> 
> >> The firmware currently adds a node for a simplefb for debugging
> >> purposes to show the boot log.  Surprisingly, this is still good enough
> >> for basic usage and testing.  
> >
> > That solved the issue. Thanks! It would be good to add a notice
> > about that at the TODO, not let it build if DRM_VC4.
> >
> > Please consider applying the enclosed path.
> 
> The VC4 incompatibility (camera firmware's AWB ends up briefly using the
> GPU, without coordinating with the Linux driver) is supposed to be fixed
> in current firmware
> (https://github.com/raspberrypi/firmware/issues/760#issuecomment-287391025)

With the current firmware, when X starts, the screen becomes blank,
with upstream Kernel (it works with the downstream Kernel shipped with 
the firmware).

Maybe something changed at DT?

Thanks,
Mauro

[toc] | [prev] | [next] | [standalone]


#1604032

FromMichael Zoran <mzoran@crowfest.net>
Date2017-03-19 18:10 +0100
Message-ID<tmMv7-oz-5@gated-at.bofh.it>
In reply to#1604030
On Sun, 2017-03-19 at 13:58 -0300, Mauro Carvalho Chehab wrote:
> Em Fri, 17 Mar 2017 17:34:36 -0700
> Eric Anholt <eric@anholt.net> escreveu:
> 
> > Mauro Carvalho Chehab <mchehab@s-opensource.com> writes:
> > 
> > > Em Wed, 15 Mar 2017 18:46:24 -0700
> > > Michael Zoran <mzoran@crowfest.net> escreveu:
> > > 
> > > > On Wed, 2017-03-15 at 22:08 -0300, Mauro Carvalho Chehab wrote:
> > > > 
> > > > > No, I didn't. Thanks! Applied it but, unfortunately, didn't
> > > > > work.
> > > > > Perhaps I'm missing some other patch. I'm compiling it from
> > > > > the Greg's staging tree (branch staging-next):
> > > > > 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/
> > > > > staging.
> > > > > git/log/?h=staging-next
> > > > > 
> > > > > Btw, as I'm running Raspbian, and didn't want to use compat32
> > > > > bits, 
> > > > > I'm compiling the Kernel as an arm32 bits Kernel.
> > > > > 
> > > > > I did a small trick to build the DTB on arm32:
> > > > > 
> > > > > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-
> > > > > b.dts
> > > > > arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> > > > > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837.dtsi
> > > > > arch/arm/boot/dts/bcm2837.dtsi
> > > > > 	git checkout arch/arm/boot/dts/Makefile
> > > > > 	sed "s,bcm2835-rpi-zero.dtb,bcm2835-rpi-zero.dtb
> > > > > bcm2837-rpi-3-
> > > > > b.dtb," a && mv a arch/arm/boot/dts/Makefile
> > > > >   
> > > > 
> > > > Two other hacks are currently needed to get the camera to work:
> > > > 
> > > > 1. Add this to config.txt(This required to get the firmware to
> > > > detect
> > > > the camera)
> > > > 
> > > > start_x=1
> > > > gpu_mem=128
> > > 
> > > I had this already.
> > > 
> > > > 
> > > > 2. VC4 is incompatible with the firmware at this time, so you
> > > > need 
> > > > to presently munge the build configuration. What you do is
> > > > leave
> > > > simplefb in the build config(I'm assuming you already have
> > > > that), but
> > > > you will need to remove VC4 from the config.
> > > > 
> > > > The firmware currently adds a node for a simplefb for debugging
> > > > purposes to show the boot log.  Surprisingly, this is still
> > > > good enough
> > > > for basic usage and testing.  
> > > 
> > > That solved the issue. Thanks! It would be good to add a notice
> > > about that at the TODO, not let it build if DRM_VC4.
> > > 
> > > Please consider applying the enclosed path.
> > 
> > The VC4 incompatibility (camera firmware's AWB ends up briefly
> > using the
> > GPU, without coordinating with the Linux driver) is supposed to be
> > fixed
> > in current firmware
> > (https://github.com/raspberrypi/firmware/issues/760#issuecomment-28
> > 7391025)
> 
> With the current firmware, when X starts, the screen becomes blank,
> with upstream Kernel (it works with the downstream Kernel shipped
> with 
> the firmware).
> 
> Maybe something changed at DT?
> 
> Thanks,
> Mauro

Hi, exactly which DT are you using and which drivers are you using for
video. If this is a RPI 3, then as you know VC4 doesn't work due to the
HDMI hotplug issue. So I'm not 100% sure how you were getting video.

A working DT that I tried this morning with the current firmware is
posted here:
http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-March/005924
.html

It even works with minecraft_pi!

[toc] | [prev] | [next] | [standalone]


#1604128

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-20 02:20 +0100
Message-ID<tmU9j-5I5-3@gated-at.bofh.it>
In reply to#1604032
Em Sun, 19 Mar 2017 10:04:28 -0700
Michael Zoran <mzoran@crowfest.net> escreveu:

> On Sun, 2017-03-19 at 13:58 -0300, Mauro Carvalho Chehab wrote:
> > Em Fri, 17 Mar 2017 17:34:36 -0700
> > Eric Anholt <eric@anholt.net> escreveu:
> >   
> > > Mauro Carvalho Chehab <mchehab@s-opensource.com> writes:
> > >   
> > > > Em Wed, 15 Mar 2017 18:46:24 -0700
> > > > Michael Zoran <mzoran@crowfest.net> escreveu:
> > > >   
> > > > > On Wed, 2017-03-15 at 22:08 -0300, Mauro Carvalho Chehab wrote:
> > > > >   
> > > > > > No, I didn't. Thanks! Applied it but, unfortunately, didn't
> > > > > > work.
> > > > > > Perhaps I'm missing some other patch. I'm compiling it from
> > > > > > the Greg's staging tree (branch staging-next):
> > > > > > 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/
> > > > > > staging.
> > > > > > git/log/?h=staging-next
> > > > > > 
> > > > > > Btw, as I'm running Raspbian, and didn't want to use compat32
> > > > > > bits, 
> > > > > > I'm compiling the Kernel as an arm32 bits Kernel.
> > > > > > 
> > > > > > I did a small trick to build the DTB on arm32:
> > > > > > 
> > > > > > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837-rpi-3-
> > > > > > b.dts
> > > > > > arch/arm/boot/dts/bcm2837-rpi-3-b.dts
> > > > > > 	ln -sf ../../../arm64/boot/dts/broadcom/bcm2837.dtsi
> > > > > > arch/arm/boot/dts/bcm2837.dtsi
> > > > > > 	git checkout arch/arm/boot/dts/Makefile
> > > > > > 	sed "s,bcm2835-rpi-zero.dtb,bcm2835-rpi-zero.dtb
> > > > > > bcm2837-rpi-3-
> > > > > > b.dtb," a && mv a arch/arm/boot/dts/Makefile
> > > > > >     
> > > > > 
> > > > > Two other hacks are currently needed to get the camera to work:
> > > > > 
> > > > > 1. Add this to config.txt(This required to get the firmware to
> > > > > detect
> > > > > the camera)
> > > > > 
> > > > > start_x=1
> > > > > gpu_mem=128  
> > > > 
> > > > I had this already.
> > > >   
> > > > > 
> > > > > 2. VC4 is incompatible with the firmware at this time, so you
> > > > > need 
> > > > > to presently munge the build configuration. What you do is
> > > > > leave
> > > > > simplefb in the build config(I'm assuming you already have
> > > > > that), but
> > > > > you will need to remove VC4 from the config.
> > > > > 
> > > > > The firmware currently adds a node for a simplefb for debugging
> > > > > purposes to show the boot log.  Surprisingly, this is still
> > > > > good enough
> > > > > for basic usage and testing.    
> > > > 
> > > > That solved the issue. Thanks! It would be good to add a notice
> > > > about that at the TODO, not let it build if DRM_VC4.
> > > > 
> > > > Please consider applying the enclosed path.  
> > > 
> > > The VC4 incompatibility (camera firmware's AWB ends up briefly
> > > using the
> > > GPU, without coordinating with the Linux driver) is supposed to be
> > > fixed
> > > in current firmware
> > > (https://github.com/raspberrypi/firmware/issues/760#issuecomment-28
> > > 7391025)  
> > 
> > With the current firmware, when X starts, the screen becomes blank,
> > with upstream Kernel (it works with the downstream Kernel shipped
> > with 
> > the firmware).
> > 
> > Maybe something changed at DT?
> > 
> > Thanks,
> > Mauro  
> 
> Hi, exactly which DT are you using and which drivers are you using for
> video.

I'm using the one at Greg's staging tree.

> If this is a RPI 3, then as you know VC4 doesn't work due to the
> HDMI hotplug issue. So I'm not 100% sure how you were getting video.

> 
> A working DT that I tried this morning with the current firmware is
> posted here:
> http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-March/005924
> .html
> 
> It even works with minecraft_pi!


Yeah, something like that solved it, thanks! With the new firmware
and the enclosed patch, compiling with VIDEO_BCM2835 

I had to comment two blocks for it to work with upstream Kernel, though.

Patch enclosed.

Thanks!
Mauro

[PATCH] bcm2837-rpi-3-b.dts: fix it to work with newer firmware

Newer firmware require extra stuff to DT.

Suggested-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
index c309633a1e87..7e8d42904022 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
@@ -17,6 +17,45 @@
 			gpios = <&gpio 47 0>;
 		};
 	};
+
+
+	soc {
+
+//		hvs at 7e400000 {
+//			status = "disabled";
+//		};
+
+//		v3d: v3d at 7ec00000 {
+//			status = "disabled";
+//		};
+
+		vc4: gpu {
+			status = "disabled";
+		};
+
+		fb: fb {
+			status = "disabled";
+		};
+
+		vchiq: vchiq {
+			compatible = "brcm,bcm2835-vchiq";
+			reg = <0x7e00b840 0xf>;
+			interrupts = <0 2>;
+			cache-line-size = <32>;
+			firmware = <&firmware>;
+		};
+
+		audio: audio {
+			compatible = "brcm,bcm2835-audio";
+			brcm,pwm-channels = <8>;
+		};
+
+	};
+
+	__overrides__ {
+		cache_line_size = <&vchiq>, "cache-line-size:0";
+	};
+
 };
 
 &uart1 {


Thanks,
Mauro

[toc] | [prev] | [next] | [standalone]


#1604374

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-20 12:10 +0100
Message-ID<tn3mi-3Qx-7@gated-at.bofh.it>
In reply to#1604128
Em Sun, 19 Mar 2017 22:11:07 -0300
Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:

> Em Sun, 19 Mar 2017 10:04:28 -0700
> Michael Zoran <mzoran@crowfest.net> escreveu:
> 

> > A working DT that I tried this morning with the current firmware is
> > posted here:
> > http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-March/005924
> > .html
> > 
> > It even works with minecraft_pi!  

With the new firmware, sometime after booting, I'm getting an oops, caused
by bcm2835_audio/vchiq:

[  298.788995] Unable to handle kernel NULL pointer dereference at virtual address 00000034
[  298.821458] pgd = ed004000
[  298.832294] [00000034] *pgd=2e5e9835, *pte=00000000, *ppte=00000000
[  298.857450] Internal error: Oops: 17 [#1] SMP ARM
[  298.876273] Modules linked in: cfg80211 hid_logitech_hidpp hid_logitech_dj snd_bcm2835(C) snd_pcm snd_timer snd soundcore vchiq(C) uio_pdrv_genirq uio fuse
[  298.932064] CPU: 3 PID: 847 Comm: pulseaudio Tainted: G         C      4.11.0-rc1+ #56
[  298.963774] Hardware name: Generic DT based system
[  298.982945] task: ef758580 task.stack: ee4c6000
[  299.001080] PC is at mutex_lock+0x14/0x3c
[  299.017148] LR is at vchiq_add_service_internal+0x138/0x3a0 [vchiq]
[  299.042246] pc : [<c0c849d4>]    lr : [<bf059654>]    psr: 40000013
sp : ee4c7ca8  ip : 00000000  fp : ef709800
[  299.088240] r10: 00000000  r9 : ee3bffc0  r8 : 00000034
[  299.109153] r7 : 00000003  r6 : 00000000  r5 : ee4c7d00  r4 : ee1d8c00
[  299.135291] r3 : ef758580  r2 : 00000000  r1 : ffffffc8  r0 : 00000034
[  299.161431] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  299.190008] Control: 10c5383d  Table: 2d00406a  DAC: 00000051
[  299.213011] Process pulseaudio (pid: 847, stack limit = 0xee4c6220)
[  299.238104] Stack: (0xee4c7ca8 to 0xee4c8000)
[  299.255539] 7ca0:                   c1403d54 80400040 ff7f0600 ff7f0660 bf06b578 ee3bffc0
[  299.288301] 7cc0: 00000000 ee3afd00 00000000 ee4c7d00 00000000 bf0640b4 00000000 bf066428
[  299.321064] 7ce0: ee3afd00 ee3afd00 ee4c7d34 ee3af444 ee3bffc0 ee3af444 ee3bffc0 bf0662ec
[  299.353826] 7d00: 41554453 bf065db0 ee3afd00 00010002 bf0d7408 ee3af440 00000000 bf0d7408
[  299.386587] 7d20: ee79bd80 bf0d5a04 00000000 ef709800 00000020 00000002 00000001 41554453
[  299.419349] 7d40: 00000000 00000000 00000000 bf0d559c ee3af440 00000001 00000001 00000000
[  299.452111] 7d60: ee24ac80 ee24ac80 ee1c4a00 00000000 ee79bd80 ee24ace8 00000001 bf0d4dfc
[  299.484872] 7d80: 0000000b ffffffff ee4b8c3c 00000000 ee4c7dc8 ee4b8800 ee4b8c28 ee4c6000
[  299.517635] 7da0: 00000000 ee4b8c3c ed029e40 bf0c0404 ee4b8800 ee1c4a00 ee4b8800 ed029e40
[  299.550398] 7dc0: 00000000 bf0c0560 ee072340 00000000 ef758580 c0367b7c ee4b8c40 ee4b8c40
[  299.583161] 7de0: 00000000 ee4b8800 ed029e40 ee318f80 ed029e40 00000006 ee318f80 bf0c0748
[  299.615924] 7e00: bf0a3430 ee4f6180 00000000 c0428fe0 ee318f80 000021b0 00000026 ed029e40
[  299.648697] 7e20: ee318f80 ed029e48 c0428f1c ee4c7e94 00000006 c0421cc0 ee4c7ed0 00000000
[  299.681464] 7e40: 00000802 00000000 ee4c7e94 00000006 ee318f80 c0432c8c ee4c7f40 c0433bc0
[  299.714225] 7e60: 00000000 ed029e40 00000000 00000041 00000000 ed004000 00000000 ee4c6000
[  299.746987] 7e80: eec69808 00000005 00000000 00000002 ee318f80 ef0d2910 ee924908 bf0ba284
[  299.779750] 7ea0: ee31bbc0 bebb53c4 ee4e1d00 00000011 ee4c7f74 00000001 fffff000 c0308b04
[  299.812512] 7ec0: ee4c6000 00000000 bebb5710 c0434578 ef0d2910 ee924908 73541c18 00000008
[  299.845274] 7ee0: ee4a7019 00000000 00000000 ee899bb0 ee318f80 00000101 00000002 00000084
[  299.878037] 7f00: 00000000 00000000 00000000 ee4c7f10 ee318df8 ed029840 40045532 bebb53c4
[  299.910799] 7f20: ee4c6000 ee4a7000 c1403ef8 bebb550c 00000011 ee5eca00 00000020 ee5eca18
[  299.943562] 7f40: ee4a7000 00000000 00080802 00000002 ffffff9c fffff000 00000011 ffffff9c
[  299.976324] 7f60: ee4a7000 c0422e70 00000002 c04359b0 ed029840 00000802 ed020000 00000006
[  300.009086] 7f80: 00000100 00000001 00000000 ffffffff 00000004 b189d000 00000005 c0308b04
[  300.041848] 7fa0: ee4c6000 c0308940 ffffffff 00000004 bebb550c 00080802 bebb53c4 00084b58
[  300.074611] 7fc0: ffffffff 00000004 b189d000 00000005 00000000 bebb550c 00099448 bebb5710
[  300.107373] 7fe0: 00000000 bebb53c8 b6c40da4 b6c24334 80000010 bebb550c 2fffd861 2fffdc61
[  300.140190] [<c0c849d4>] (mutex_lock) from [<bf059654>] (vchiq_add_service_internal+0x138/0x3a0 [vchiq])
[  300.178237] [<bf059654>] (vchiq_add_service_internal [vchiq]) from [<bf0640b4>] (vchiq_open_service+0x58/0xf0 [vchiq])
[  300.221152] [<bf0640b4>] (vchiq_open_service [vchiq]) from [<bf0662ec>] (vchi_service_open+0x74/0xa8 [vchiq])
[  300.260919] [<bf0662ec>] (vchi_service_open [vchiq]) from [<bf0d5a04>] (bcm2835_audio_open+0xe8/0x2d0 [snd_bcm2835])
[  300.303111] [<bf0d5a04>] (bcm2835_audio_open [snd_bcm2835]) from [<bf0d4dfc>] (snd_bcm2835_playback_open_generic+0xc0/0x1c4 [snd_bcm2835])
[  300.352975] [<bf0d4dfc>] (snd_bcm2835_playback_open_generic [snd_bcm2835]) from [<bf0c0404>] (snd_pcm_open_substream+0x60/0x110 [snd_pcm])
[  300.402848] [<bf0c0404>] (snd_pcm_open_substream [snd_pcm]) from [<bf0c0560>] (snd_pcm_open+0xac/0x1fc [snd_pcm])
[  300.444009] [<bf0c0560>] (snd_pcm_open [snd_pcm]) from [<bf0c0748>] (snd_pcm_playback_open+0x3c/0x5c [snd_pcm])
[  300.484459] [<bf0c0748>] (snd_pcm_playback_open [snd_pcm]) from [<c0428fe0>] (chrdev_open+0xc4/0x180)
[  300.521408] [<c0428fe0>] (chrdev_open) from [<c0421cc0>] (do_dentry_open.constprop.3+0x1fc/0x304)
[  300.556964] [<c0421cc0>] (do_dentry_open.constprop.3) from [<c0432c8c>] (path_openat+0x588/0x1078)
[  300.592866] [<c0432c8c>] (path_openat) from [<c0434578>] (do_filp_open+0x60/0xc4)
[  300.622846] [<c0434578>] (do_filp_open) from [<c0422e70>] (do_sys_open+0x110/0x1c0)
[  300.653524] [<c0422e70>] (do_sys_open) from [<c0308940>] (ret_fast_syscall+0x0/0x3c)


Thanks,
Mauro

[toc] | [prev] | [next] | [standalone]


#1604379

FromMichael Zoran <mzoran@crowfest.net>
Date2017-03-20 12:10 +0100
Message-ID<tn3mj-3Qx-27@gated-at.bofh.it>
In reply to#1604374
On Mon, 2017-03-20 at 07:58 -0300, Mauro Carvalho Chehab wrote:
> Em Sun, 19 Mar 2017 22:11:07 -0300
> Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> 
> > Em Sun, 19 Mar 2017 10:04:28 -0700
> > Michael Zoran <mzoran@crowfest.net> escreveu:
> > 
> > > A working DT that I tried this morning with the current firmware
> > > is
> > > posted here:
> > > http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-March/
> > > 005924
> > > .html
> > > 
> > > It even works with minecraft_pi!  
> 
> With the new firmware, sometime after booting, I'm getting an oops,
> caused
> by bcm2835_audio/vchiq:
> 
> [  298.788995] Unable to handle kernel NULL pointer dereference at
> virtual address 00000034
> [  298.821458] pgd = ed004000
> [  298.832294] [00000034] *pgd=2e5e9835, *pte=00000000,
> *ppte=00000000
> [  298.857450] Internal error: Oops: 17 [#1] SMP ARM
> [  298.876273] Modules linked in: cfg80211 hid_logitech_hidpp
> hid_logitech_dj snd_bcm2835(C) snd_pcm snd_timer snd soundcore
> vchiq(C) uio_pdrv_genirq uio fuse
> [  298.932064] CPU: 3 PID: 847 Comm: pulseaudio Tainted:
> G         C      4.11.0-rc1+ #56
> [  298.963774] Hardware name: Generic DT based system
> [  298.982945] task: ef758580 task.stack: ee4c6000
> [  299.001080] PC is at mutex_lock+0x14/0x3c
> [  299.017148] LR is at vchiq_add_service_internal+0x138/0x3a0
> [vchiq]
> [  299.042246] pc : [<c0c849d4>]    lr : [<bf059654>]    psr:
> 40000013
> sp : ee4c7ca8  ip : 00000000  fp : ef709800
> [  299.088240] r10: 00000000  r9 : ee3bffc0  r8 : 00000034
> [  299.109153] r7 : 00000003  r6 : 00000000  r5 : ee4c7d00  r4 :
> ee1d8c00
> [  299.135291] r3 : ef758580  r2 : 00000000  r1 : ffffffc8  r0 :
> 00000034
> [  299.161431] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA
> ARM  Segment none
> [  299.190008] Control: 10c5383d  Table: 2d00406a  DAC: 00000051
> [  299.213011] Process pulseaudio (pid: 847, stack limit =
> 0xee4c6220)
> [  299.238104] Stack: (0xee4c7ca8 to 0xee4c8000)
> [  299.255539] 7ca0:                   c1403d54 80400040 ff7f0600
> ff7f0660 bf06b578 ee3bffc0
> [  299.288301] 7cc0: 00000000 ee3afd00 00000000 ee4c7d00 00000000
> bf0640b4 00000000 bf066428
> [  299.321064] 7ce0: ee3afd00 ee3afd00 ee4c7d34 ee3af444 ee3bffc0
> ee3af444 ee3bffc0 bf0662ec
> [  299.353826] 7d00: 41554453 bf065db0 ee3afd00 00010002 bf0d7408
> ee3af440 00000000 bf0d7408
> [  299.386587] 7d20: ee79bd80 bf0d5a04 00000000 ef709800 00000020
> 00000002 00000001 41554453
> [  299.419349] 7d40: 00000000 00000000 00000000 bf0d559c ee3af440
> 00000001 00000001 00000000
> [  299.452111] 7d60: ee24ac80 ee24ac80 ee1c4a00 00000000 ee79bd80
> ee24ace8 00000001 bf0d4dfc
> [  299.484872] 7d80: 0000000b ffffffff ee4b8c3c 00000000 ee4c7dc8
> ee4b8800 ee4b8c28 ee4c6000
> [  299.517635] 7da0: 00000000 ee4b8c3c ed029e40 bf0c0404 ee4b8800
> ee1c4a00 ee4b8800 ed029e40
> [  299.550398] 7dc0: 00000000 bf0c0560 ee072340 00000000 ef758580
> c0367b7c ee4b8c40 ee4b8c40
> [  299.583161] 7de0: 00000000 ee4b8800 ed029e40 ee318f80 ed029e40
> 00000006 ee318f80 bf0c0748
> [  299.615924] 7e00: bf0a3430 ee4f6180 00000000 c0428fe0 ee318f80
> 000021b0 00000026 ed029e40
> [  299.648697] 7e20: ee318f80 ed029e48 c0428f1c ee4c7e94 00000006
> c0421cc0 ee4c7ed0 00000000
> [  299.681464] 7e40: 00000802 00000000 ee4c7e94 00000006 ee318f80
> c0432c8c ee4c7f40 c0433bc0
> [  299.714225] 7e60: 00000000 ed029e40 00000000 00000041 00000000
> ed004000 00000000 ee4c6000
> [  299.746987] 7e80: eec69808 00000005 00000000 00000002 ee318f80
> ef0d2910 ee924908 bf0ba284
> [  299.779750] 7ea0: ee31bbc0 bebb53c4 ee4e1d00 00000011 ee4c7f74
> 00000001 fffff000 c0308b04
> [  299.812512] 7ec0: ee4c6000 00000000 bebb5710 c0434578 ef0d2910
> ee924908 73541c18 00000008
> [  299.845274] 7ee0: ee4a7019 00000000 00000000 ee899bb0 ee318f80
> 00000101 00000002 00000084
> [  299.878037] 7f00: 00000000 00000000 00000000 ee4c7f10 ee318df8
> ed029840 40045532 bebb53c4
> [  299.910799] 7f20: ee4c6000 ee4a7000 c1403ef8 bebb550c 00000011
> ee5eca00 00000020 ee5eca18
> [  299.943562] 7f40: ee4a7000 00000000 00080802 00000002 ffffff9c
> fffff000 00000011 ffffff9c
> [  299.976324] 7f60: ee4a7000 c0422e70 00000002 c04359b0 ed029840
> 00000802 ed020000 00000006
> [  300.009086] 7f80: 00000100 00000001 00000000 ffffffff 00000004
> b189d000 00000005 c0308b04
> [  300.041848] 7fa0: ee4c6000 c0308940 ffffffff 00000004 bebb550c
> 00080802 bebb53c4 00084b58
> [  300.074611] 7fc0: ffffffff 00000004 b189d000 00000005 00000000
> bebb550c 00099448 bebb5710
> [  300.107373] 7fe0: 00000000 bebb53c8 b6c40da4 b6c24334 80000010
> bebb550c 2fffd861 2fffdc61
> [  300.140190] [<c0c849d4>] (mutex_lock) from [<bf059654>]
> (vchiq_add_service_internal+0x138/0x3a0 [vchiq])
> [  300.178237] [<bf059654>] (vchiq_add_service_internal [vchiq]) from
> [<bf0640b4>] (vchiq_open_service+0x58/0xf0 [vchiq])
> [  300.221152] [<bf0640b4>] (vchiq_open_service [vchiq]) from
> [<bf0662ec>] (vchi_service_open+0x74/0xa8 [vchiq])
> [  300.260919] [<bf0662ec>] (vchi_service_open [vchiq]) from
> [<bf0d5a04>] (bcm2835_audio_open+0xe8/0x2d0 [snd_bcm2835])
> [  300.303111] [<bf0d5a04>] (bcm2835_audio_open [snd_bcm2835]) from
> [<bf0d4dfc>] (snd_bcm2835_playback_open_generic+0xc0/0x1c4
> [snd_bcm2835])
> [  300.352975] [<bf0d4dfc>] (snd_bcm2835_playback_open_generic
> [snd_bcm2835]) from [<bf0c0404>] (snd_pcm_open_substream+0x60/0x110
> [snd_pcm])
> [  300.402848] [<bf0c0404>] (snd_pcm_open_substream [snd_pcm]) from
> [<bf0c0560>] (snd_pcm_open+0xac/0x1fc [snd_pcm])
> [  300.444009] [<bf0c0560>] (snd_pcm_open [snd_pcm]) from
> [<bf0c0748>] (snd_pcm_playback_open+0x3c/0x5c [snd_pcm])
> [  300.484459] [<bf0c0748>] (snd_pcm_playback_open [snd_pcm]) from
> [<c0428fe0>] (chrdev_open+0xc4/0x180)
> [  300.521408] [<c0428fe0>] (chrdev_open) from [<c0421cc0>]
> (do_dentry_open.constprop.3+0x1fc/0x304)
> [  300.556964] [<c0421cc0>] (do_dentry_open.constprop.3) from
> [<c0432c8c>] (path_openat+0x588/0x1078)
> [  300.592866] [<c0432c8c>] (path_openat) from [<c0434578>]
> (do_filp_open+0x60/0xc4)
> [  300.622846] [<c0434578>] (do_filp_open) from [<c0422e70>]
> (do_sys_open+0x110/0x1c0)
> [  300.653524] [<c0422e70>] (do_sys_open) from [<c0308940>]
> (ret_fast_syscall+0x0/0x3c)
> 
> 
Hi, can you e-mail out your config.txt?  Do you have audio enabled in
config.txt?

[toc] | [prev] | [next] | [standalone]


#1604670

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-20 16:10 +0100
Message-ID<tn76y-6tc-5@gated-at.bofh.it>
In reply to#1604379
Em Mon, 20 Mar 2017 04:08:21 -0700
Michael Zoran <mzoran@crowfest.net> escreveu:

> On Mon, 2017-03-20 at 07:58 -0300, Mauro Carvalho Chehab wrote:
> > Em Sun, 19 Mar 2017 22:11:07 -0300
> > Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> >   
> > > Em Sun, 19 Mar 2017 10:04:28 -0700
> > > Michael Zoran <mzoran@crowfest.net> escreveu:
> > >   
> > > > A working DT that I tried this morning with the current firmware
> > > > is
> > > > posted here:
> > > > http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-March/
> > > > 005924
> > > > .html
> > > > 
> > > > It even works with minecraft_pi!    
> > 
> > With the new firmware, sometime after booting, I'm getting an oops,
> > caused
> > by bcm2835_audio/vchiq:
> > 
> > [  298.788995] Unable to handle kernel NULL pointer dereference at
> > virtual address 00000034
> > [  298.821458] pgd = ed004000
> > [  298.832294] [00000034] *pgd=2e5e9835, *pte=00000000,
> > *ppte=00000000
> > [  298.857450] Internal error: Oops: 17 [#1] SMP ARM
> > [  298.876273] Modules linked in: cfg80211 hid_logitech_hidpp
> > hid_logitech_dj snd_bcm2835(C) snd_pcm snd_timer snd soundcore
> > vchiq(C) uio_pdrv_genirq uio fuse
> > [  298.932064] CPU: 3 PID: 847 Comm: pulseaudio Tainted:
> > G         C      4.11.0-rc1+ #56
> > [  298.963774] Hardware name: Generic DT based system
> > [  298.982945] task: ef758580 task.stack: ee4c6000
> > [  299.001080] PC is at mutex_lock+0x14/0x3c
> > [  299.017148] LR is at vchiq_add_service_internal+0x138/0x3a0
> > [vchiq]
> > [  299.042246] pc : [<c0c849d4>]    lr : [<bf059654>]    psr:
> > 40000013
> > sp : ee4c7ca8  ip : 00000000  fp : ef709800
> > [  299.088240] r10: 00000000  r9 : ee3bffc0  r8 : 00000034
> > [  299.109153] r7 : 00000003  r6 : 00000000  r5 : ee4c7d00  r4 :
> > ee1d8c00
> > [  299.135291] r3 : ef758580  r2 : 00000000  r1 : ffffffc8  r0 :
> > 00000034
> > [  299.161431] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA
> > ARM  Segment none
> > [  299.190008] Control: 10c5383d  Table: 2d00406a  DAC: 00000051
> > [  299.213011] Process pulseaudio (pid: 847, stack limit =
> > 0xee4c6220)
> > [  299.238104] Stack: (0xee4c7ca8 to 0xee4c8000)
> > [  299.255539] 7ca0:                   c1403d54 80400040 ff7f0600
> > ff7f0660 bf06b578 ee3bffc0
> > [  299.288301] 7cc0: 00000000 ee3afd00 00000000 ee4c7d00 00000000
> > bf0640b4 00000000 bf066428
> > [  299.321064] 7ce0: ee3afd00 ee3afd00 ee4c7d34 ee3af444 ee3bffc0
> > ee3af444 ee3bffc0 bf0662ec
> > [  299.353826] 7d00: 41554453 bf065db0 ee3afd00 00010002 bf0d7408
> > ee3af440 00000000 bf0d7408
> > [  299.386587] 7d20: ee79bd80 bf0d5a04 00000000 ef709800 00000020
> > 00000002 00000001 41554453
> > [  299.419349] 7d40: 00000000 00000000 00000000 bf0d559c ee3af440
> > 00000001 00000001 00000000
> > [  299.452111] 7d60: ee24ac80 ee24ac80 ee1c4a00 00000000 ee79bd80
> > ee24ace8 00000001 bf0d4dfc
> > [  299.484872] 7d80: 0000000b ffffffff ee4b8c3c 00000000 ee4c7dc8
> > ee4b8800 ee4b8c28 ee4c6000
> > [  299.517635] 7da0: 00000000 ee4b8c3c ed029e40 bf0c0404 ee4b8800
> > ee1c4a00 ee4b8800 ed029e40
> > [  299.550398] 7dc0: 00000000 bf0c0560 ee072340 00000000 ef758580
> > c0367b7c ee4b8c40 ee4b8c40
> > [  299.583161] 7de0: 00000000 ee4b8800 ed029e40 ee318f80 ed029e40
> > 00000006 ee318f80 bf0c0748
> > [  299.615924] 7e00: bf0a3430 ee4f6180 00000000 c0428fe0 ee318f80
> > 000021b0 00000026 ed029e40
> > [  299.648697] 7e20: ee318f80 ed029e48 c0428f1c ee4c7e94 00000006
> > c0421cc0 ee4c7ed0 00000000
> > [  299.681464] 7e40: 00000802 00000000 ee4c7e94 00000006 ee318f80
> > c0432c8c ee4c7f40 c0433bc0
> > [  299.714225] 7e60: 00000000 ed029e40 00000000 00000041 00000000
> > ed004000 00000000 ee4c6000
> > [  299.746987] 7e80: eec69808 00000005 00000000 00000002 ee318f80
> > ef0d2910 ee924908 bf0ba284
> > [  299.779750] 7ea0: ee31bbc0 bebb53c4 ee4e1d00 00000011 ee4c7f74
> > 00000001 fffff000 c0308b04
> > [  299.812512] 7ec0: ee4c6000 00000000 bebb5710 c0434578 ef0d2910
> > ee924908 73541c18 00000008
> > [  299.845274] 7ee0: ee4a7019 00000000 00000000 ee899bb0 ee318f80
> > 00000101 00000002 00000084
> > [  299.878037] 7f00: 00000000 00000000 00000000 ee4c7f10 ee318df8
> > ed029840 40045532 bebb53c4
> > [  299.910799] 7f20: ee4c6000 ee4a7000 c1403ef8 bebb550c 00000011
> > ee5eca00 00000020 ee5eca18
> > [  299.943562] 7f40: ee4a7000 00000000 00080802 00000002 ffffff9c
> > fffff000 00000011 ffffff9c
> > [  299.976324] 7f60: ee4a7000 c0422e70 00000002 c04359b0 ed029840
> > 00000802 ed020000 00000006
> > [  300.009086] 7f80: 00000100 00000001 00000000 ffffffff 00000004
> > b189d000 00000005 c0308b04
> > [  300.041848] 7fa0: ee4c6000 c0308940 ffffffff 00000004 bebb550c
> > 00080802 bebb53c4 00084b58
> > [  300.074611] 7fc0: ffffffff 00000004 b189d000 00000005 00000000
> > bebb550c 00099448 bebb5710
> > [  300.107373] 7fe0: 00000000 bebb53c8 b6c40da4 b6c24334 80000010
> > bebb550c 2fffd861 2fffdc61
> > [  300.140190] [<c0c849d4>] (mutex_lock) from [<bf059654>]
> > (vchiq_add_service_internal+0x138/0x3a0 [vchiq])
> > [  300.178237] [<bf059654>] (vchiq_add_service_internal [vchiq]) from
> > [<bf0640b4>] (vchiq_open_service+0x58/0xf0 [vchiq])
> > [  300.221152] [<bf0640b4>] (vchiq_open_service [vchiq]) from
> > [<bf0662ec>] (vchi_service_open+0x74/0xa8 [vchiq])
> > [  300.260919] [<bf0662ec>] (vchi_service_open [vchiq]) from
> > [<bf0d5a04>] (bcm2835_audio_open+0xe8/0x2d0 [snd_bcm2835])
> > [  300.303111] [<bf0d5a04>] (bcm2835_audio_open [snd_bcm2835]) from
> > [<bf0d4dfc>] (snd_bcm2835_playback_open_generic+0xc0/0x1c4
> > [snd_bcm2835])
> > [  300.352975] [<bf0d4dfc>] (snd_bcm2835_playback_open_generic
> > [snd_bcm2835]) from [<bf0c0404>] (snd_pcm_open_substream+0x60/0x110
> > [snd_pcm])
> > [  300.402848] [<bf0c0404>] (snd_pcm_open_substream [snd_pcm]) from
> > [<bf0c0560>] (snd_pcm_open+0xac/0x1fc [snd_pcm])
> > [  300.444009] [<bf0c0560>] (snd_pcm_open [snd_pcm]) from
> > [<bf0c0748>] (snd_pcm_playback_open+0x3c/0x5c [snd_pcm])
> > [  300.484459] [<bf0c0748>] (snd_pcm_playback_open [snd_pcm]) from
> > [<c0428fe0>] (chrdev_open+0xc4/0x180)
> > [  300.521408] [<c0428fe0>] (chrdev_open) from [<c0421cc0>]
> > (do_dentry_open.constprop.3+0x1fc/0x304)
> > [  300.556964] [<c0421cc0>] (do_dentry_open.constprop.3) from
> > [<c0432c8c>] (path_openat+0x588/0x1078)
> > [  300.592866] [<c0432c8c>] (path_openat) from [<c0434578>]
> > (do_filp_open+0x60/0xc4)
> > [  300.622846] [<c0434578>] (do_filp_open) from [<c0422e70>]
> > (do_sys_open+0x110/0x1c0)
> > [  300.653524] [<c0422e70>] (do_sys_open) from [<c0308940>]
> > (ret_fast_syscall+0x0/0x3c)
> > 
> >   
> Hi, can you e-mail out your config.txt?  Do you have audio enabled in
> config.txt?

yes, I have this:

$ cat config.txt |grep -i audio
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# Enable audio (loads snd_bcm2835)
dtparam=audio=on

Full config attached.

Thanks,
Mauro


---

# Latest RPi Kernel
#kernel=rpi-4.10.y/vmlinuz-4.11.0-rc2-v8+
#device_tree=rpi-4.10.y/bcm2837-rpi-3-b.dtb

# Upstream Kernel
kernel=upstream/vmlinuz-4.11.0-rc1+
device_tree=upstream/bcm2837-rpi-3-b.dtb

# For more options and information see
# http://rpf.io/configtxtreadme
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
start_x=1
gpu_mem=128

enable_uart=1

[toc] | [prev] | [next] | [standalone]


#1604678

FromMichael Zoran <mzoran@crowfest.net>
Date2017-03-20 16:20 +0100
Message-ID<tn7gd-6yN-13@gated-at.bofh.it>
In reply to#1604670
On Mon, 2017-03-20 at 11:58 -0300, Mauro Carvalho Chehab wrote:
> Em Mon, 20 Mar 2017 04:08:21 -0700
> Michael Zoran <mzoran@crowfest.net> escreveu:
> 
> > On Mon, 2017-03-20 at 07:58 -0300, Mauro Carvalho Chehab wrote:
> > > Em Sun, 19 Mar 2017 22:11:07 -0300
> > > Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> > >   
> > > > Em Sun, 19 Mar 2017 10:04:28 -0700
> > > > Michael Zoran <mzoran@crowfest.net> escreveu:
> > > >   
> > > > > A working DT that I tried this morning with the current
> > > > > firmware
> > > > > is
> > > > > posted here:
> > > > > http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-Ma
> > > > > rch/
> > > > > 005924
> > > > > .html
> > > > > 
> > > > > It even works with minecraft_pi!    
> > > 
> > >   
> > 
> > Hi, can you e-mail out your config.txt?  Do you have audio enabled
> > in
> > config.txt?
> 
> yes, I have this:
> 
> $ cat config.txt |grep -i audio
> # uncomment to force a HDMI mode rather than DVI. This can make audio
> work in
> # Enable audio (loads snd_bcm2835)
> dtparam=audio=on
> 
> Full config attached.
> 
> Thanks,
> Mauro
> 

Are you using Eric Anholt's HDMI Audio driver that's included in VC4? 
That could well be incompatible with the firmware driver. Or are you
using a half mode of VC4 for audio and VCHIQ for video?

[toc] | [prev] | [next] | [standalone]


#1604711

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-20 17:00 +0100
Message-ID<tn7SV-6Ou-7@gated-at.bofh.it>
In reply to#1604678
Em Mon, 20 Mar 2017 08:11:41 -0700
Michael Zoran <mzoran@crowfest.net> escreveu:

> On Mon, 2017-03-20 at 11:58 -0300, Mauro Carvalho Chehab wrote:
> > Em Mon, 20 Mar 2017 04:08:21 -0700
> > Michael Zoran <mzoran@crowfest.net> escreveu:
> >   
> > > On Mon, 2017-03-20 at 07:58 -0300, Mauro Carvalho Chehab wrote:  
> > > > Em Sun, 19 Mar 2017 22:11:07 -0300
> > > > Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> > > >     
> > > > > Em Sun, 19 Mar 2017 10:04:28 -0700
> > > > > Michael Zoran <mzoran@crowfest.net> escreveu:
> > > > >     
> > > > > > A working DT that I tried this morning with the current
> > > > > > firmware
> > > > > > is
> > > > > > posted here:
> > > > > > http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-Ma
> > > > > > rch/
> > > > > > 005924
> > > > > > .html
> > > > > > 
> > > > > > It even works with minecraft_pi!      
> > > > 
> > > >     
> > > 
> > > Hi, can you e-mail out your config.txt?  Do you have audio enabled
> > > in
> > > config.txt?  
> > 
> > yes, I have this:
> > 
> > $ cat config.txt |grep -i audio
> > # uncomment to force a HDMI mode rather than DVI. This can make audio
> > work in
> > # Enable audio (loads snd_bcm2835)
> > dtparam=audio=on
> > 
> > Full config attached.
> > 
> > Thanks,
> > Mauro
> >   
> 
> Are you using Eric Anholt's HDMI Audio driver that's included in VC4? 
> That could well be incompatible with the firmware driver. Or are you
> using a half mode of VC4 for audio and VCHIQ for video?

I'm using vanilla staging Kernel, from Greg's tree:
	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?h=staging-next&id=7bc49cb9b9b8bad32536c4b6d1aff1824c1adc6c

Plus the DWC2 fixup I wrote and DT changes you pointed
(see enclosed).

I can disable the audio overlay here, as I don't have anything 
connected to audio inputs/outputs.

Regards,
Mauro

---


diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 38e6050035bc..1f42190e8558 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -27,6 +27,14 @@
                        firmware = <&firmware>;
                        #power-domain-cells = <1>;
                };
+
+               vchiq {
+                       compatible = "brcm,bcm2835-vchiq";
+                       reg = <0x7e00b840 0xf>;
+                       interrupts = <0 2>;
+                       cache-line-size = <32>;
+                       firmware = <&firmware>;
+               };
        };
 };

diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
index c309633a1e87..7e8d42904022 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts
@@ -17,6 +17,45 @@
                        gpios = <&gpio 47 0>;
                };
        };
+
+
+       soc {
+
+//             hvs at 7e400000 {
+//                     status = "disabled";
+//             };
+
+//             v3d: v3d at 7ec00000 {
+//                     status = "disabled";
+//             };
+
+               vc4: gpu {
+                       status = "disabled";
+               };
+
+               fb: fb {
+                       status = "disabled";
+               };
+
+               vchiq: vchiq {
+                       compatible = "brcm,bcm2835-vchiq";
+                       reg = <0x7e00b840 0xf>;
+                       interrupts = <0 2>;
+                       cache-line-size = <32>;
+                       firmware = <&firmware>;
+               };
+
+               audio: audio {
+                       compatible = "brcm,bcm2835-audio";
+                       brcm,pwm-channels = <8>;
+               };
+
+       };
+
+       __overrides__ {
+               cache_line_size = <&vchiq>, "cache-line-size:0";
+       };
+
 };
 

Thanks,
Mauro

[toc] | [prev] | [next] | [standalone]


#1604727

FromMichael Zoran <mzoran@crowfest.net>
Date2017-03-20 17:10 +0100
Message-ID<tn82C-77f-25@gated-at.bofh.it>
In reply to#1604711
On Mon, 2017-03-20 at 12:33 -0300, Mauro Carvalho Chehab wrote:
> Em Mon, 20 Mar 2017 08:11:41 -0700
> Michael Zoran <mzoran@crowfest.net> escreveu:
> 
> > On Mon, 2017-03-20 at 11:58 -0300, Mauro Carvalho Chehab wrote:
> > > Em Mon, 20 Mar 2017 04:08:21 -0700
> > > Michael Zoran <mzoran@crowfest.net> escreveu:
> > >   
> > > > On Mon, 2017-03-20 at 07:58 -0300, Mauro Carvalho Chehab
> > > > wrote:  
> > > > > Em Sun, 19 Mar 2017 22:11:07 -0300
> > > > > Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
> > > > >     
> > > > > > Em Sun, 19 Mar 2017 10:04:28 -0700
> > > > > > Michael Zoran <mzoran@crowfest.net> escreveu:
> > > > > >     
> > > > > > > A working DT that I tried this morning with the current
> > > > > > > firmware
> > > > > > > is
> > > > > > > posted here:
> > > > > > > http://lists.infradead.org/pipermail/linux-rpi-kernel/201
> > > > > > > 7-Ma
> > > > > > > rch/
> > > > > > > 005924
> > > > > > > .html
> > > > > > > 
> > > > > > > It even works with minecraft_pi!      
> > > > > 
> > > > >     
> > > > 
> > > > Hi, can you e-mail out your config.txt?  Do you have audio
> > > > enabled
> > > > in
> > > > config.txt?  
> > > 
> > > yes, I have this:
> > > 
> > > $ cat config.txt |grep -i audio
> > > # uncomment to force a HDMI mode rather than DVI. This can make
> > > audio
> > > work in
> > > # Enable audio (loads snd_bcm2835)
> > > dtparam=audio=on
> > > 
> > > Full config attached.
> > > 
> > > Thanks,
> > > Mauro
> > >   
> > 
> > Are you using Eric Anholt's HDMI Audio driver that's included in
> > VC4? 
> > That could well be incompatible with the firmware driver. Or are
> > you
> > using a half mode of VC4 for audio and VCHIQ for video?
> 
> I'm using vanilla staging Kernel, from Greg's tree:
> 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.
> git/commit/?h=staging-
> next&id=7bc49cb9b9b8bad32536c4b6d1aff1824c1adc6c
> 
> Plus the DWC2 fixup I wrote and DT changes you pointed
> (see enclosed).
> 
> I can disable the audio overlay here, as I don't have anything 
> connected to audio inputs/outputs.
> 
> Regards,
> Mauro
> 

Why is the vchiq node in the tree twice? For me to even respond anymore
you you going to have to include your entire dtb(whatever you are
using) run through dtc -I dtb -O dts.  You are also going to have to
include your exact .config file you used for building, and exactly what
these DWC2 fixeups are.

You don't even state exactly what platform you are using, Is it even an
RPI of some kind.

[toc] | [prev] | [next] | [standalone]


#1606784

FromMauro Carvalho Chehab <mchehab@s-opensource.com>
Date2017-03-22 18:20 +0100
Message-ID<tnS5s-5Vz-29@gated-at.bofh.it>
In reply to#1604727
Hi Michael,

Em Mon, 20 Mar 2017 08:40:11 -0700
Michael Zoran <mzoran@crowfest.net> escreveu:

> > > Are you using Eric Anholt's HDMI Audio driver that's included in
> > > VC4? 
> > > That could well be incompatible with the firmware driver. Or are
> > > you
> > > using a half mode of VC4 for audio and VCHIQ for video?  
> > 
> > I'm using vanilla staging Kernel, from Greg's tree:
> > 	https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.
> > git/commit/?h=staging-
> > next&id=7bc49cb9b9b8bad32536c4b6d1aff1824c1adc6c
> > 
> > Plus the DWC2 fixup I wrote and DT changes you pointed
> > (see enclosed).
> > 
> > I can disable the audio overlay here, as I don't have anything 
> > connected to audio inputs/outputs.
> > 
> > Regards,
> > Mauro
> >   
> 
> Why is the vchiq node in the tree twice? For me to even respond anymore
> you you going to have to include your entire dtb(whatever you are
> using) run through dtc -I dtb -O dts.  You are also going to have to
> include your exact .config file you used for building, and exactly what
> these DWC2 fixeups are.
> 
> You don't even state exactly what platform you are using, Is it even an
> RPI of some kind.

It is a RPi3 board. The exact procedure that I took is described here:
	https://blogs.s-osg.org/use-v4l2-cameras-raspberry-pi-3-upstream-kernel/

After it, I updated the firmware to the newest one, from:
	https://github.com/raspberrypi/firmware.git

	commit 384559354762f36aa55584560d8749fc66a4cfd0
	Author: popcornmix <popcornmix@gmail.com>
	Date:   Sat Mar 18 17:48:59 2017 +0000
	    kernel: Bump to 4.9.16

Then I applied two patches on the top of it:

	https://patchwork.linuxtv.org/patch/40093/
	https://patchwork.linuxtv.org/patch/40146/

As the second patch has entries for vchiq, I ended by having it
duplicated (although the DTB has it only once, as you can see below).

Regards,
Mauro

----

Output of:
$ dtc -I dtb -O dts /devel/arm_rootdir/install/bcm2837-rpi-3-b.dtb

/dts-v1/;

/ {
	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
	model = "Raspberry Pi 3 Model B";
	interrupt-parent = <0x1>;
	#address-cells = <0x1>;
	#size-cells = <0x1>;

	chosen {
		bootargs = "earlyprintk console=ttyAMA0";
	};

	soc {
		compatible = "simple-bus";
		#address-cells = <0x1>;
		#size-cells = <0x1>;
		ranges = <0x7e000000 0x3f000000 0x1000000 0x40000000 0x40000000 0x1000>;
		dma-ranges = <0xc0000000 0x0 0x3f000000>;

		timer@7e003000 {
			compatible = "brcm,bcm2835-system-timer";
			reg = <0x7e003000 0x1000>;
			interrupts = <0x1 0x0 0x1 0x1 0x1 0x2 0x1 0x3>;
			clock-frequency = <0xf4240>;
		};

		dma@7e007000 {
			compatible = "brcm,bcm2835-dma";
			reg = <0x7e007000 0xf00>;
			interrupts = <0x1 0x10 0x1 0x11 0x1 0x12 0x1 0x13 0x1 0x14 0x1 0x15 0x1 0x16 0x1 0x17 0x1 0x18 0x1 0x19 0x1 0x1a 0x1 0x1b 0x1 0x1b 0x1 0x1b 0x1 0x1b 0x1 0x1c>;
			interrupt-names = "dma0", "dma1", "dma2", "dma3", "dma4", "dma5", "dma6", "dma7", "dma8", "dma9", "dma10", "dma11", "dma12", "dma13", "dma14", "dma-shared-all";
			#dma-cells = <0x1>;
			brcm,dma-channel-mask = <0x7f35>;
			linux,phandle = <0x5>;
			phandle = <0x5>;
		};

		interrupt-controller@7e00b200 {
			compatible = "brcm,bcm2836-armctrl-ic";
			reg = <0x7e00b200 0x200>;
			interrupt-controller;
			#interrupt-cells = <0x2>;
			interrupt-parent = <0x2>;
			interrupts = <0x8>;
			linux,phandle = <0x1>;
			phandle = <0x1>;
		};

		watchdog@7e100000 {
			compatible = "brcm,bcm2835-pm-wdt";
			reg = <0x7e100000 0x28>;
		};

		cprman@7e101000 {
			compatible = "brcm,bcm2835-cprman";
			#clock-cells = <0x1>;
			reg = <0x7e101000 0x2000>;
			clocks = <0x3>;
			linux,phandle = <0x4>;
			phandle = <0x4>;
		};

		rng@7e104000 {
			compatible = "brcm,bcm2835-rng";
			reg = <0x7e104000 0x10>;
		};

		mailbox@7e00b880 {
			compatible = "brcm,bcm2835-mbox";
			reg = <0x7e00b880 0x40>;
			interrupts = <0x0 0x1>;
			#mbox-cells = <0x0>;
			linux,phandle = <0xf>;
			phandle = <0xf>;
		};

		gpio@7e200000 {
			compatible = "brcm,bcm2835-gpio";
			reg = <0x7e200000 0xb4>;
			interrupts = <0x2 0x11 0x2 0x12 0x2 0x13 0x2 0x14>;
			gpio-controller;
			#gpio-cells = <0x2>;
			interrupt-controller;
			#interrupt-cells = <0x2>;
			pinctrl-names = "default";
			linux,phandle = <0x11>;
			phandle = <0x11>;

			dpi_gpio0 {
				brcm,pins = <0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b>;
				brcm,function = <0x6>;
			};

			emmc_gpio22 {
				brcm,pins = <0x16 0x17 0x18 0x19 0x1a 0x1b>;
				brcm,function = <0x7>;
			};

			emmc_gpio34 {
				brcm,pins = <0x22 0x23 0x24 0x25 0x26 0x27>;
				brcm,function = <0x7>;
				brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>;
			};

			emmc_gpio48 {
				brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>;
				brcm,function = <0x7>;
				linux,phandle = <0xa>;
				phandle = <0xa>;
			};

			gpclk0_gpio4 {
				brcm,pins = <0x4>;
				brcm,function = <0x4>;
			};

			gpclk1_gpio5 {
				brcm,pins = <0x5>;
				brcm,function = <0x4>;
			};

			gpclk1_gpio42 {
				brcm,pins = <0x2a>;
				brcm,function = <0x4>;
			};

			gpclk1_gpio44 {
				brcm,pins = <0x2c>;
				brcm,function = <0x4>;
			};

			gpclk2_gpio6 {
				brcm,pins = <0x6>;
				brcm,function = <0x4>;
			};

			gpclk2_gpio43 {
				brcm,pins = <0x2b>;
				brcm,function = <0x4>;
			};

			i2c0_gpio0 {
				brcm,pins = <0x0 0x1>;
				brcm,function = <0x4>;
				linux,phandle = <0x6>;
				phandle = <0x6>;
			};

			i2c0_gpio32 {
				brcm,pins = <0x20 0x22>;
				brcm,function = <0x4>;
			};

			i2c0_gpio44 {
				brcm,pins = <0x2c 0x2d>;
				brcm,function = <0x5>;
			};

			i2c1_gpio2 {
				brcm,pins = <0x2 0x3>;
				brcm,function = <0x4>;
				linux,phandle = <0xb>;
				phandle = <0xb>;
			};

			i2c1_gpio44 {
				brcm,pins = <0x2c 0x2d>;
				brcm,function = <0x6>;
			};

			i2c_slave_gpio18 {
				brcm,pins = <0x12 0x13 0x14 0x15>;
				brcm,function = <0x7>;
			};

			jtag_gpio4 {
				brcm,pins = <0x4 0x5 0x6 0xc 0xd>;
				brcm,function = <0x3>;
			};

			jtag_gpio22 {
				brcm,pins = <0x16 0x17 0x18 0x19 0x1a 0x1b>;
				brcm,function = <0x3>;
			};

			pcm_gpio18 {
				brcm,pins = <0x12 0x13 0x14 0x15>;
				brcm,function = <0x4>;
			};

			pcm_gpio28 {
				brcm,pins = <0x1c 0x1d 0x1e 0x1f>;
				brcm,function = <0x6>;
			};

			pwm0_gpio12 {
				brcm,pins = <0xc>;
				brcm,function = <0x4>;
			};

			pwm0_gpio18 {
				brcm,pins = <0x12>;
				brcm,function = <0x2>;
			};

			pwm0_gpio40 {
				brcm,pins = <0x28>;
				brcm,function = <0x4>;
				linux,phandle = <0x8>;
				phandle = <0x8>;
			};

			pwm1_gpio13 {
				brcm,pins = <0xd>;
				brcm,function = <0x4>;
			};

			pwm1_gpio19 {
				brcm,pins = <0x13>;
				brcm,function = <0x2>;
			};

			pwm1_gpio41 {
				brcm,pins = <0x29>;
				brcm,function = <0x4>;
			};

			pwm1_gpio45 {
				brcm,pins = <0x2d>;
				brcm,function = <0x4>;
				linux,phandle = <0x9>;
				phandle = <0x9>;
			};

			sdhost_gpio48 {
				brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>;
				brcm,function = <0x4>;
			};

			spi0_gpio7 {
				brcm,pins = <0x7 0x8 0x9 0xa 0xb>;
				brcm,function = <0x4>;
			};

			spi0_gpio35 {
				brcm,pins = <0x23 0x24 0x25 0x26 0x27>;
				brcm,function = <0x4>;
			};

			spi1_gpio16 {
				brcm,pins = <0x10 0x11 0x12 0x13 0x14 0x15>;
				brcm,function = <0x3>;
			};

			spi2_gpio40 {
				brcm,pins = <0x28 0x29 0x2a 0x2b 0x2c 0x2d>;
				brcm,function = <0x3>;
			};

			uart0_gpio14 {
				brcm,pins = <0xe 0xf>;
				brcm,function = <0x4>;
			};

			uart0_ctsrts_gpio16 {
				brcm,pins = <0x10 0x11>;
				brcm,function = <0x7>;
			};

			uart0_gpio30 {
				brcm,pins = <0x1e 0x1f>;
				brcm,function = <0x7>;
			};

			uart0_ctsrts_gpio32 {
				brcm,pins = <0x20 0x21>;
				brcm,function = <0x7>;
			};

			uart1_gpio14 {
				brcm,pins = <0xe 0xf>;
				brcm,function = <0x2>;
			};

			uart1_ctsrts_gpio16 {
				brcm,pins = <0x10 0x11>;
				brcm,function = <0x2>;
			};

			uart1_gpio32 {
				brcm,pins = <0x20 0x21>;
				brcm,function = <0x2>;
			};

			uart1_ctsrts_gpio30 {
				brcm,pins = <0x1e 0x1f>;
				brcm,function = <0x2>;
			};

			uart1_gpio36 {
				brcm,pins = <0x24 0x25 0x26 0x27>;
				brcm,function = <0x6>;
			};

			uart1_gpio40 {
				brcm,pins = <0x28 0x29>;
				brcm,function = <0x2>;
			};

			uart1_ctsrts_gpio42 {
				brcm,pins = <0x2a 0x2b>;
				brcm,function = <0x2>;
			};

			gpioout {
				brcm,pins = <0x6>;
				brcm,function = <0x1>;
			};

			alt0 {
				brcm,pins = <0x4 0x5 0x7 0x8 0x9 0xa 0xb 0xe 0xf>;
				brcm,function = <0x4>;
			};
		};

		serial@7e201000 {
			compatible = "brcm,bcm2835-pl011", "arm,pl011", "arm,primecell";
			reg = <0x7e201000 0x1000>;
			interrupts = <0x2 0x19>;
			clocks = <0x4 0x13 0x4 0x14>;
			clock-names = "uartclk", "apb_pclk";
			arm,primecell-periphid = <0x241011>;
		};

		i2s@7e203000 {
			compatible = "brcm,bcm2835-i2s";
			reg = <0x7e203000 0x20 0x7e101098 0x2>;
			dmas = <0x5 0x2 0x5 0x3>;
			dma-names = "tx", "rx";
			status = "disabled";
		};

		spi@7e204000 {
			compatible = "brcm,bcm2835-spi";
			reg = <0x7e204000 0x1000>;
			interrupts = <0x2 0x16>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "disabled";
		};

		i2c@7e205000 {
			compatible = "brcm,bcm2835-i2c";
			reg = <0x7e205000 0x1000>;
			interrupts = <0x2 0x15>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x6>;
			clock-frequency = <0x186a0>;
		};

		pixelvalve@7e206000 {
			compatible = "brcm,bcm2835-pixelvalve0";
			reg = <0x7e206000 0x100>;
			interrupts = <0x2 0xd>;
		};

		pixelvalve@7e207000 {
			compatible = "brcm,bcm2835-pixelvalve1";
			reg = <0x7e207000 0x100>;
			interrupts = <0x2 0xe>;
		};

		thermal@7e212000 {
			compatible = "brcm,bcm2837-thermal";
			reg = <0x7e212000 0x8>;
			clocks = <0x4 0x1b>;
			status = "okay";
		};

		aux@0x7e215000 {
			compatible = "brcm,bcm2835-aux";
			#clock-cells = <0x1>;
			reg = <0x7e215000 0x8>;
			clocks = <0x4 0x14>;
			linux,phandle = <0x7>;
			phandle = <0x7>;
		};

		serial@7e215040 {
			compatible = "brcm,bcm2835-aux-uart";
			reg = <0x7e215040 0x40>;
			interrupts = <0x1 0x1d>;
			clocks = <0x7 0x0>;
			status = "okay";
		};

		spi@7e215080 {
			compatible = "brcm,bcm2835-aux-spi";
			reg = <0x7e215080 0x40>;
			interrupts = <0x1 0x1d>;
			clocks = <0x7 0x1>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "disabled";
		};

		spi@7e2150c0 {
			compatible = "brcm,bcm2835-aux-spi";
			reg = <0x7e2150c0 0x40>;
			interrupts = <0x1 0x1d>;
			clocks = <0x7 0x2>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "disabled";
		};

		pwm@7e20c000 {
			compatible = "brcm,bcm2835-pwm";
			reg = <0x7e20c000 0x28>;
			clocks = <0x4 0x1e>;
			assigned-clocks = <0x4 0x1e>;
			assigned-clock-rates = <0x989680>;
			#pwm-cells = <0x2>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0x8 0x9>;
		};

		sdhci@7e300000 {
			compatible = "brcm,bcm2835-sdhci";
			reg = <0x7e300000 0x100>;
			interrupts = <0x2 0x1e>;
			clocks = <0x4 0x1c>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0xa>;
			bus-width = <0x4>;
		};

		hvs@7e400000 {
			compatible = "brcm,bcm2835-hvs";
			reg = <0x7e400000 0x6000>;
			interrupts = <0x2 0x1>;
		};

		i2c@7e804000 {
			compatible = "brcm,bcm2835-i2c";
			reg = <0x7e804000 0x1000>;
			interrupts = <0x2 0x15>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			pinctrl-names = "default";
			pinctrl-0 = <0xb>;
			clock-frequency = <0x186a0>;
		};

		i2c@7e805000 {
			compatible = "brcm,bcm2835-i2c";
			reg = <0x7e805000 0x1000>;
			interrupts = <0x2 0x15>;
			clocks = <0x4 0x14>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			status = "okay";
			linux,phandle = <0xd>;
			phandle = <0xd>;
		};

		vec@7e806000 {
			compatible = "brcm,bcm2835-vec";
			reg = <0x7e806000 0x1000>;
			clocks = <0x4 0x18>;
			interrupts = <0x2 0x1b>;
			status = "okay";
			power-domains = <0xc 0x7>;
		};

		pixelvalve@7e807000 {
			compatible = "brcm,bcm2835-pixelvalve2";
			reg = <0x7e807000 0x100>;
			interrupts = <0x2 0xa>;
		};

		hdmi@7e902000 {
			compatible = "brcm,bcm2835-hdmi";
			reg = <0x7e902000 0x600 0x7e808000 0x100>;
			interrupts = <0x2 0x8 0x2 0x9>;
			ddc = <0xd>;
			clocks = <0x4 0x10 0x4 0x19>;
			clock-names = "pixel", "hdmi";
			status = "okay";
			power-domains = <0xc 0x5>;
		};

		usb@7e980000 {
			compatible = "brcm,bcm2835-usb";
			reg = <0x7e980000 0x10000>;
			interrupts = <0x1 0x9>;
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			clocks = <0xe>;
			clock-names = "otg";
			power-domains = <0xc 0x6>;
			dr_mode = "host";

			usb1@1 {
				compatible = "usb424,9514";
				reg = <0x1>;
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				usbether@1 {
					compatible = "usb424,ec00";
					reg = <0x1>;
				};
			};
		};

		v3d@7ec00000 {
			compatible = "brcm,bcm2835-v3d";
			reg = <0x7ec00000 0x1000>;
			interrupts = <0x1 0xa>;
			power-domains = <0xc 0xa>;
		};

		gpu {
			compatible = "brcm,bcm2835-vc4";
			status = "disabled";
		};

		local_intc {
			compatible = "brcm,bcm2836-l1-intc";
			reg = <0x40000000 0x100>;
			interrupt-controller;
			#interrupt-cells = <0x1>;
			interrupt-parent = <0x2>;
			linux,phandle = <0x2>;
			phandle = <0x2>;
		};

		firmware {
			compatible = "raspberrypi,bcm2835-firmware";
			mboxes = <0xf>;
			linux,phandle = <0x10>;
			phandle = <0x10>;
		};

		power {
			compatible = "raspberrypi,bcm2835-power";
			firmware = <0x10>;
			#power-domain-cells = <0x1>;
			linux,phandle = <0xc>;
			phandle = <0xc>;
		};

		vchiq {
			compatible = "brcm,bcm2835-vchiq";
			reg = <0x7e00b840 0xf>;
			interrupts = <0x0 0x2>;
			cache-line-size = <0x20>;
			firmware = <0x10>;
			linux,phandle = <0x12>;
			phandle = <0x12>;
		};

		fb {
			status = "disabled";
		};

		audio {
			compatible = "brcm,bcm2835-audio";
			brcm,pwm-channels = <0x8>;
		};
	};

	clocks {
		compatible = "simple-bus";
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		clock@3 {
			compatible = "fixed-clock";
			reg = <0x3>;
			#clock-cells = <0x0>;
			clock-output-names = "osc";
			clock-frequency = <0x124f800>;
			linux,phandle = <0x3>;
			phandle = <0x3>;
		};

		clock@4 {
			compatible = "fixed-clock";
			reg = <0x4>;
			#clock-cells = <0x0>;
			clock-output-names = "otg";
			clock-frequency = <0x1c9c3800>;
			linux,phandle = <0xe>;
			phandle = <0xe>;
		};
	};

	timer {
		compatible = "arm,armv7-timer";
		interrupt-parent = <0x2>;
		interrupts = <0x0 0x1 0x3 0x2>;
		always-on;
	};

	cpus {
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		cpu@0 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x0>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xd8>;
		};

		cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x1>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xe0>;
		};

		cpu@2 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x2>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xe8>;
		};

		cpu@3 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x3>;
			enable-method = "spin-table";
			cpu-release-addr = <0x0 0xf0>;
		};
	};

	memory {
		device_type = "memory";
		reg = <0x0 0x40000000>;
	};

	leds {
		compatible = "gpio-leds";

		act {
			label = "ACT";
			default-state = "keep";
			linux,default-trigger = "heartbeat";
			gpios = <0x11 0x2f 0x0>;
		};
	};

	aliases {
		ethernet = "/soc/usb@7e980000/usb1@1/usbether@1";
	};

	__overrides__ {
		cache_line_size = [00 00 00 12 63 61 63 68 65 2d 6c 69 6e 65 2d 73 69 7a 65 3a 30 00];
	};
};

[toc] | [prev] | [next] | [standalone]


#1604442

FromStefan Wahren <stefan.wahren@i2se.com>
Date2017-03-20 13:00 +0100
Message-ID<tn48G-4dt-19@gated-at.bofh.it>
In reply to#1604374
Hi Mauro,


Am 20.03.2017 um 11:58 schrieb Mauro Carvalho Chehab:
> Em Sun, 19 Mar 2017 22:11:07 -0300
> Mauro Carvalho Chehab <mchehab@s-opensource.com> escreveu:
>
>> Em Sun, 19 Mar 2017 10:04:28 -0700
>> Michael Zoran <mzoran@crowfest.net> escreveu:
>>
>>> A working DT that I tried this morning with the current firmware is
>>> posted here:
>>> http://lists.infradead.org/pipermail/linux-rpi-kernel/2017-March/005924
>>> .html
>>>
>>> It even works with minecraft_pi!
> With the new firmware, sometime after booting, I'm getting an oops, caused
> by bcm2835_audio/vchiq:
>
> [  298.788995] Unable to handle kernel NULL pointer dereference at virtual address 00000034
> [  298.821458] pgd = ed004000
> [  298.832294] [00000034] *pgd=2e5e9835, *pte=00000000, *ppte=00000000
> [  298.857450] Internal error: Oops: 17 [#1] SMP ARM
> [  298.876273] Modules linked in: cfg80211 hid_logitech_hidpp hid_logitech_dj snd_bcm2835(C) snd_pcm snd_timer snd soundcore vchiq(C) uio_pdrv_genirq uio fuse
> [  298.932064] CPU: 3 PID: 847 Comm: pulseaudio Tainted: G         C      4.11.0-rc1+ #56
> [  298.963774] Hardware name: Generic DT based system
> [  298.982945] task: ef758580 task.stack: ee4c6000
> [  299.001080] PC is at mutex_lock+0x14/0x3c
> [  299.017148] LR is at vchiq_add_service_internal+0x138/0x3a0 [vchiq]
> [  299.042246] pc : [<c0c849d4>]    lr : [<bf059654>]    psr: 40000013
> sp : ee4c7ca8  ip : 00000000  fp : ef709800
> [  299.088240] r10: 00000000  r9 : ee3bffc0  r8 : 00000034
> [  299.109153] r7 : 00000003  r6 : 00000000  r5 : ee4c7d00  r4 : ee1d8c00
> [  299.135291] r3 : ef758580  r2 : 00000000  r1 : ffffffc8  r0 : 00000034
> [  299.161431] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
> [  299.190008] Control: 10c5383d  Table: 2d00406a  DAC: 00000051
> [  299.213011] Process pulseaudio (pid: 847, stack limit = 0xee4c6220)
> [  299.238104] Stack: (0xee4c7ca8 to 0xee4c8000)
> [  299.255539] 7ca0:                   c1403d54 80400040 ff7f0600 ff7f0660 bf06b578 ee3bffc0
> [  299.288301] 7cc0: 00000000 ee3afd00 00000000 ee4c7d00 00000000 bf0640b4 00000000 bf066428
> [  299.321064] 7ce0: ee3afd00 ee3afd00 ee4c7d34 ee3af444 ee3bffc0 ee3af444 ee3bffc0 bf0662ec
> [  299.353826] 7d00: 41554453 bf065db0 ee3afd00 00010002 bf0d7408 ee3af440 00000000 bf0d7408
> [  299.386587] 7d20: ee79bd80 bf0d5a04 00000000 ef709800 00000020 00000002 00000001 41554453
> [  299.419349] 7d40: 00000000 00000000 00000000 bf0d559c ee3af440 00000001 00000001 00000000
> [  299.452111] 7d60: ee24ac80 ee24ac80 ee1c4a00 00000000 ee79bd80 ee24ace8 00000001 bf0d4dfc
> [  299.484872] 7d80: 0000000b ffffffff ee4b8c3c 00000000 ee4c7dc8 ee4b8800 ee4b8c28 ee4c6000
> [  299.517635] 7da0: 00000000 ee4b8c3c ed029e40 bf0c0404 ee4b8800 ee1c4a00 ee4b8800 ed029e40
> [  299.550398] 7dc0: 00000000 bf0c0560 ee072340 00000000 ef758580 c0367b7c ee4b8c40 ee4b8c40
> [  299.583161] 7de0: 00000000 ee4b8800 ed029e40 ee318f80 ed029e40 00000006 ee318f80 bf0c0748
> [  299.615924] 7e00: bf0a3430 ee4f6180 00000000 c0428fe0 ee318f80 000021b0 00000026 ed029e40
> [  299.648697] 7e20: ee318f80 ed029e48 c0428f1c ee4c7e94 00000006 c0421cc0 ee4c7ed0 00000000
> [  299.681464] 7e40: 00000802 00000000 ee4c7e94 00000006 ee318f80 c0432c8c ee4c7f40 c0433bc0
> [  299.714225] 7e60: 00000000 ed029e40 00000000 00000041 00000000 ed004000 00000000 ee4c6000
> [  299.746987] 7e80: eec69808 00000005 00000000 00000002 ee318f80 ef0d2910 ee924908 bf0ba284
> [  299.779750] 7ea0: ee31bbc0 bebb53c4 ee4e1d00 00000011 ee4c7f74 00000001 fffff000 c0308b04
> [  299.812512] 7ec0: ee4c6000 00000000 bebb5710 c0434578 ef0d2910 ee924908 73541c18 00000008
> [  299.845274] 7ee0: ee4a7019 00000000 00000000 ee899bb0 ee318f80 00000101 00000002 00000084
> [  299.878037] 7f00: 00000000 00000000 00000000 ee4c7f10 ee318df8 ed029840 40045532 bebb53c4
> [  299.910799] 7f20: ee4c6000 ee4a7000 c1403ef8 bebb550c 00000011 ee5eca00 00000020 ee5eca18
> [  299.943562] 7f40: ee4a7000 00000000 00080802 00000002 ffffff9c fffff000 00000011 ffffff9c
> [  299.976324] 7f60: ee4a7000 c0422e70 00000002 c04359b0 ed029840 00000802 ed020000 00000006
> [  300.009086] 7f80: 00000100 00000001 00000000 ffffffff 00000004 b189d000 00000005 c0308b04
> [  300.041848] 7fa0: ee4c6000 c0308940 ffffffff 00000004 bebb550c 00080802 bebb53c4 00084b58
> [  300.074611] 7fc0: ffffffff 00000004 b189d000 00000005 00000000 bebb550c 00099448 bebb5710
> [  300.107373] 7fe0: 00000000 bebb53c8 b6c40da4 b6c24334 80000010 bebb550c 2fffd861 2fffdc61
> [  300.140190] [<c0c849d4>] (mutex_lock) from [<bf059654>] (vchiq_add_service_internal+0x138/0x3a0 [vchiq])
> [  300.178237] [<bf059654>] (vchiq_add_service_internal [vchiq]) from [<bf0640b4>] (vchiq_open_service+0x58/0xf0 [vchiq])
> [  300.221152] [<bf0640b4>] (vchiq_open_service [vchiq]) from [<bf0662ec>] (vchi_service_open+0x74/0xa8 [vchiq])
> [  300.260919] [<bf0662ec>] (vchi_service_open [vchiq]) from [<bf0d5a04>] (bcm2835_audio_open+0xe8/0x2d0 [snd_bcm2835])
> [  300.303111] [<bf0d5a04>] (bcm2835_audio_open [snd_bcm2835]) from [<bf0d4dfc>] (snd_bcm2835_playback_open_generic+0xc0/0x1c4 [snd_bcm2835])
> [  300.352975] [<bf0d4dfc>] (snd_bcm2835_playback_open_generic [snd_bcm2835]) from [<bf0c0404>] (snd_pcm_open_substream+0x60/0x110 [snd_pcm])
> [  300.402848] [<bf0c0404>] (snd_pcm_open_substream [snd_pcm]) from [<bf0c0560>] (snd_pcm_open+0xac/0x1fc [snd_pcm])
> [  300.444009] [<bf0c0560>] (snd_pcm_open [snd_pcm]) from [<bf0c0748>] (snd_pcm_playback_open+0x3c/0x5c [snd_pcm])
> [  300.484459] [<bf0c0748>] (snd_pcm_playback_open [snd_pcm]) from [<c0428fe0>] (chrdev_open+0xc4/0x180)
> [  300.521408] [<c0428fe0>] (chrdev_open) from [<c0421cc0>] (do_dentry_open.constprop.3+0x1fc/0x304)
> [  300.556964] [<c0421cc0>] (do_dentry_open.constprop.3) from [<c0432c8c>] (path_openat+0x588/0x1078)
> [  300.592866] [<c0432c8c>] (path_openat) from [<c0434578>] (do_filp_open+0x60/0xc4)
> [  300.622846] [<c0434578>] (do_filp_open) from [<c0422e70>] (do_sys_open+0x110/0x1c0)
> [  300.653524] [<c0422e70>] (do_sys_open) from [<c0308940>] (ret_fast_syscall+0x0/0x3c)
>
>
> Thanks,
> Mauro
>
> _______________________________________________
> linux-rpi-kernel mailing list
> linux-rpi-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rpi-kernel

can you try to revert this change: 001943e8ea3c8 ("staging: 
vc04_services: Refactor conditionals")?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web