All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
@ 2018-10-25 15:29 Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera Stefan Wahren
                   ` (12 more replies)
  0 siblings, 13 replies; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series improves the load/unload of bcm2835 camera and audio
drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.

This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ
cache line size handling"). After Nicolas' series ("staging: vc04_services:
Some dead code removal") has been applied, i will rebase my series.

Stefan Wahren (11):
  staging: bcm2835-camera: Abort probe if there is no camera
  staging: bcm2835-camera: fix module autoloading
  staging: bcm2835-camera: Move module info to the end
  staging: vchiq_arm: Fix platform device unregistration
  staging: vchiq_arm: Fix camera device registration
  staging: vchiq_arm: Register a platform device for audio
  staging: bcm2835-audio: Enable compile test
  staging: bcm2835-audio: use module_platform_driver() macro
  staging: bcm2835-audio: Drop DT dependency
  staging: bcm2835-camera: Provide more specific probe error messages
  staging: bcm2835-camera: Add hint about possible faulty config

 .../staging/vc04_services/bcm2835-audio/Kconfig    |  2 +-
 .../staging/vc04_services/bcm2835-audio/bcm2835.c  | 61 ++++++-----------
 .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 78 +++++++++++++++-------
 .../vc04_services/bcm2835-camera/mmal-vchiq.c      |  5 +-
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c  | 27 ++++++--
 5 files changed, 102 insertions(+), 71 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-12-19  8:07   ` Peter Robinson
  2018-10-25 15:29 ` [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading Stefan Wahren
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Abort the probing of the camera driver in case there isn't a camera
actually connected to the Raspberry Pi. This solution also avoids a
NULL ptr dereference of mmal instance on driver unload.

Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index c04bdf0..d6fbef7 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1841,6 +1841,12 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
 	num_cameras = get_num_cameras(instance,
 				      resolutions,
 				      MAX_BCM2835_CAMERAS);
+
+	if (num_cameras < 1) {
+		ret = -ENODEV;
+		goto cleanup_mmal;
+	}
+
 	if (num_cameras > MAX_BCM2835_CAMERAS)
 		num_cameras = MAX_BCM2835_CAMERAS;
 
@@ -1940,6 +1946,9 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
 	pr_info("%s: error %d while loading driver\n",
 		BM2835_MMAL_MODULE_NAME, ret);
 
+cleanup_mmal:
+	vchiq_mmal_finalise(instance);
+
 	return ret;
 }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-12-19  7:54   ` Peter Robinson
  2018-10-25 15:29 ` [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end Stefan Wahren
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

In order to make the module bcm2835-camera load automatically, we need to
add a module alias.

Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index d6fbef7..7d3222c 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
 MODULE_AUTHOR("Vincent Sanders");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(BM2835_MMAL_VERSION);
+MODULE_ALIAS("platform:bcm2835-camera");
 
 int bcm2835_v4l2_debug;
 module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-12-19  7:53   ` Peter Robinson
  2018-10-25 15:29 ` [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration Stefan Wahren
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

In order to have this more consistent between the vc04 services move
the module information to the end of the file.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index 7d3222c..cd773eb 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -43,12 +43,6 @@
 
 #define MAX_BCM2835_CAMERAS 2
 
-MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
-MODULE_AUTHOR("Vincent Sanders");
-MODULE_LICENSE("GPL");
-MODULE_VERSION(BM2835_MMAL_VERSION);
-MODULE_ALIAS("platform:bcm2835-camera");
-
 int bcm2835_v4l2_debug;
 module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
 MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2");
@@ -1976,3 +1970,9 @@ static struct platform_driver bcm2835_camera_driver = {
 };
 
 module_platform_driver(bcm2835_camera_driver)
+
+MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
+MODULE_AUTHOR("Vincent Sanders");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(BM2835_MMAL_VERSION);
+MODULE_ALIAS("platform:bcm2835-camera");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (2 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-26  8:07   ` Dan Carpenter
  2018-10-25 15:29 ` [PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration Stefan Wahren
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

In error case platform_device_register_data would return an ERR_PTR
instead of NULL. So we better check this before unregistration.

Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index ea78937..d7d7c2f0 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -3672,7 +3672,8 @@ static int vchiq_probe(struct platform_device *pdev)
 
 static int vchiq_remove(struct platform_device *pdev)
 {
-	platform_device_unregister(bcm2835_camera);
+	if (!IS_ERR(bcm2835_camera))
+		platform_device_unregister(bcm2835_camera);
 	vchiq_debugfs_deinit();
 	device_destroy(vchiq_class, vchiq_devid);
 	class_destroy(vchiq_class);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (3 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio Stefan Wahren
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Since the camera driver isn't probed via DT, we need to properly setup DMA.

Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c    | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index d7d7c2f0..778a252 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -49,6 +49,7 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/compat.h>
+#include <linux/dma-mapping.h>
 #include <soc/bcm2835/raspberrypi-firmware.h>
 
 #include "vchiq_core.h"
@@ -3588,6 +3589,21 @@ static const struct of_device_id vchiq_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, vchiq_of_match);
 
+static struct platform_device *
+vchiq_register_child(struct platform_device *pdev, const char *name)
+{
+	struct platform_device_info pdevinfo;
+
+	memset(&pdevinfo, 0, sizeof(pdevinfo));
+
+	pdevinfo.parent = &pdev->dev;
+	pdevinfo.name = name;
+	pdevinfo.id = PLATFORM_DEVID_NONE;
+	pdevinfo.dma_mask = DMA_BIT_MASK(32);
+
+	return platform_device_register_full(&pdevinfo);
+}
+
 static int vchiq_probe(struct platform_device *pdev)
 {
 	struct device_node *fw_node;
@@ -3653,9 +3669,7 @@ static int vchiq_probe(struct platform_device *pdev)
 		VCHIQ_VERSION, VCHIQ_VERSION_MIN,
 		MAJOR(vchiq_devid), MINOR(vchiq_devid));
 
-	bcm2835_camera = platform_device_register_data(&pdev->dev,
-						       "bcm2835-camera", -1,
-						       NULL, 0);
+	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
 
 	return 0;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (4 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-26  8:09   ` Dan Carpenter
  2018-10-25 15:29 ` [PATCH RFC 07/11] staging: bcm2835-audio: Enable compile test Stefan Wahren
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a
platform device for the camera driver.") this register the audio driver as
a platform device, too.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 778a252..fc6388b 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -170,6 +170,7 @@ static struct class  *vchiq_class;
 static struct device *vchiq_dev;
 static DEFINE_SPINLOCK(msg_queue_spinlock);
 static struct platform_device *bcm2835_camera;
+static struct platform_device *bcm2835_audio;
 
 static struct vchiq_drvdata bcm2835_drvdata = {
 	.cache_line_size = 32,
@@ -3670,6 +3671,7 @@ static int vchiq_probe(struct platform_device *pdev)
 		MAJOR(vchiq_devid), MINOR(vchiq_devid));
 
 	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
+	bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
 
 	return 0;
 
@@ -3686,6 +3688,8 @@ static int vchiq_probe(struct platform_device *pdev)
 
 static int vchiq_remove(struct platform_device *pdev)
 {
+	if (!IS_ERR(bcm2835_audio))
+		platform_device_unregister(bcm2835_audio);
 	if (!IS_ERR(bcm2835_camera))
 		platform_device_unregister(bcm2835_camera);
 	vchiq_debugfs_deinit();
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 07/11] staging: bcm2835-audio: Enable compile test
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (5 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 08/11] staging: bcm2835-audio: use module_platform_driver() macro Stefan Wahren
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Enable the compilation test for bcm2835-audio to gain more build coverage.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/staging/vc04_services/bcm2835-audio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/Kconfig b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
index 9f53653..62c1c8b 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/Kconfig
+++ b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
@@ -1,6 +1,6 @@
 config SND_BCM2835
         tristate "BCM2835 Audio"
-        depends on ARCH_BCM2835 && SND
+        depends on (ARCH_BCM2835 || COMPILE_TEST) && SND
         select SND_PCM
         select BCM2835_VCHIQ
         help
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 08/11] staging: bcm2835-audio: use module_platform_driver() macro
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (6 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 07/11] staging: bcm2835-audio: Enable compile test Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFX 09/11] staging: bcm2835-audio: Drop DT dependency Stefan Wahren
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

There is not much value behind this boilerplate, so use
module_platform_driver() instead.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../staging/vc04_services/bcm2835-audio/bcm2835.c    | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
index 87d56ab..87a27fd 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
@@ -356,25 +356,7 @@ static struct platform_driver bcm2835_alsa0_driver = {
 		.of_match_table = snd_bcm2835_of_match_table,
 	},
 };
-
-static int bcm2835_alsa_device_init(void)
-{
-	int retval;
-
-	retval = platform_driver_register(&bcm2835_alsa0_driver);
-	if (retval)
-		pr_err("Error registering bcm2835_audio driver %d .\n", retval);
-
-	return retval;
-}
-
-static void bcm2835_alsa_device_exit(void)
-{
-	platform_driver_unregister(&bcm2835_alsa0_driver);
-}
-
-late_initcall(bcm2835_alsa_device_init);
-module_exit(bcm2835_alsa_device_exit);
+module_platform_driver(bcm2835_alsa0_driver);
 
 MODULE_AUTHOR("Dom Cobley");
 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFX 09/11] staging: bcm2835-audio: Drop DT dependency
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (7 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 08/11] staging: bcm2835-audio: use module_platform_driver() macro Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 10/11] staging: bcm2835-camera: Provide more specific probe error messages Stefan Wahren
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Just like the bcm2835-video make this a platform driver which is probed
by vchiq. In order to change the number of channels use a module
parameter instead, but use the maximum as default.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../staging/vc04_services/bcm2835-audio/bcm2835.c  | 41 ++++++++++------------
 1 file changed, 19 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
index 87a27fd..5c5b600 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
@@ -4,15 +4,17 @@
 #include <linux/platform_device.h>
 
 #include <linux/init.h>
+#include <linux/dma-mapping.h>
+#include <linux/of_device.h>
 #include <linux/slab.h>
 #include <linux/module.h>
-#include <linux/of.h>
 
 #include "bcm2835.h"
 
 static bool enable_hdmi;
 static bool enable_headphones;
 static bool enable_compat_alsa = true;
+static int num_channels = MAX_SUBSTREAMS;
 
 module_param(enable_hdmi, bool, 0444);
 MODULE_PARM_DESC(enable_hdmi, "Enables HDMI virtual audio device");
@@ -21,6 +23,8 @@ MODULE_PARM_DESC(enable_headphones, "Enables Headphones virtual audio device");
 module_param(enable_compat_alsa, bool, 0444);
 MODULE_PARM_DESC(enable_compat_alsa,
 		 "Enables ALSA compatibility virtual audio device");
+module_param(num_channels, int, 0644);
+MODULE_PARM_DESC(num_channels, "Number of audio channels (default: 8)");
 
 static void bcm2835_devm_free_vchi_ctx(struct device *dev, void *res)
 {
@@ -293,31 +297,30 @@ static int snd_add_child_devices(struct device *device, u32 numchans)
 	return 0;
 }
 
-static int snd_bcm2835_alsa_probe_dt(struct platform_device *pdev)
+static int snd_bcm2835_alsa_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	u32 numchans;
 	int err;
 
-	err = of_property_read_u32(dev->of_node, "brcm,pwm-channels",
-				   &numchans);
-	if (err) {
-		dev_err(dev, "Failed to get DT property 'brcm,pwm-channels'");
-		return err;
+	if (num_channels <= 0 || num_channels > MAX_SUBSTREAMS) {
+		num_channels = MAX_SUBSTREAMS;
+		dev_warn(dev, "Illegal num_channels value, will use %u\n",
+			 num_channels);
 	}
 
-	if (numchans == 0 || numchans > MAX_SUBSTREAMS) {
-		numchans = MAX_SUBSTREAMS;
-		dev_warn(dev,
-			 "Illegal 'brcm,pwm-channels' value, will use %u\n",
-			 numchans);
+	dev->coherent_dma_mask = DMA_BIT_MASK(32);
+	dev->dma_mask = &dev->coherent_dma_mask;
+	err = of_dma_configure(dev, NULL, true);
+	if (err) {
+		dev_err(dev, "Unable to setup DMA: %d\n", err);
+		return err;
 	}
 
 	err = bcm2835_devm_add_vchi_ctx(dev);
 	if (err)
 		return err;
 
-	err = snd_add_child_devices(dev, numchans);
+	err = snd_add_child_devices(dev, num_channels);
 	if (err)
 		return err;
 
@@ -339,21 +342,14 @@ static int snd_bcm2835_alsa_resume(struct platform_device *pdev)
 
 #endif
 
-static const struct of_device_id snd_bcm2835_of_match_table[] = {
-	{ .compatible = "brcm,bcm2835-audio",},
-	{},
-};
-MODULE_DEVICE_TABLE(of, snd_bcm2835_of_match_table);
-
 static struct platform_driver bcm2835_alsa0_driver = {
-	.probe = snd_bcm2835_alsa_probe_dt,
+	.probe = snd_bcm2835_alsa_probe,
 #ifdef CONFIG_PM
 	.suspend = snd_bcm2835_alsa_suspend,
 	.resume = snd_bcm2835_alsa_resume,
 #endif
 	.driver = {
 		.name = "bcm2835_audio",
-		.of_match_table = snd_bcm2835_of_match_table,
 	},
 };
 module_platform_driver(bcm2835_alsa0_driver);
@@ -361,3 +357,4 @@ module_platform_driver(bcm2835_alsa0_driver);
 MODULE_AUTHOR("Dom Cobley");
 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:bcm2835_audio");
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 10/11] staging: bcm2835-camera: Provide more specific probe error messages
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (8 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFX 09/11] staging: bcm2835-audio: Drop DT dependency Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-25 15:29 ` [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config Stefan Wahren
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

Currently there is only a catch-all info message which print the
relevant error code without any context. So add more specific error
messages in order to narrow down possible issues.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 58 +++++++++++++++-------
 1 file changed, 39 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index cd773eb..84ca22d 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1539,8 +1539,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
 	struct vchiq_mmal_component  *camera;
 
 	ret = vchiq_mmal_init(&dev->instance);
-	if (ret < 0)
+	if (ret < 0) {
+		v4l2_err(&dev->v4l2_dev, "%s: vchiq mmal init failed %d\n",
+			 __func__, ret);
 		return ret;
+	}
 
 	/* get the camera component ready */
 	ret = vchiq_mmal_component_init(dev->instance, "ril.camera",
@@ -1549,7 +1552,9 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
 		goto unreg_mmal;
 
 	camera = dev->component[MMAL_COMPONENT_CAMERA];
-	if (camera->outputs <  MMAL_CAMERA_PORT_COUNT) {
+	if (camera->outputs < MMAL_CAMERA_PORT_COUNT) {
+		v4l2_err(&dev->v4l2_dev, "%s: too few camera outputs %d needed %d\n",
+			 __func__, camera->outputs, MMAL_CAMERA_PORT_COUNT);
 		ret = -EINVAL;
 		goto unreg_camera;
 	}
@@ -1557,8 +1562,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
 	ret = set_camera_parameters(dev->instance,
 				    camera,
 				    dev);
-	if (ret < 0)
+	if (ret < 0) {
+		v4l2_err(&dev->v4l2_dev, "%s: unable to set camera parameters: %d\n",
+			 __func__, ret);
 		goto unreg_camera;
+	}
 
 	/* There was an error in the firmware that meant the camera component
 	 * produced BGR instead of RGB.
@@ -1647,8 +1655,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
 
 	if (dev->component[MMAL_COMPONENT_PREVIEW]->inputs < 1) {
 		ret = -EINVAL;
-		pr_debug("too few input ports %d needed %d\n",
-			 dev->component[MMAL_COMPONENT_PREVIEW]->inputs, 1);
+		v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n",
+			 __func__, dev->component[MMAL_COMPONENT_PREVIEW]->inputs, 1);
 		goto unreg_preview;
 	}
 
@@ -1661,8 +1669,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
 
 	if (dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs < 1) {
 		ret = -EINVAL;
-		v4l2_err(&dev->v4l2_dev, "too few input ports %d needed %d\n",
-			 dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs,
+		v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n",
+			 __func__, dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs,
 			 1);
 		goto unreg_image_encoder;
 	}
@@ -1676,8 +1684,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
 
 	if (dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs < 1) {
 		ret = -EINVAL;
-		v4l2_err(&dev->v4l2_dev, "too few input ports %d needed %d\n",
-			 dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs,
+		v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n",
+			 __func__, dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs,
 			 1);
 		goto unreg_vid_encoder;
 	}
@@ -1706,8 +1714,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev)
 					      sizeof(enable));
 	}
 	ret = bm2835_mmal_set_all_camera_controls(dev);
-	if (ret < 0)
+	if (ret < 0) {
+		v4l2_err(&dev->v4l2_dev, "%s: failed to set all camera controls: %d\n",
+			 __func__, ret);
 		goto unreg_vid_encoder;
+	}
 
 	return 0;
 
@@ -1873,21 +1884,29 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
 		snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
 			 "%s", BM2835_MMAL_MODULE_NAME);
 		ret = v4l2_device_register(NULL, &dev->v4l2_dev);
-		if (ret)
+		if (ret) {
+			dev_err(&pdev->dev, "%s: could not register V4L2 device: %d\n",
+				__func__, ret);
 			goto free_dev;
+		}
 
 		/* setup v4l controls */
 		ret = bm2835_mmal_init_controls(dev, &dev->ctrl_handler);
-		if (ret < 0)
+		if (ret < 0) {
+			v4l2_err(&dev->v4l2_dev, "%s: could not init controls: %d\n",
+				__func__, ret);
 			goto unreg_dev;
+		}
 		dev->v4l2_dev.ctrl_handler = &dev->ctrl_handler;
 
 		/* mmal init */
 		dev->instance = instance;
 		ret = mmal_init(dev);
-		if (ret < 0)
+		if (ret < 0) {
+			v4l2_err(&dev->v4l2_dev, "%s: mmal init failed: %d\n",
+				 __func__, ret);
 			goto unreg_dev;
-
+		}
 		/* initialize queue */
 		q = &dev->capture.vb_vidq;
 		memset(q, 0, sizeof(*q));
@@ -1905,16 +1924,19 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
 
 		/* initialise video devices */
 		ret = bm2835_mmal_init_device(dev, &dev->vdev);
-		if (ret < 0)
+		if (ret < 0) {
+			v4l2_err(&dev->v4l2_dev, "%s: could not init device: %d\n",
+				 __func__, ret);
 			goto unreg_dev;
+		}
 
 		/* Really want to call vidioc_s_fmt_vid_cap with the default
 		 * format, but currently the APIs don't join up.
 		 */
 		ret = mmal_setup_components(dev, &default_v4l2_format);
 		if (ret < 0) {
-			v4l2_err(&dev->v4l2_dev,
-				 "%s: could not setup components\n", __func__);
+			v4l2_err(&dev->v4l2_dev, "%s: could not setup components: %d\n",
+				 __func__, ret);
 			goto unreg_dev;
 		}
 
@@ -1938,8 +1960,6 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
 		bcm2835_cleanup_instance(gdev[i]);
 		gdev[i] = NULL;
 	}
-	pr_info("%s: error %d while loading driver\n",
-		BM2835_MMAL_MODULE_NAME, ret);
 
 cleanup_mmal:
 	vchiq_mmal_finalise(instance);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (9 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 10/11] staging: bcm2835-camera: Provide more specific probe error messages Stefan Wahren
@ 2018-10-25 15:29 ` Stefan Wahren
  2018-10-26 10:55   ` Nicolas Saenz Julienne
  2018-10-26 11:06 ` [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Nicolas Saenz Julienne
  2019-01-08  7:21 ` Peter Robinson
  12 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2018-10-25 15:29 UTC (permalink / raw)
  To: linux-arm-kernel

As per default the GPU memory config of the Raspberry Pi isn't sufficient
for the camera usage. Even worse the bcm2835 camera driver doesn't provide a
helpful error message in this case. So let's add a hint to point the user
to the likely cause.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index cc2d993..bffd75d 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -1623,8 +1623,11 @@ int vchiq_mmal_component_init(struct vchiq_mmal_instance *instance,
 	component = &instance->component[instance->component_idx];
 
 	ret = create_component(instance, component, name);
-	if (ret < 0)
+	if (ret < 0) {
+		pr_err("%s: failed to create component %d (Not enough GPU mem?)\n",
+		       __func__, ret);
 		goto unlock;
+	}
 
 	/* ports info needs gathering */
 	component->control.type = MMAL_PORT_TYPE_CONTROL;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration
  2018-10-25 15:29 ` [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration Stefan Wahren
@ 2018-10-26  8:07   ` Dan Carpenter
  0 siblings, 0 replies; 37+ messages in thread
From: Dan Carpenter @ 2018-10-26  8:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 25, 2018 at 05:29:28PM +0200, Stefan Wahren wrote:
> In error case platform_device_register_data would return an ERR_PTR
> instead of NULL. So we better check this before unregistration.
> 
> Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.")
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index ea78937..d7d7c2f0 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -3672,7 +3672,8 @@ static int vchiq_probe(struct platform_device *pdev)
>  
>  static int vchiq_remove(struct platform_device *pdev)
>  {
> -	platform_device_unregister(bcm2835_camera);
> +	if (!IS_ERR(bcm2835_camera))
> +		platform_device_unregister(bcm2835_camera);

This wouldn't be needed if we checked for platform_device_register_data()
errors in probe.  That would be a better fix.

This is obviously a bug, but is it a real life bug, btw?  I would be
surprised if platform_device_register_data() actually failed.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio
  2018-10-25 15:29 ` [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio Stefan Wahren
@ 2018-10-26  8:09   ` Dan Carpenter
  2018-10-26  8:18     ` Dan Carpenter
  0 siblings, 1 reply; 37+ messages in thread
From: Dan Carpenter @ 2018-10-26  8:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 25, 2018 at 05:29:30PM +0200, Stefan Wahren wrote:
> Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a
> platform device for the camera driver.") this register the audio driver as
> a platform device, too.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> index 778a252..fc6388b 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> @@ -170,6 +170,7 @@ static struct class  *vchiq_class;
>  static struct device *vchiq_dev;
>  static DEFINE_SPINLOCK(msg_queue_spinlock);
>  static struct platform_device *bcm2835_camera;
> +static struct platform_device *bcm2835_audio;
>  
>  static struct vchiq_drvdata bcm2835_drvdata = {
>  	.cache_line_size = 32,
> @@ -3670,6 +3671,7 @@ static int vchiq_probe(struct platform_device *pdev)
>  		MAJOR(vchiq_devid), MINOR(vchiq_devid));
>  
>  	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
> +	bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");

Same thing.  Check here and not in the remove function.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio
  2018-10-26  8:09   ` Dan Carpenter
@ 2018-10-26  8:18     ` Dan Carpenter
  0 siblings, 0 replies; 37+ messages in thread
From: Dan Carpenter @ 2018-10-26  8:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 26, 2018 at 11:09:31AM +0300, Dan Carpenter wrote:
> On Thu, Oct 25, 2018 at 05:29:30PM +0200, Stefan Wahren wrote:
> > Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a
> > platform device for the camera driver.") this register the audio driver as
> > a platform device, too.
> > 
> > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > ---
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > index 778a252..fc6388b 100644
> > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > @@ -170,6 +170,7 @@ static struct class  *vchiq_class;
> >  static struct device *vchiq_dev;
> >  static DEFINE_SPINLOCK(msg_queue_spinlock);
> >  static struct platform_device *bcm2835_camera;
> > +static struct platform_device *bcm2835_audio;
> >  
> >  static struct vchiq_drvdata bcm2835_drvdata = {
> >  	.cache_line_size = 32,
> > @@ -3670,6 +3671,7 @@ static int vchiq_probe(struct platform_device *pdev)
> >  		MAJOR(vchiq_devid), MINOR(vchiq_devid));
> >  
> >  	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
> > +	bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
> 
> Same thing.  Check here and not in the remove function.
> 

Never mind.  I see what you're doing now that you have both camera and
audio.  You want it to still load even if one is not present.  That's
fine.

I am slightly uncomfortable just leaving error pointers lying around.
It might be nicer to just do:

	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
	if (IS_ERR(bcm2835_camera)) {
		dev_err(pdev, "bcm2835-camera not registered.\n");
		bcm2835_camera = NULL;
	}

In that case NULL becomes a special case of success.  The unregister
functions accept NULL pointers so they wouldn't need to be changed.

Btw, if these had been normal patch instead of RFC we would have just
applied them and I wouldn't have complained.  But since you're
deliberately requesting comments anyway, then ...

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config
  2018-10-25 15:29 ` [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config Stefan Wahren
@ 2018-10-26 10:55   ` Nicolas Saenz Julienne
  0 siblings, 0 replies; 37+ messages in thread
From: Nicolas Saenz Julienne @ 2018-10-26 10:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 2018-10-25 at 17:29 +0200, Stefan Wahren wrote:
> As per default the GPU memory config of the Raspberry Pi isn't
> sufficient
> for the camera usage. Even worse the bcm2835 camera driver doesn't
> provide a
> helpful error message in this case. So let's add a hint to point the
> user
> to the likely cause.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-
> vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
> index cc2d993..bffd75d 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
> @@ -1623,8 +1623,11 @@ int vchiq_mmal_component_init(struct
> vchiq_mmal_instance *instance,
>  	component = &instance->component[instance->component_idx];
>  
>  	ret = create_component(instance, component, name);
> -	if (ret < 0)
> +	if (ret < 0) {
> +		pr_err("%s: failed to create component %d (Not enough
> GPU mem?)\n",
> +		       __func__, ret);
>  		goto unlock;
> +	}
>  
>  	/* ports info needs gathering */
>  	component->control.type = MMAL_PORT_TYPE_CONTROL;

Nice, had to deal with this the hard way, would have saved me some
time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181026/04268762/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (10 preceding siblings ...)
  2018-10-25 15:29 ` [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config Stefan Wahren
@ 2018-10-26 11:06 ` Nicolas Saenz Julienne
  2018-10-28 20:10   ` Stefan Wahren
  2019-01-08  7:21 ` Peter Robinson
  12 siblings, 1 reply; 37+ messages in thread
From: Nicolas Saenz Julienne @ 2018-10-26 11:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Stefan,

On Thu, 2018-10-25 at 17:29 +0200, Stefan Wahren wrote:
> This patch series improves the load/unload of bcm2835 camera and
> audio
> drivers. It has been tested with Raspberry Pi 3 B and a camera module
> V1.
> 
> This series based on current linux-next and Phil Elwell's series
> ("Improve VCHIQ
> cache line size handling"). After Nicolas' series ("staging:
> vc04_services:
> Some dead code removal") has been applied, i will rebase my series.
> 
> Stefan Wahren (11):
>   staging: bcm2835-camera: Abort probe if there is no camera
>   staging: bcm2835-camera: fix module autoloading
>   staging: bcm2835-camera: Move module info to the end
>   staging: vchiq_arm: Fix platform device unregistration
>   staging: vchiq_arm: Fix camera device registration
>   staging: vchiq_arm: Register a platform device for audio
>   staging: bcm2835-audio: Enable compile test
>   staging: bcm2835-audio: use module_platform_driver() macro
>   staging: bcm2835-audio: Drop DT dependency
>   staging: bcm2835-camera: Provide more specific probe error messages
>   staging: bcm2835-camera: Add hint about possible faulty config
> 
>  .../staging/vc04_services/bcm2835-audio/Kconfig    |  2 +-
>  .../staging/vc04_services/bcm2835-audio/bcm2835.c  | 61 ++++++----
> -------
>  .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 78
> +++++++++++++++-------
>  .../vc04_services/bcm2835-camera/mmal-vchiq.c      |  5 +-
>  .../vc04_services/interface/vchiq_arm/vchiq_arm.c  | 27 ++++++--
>  5 files changed, 102 insertions(+), 71 deletions(-)
> 

I prefer Dan's approach to error checking in vchiq_probe(). Apart from
that seems good to me.

Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

Regards,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20181026/a9837357/attachment.sig>

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2018-10-26 11:06 ` [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Nicolas Saenz Julienne
@ 2018-10-28 20:10   ` Stefan Wahren
  0 siblings, 0 replies; 37+ messages in thread
From: Stefan Wahren @ 2018-10-28 20:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

> Nicolas Saenz Julienne <nsaenzjulienne@suse.de> hat am 26. Oktober 2018 um 13:06 geschrieben:
> 
> 
> Hi Stefan,
> 
> On Thu, 2018-10-25 at 17:29 +0200, Stefan Wahren wrote:
> > This patch series improves the load/unload of bcm2835 camera and
> > audio
> > drivers. It has been tested with Raspberry Pi 3 B and a camera module
> > V1.
> > 
> > This series based on current linux-next and Phil Elwell's series
> > ("Improve VCHIQ
> > cache line size handling"). After Nicolas' series ("staging:
> > vc04_services:
> > Some dead code removal") has been applied, i will rebase my series.
> > 
> > Stefan Wahren (11):
> >   staging: bcm2835-camera: Abort probe if there is no camera
> >   staging: bcm2835-camera: fix module autoloading
> >   staging: bcm2835-camera: Move module info to the end
> >   staging: vchiq_arm: Fix platform device unregistration
> >   staging: vchiq_arm: Fix camera device registration
> >   staging: vchiq_arm: Register a platform device for audio
> >   staging: bcm2835-audio: Enable compile test
> >   staging: bcm2835-audio: use module_platform_driver() macro
> >   staging: bcm2835-audio: Drop DT dependency
> >   staging: bcm2835-camera: Provide more specific probe error messages
> >   staging: bcm2835-camera: Add hint about possible faulty config
> > 
> >  .../staging/vc04_services/bcm2835-audio/Kconfig    |  2 +-
> >  .../staging/vc04_services/bcm2835-audio/bcm2835.c  | 61 ++++++----
> > -------
> >  .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 78
> > +++++++++++++++-------
> >  .../vc04_services/bcm2835-camera/mmal-vchiq.c      |  5 +-
> >  .../vc04_services/interface/vchiq_arm/vchiq_arm.c  | 27 ++++++--
> >  5 files changed, 102 insertions(+), 71 deletions(-)
> > 
> 
> I prefer Dan's approach to error checking in vchiq_probe(). Apart from
> that seems good to me.
> 
> Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

unfortunately there is a issue with this series, after enabling the memleak detector i'm getting this:

unreferenced object 0xec9c9300 (size 64):
comm "systemd-udevd", pid 182, jiffies 4294937996 (age 1376.140s)
hex dump (first 32 bytes):
ff ff ff ff 00 00 00 00 2f 70 6c 61 74 66 6f 72 ......../platfor
6d 2f 73 6f 63 2f 33 66 30 30 62 38 34 30 2e 6d m/soc/3f00b840.m
backtrace:
[<9d7676d1>] vchiq_register_child+0x58/0x74 [vchiq]
[<6a2780cc>] vchiq_probe+0x1c0/0x264 [vchiq]
[<278d830e>] platform_drv_probe+0x48/0x98
[<c9846b79>] really_probe+0x228/0x2d0
[<489d6b89>] driver_probe_device+0x60/0x164
[<ccf84a43>] __driver_attach+0xd0/0xd4
[<042acada>] bus_for_each_dev+0x74/0xb4
[<b04ae13a>] bus_add_driver+0x18c/0x210
[<a66d3fa5>] driver_register+0x7c/0x114
[<a7353eeb>] do_one_initcall+0x54/0x1fc
[<9420261f>] do_init_module+0x64/0x1f4
[<571c859a>] load_module+0x1dfc/0x24bc
[<06885682>] sys_finit_module+0xac/0xd8
[<85e18c3d>] __sys_trace_return+0x0/0x20
[<0051c54d>] 0xbecb0898
[<0a0ced8e>] 0xffffffff

> 
> Regards,
> Nicolas
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end
  2018-10-25 15:29 ` [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end Stefan Wahren
@ 2018-12-19  7:53   ` Peter Robinson
  0 siblings, 0 replies; 37+ messages in thread
From: Peter Robinson @ 2018-12-19  7:53 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

On Thu, Oct 25, 2018 at 4:30 PM Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> In order to have this more consistent between the vc04 services move
> the module information to the end of the file.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>

Tested with a v2 camera module.

> ---
>  .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c    | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index 7d3222c..cd773eb 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -43,12 +43,6 @@
>
>  #define MAX_BCM2835_CAMERAS 2
>
> -MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
> -MODULE_AUTHOR("Vincent Sanders");
> -MODULE_LICENSE("GPL");
> -MODULE_VERSION(BM2835_MMAL_VERSION);
> -MODULE_ALIAS("platform:bcm2835-camera");
> -
>  int bcm2835_v4l2_debug;
>  module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
>  MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2");
> @@ -1976,3 +1970,9 @@ static struct platform_driver bcm2835_camera_driver = {
>  };
>
>  module_platform_driver(bcm2835_camera_driver)
> +
> +MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
> +MODULE_AUTHOR("Vincent Sanders");
> +MODULE_LICENSE("GPL");
> +MODULE_VERSION(BM2835_MMAL_VERSION);
> +MODULE_ALIAS("platform:bcm2835-camera");
> --
> 2.7.4
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading
  2018-10-25 15:29 ` [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading Stefan Wahren
@ 2018-12-19  7:54   ` Peter Robinson
  0 siblings, 0 replies; 37+ messages in thread
From: Peter Robinson @ 2018-12-19  7:54 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

On Thu, Oct 25, 2018 at 4:30 PM Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> In order to make the module bcm2835-camera load automatically, we need to
> add a module alias.
>
> Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.")
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>

Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>

Tested with a v2 camera module and kernel module loads automatically
as expected.

> ---
>  drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index d6fbef7..7d3222c 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
>  MODULE_AUTHOR("Vincent Sanders");
>  MODULE_LICENSE("GPL");
>  MODULE_VERSION(BM2835_MMAL_VERSION);
> +MODULE_ALIAS("platform:bcm2835-camera");
>
>  int bcm2835_v4l2_debug;
>  module_param_named(debug, bcm2835_v4l2_debug, int, 0644);
> --
> 2.7.4
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera
  2018-10-25 15:29 ` [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera Stefan Wahren
@ 2018-12-19  8:07   ` Peter Robinson
  0 siblings, 0 replies; 37+ messages in thread
From: Peter Robinson @ 2018-12-19  8:07 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

On Thu, Oct 25, 2018 at 4:30 PM Stefan Wahren <stefan.wahren@i2se.com> wrote:
>
> Abort the probing of the camera driver in case there isn't a camera
> actually connected to the Raspberry Pi. This solution also avoids a
> NULL ptr dereference of mmal instance on driver unload.
>
> Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.")
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>

In testing this both with and without a camera module attached it
appears to still load the entire v4l stack even if there's no camera
attached and it remains post probe, the /dev/video0 interface doesn't
appear, which is what I'd expect, and from the dmesg output
with/without a camera module it certainly seems to do less. I'm not
sure if it's possible to detect whether we have a camera module before
we start up the full media/v4l stack and exit the process and unload
the module but I suspect having all the v4l bits loaded without
various interfaces might cause confusion.

# lsmod| grep v4l
bcm2835_v4l2           61440  0
videobuf2_vmalloc      20480  1 bcm2835_v4l2
videobuf2_v4l2         24576  1 bcm2835_v4l2
videobuf2_common       49152  2 bcm2835_v4l2,videobuf2_v4l2
v4l2_common            16384  1 bcm2835_v4l2
videodev              180224  4
v4l2_common,videobuf2_common,bcm2835_v4l2,videobuf2_v4l2
media                  49152  3 videobuf2_common,videodev,videobuf2_v4l2
vchiq                 237568  2 bcm2835_v4l2,snd_bcm2835

Peter

> ---
>  drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index c04bdf0..d6fbef7 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -1841,6 +1841,12 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
>         num_cameras = get_num_cameras(instance,
>                                       resolutions,
>                                       MAX_BCM2835_CAMERAS);
> +
> +       if (num_cameras < 1) {
> +               ret = -ENODEV;
> +               goto cleanup_mmal;
> +       }
> +
>         if (num_cameras > MAX_BCM2835_CAMERAS)
>                 num_cameras = MAX_BCM2835_CAMERAS;
>
> @@ -1940,6 +1946,9 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
>         pr_info("%s: error %d while loading driver\n",
>                 BM2835_MMAL_MODULE_NAME, ret);
>
> +cleanup_mmal:
> +       vchiq_mmal_finalise(instance);
> +
>         return ret;
>  }
>
> --
> 2.7.4
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
                   ` (11 preceding siblings ...)
  2018-10-26 11:06 ` [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Nicolas Saenz Julienne
@ 2019-01-08  7:21 ` Peter Robinson
  2019-01-08  8:48   ` Stefan Wahren
  2019-01-08 17:10   ` Dave Stevenson
  12 siblings, 2 replies; 37+ messages in thread
From: Peter Robinson @ 2019-01-08  7:21 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

Hi Stefan,

> This patch series improves the load/unload of bcm2835 camera and audio
> drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
>
> This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ
> cache line size handling"). After Nicolas' series ("staging: vc04_services:
> Some dead code removal") has been applied, i will rebase my series.

I tried testing this series applied to 4.20 with the camera module. I
tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
gstreamer. I basically get the same crash for both options. Desktop is
LXDE on 32 bit Fedora 29.

I've not yet tried with 5.0-rc1 but it looks like it has this patch
series and some other bits for the vchiq drivers in staging.

Peter

[  231.121704] bcm2835-v4l2: Failed enabling camera, ret -2
[  231.127168] bcm2835-v4l2: Failed to enable camera
[  231.132030] ------------[ cut here ]------------
[  231.136852] WARNING: CPU: 2 PID: 1473 at
drivers/media/common/videobuf2/videobuf2-core.c:1468
vb2_start_streaming+0xb4/0x12c [videobuf2_common]
[  231.149967] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables ip6table_filter ip6_tables cmac bnep sunrpc
vfat fat brcmfmac brcmutil vc4 cfg80211 snd_soc_core bcm2835_v4l2(C)
ac97_bus snd_bcm2835(C) videobuf2_vmalloc snd_pcm_dmaengine
videobuf2_memops snd_seq videobuf2_v4l2 videobuf2_common
snd_seq_device v4l2_common snd_pcm videodev media snd_timer snd
soundcore drm_kms_helper drm hci_uart btqca joydev btbcm btintel
fb_sys_fops syscopyarea bluetooth sysfillrect gpio_raspberrypi_exp
sysimgblt raspberrypi_hwmon bcm2835_thermal ecdh_generic vchiq(C)
rfkill bcm2835_wdt bcm2835_rng leds_gpio cpufreq_dt lz4 lz4_compress
zram hid_logitech_hidpp hid_logitech_dj smsc95xx usbnet mii mmc_block
dwc2 sdhci_iproc crc32_arm_ce
[  231.150208]  sdhci_pltfm udc_core sdhci bcm2835 pwm_bcm2835
i2c_bcm2835 bcm2835_dma phy_generic
[  231.248013] CPU: 2 PID: 1473 Comm: qv4l2 Tainted: G         C
 4.20.0-1.fc30.armv7hl #1
[  231.256663] Hardware name: BCM2835
[  231.260144] [<c03127a4>] (unwind_backtrace) from [<c030cbf0>]
(show_stack+0x18/0x1c)
[  231.268013] [<c030cbf0>] (show_stack) from [<c0b14340>]
(dump_stack+0x80/0xa0)
[  231.275357] [<c0b14340>] (dump_stack) from [<c03507b4>] (__warn+0xdc/0xf8)
[  231.282349] [<c03507b4>] (__warn) from [<c0350b28>]
(warn_slowpath_null+0x40/0x4c)
[  231.290067] [<c0350b28>] (warn_slowpath_null) from [<bf4d82d4>]
(vb2_start_streaming+0xb4/0x12c [videobuf2_common])
[  231.300747] [<bf4d82d4>] (vb2_start_streaming [videobuf2_common])
from [<bf4d978c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  231.313166] [<bf4d978c>] (vb2_core_streamon [videobuf2_common])
from [<bf44ea34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  231.324681] [<bf44ea34>] (__video_do_ioctl [videodev]) from
[<bf44f19c>] (video_usercopy+0x508/0x5d4 [videodev])
[  231.335120] [<bf44f19c>] (video_usercopy [videodev]) from
[<c04ffae0>] (vfs_ioctl+0x28/0x3c)
[  231.343697] [<c04ffae0>] (vfs_ioctl) from [<c0500300>]
(do_vfs_ioctl+0x8c/0x838)
[  231.351212] [<c0500300>] (do_vfs_ioctl) from [<c0500b04>]
(ksys_ioctl+0x58/0x74)
[  231.358726] [<c0500b04>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  231.366493] Exception stack(0xd7d53fa8 to 0xd7d53ff0)
[  231.371623] 3fa0:                   4a1bf700 b5edd000 0000000c
40045612 be905378 00000001
[  231.379930] 3fc0: 4a1bf700 b5edd000 40045612 00000036 b5e40e40
0000000c b6f00508 00000000
[  231.388230] 3fe0: be905378 be905368 b5ec6804 b5b9a1f0
[  231.393434] ---[ end trace c5943cec7bb25669 ]---
[  237.695591] list_add corruption. prev->next should be next
(ea4493e0), but was efeb6638. (prev=e126fa78).
[  237.705362] ------------[ cut here ]------------
[  237.710056] kernel BUG at lib/list_debug.c:28!
[  237.714569] Internal error: Oops - BUG: 0 [#1] SMP ARM
[  237.719785] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables ip6table_filter ip6_tables cmac bnep sunrpc
vfat fat brcmfmac brcmutil vc4 cfg80211 snd_soc_core bcm2835_v4l2(C)
ac97_bus snd_bcm2835(C) videobuf2_vmalloc snd_pcm_dmaengine
videobuf2_memops snd_seq videobuf2_v4l2 videobuf2_common
snd_seq_device v4l2_common snd_pcm videodev media snd_timer snd
soundcore drm_kms_helper drm hci_uart btqca joydev btbcm btintel
fb_sys_fops syscopyarea bluetooth sysfillrect gpio_raspberrypi_exp
sysimgblt raspberrypi_hwmon bcm2835_thermal ecdh_generic vchiq(C)
rfkill bcm2835_wdt bcm2835_rng leds_gpio cpufreq_dt lz4 lz4_compress
zram hid_logitech_hidpp hid_logitech_dj smsc95xx usbnet mii mmc_block
dwc2 sdhci_iproc crc32_arm_ce
[  237.720008]  sdhci_pltfm udc_core sdhci bcm2835 pwm_bcm2835
i2c_bcm2835 bcm2835_dma phy_generic
[  237.817717] CPU: 1 PID: 1473 Comm: qv4l2 Tainted: G        WC
 4.20.0-1.fc30.armv7hl #1
[  237.826365] Hardware name: BCM2835
[  237.829831] PC is at __list_add_valid+0x44/0x84
[  237.834426] LR is at __list_add_valid+0x44/0x84
[  237.839020] pc : [<c069b958>]    lr : [<c069b958>]    psr: 600f0093
[  237.845377] sp : d7d53da0  ip : 00000000  fp : 00000001
[  237.850676] r10: 600f0013  r9 : ea4493e0  r8 : ea4493e8
[  237.855979] r7 : eb773000  r6 : eb773278  r5 : e126fa78  r4 : ea449358
[  237.862602] r3 : ef707cb0  r2 : 2e5c6000  r1 : ef704548  r0 : 0000005d
[  237.869226] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment none
[  237.876555] Control: 10c5383d  Table: 17d0406a  DAC: 00000051
[  237.882390] Process qv4l2 (pid: 1473, stack limit = 0xdf044251)
[  237.888394] Stack: (0xd7d53da0 to 0xd7d54000)
[  237.892823] 3da0: ea449358 bf55f20c ea31f800 eb773000 ea31fe24
bf44aa08 ea31fb80 d7d53e78
[  237.901130] 3dc0: bf467200 bf55a22c eb773000 00000000 00000001
ea31fd28 eb773000 bf4d8278
[  237.909435] 3de0: ea31fd28 00000000 ea31f858 bf44aa08 ea31fb80
bf4d978c 40045612 bf44ea34
[  237.917738] 3e00: d7d53e2c c04babd4 ef8eb210 bf5601f4 ecf68f00
00000000 d7c51900 ecf68f00
[  237.926042] 3e20: c124f850 00000004 d7d53e7c c04c0b88 d7d53e78
c031691c d7d53e78 00000000
[  237.934345] 3e40: d7d53e78 00000000 bf44e6d8 40045612 00000000
00000004 00000000 bf44f19c
[  237.942648] 3e60: 0007ffff 00000000 00000000 be9052b0 d7c51900
00000001 00000001 00000001
[  237.950949] 3e80: 00000000 00002003 00000000 00000000 00000000
00000000 00000000 00000000
[  237.959251] 3ea0: 00000000 00000000 00000001 00240000 000c0000
00000000 00000000 00000000
[  237.967560] 3ec0: 00002000 00000000 ac5f2000 ec4171e0 ed793cd8
ed793cd0 ac5f2000 c049bac8
[  237.975863] 3ee0: 00000001 00000003 000c0000 c0b29c74 00000000
c0b29c74 c2c46570 be9052b0
[  237.984167] 3f00: c2c46570 d7c51900 40045612 be9052b0 0000000c
00000036 00000000 c04ffae0
[  237.992470] 3f20: be9052b0 c0500300 00000001 00000056 00000012
d7d53f48 00000001 ef1fee10
[  238.000775] 3f40: ee4e3660 d7d55612 d7d53f0b d7d53f3c 00400100
00000000 d7d53f58 c126aa48
[  238.009079] 3f60: d7c51900 40045612 00000000 d7c51900 d7c51901
40045612 be9052b0 0000000c
[  238.017383] 3f80: 00000036 c0500b04 4a1bf700 b5edd000 40045612
00000036 c0301204 d7d52000
[  238.025686] 3fa0: 00000036 c0301000 4a1bf700 b5edd000 0000000c
40045612 be9052b0 00000001
[  238.033990] 3fc0: 4a1bf700 b5edd000 40045612 00000036 b5e40e40
0000000c b6f00508 00000000
[  238.042293] 3fe0: be9052b0 be9052a0 b5ec6804 b5b9a1f0 400f0010
0000000c 00000000 00000000
[  238.050651] [<c069b958>] (__list_add_valid) from [<bf55f20c>]
(vchiq_mmal_submit_buffer+0x4c/0x74 [bcm2835_v4l2])
[  238.061170] [<bf55f20c>] (vchiq_mmal_submit_buffer [bcm2835_v4l2])
from [<bf55a22c>] (buffer_queue+0x58/0x90 [bcm2835_v4l2])
[  238.072618] [<bf55a22c>] (buffer_queue [bcm2835_v4l2]) from
[<bf4d8278>] (vb2_start_streaming+0x58/0x12c [videobuf2_common])
[  238.084053] [<bf4d8278>] (vb2_start_streaming [videobuf2_common])
from [<bf4d978c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  238.096479] [<bf4d978c>] (vb2_core_streamon [videobuf2_common])
from [<bf44ea34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  238.107976] [<bf44ea34>] (__video_do_ioctl [videodev]) from
[<bf44f19c>] (video_usercopy+0x508/0x5d4 [videodev])
[  238.118414] [<bf44f19c>] (video_usercopy [videodev]) from
[<c04ffae0>] (vfs_ioctl+0x28/0x3c)
[  238.126988] [<c04ffae0>] (vfs_ioctl) from [<c0500300>]
(do_vfs_ioctl+0x8c/0x838)
[  238.134502] [<c0500300>] (do_vfs_ioctl) from [<c0500b04>]
(ksys_ioctl+0x58/0x74)
[  238.142019] [<c0500b04>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  238.149787] Exception stack(0xd7d53fa8 to 0xd7d53ff0)
[  238.154915] 3fa0:                   4a1bf700 b5edd000 0000000c
40045612 be9052b0 00000001
[  238.163219] 3fc0: 4a1bf700 b5edd000 40045612 00000036 b5e40e40
0000000c b6f00508 00000000
[  238.171519] 3fe0: be9052b0 be9052a0 b5ec6804 b5b9a1f0
[  238.176657] Code: e59f0040 e1a02001 e1a0100c ebf44a37 (e7f001f2)
[  238.182843] ---[ end trace c5943cec7bb2566a ]---

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-08  7:21 ` Peter Robinson
@ 2019-01-08  8:48   ` Stefan Wahren
  2019-01-08  8:56     ` Peter Robinson
  2019-01-08 17:10   ` Dave Stevenson
  1 sibling, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2019-01-08  8:48 UTC (permalink / raw)
  To: Peter Robinson
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

Hi Peter,

> Peter Robinson <pbrobinson@gmail.com> hat am 8. Januar 2019 um 08:21 geschrieben:
> 
> 
> Hi Stefan,
> 
> > This patch series improves the load/unload of bcm2835 camera and audio
> > drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
> >
> > This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ
> > cache line size handling"). After Nicolas' series ("staging: vc04_services:
> > Some dead code removal") has been applied, i will rebase my series.
> 
> I tried testing this series applied to 4.20 with the camera module.

first of all this crash should never happend.

But why didn't you applied the series which was actually applied to mainline?
Did you apply the rest of Phil's DT series as mentioned in the cover letter?

> I
> tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
> gstreamer.

Please provide the exact commandline and version.

> I basically get the same crash for both options. Desktop is
> LXDE on 32 bit Fedora 29.
> 
> I've not yet tried with 5.0-rc1 but it looks like it has this patch
> series and some other bits for the vchiq drivers in staging.

Please try 5.0-rc1 which would be more helpful.

Maybe this sounds like a lame excuse but the intension of this series wasn't to get the driver fully operational. I think this is more Dave's expertise.

Stefan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-08  8:48   ` Stefan Wahren
@ 2019-01-08  8:56     ` Peter Robinson
  2019-01-08 10:20       ` Stefan Wahren
  0 siblings, 1 reply; 37+ messages in thread
From: Peter Robinson @ 2019-01-08  8:56 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

Hi Stefan,

> > > This patch series improves the load/unload of bcm2835 camera and audio
> > > drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
> > >
> > > This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ
> > > cache line size handling"). After Nicolas' series ("staging: vc04_services:
> > > Some dead code removal") has been applied, i will rebase my series.
> >
> > I tried testing this series applied to 4.20 with the camera module.
>
> first of all this crash should never happend.

What do you mean by that?

> But why didn't you applied the series which was actually applied to mainline?
> Did you apply the rest of Phil's DT series as mentioned in the cover letter?

I'm fairly certain I have Phil's "Improve VCHIQ cache line size
handling" patch series applied if that's the one you mean, I will
check (I'm currently dealing with 4 different kernels for maintenance
so I'm sorry if my memory isn't exact).

> > I
> > tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
> > gstreamer.
>
> Please provide the exact commandline and version.

That was the command line, it pops up a GUI and then just taking a
still. The version is the latest upstream which is 1.16.3.

> > I basically get the same crash for both options. Desktop is
> > LXDE on 32 bit Fedora 29.
> >
> > I've not yet tried with 5.0-rc1 but it looks like it has this patch
> > series and some other bits for the vchiq drivers in staging.
>
> Please try 5.0-rc1 which would be more helpful.

Yes, it's on my list.

> Maybe this sounds like a lame excuse but the intension of this series wasn't to get the driver fully operational. I think this is more Dave's expertise.

Well like so much stuff on the Raspberry Pi there's users that are
testing it and want to use it so when people bother me I test it and
provide feedback to the patches, if you don't want feedback I'll stop
testing and just disable it and send people upstream for details so
they don't bother me!

Peter

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-08  8:56     ` Peter Robinson
@ 2019-01-08 10:20       ` Stefan Wahren
  2019-01-10  5:09         ` Peter Robinson
  0 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2019-01-08 10:20 UTC (permalink / raw)
  To: Peter Robinson
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

Hi Peter,

> Peter Robinson <pbrobinson@gmail.com> hat am 8. Januar 2019 um 09:56 geschrieben:
> 
> 
> Hi Stefan,
> 
> > > > This patch series improves the load/unload of bcm2835 camera and audio
> > > > drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
> > > >
> > > > This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ
> > > > cache line size handling"). After Nicolas' series ("staging: vc04_services:
> > > > Some dead code removal") has been applied, i will rebase my series.
> > >
> > > I tried testing this series applied to 4.20 with the camera module.
> >
> > first of all this crash should never happend.
> 
> What do you mean by that?

looks like you spotted an issue in the bail out code which is very likely not fixed yet.
But i assume this wasn't your intention. You want to use the RPi camera with Linux 4.20.

> 
> > But why didn't you applied the series which was actually applied to mainline?
> > Did you apply the rest of Phil's DT series as mentioned in the cover letter?
> 
> I'm fairly certain I have Phil's "Improve VCHIQ cache line size
> handling" patch series applied if that's the one you mean, I will
> check (I'm currently dealing with 4 different kernels for maintenance
> so I'm sorry if my memory isn't exact).

That's correct. Btw you will need a recent raspberrypi-firmware (iirc since 10/2018), too.

> 
> > > I
> > > tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
> > > gstreamer.
> >
> > Please provide the exact commandline and version.
> 
> That was the command line, it pops up a GUI and then just taking a
> still. The version is the latest upstream which is 1.16.3.

Thanks, i will try to reproduce it.

> 
> > > I basically get the same crash for both options. Desktop is
> > > LXDE on 32 bit Fedora 29.
> > >
> > > I've not yet tried with 5.0-rc1 but it looks like it has this patch
> > > series and some other bits for the vchiq drivers in staging.
> >
> > Please try 5.0-rc1 which would be more helpful.
> 
> Yes, it's on my list.
> 
> > Maybe this sounds like a lame excuse but the intension of this series wasn't to get the driver fully operational. I think this is more Dave's expertise.
> 
> Well like so much stuff on the Raspberry Pi there's users that are
> testing it and want to use it so when people bother me I test it and
> provide feedback to the patches, if you don't want feedback I'll stop
> testing and just disable it and send people upstream for details so
> they don't bother me!

Please don't get me wrong. I'm very thankful to all this feedback. I know this isn't a very thankful job to offer a very close to mainline distribution and users expect the same behavior like on Raspbian. Without yours and others feedback we wont get much further.

All i wanted to say was: please don't expect too much. It took nearly a year to fix this VCHIQ corruption. I think for the audio and camera stuff, we are just at the beginning ...

So please keep up this good work.

Stefan

> 
> Peter
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-08  7:21 ` Peter Robinson
  2019-01-08  8:48   ` Stefan Wahren
@ 2019-01-08 17:10   ` Dave Stevenson
  2019-01-09  8:33     ` Stefan Wahren
  2019-01-10  5:22     ` Peter Robinson
  1 sibling, 2 replies; 37+ messages in thread
From: Dave Stevenson @ 2019-01-08 17:10 UTC (permalink / raw)
  To: Peter Robinson
  Cc: Stefan Wahren, devel, tiwai, Greg KH, mikebrady, Eric Anholt,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE, nsaenzjulienne,
	linux-arm-kernel

Hi Peter

On Tue, 8 Jan 2019 at 07:21, Peter Robinson <pbrobinson@gmail.com> wrote:
>
> Hi Stefan,
>
> > This patch series improves the load/unload of bcm2835 camera and audio
> > drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
> >
> > This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ
> > cache line size handling"). After Nicolas' series ("staging: vc04_services:
> > Some dead code removal") has been applied, i will rebase my series.
>
> I tried testing this series applied to 4.20 with the camera module. I
> tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
> gstreamer. I basically get the same crash for both options. Desktop is
> LXDE on 32 bit Fedora 29.
>
> I've not yet tried with 5.0-rc1 but it looks like it has this patch
> series and some other bits for the vchiq drivers in staging.

I'm trying to sort the patches I have on our kernel tree and get them
in a shape to get merged to staging.
I've built for 5.0.0-rc1 and also see the same error using:
v4l2-ctl -v width=640,height=480,pixelformat=YU12
v4l2-ctl --stream-mmap=3 --stream-to=/dev/null --stream-count=300

It's three independent things:
- The firmware has failed the failed to enable the camera for reasons unknown.
- The error path then hasn't returned all the buffers to videobuf2,
hence the warning from videobuf2-core.c:1468
- The driver has then tried to pass some buffers to MMAL / VCHI which
tries adding them to an invalid list.

I'm investigating why the firmware is failing to enable the camera
initially, and then look at cleaning up the error handling.

  Dave

> Peter
>
> [  231.121704] bcm2835-v4l2: Failed enabling camera, ret -2
> [  231.127168] bcm2835-v4l2: Failed to enable camera
> [  231.132030] ------------[ cut here ]------------
> [  231.136852] WARNING: CPU: 2 PID: 1473 at
> drivers/media/common/videobuf2/videobuf2-core.c:1468
> vb2_start_streaming+0xb4/0x12c [videobuf2_common]
> [  231.149967] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
> nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
> ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
> nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
> nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
> ebtable_filter ebtables ip6table_filter ip6_tables cmac bnep sunrpc
> vfat fat brcmfmac brcmutil vc4 cfg80211 snd_soc_core bcm2835_v4l2(C)
> ac97_bus snd_bcm2835(C) videobuf2_vmalloc snd_pcm_dmaengine
> videobuf2_memops snd_seq videobuf2_v4l2 videobuf2_common
> snd_seq_device v4l2_common snd_pcm videodev media snd_timer snd
> soundcore drm_kms_helper drm hci_uart btqca joydev btbcm btintel
> fb_sys_fops syscopyarea bluetooth sysfillrect gpio_raspberrypi_exp
> sysimgblt raspberrypi_hwmon bcm2835_thermal ecdh_generic vchiq(C)
> rfkill bcm2835_wdt bcm2835_rng leds_gpio cpufreq_dt lz4 lz4_compress
> zram hid_logitech_hidpp hid_logitech_dj smsc95xx usbnet mii mmc_block
> dwc2 sdhci_iproc crc32_arm_ce
> [  231.150208]  sdhci_pltfm udc_core sdhci bcm2835 pwm_bcm2835
> i2c_bcm2835 bcm2835_dma phy_generic
> [  231.248013] CPU: 2 PID: 1473 Comm: qv4l2 Tainted: G         C
>  4.20.0-1.fc30.armv7hl #1
> [  231.256663] Hardware name: BCM2835
> [  231.260144] [<c03127a4>] (unwind_backtrace) from [<c030cbf0>]
> (show_stack+0x18/0x1c)
> [  231.268013] [<c030cbf0>] (show_stack) from [<c0b14340>]
> (dump_stack+0x80/0xa0)
> [  231.275357] [<c0b14340>] (dump_stack) from [<c03507b4>] (__warn+0xdc/0xf8)
> [  231.282349] [<c03507b4>] (__warn) from [<c0350b28>]
> (warn_slowpath_null+0x40/0x4c)
> [  231.290067] [<c0350b28>] (warn_slowpath_null) from [<bf4d82d4>]
> (vb2_start_streaming+0xb4/0x12c [videobuf2_common])
> [  231.300747] [<bf4d82d4>] (vb2_start_streaming [videobuf2_common])
> from [<bf4d978c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
> [  231.313166] [<bf4d978c>] (vb2_core_streamon [videobuf2_common])
> from [<bf44ea34>] (__video_do_ioctl+0x35c/0x494 [videodev])
> [  231.324681] [<bf44ea34>] (__video_do_ioctl [videodev]) from
> [<bf44f19c>] (video_usercopy+0x508/0x5d4 [videodev])
> [  231.335120] [<bf44f19c>] (video_usercopy [videodev]) from
> [<c04ffae0>] (vfs_ioctl+0x28/0x3c)
> [  231.343697] [<c04ffae0>] (vfs_ioctl) from [<c0500300>]
> (do_vfs_ioctl+0x8c/0x838)
> [  231.351212] [<c0500300>] (do_vfs_ioctl) from [<c0500b04>]
> (ksys_ioctl+0x58/0x74)
> [  231.358726] [<c0500b04>] (ksys_ioctl) from [<c0301000>]
> (ret_fast_syscall+0x0/0x54)
> [  231.366493] Exception stack(0xd7d53fa8 to 0xd7d53ff0)
> [  231.371623] 3fa0:                   4a1bf700 b5edd000 0000000c
> 40045612 be905378 00000001
> [  231.379930] 3fc0: 4a1bf700 b5edd000 40045612 00000036 b5e40e40
> 0000000c b6f00508 00000000
> [  231.388230] 3fe0: be905378 be905368 b5ec6804 b5b9a1f0
> [  231.393434] ---[ end trace c5943cec7bb25669 ]---
> [  237.695591] list_add corruption. prev->next should be next
> (ea4493e0), but was efeb6638. (prev=e126fa78).
> [  237.705362] ------------[ cut here ]------------
> [  237.710056] kernel BUG at lib/list_debug.c:28!
> [  237.714569] Internal error: Oops - BUG: 0 [#1] SMP ARM
> [  237.719785] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
> nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
> ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
> nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
> nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
> ebtable_filter ebtables ip6table_filter ip6_tables cmac bnep sunrpc
> vfat fat brcmfmac brcmutil vc4 cfg80211 snd_soc_core bcm2835_v4l2(C)
> ac97_bus snd_bcm2835(C) videobuf2_vmalloc snd_pcm_dmaengine
> videobuf2_memops snd_seq videobuf2_v4l2 videobuf2_common
> snd_seq_device v4l2_common snd_pcm videodev media snd_timer snd
> soundcore drm_kms_helper drm hci_uart btqca joydev btbcm btintel
> fb_sys_fops syscopyarea bluetooth sysfillrect gpio_raspberrypi_exp
> sysimgblt raspberrypi_hwmon bcm2835_thermal ecdh_generic vchiq(C)
> rfkill bcm2835_wdt bcm2835_rng leds_gpio cpufreq_dt lz4 lz4_compress
> zram hid_logitech_hidpp hid_logitech_dj smsc95xx usbnet mii mmc_block
> dwc2 sdhci_iproc crc32_arm_ce
> [  237.720008]  sdhci_pltfm udc_core sdhci bcm2835 pwm_bcm2835
> i2c_bcm2835 bcm2835_dma phy_generic
> [  237.817717] CPU: 1 PID: 1473 Comm: qv4l2 Tainted: G        WC
>  4.20.0-1.fc30.armv7hl #1
> [  237.826365] Hardware name: BCM2835
> [  237.829831] PC is at __list_add_valid+0x44/0x84
> [  237.834426] LR is at __list_add_valid+0x44/0x84
> [  237.839020] pc : [<c069b958>]    lr : [<c069b958>]    psr: 600f0093
> [  237.845377] sp : d7d53da0  ip : 00000000  fp : 00000001
> [  237.850676] r10: 600f0013  r9 : ea4493e0  r8 : ea4493e8
> [  237.855979] r7 : eb773000  r6 : eb773278  r5 : e126fa78  r4 : ea449358
> [  237.862602] r3 : ef707cb0  r2 : 2e5c6000  r1 : ef704548  r0 : 0000005d
> [  237.869226] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
> Segment none
> [  237.876555] Control: 10c5383d  Table: 17d0406a  DAC: 00000051
> [  237.882390] Process qv4l2 (pid: 1473, stack limit = 0xdf044251)
> [  237.888394] Stack: (0xd7d53da0 to 0xd7d54000)
> [  237.892823] 3da0: ea449358 bf55f20c ea31f800 eb773000 ea31fe24
> bf44aa08 ea31fb80 d7d53e78
> [  237.901130] 3dc0: bf467200 bf55a22c eb773000 00000000 00000001
> ea31fd28 eb773000 bf4d8278
> [  237.909435] 3de0: ea31fd28 00000000 ea31f858 bf44aa08 ea31fb80
> bf4d978c 40045612 bf44ea34
> [  237.917738] 3e00: d7d53e2c c04babd4 ef8eb210 bf5601f4 ecf68f00
> 00000000 d7c51900 ecf68f00
> [  237.926042] 3e20: c124f850 00000004 d7d53e7c c04c0b88 d7d53e78
> c031691c d7d53e78 00000000
> [  237.934345] 3e40: d7d53e78 00000000 bf44e6d8 40045612 00000000
> 00000004 00000000 bf44f19c
> [  237.942648] 3e60: 0007ffff 00000000 00000000 be9052b0 d7c51900
> 00000001 00000001 00000001
> [  237.950949] 3e80: 00000000 00002003 00000000 00000000 00000000
> 00000000 00000000 00000000
> [  237.959251] 3ea0: 00000000 00000000 00000001 00240000 000c0000
> 00000000 00000000 00000000
> [  237.967560] 3ec0: 00002000 00000000 ac5f2000 ec4171e0 ed793cd8
> ed793cd0 ac5f2000 c049bac8
> [  237.975863] 3ee0: 00000001 00000003 000c0000 c0b29c74 00000000
> c0b29c74 c2c46570 be9052b0
> [  237.984167] 3f00: c2c46570 d7c51900 40045612 be9052b0 0000000c
> 00000036 00000000 c04ffae0
> [  237.992470] 3f20: be9052b0 c0500300 00000001 00000056 00000012
> d7d53f48 00000001 ef1fee10
> [  238.000775] 3f40: ee4e3660 d7d55612 d7d53f0b d7d53f3c 00400100
> 00000000 d7d53f58 c126aa48
> [  238.009079] 3f60: d7c51900 40045612 00000000 d7c51900 d7c51901
> 40045612 be9052b0 0000000c
> [  238.017383] 3f80: 00000036 c0500b04 4a1bf700 b5edd000 40045612
> 00000036 c0301204 d7d52000
> [  238.025686] 3fa0: 00000036 c0301000 4a1bf700 b5edd000 0000000c
> 40045612 be9052b0 00000001
> [  238.033990] 3fc0: 4a1bf700 b5edd000 40045612 00000036 b5e40e40
> 0000000c b6f00508 00000000
> [  238.042293] 3fe0: be9052b0 be9052a0 b5ec6804 b5b9a1f0 400f0010
> 0000000c 00000000 00000000
> [  238.050651] [<c069b958>] (__list_add_valid) from [<bf55f20c>]
> (vchiq_mmal_submit_buffer+0x4c/0x74 [bcm2835_v4l2])
> [  238.061170] [<bf55f20c>] (vchiq_mmal_submit_buffer [bcm2835_v4l2])
> from [<bf55a22c>] (buffer_queue+0x58/0x90 [bcm2835_v4l2])
> [  238.072618] [<bf55a22c>] (buffer_queue [bcm2835_v4l2]) from
> [<bf4d8278>] (vb2_start_streaming+0x58/0x12c [videobuf2_common])
> [  238.084053] [<bf4d8278>] (vb2_start_streaming [videobuf2_common])
> from [<bf4d978c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
> [  238.096479] [<bf4d978c>] (vb2_core_streamon [videobuf2_common])
> from [<bf44ea34>] (__video_do_ioctl+0x35c/0x494 [videodev])
> [  238.107976] [<bf44ea34>] (__video_do_ioctl [videodev]) from
> [<bf44f19c>] (video_usercopy+0x508/0x5d4 [videodev])
> [  238.118414] [<bf44f19c>] (video_usercopy [videodev]) from
> [<c04ffae0>] (vfs_ioctl+0x28/0x3c)
> [  238.126988] [<c04ffae0>] (vfs_ioctl) from [<c0500300>]
> (do_vfs_ioctl+0x8c/0x838)
> [  238.134502] [<c0500300>] (do_vfs_ioctl) from [<c0500b04>]
> (ksys_ioctl+0x58/0x74)
> [  238.142019] [<c0500b04>] (ksys_ioctl) from [<c0301000>]
> (ret_fast_syscall+0x0/0x54)
> [  238.149787] Exception stack(0xd7d53fa8 to 0xd7d53ff0)
> [  238.154915] 3fa0:                   4a1bf700 b5edd000 0000000c
> 40045612 be9052b0 00000001
> [  238.163219] 3fc0: 4a1bf700 b5edd000 40045612 00000036 b5e40e40
> 0000000c b6f00508 00000000
> [  238.171519] 3fe0: be9052b0 be9052a0 b5ec6804 b5b9a1f0
> [  238.176657] Code: e59f0040 e1a02001 e1a0100c ebf44a37 (e7f001f2)
> [  238.182843] ---[ end trace c5943cec7bb2566a ]---

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-08 17:10   ` Dave Stevenson
@ 2019-01-09  8:33     ` Stefan Wahren
  2019-01-09 11:58       ` Nicolas Saenz Julienne
  2019-01-10  5:22     ` Peter Robinson
  1 sibling, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2019-01-09  8:33 UTC (permalink / raw)
  To: Dave Stevenson, Peter Robinson
  Cc: devel, Arnd Bergmann, tiwai, Greg KH, mikebrady, Eric Anholt,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE, nsaenzjulienne,
	linux-arm-kernel

Hi,

[add Arnd]

> Dave Stevenson <dave.stevenson@raspberrypi.org> hat am 8. Januar 2019 um 18:10
> geschrieben:
> 
> 
> Hi Peter
> 
> On Tue, 8 Jan 2019 at 07:21, Peter Robinson <pbrobinson@gmail.com> wrote:
> >
> > Hi Stefan,
> >
> > > This patch series improves the load/unload of bcm2835 camera and audio
> > > drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
> > >
> > > This series based on current linux-next and Phil Elwell's series ("Improve
> > > VCHIQ
> > > cache line size handling"). After Nicolas' series ("staging:
> > > vc04_services:
> > > Some dead code removal") has been applied, i will rebase my series.
> >
> > I tried testing this series applied to 4.20 with the camera module. I
> > tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
> > gstreamer. I basically get the same crash for both options. Desktop is
> > LXDE on 32 bit Fedora 29.
> >
> > I've not yet tried with 5.0-rc1 but it looks like it has this patch
> > series and some other bits for the vchiq drivers in staging.
> 
> I'm trying to sort the patches I have on our kernel tree and get them
> in a shape to get merged to staging.
> I've built for 5.0.0-rc1 and also see the same error using:
> v4l2-ctl -v width=640,height=480,pixelformat=YU12
> v4l2-ctl --stream-mmap=3 --stream-to=/dev/null --stream-count=300
> 

i wasn't able to reproduce this issue yet (Raspberry Pi 3, Firmware:
2018-12-18 + 2018-11-12). qv4l2 and cheese from recent Raspbian shows an greenish image but
works.

I tried to capture a video with cheese but this seems to hang and after some
time i terminated cheese and got this kernel output:

[  238.330187] bcm2835_v4l2: timed out waiting for sync completion
[  238.330202] bcm2835-v4l2: Failed disabling camera, ret -62
[  238.330206] bcm2835-v4l2: Failed to disable camera
[  238.330211] ------------[ cut here ]------------
[  238.330239] WARNING: CPU: 3 PID: 1259 at
drivers/media/common/videobuf2/videobuf2-core.c:1852
__vb2_queue_cancel+0x1d8/0x24c [videobuf2_common]
[  238.330242] Modules linked in: cmac bcm2835_v4l2(C) v4l2_common
videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev
media snd_bcm2835(C) brcmfmac sha256_generic sha256_arm vc4 snd_soc_core
ac97_bus snd_pcm_dmaengine snd_pcm snd_timer cfg80211 snd crc32_arm_ce
raspberrypi_hwmon soundcore brcmutil hci_uart btbcm bluetooth bcm2835_thermal
ecdh_generic vchiq(C) phy_generic microchip lan78xx
[  238.330328] CPU: 3 PID: 1259 Comm: v4l2src1:src Tainted: G         C
       5.0.0-rc1-g3bd6e94be #2
[  238.330331] Hardware name: BCM2835
[  238.330359] [<c031234c>] (unwind_backtrace) from [<c030cd64>]
(show_stack+0x10/0x14)
[  238.330373] [<c030cd64>] (show_stack) from [<c0e33830>]
(dump_stack+0x8c/0xa0)
[  238.330388] [<c0e33830>] (dump_stack) from [<c0345e00>] (__warn+0xe0/0xf8)
[  238.330401] [<c0345e00>] (__warn) from [<c0345f30>]
(warn_slowpath_null+0x40/0x48)
[  238.330421] [<c0345f30>] (warn_slowpath_null) from [<bf4f60b0>]
(__vb2_queue_cancel+0x1d8/0x24c [videobuf2_common])
[  238.330466] [<bf4f60b0>] (__vb2_queue_cancel [videobuf2_common]) from
[<bf4f7a0c>] (vb2_core_queue_release+0x18/0x38 [videobuf2_common])
[  238.330490] [<bf4f7a0c>] (vb2_core_queue_release [videobuf2_common]) from
[<bf5059e8>] (_vb2_fop_release+0x74/0x84 [videobuf2_v4l2])
[  238.330533] [<bf5059e8>] (_vb2_fop_release [videobuf2_v4l2]) from
[<bf4be428>] (v4l2_release+0x94/0xd8 [videodev])
[  238.330571] [<bf4be428>] (v4l2_release [videodev]) from [<c0480054>]
(__fput+0x84/0x1c8)
[  238.330588] [<c0480054>] (__fput) from [<c03640a0>] (task_work_run+0xa8/0xcc)
[  238.330604] [<c03640a0>] (task_work_run) from [<c0349984>]
(do_exit+0x3a4/0xa90)
[  238.330618] [<c0349984>] (do_exit) from [<c034af30>]
(do_group_exit+0x3c/0xd0)
[  238.330634] [<c034af30>] (do_group_exit) from [<c03563a0>]
(get_signal+0x24c/0x6d8)
[  238.330647] [<c03563a0>] (get_signal) from [<c030c184>]
(do_work_pending+0x150/0x5a8)
[  238.330659] [<c030c184>] (do_work_pending) from [<c030106c>]
(slow_work_pending+0xc/0x20)
[  238.330665] Exception stack(0xe589ffb0 to 0xe589fff8)
[  238.330674] ffa0:                                     ab203ea0 00000002
00000000 00000000
[  238.330685] ffc0: 00000008 00000002 ab203ea0 00000150 00000000 009bfd80
ffffffff ffffffff
[  238.330695] ffe0: ab1fe54c ab1fe558 00000000 b6155d68 80000010 ab203ea0
[  238.330701] ---[ end trace 38eb902c180397fe ]---
[  238.330710] videobuf2_common: driver bug: stop_streaming operation is leaving
buf a00b2206 in active state
[  238.330717] videobuf2_common: driver bug: stop_streaming operation is leaving
buf c6a3f306 in active state
[  238.330723] videobuf2_common: driver bug: stop_streaming operation is leaving
buf d3723ebf in active state
[  238.330728] videobuf2_common: driver bug: stop_streaming operation is leaving
buf fd514935 in active state

But i noticed a regression introduced in 5.0-rc1, which might be related. I
tried to run "vchiq_test -f 1" and it never completes. After reverting commit
852b2876a8a8 ("staging: vchiq: rework remove_event handling") vchiq_test [1]
works as expected again.

Regards
Stefan

[1] -
https://github.com/raspberrypi/userland/blob/master/interface/vchiq_arm/vchiq_test.c

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-09  8:33     ` Stefan Wahren
@ 2019-01-09 11:58       ` Nicolas Saenz Julienne
  0 siblings, 0 replies; 37+ messages in thread
From: Nicolas Saenz Julienne @ 2019-01-09 11:58 UTC (permalink / raw)
  To: Stefan Wahren, Dave Stevenson, Peter Robinson
  Cc: devel, Arnd Bergmann, tiwai, Greg KH, mikebrady, Eric Anholt,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 669 bytes --]

Hi Stefan,

On Wed, 2019-01-09 at 09:33 +0100, Stefan Wahren wrote:
> 
> But i noticed a regression introduced in 5.0-rc1, which might be
> related. I
> tried to run "vchiq_test -f 1" and it never completes. After
> reverting commit
> 852b2876a8a8 ("staging: vchiq: rework remove_event handling")
> vchiq_test [1]
> works as expected again.

I had a look at that one, it seems that it's due to the fact that vchiq
relies on completions only sleeping whenever their internal count
reaches 0 (it's incremented on every complete()). As opposed to
wait_queues, which will wait until an event is triggered regardless of
previous state.

Regards,
Nicolas

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-08 10:20       ` Stefan Wahren
@ 2019-01-10  5:09         ` Peter Robinson
  2019-01-10  6:24           ` Stefan Wahren
  0 siblings, 1 reply; 37+ messages in thread
From: Peter Robinson @ 2019-01-10  5:09 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

Hi Stefan,

> > > But why didn't you applied the series which was actually applied to mainline?
> > > Did you apply the rest of Phil's DT series as mentioned in the cover letter?
> >
> > I'm fairly certain I have Phil's "Improve VCHIQ cache line size
> > handling" patch series applied if that's the one you mean, I will
> > check (I'm currently dealing with 4 different kernels for maintenance
> > so I'm sorry if my memory isn't exact).
>
> That's correct. Btw you will need a recent raspberrypi-firmware (iirc since 10/2018), too.

For reference I was using 1ea8781 from 18/12/2018, I noticed there's a
new one that fixes colour issues with the cameres.

Given I couldn't work out exactly which random patch set I had for the
test kernel I've now moved to a 4.20.1 with cacheline and this patch
series. I still get the same series of crash there from just running
qv4l2. I get a blank OpenGL window (could be something unrelated with
the vc4 driver), and the same issue with cheese.

[   74.723451] bcm2835_audio bcm2835_audio: vchi message timeout, msg=5
[  118.512917] bcm2835-v4l2: Failed enabling camera, ret -2
[  118.518379] bcm2835-v4l2: Failed to enable camera
[  118.523228] ------------[ cut here ]------------
[  118.528002] WARNING: CPU: 3 PID: 1470 at
drivers/media/common/videobuf2/videobuf2-core.c:1471
vb2_start_streaming+0xb4/0x12c [videobuf2_common]
[  118.541098] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables cmac ip6table_filter ip6_tables bnep sunrpc
vfat fat vc4 snd_soc_core ac97_bus bcm2835_v4l2(C) snd_pcm_dmaengine
snd_bcm2835(C) videobuf2_vmalloc snd_seq videobuf2_memops
videobuf2_v4l2 snd_seq_device videobuf2_common snd_pcm v4l2_common
videodev snd_timer snd media brcmfmac soundcore drm_kms_helper
brcmutil drm hci_uart cfg80211 fb_sys_fops btqca syscopyarea btbcm
joydev sysfillrect btintel sysimgblt bluetooth raspberrypi_hwmon
ecdh_generic rfkill bcm2835_thermal bcm2835_rng bcm2835_wdt vchiq(C)
leds_gpio cpufreq_dt lz4 lz4_compress zram hid_logitech_hidpp
hid_logitech_dj smsc95xx usbnet mii mmc_block dwc2 sdhci_iproc
sdhci_pltfm udc_core
[  118.541261]  gpio_raspberrypi_exp crc32_arm_ce sdhci pwm_bcm2835
bcm2835 i2c_bcm2835 bcm2835_dma phy_generic
[  118.639009] CPU: 3 PID: 1470 Comm: qv4l2 Tainted: G         C
 4.20.1-200.fc29.armv7hl #1
[  118.647828] Hardware name: BCM2835
[  118.651296] [<c03127a4>] (unwind_backtrace) from [<c030cbf0>]
(show_stack+0x18/0x1c)
[  118.659156] [<c030cbf0>] (show_stack) from [<c0b14f80>]
(dump_stack+0x80/0xa0)
[  118.666488] [<c0b14f80>] (dump_stack) from [<c03507b4>] (__warn+0xdc/0xf8)
[  118.673466] [<c03507b4>] (__warn) from [<c0350b28>]
(warn_slowpath_null+0x40/0x4c)
[  118.681168] [<c0350b28>] (warn_slowpath_null) from [<bf70a2d4>]
(vb2_start_streaming+0xb4/0x12c [videobuf2_common])
[  118.691810] [<bf70a2d4>] (vb2_start_streaming [videobuf2_common])
from [<bf70b78c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  118.704152] [<bf70b78c>] (vb2_core_streamon [videobuf2_common])
from [<bf6aaa34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  118.715546] [<bf6aaa34>] (__video_do_ioctl [videodev]) from
[<bf6ab19c>] (video_usercopy+0x508/0x5d4 [videodev])
[  118.725923] [<bf6ab19c>] (video_usercopy [videodev]) from
[<c04ffae8>] (vfs_ioctl+0x28/0x3c)
[  118.734487] [<c04ffae8>] (vfs_ioctl) from [<c0500308>]
(do_vfs_ioctl+0x8c/0x838)
[  118.741990] [<c0500308>] (do_vfs_ioctl) from [<c0500b0c>]
(ksys_ioctl+0x58/0x74)
[  118.749495] [<c0500b0c>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  118.757259] Exception stack(0xd940dfa8 to 0xd940dff0)
[  118.762382] dfa0:                   d47c8700 b5f1e000 0000000c
40045612 befb42a0 00000001
[  118.770678] dfc0: d47c8700 b5f1e000 40045612 00000036 b5e81e40
0000000c b6f41508 00000000
[  118.778970] dfe0: befb42a0 befb4290 b5f07804 b5bdb1f0
[  118.784155] ---[ end trace 4c04f89544a1aee9 ]---
[  132.329586] bcm2835-v4l2: Failed enabling camera, ret -2
[  132.335008] bcm2835-v4l2: Failed to enable camera
[  132.339826] ------------[ cut here ]------------
[  132.344555] WARNING: CPU: 3 PID: 1470 at
drivers/media/common/videobuf2/videobuf2-core.c:1471
vb2_start_streaming+0xb4/0x12c [videobuf2_common]
[  132.357629] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables cmac ip6table_filter ip6_tables bnep sunrpc
vfat fat vc4 snd_soc_core ac97_bus bcm2835_v4l2(C) snd_pcm_dmaengine
snd_bcm2835(C) videobuf2_vmalloc snd_seq videobuf2_memops
videobuf2_v4l2 snd_seq_device videobuf2_common snd_pcm v4l2_common
videodev snd_timer snd media brcmfmac soundcore drm_kms_helper
brcmutil drm hci_uart cfg80211 fb_sys_fops btqca syscopyarea btbcm
joydev sysfillrect btintel sysimgblt bluetooth raspberrypi_hwmon
ecdh_generic rfkill bcm2835_thermal bcm2835_rng bcm2835_wdt vchiq(C)
leds_gpio cpufreq_dt lz4 lz4_compress zram hid_logitech_hidpp
hid_logitech_dj smsc95xx usbnet mii mmc_block dwc2 sdhci_iproc
sdhci_pltfm udc_core
[  132.357792]  gpio_raspberrypi_exp crc32_arm_ce sdhci pwm_bcm2835
bcm2835 i2c_bcm2835 bcm2835_dma phy_generic
[  132.455510] CPU: 3 PID: 1470 Comm: qv4l2 Tainted: G        WC
 4.20.1-200.fc29.armv7hl #1
[  132.464329] Hardware name: BCM2835
[  132.467798] [<c03127a4>] (unwind_backtrace) from [<c030cbf0>]
(show_stack+0x18/0x1c)
[  132.475658] [<c030cbf0>] (show_stack) from [<c0b14f80>]
(dump_stack+0x80/0xa0)
[  132.482986] [<c0b14f80>] (dump_stack) from [<c03507b4>] (__warn+0xdc/0xf8)
[  132.489962] [<c03507b4>] (__warn) from [<c0350b28>]
(warn_slowpath_null+0x40/0x4c)
[  132.497663] [<c0350b28>] (warn_slowpath_null) from [<bf70a2d4>]
(vb2_start_streaming+0xb4/0x12c [videobuf2_common])
[  132.508273] [<bf70a2d4>] (vb2_start_streaming [videobuf2_common])
from [<bf70b78c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  132.520619] [<bf70b78c>] (vb2_core_streamon [videobuf2_common])
from [<bf6aaa34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  132.532012] [<bf6aaa34>] (__video_do_ioctl [videodev]) from
[<bf6ab19c>] (video_usercopy+0x508/0x5d4 [videodev])
[  132.542387] [<bf6ab19c>] (video_usercopy [videodev]) from
[<c04ffae8>] (vfs_ioctl+0x28/0x3c)
[  132.550949] [<c04ffae8>] (vfs_ioctl) from [<c0500308>]
(do_vfs_ioctl+0x8c/0x838)
[  132.558452] [<c0500308>] (do_vfs_ioctl) from [<c0500b0c>]
(ksys_ioctl+0x58/0x74)
[  132.565956] [<c0500b0c>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  132.573718] Exception stack(0xd940dfa8 to 0xd940dff0)
[  132.578838] dfa0:                   d47c8700 b5f1e000 0000000c
40045612 befb4368 00000001
[  132.587132] dfc0: d47c8700 b5f1e000 40045612 00000036 b5e81e40
0000000c b6f41508 00000000
[  132.595424] dfe0: befb4368 befb4358 b5f07804 b5bdb1f0
[  132.600568] ---[ end trace 4c04f89544a1aeea ]---
[  155.048886] list_add corruption. prev->next should be next
(ea7793e0), but was 00000000. (prev=d97cde78).
[  155.058671] ------------[ cut here ]------------
[  155.063361] kernel BUG at lib/list_debug.c:28!
[  155.067864] Internal error: Oops - BUG: 0 [#1] SMP ARM
[  155.073071] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables cmac ip6table_filter ip6_tables bnep sunrpc
vfat fat vc4 snd_soc_core ac97_bus bcm2835_v4l2(C) snd_pcm_dmaengine
snd_bcm2835(C) videobuf2_vmalloc snd_seq videobuf2_memops
videobuf2_v4l2 snd_seq_device videobuf2_common snd_pcm v4l2_common
videodev snd_timer snd media brcmfmac soundcore drm_kms_helper
brcmutil drm hci_uart cfg80211 fb_sys_fops btqca syscopyarea btbcm
joydev sysfillrect btintel sysimgblt bluetooth raspberrypi_hwmon
ecdh_generic rfkill bcm2835_thermal bcm2835_rng bcm2835_wdt vchiq(C)
leds_gpio cpufreq_dt lz4 lz4_compress zram hid_logitech_hidpp
hid_logitech_dj smsc95xx usbnet mii mmc_block dwc2 sdhci_iproc
sdhci_pltfm udc_core
[  155.073205]  gpio_raspberrypi_exp crc32_arm_ce sdhci pwm_bcm2835
bcm2835 i2c_bcm2835 bcm2835_dma phy_generic
[  155.170889] CPU: 1 PID: 1470 Comm: qv4l2 Tainted: G        WC
 4.20.1-200.fc29.armv7hl #1
[  155.179708] Hardware name: BCM2835
[  155.183162] PC is at __list_add_valid+0x44/0x84
[  155.187754] LR is at __list_add_valid+0x44/0x84
[  155.192344] pc : [<c069bec0>]    lr : [<c069bec0>]    psr: 600f0093
[  155.198694] sp : d940dda0  ip : 00000000  fp : 00000001
[  155.203988] r10: 600f0013  r9 : ea7793e0  r8 : ea7793e8
[  155.209282] r7 : d9534c00  r6 : d9534e78  r5 : d97cde78  r4 : ea779358
[  155.215898] r3 : ef74fcb0  r2 : 2e60e000  r1 : ef74c548  r0 : 0000005d
[  155.222516] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment none
[  155.229837] Control: 10c5383d  Table: 1944c06a  DAC: 00000051
[  155.235661] Process qv4l2 (pid: 1470, stack limit = 0x56c02967)
[  155.241661] Stack: (0xd940dda0 to 0xd940e000)
[  155.246079] dda0: ea779358 bf7ab20c ede0a800 d9534c00 ede0ae24
bf6a6a08 ede0ab80 d940de78
[  155.254373] ddc0: bf6c3200 bf7a622c d9534c00 00000000 00000001
ede0ad28 d9534c00 bf70a278
[  155.262667] dde0: ede0ad28 00000000 ede0a858 bf6a6a08 ede0ab80
bf70b78c 40045612 bf6aaa34
[  155.270961] de00: d940de2c c04babdc ef8cfd24 bf7ac1f4 df58fc00
00000000 e9587240 df58fc00
[  155.279256] de20: c124f850 00000004 d940de7c c04c0b90 d940de78
c031691c d940de78 00000000
[  155.287549] de40: d940de78 00000000 bf6aa6d8 40045612 00000000
00000004 00000000 bf6ab19c
[  155.295843] de60: 0007ffff 00000000 00000000 befb4368 e9587240
00000001 00000001 00000001
[  155.304136] de80: 00000000 00002003 00000000 00000000 00000000
00000000 00000000 00000000
[  155.312429] dea0: 00000000 00000000 00000001 00240000 000c0000
00000000 00000000 00000000
[  155.320723] dec0: 00002000 00000000 ac2ef000 e535ae40 e95c6198
e95c6190 ac2ef000 c049bad0
[  155.329019] dee0: 00000001 00000003 000c0000 c0b2a8b4 00000000
c0b2a8b4 c2ee6570 befb4368
[  155.337315] df00: c2ee6570 e9587240 40045612 befb4368 0000000c
00000036 00000000 c04ffae8
[  155.345612] df20: befb4368 c0500308 00000001 00000056 00000012
d940df48 00000001 ef2ac910
[  155.353908] df40: c29c4660 d9405612 d940df0b d940df3c 00400100
00000000 d940df58 c126ab28
[  155.362204] df60: e9587240 40045612 00000000 e9587240 e9587241
40045612 befb4368 0000000c
[  155.370500] df80: 00000036 c0500b0c d47c8700 b5f1e000 40045612
00000036 c0301204 d940c000
[  155.378797] dfa0: 00000036 c0301000 d47c8700 b5f1e000 0000000c
40045612 befb4368 00000001
[  155.387093] dfc0: d47c8700 b5f1e000 40045612 00000036 b5e81e40
0000000c b6f41508 00000000
[  155.395386] dfe0: befb4368 befb4358 b5f07804 b5bdb1f0 400f0010
0000000c 00000000 00000000
[  155.403716] [<c069bec0>] (__list_add_valid) from [<bf7ab20c>]
(vchiq_mmal_submit_buffer+0x4c/0x74 [bcm2835_v4l2])
[  155.414189] [<bf7ab20c>] (vchiq_mmal_submit_buffer [bcm2835_v4l2])
from [<bf7a622c>] (buffer_queue+0x58/0x90 [bcm2835_v4l2])
[  155.425602] [<bf7a622c>] (buffer_queue [bcm2835_v4l2]) from
[<bf70a278>] (vb2_start_streaming+0x58/0x12c [videobuf2_common])
[  155.437005] [<bf70a278>] (vb2_start_streaming [videobuf2_common])
from [<bf70b78c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  155.449348] [<bf70b78c>] (vb2_core_streamon [videobuf2_common])
from [<bf6aaa34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  155.460740] [<bf6aaa34>] (__video_do_ioctl [videodev]) from
[<bf6ab19c>] (video_usercopy+0x508/0x5d4 [videodev])
[  155.471115] [<bf6ab19c>] (video_usercopy [videodev]) from
[<c04ffae8>] (vfs_ioctl+0x28/0x3c)
[  155.479680] [<c04ffae8>] (vfs_ioctl) from [<c0500308>]
(do_vfs_ioctl+0x8c/0x838)
[  155.487184] [<c0500308>] (do_vfs_ioctl) from [<c0500b0c>]
(ksys_ioctl+0x58/0x74)
[  155.494689] [<c0500b0c>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  155.502451] Exception stack(0xd940dfa8 to 0xd940dff0)
[  155.507573] dfa0:                   d47c8700 b5f1e000 0000000c
40045612 befb4368 00000001
[  155.515866] dfc0: d47c8700 b5f1e000 40045612 00000036 b5e81e40
0000000c b6f41508 00000000
[  155.524160] dfe0: befb4368 befb4358 b5f07804 b5bdb1f0
[  155.529283] Code: e59f0040 e1a02001 e1a0100c ebf448dd (e7f001f2)
[  155.535464] ---[ end trace 4c04f89544a1aeeb ]---

> > > > I basically get the same crash for both options. Desktop is
> > > > LXDE on 32 bit Fedora 29.
> > > >
> > > > I've not yet tried with 5.0-rc1 but it looks like it has this patch
> > > > series and some other bits for the vchiq drivers in staging.
> > >
> > > Please try 5.0-rc1 which would be more helpful.
> >
> > Yes, it's on my list.

I get difference results with 5.0-rc1 but neither of the above apps
work either, will follow up based on the rest of the thread there.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-08 17:10   ` Dave Stevenson
  2019-01-09  8:33     ` Stefan Wahren
@ 2019-01-10  5:22     ` Peter Robinson
  1 sibling, 0 replies; 37+ messages in thread
From: Peter Robinson @ 2019-01-10  5:22 UTC (permalink / raw)
  To: Dave Stevenson
  Cc: Stefan Wahren, devel, tiwai, Greg KH, mikebrady, Eric Anholt,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE, nsaenzjulienne,
	linux-arm-kernel

 Hi Dave,

> > > This patch series improves the load/unload of bcm2835 camera and audio
> > > drivers. It has been tested with Raspberry Pi 3 B and a camera module V1.
> > >
> > > This series based on current linux-next and Phil Elwell's series ("Improve VCHIQ
> > > cache line size handling"). After Nicolas' series ("staging: vc04_services:
> > > Some dead code removal") has been applied, i will rebase my series.
> >
> > I tried testing this series applied to 4.20 with the camera module. I
> > tried with qv4l2 (from v4l-utils) and using cheese, which in turn uses
> > gstreamer. I basically get the same crash for both options. Desktop is
> > LXDE on 32 bit Fedora 29.
> >
> > I've not yet tried with 5.0-rc1 but it looks like it has this patch
> > series and some other bits for the vchiq drivers in staging.
>
> I'm trying to sort the patches I have on our kernel tree and get them
> in a shape to get merged to staging.
> I've built for 5.0.0-rc1 and also see the same error using:
> v4l2-ctl -v width=640,height=480,pixelformat=YU12
> v4l2-ctl --stream-mmap=3 --stream-to=/dev/null --stream-count=300
>
> It's three independent things:
> - The firmware has failed the failed to enable the camera for reasons unknown.

OK, with the extended firmware enabled I get the following boot
messages before trying to access the camera:

[   27.541690] bcm2835_v4l2: module is from the staging directory, the
quality is unknown, you have been warned.
[   28.203301] bcm2835-v4l2: scene mode selected 0, was 0
[   28.203882] bcm2835-v4l2: V4L2 device registered as video0 - stills
mode > 1280x720
[   28.219128] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.

Any idea what I should be seeing besides this if it enables it
properly, I get different errors if I don't have extended firmware or
not enough memory.

With Stefan's upstream commit 4cc357c500d (staging: bcm2835-camera:
Add hint about possible faulty config) he reports "Not enough GPU
mem?" but I wonder if it's more accurate to report that the wrong
firmware is loaded, I've managed to get that error if I have enough
memory and aren't don't have "start_x=1" (or have start_x=10).

BTW what is enough memory? It seems 32Mb should be enough, tried with
the same results with 64Mb too but I've not found anything explicit
about features vs gpu_mem, until I've started looking at the camera
we've set it to 16Mb due to using the open vc4 driver, but as other
things start to come along like the camera, and presumably accelerated
video decoding, this seems to affect those.

As a side note it would be a useful debug feature from a support PoV
if the following line could also note which firmware is loaded:

[    8.087691] raspberrypi-firmware soc:firmware: Attached to firmware
from 2019-01-09 20:07

Something like "attached to extended/reduced/whatecer firmware from XXXX-XX-XX"

> - The error path then hasn't returned all the buffers to videobuf2,
> hence the warning from videobuf2-core.c:1468
> - The driver has then tried to pass some buffers to MMAL / VCHI which
> tries adding them to an invalid list.
>
> I'm investigating why the firmware is failing to enable the camera
> initially, and then look at cleaning up the error handling.

OK, let me know when you've got something you want me to test.

Peter

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-10  5:09         ` Peter Robinson
@ 2019-01-10  6:24           ` Stefan Wahren
  2019-01-10  6:34             ` Peter Robinson
  2019-01-10  7:05             ` Peter Robinson
  0 siblings, 2 replies; 37+ messages in thread
From: Stefan Wahren @ 2019-01-10  6:24 UTC (permalink / raw)
  To: Peter Robinson
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel


> Peter Robinson <pbrobinson@gmail.com> hat am 10. Januar 2019 um 06:09 geschrieben:
> 
> 
> Hi Stefan,
> 
...
> 
> I get difference results with 5.0-rc1 but neither of the above apps
> work either, will follow up based on the rest of the thread there.
> 

My first step with Raspbian is to enable the Camera interface which results into an appending of the following lines to config.txt:

start_x=1
gpu_mem=128

AFAIK a smaller value for gpu_mem wont work. Please provide your settings which results in this crash.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-10  6:24           ` Stefan Wahren
@ 2019-01-10  6:34             ` Peter Robinson
  2019-01-10 18:48               ` Stefan Wahren
  2019-01-10  7:05             ` Peter Robinson
  1 sibling, 1 reply; 37+ messages in thread
From: Peter Robinson @ 2019-01-10  6:34 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

> > Hi Stefan,
> >
> ...
> >
> > I get difference results with 5.0-rc1 but neither of the above apps
> > work either, will follow up based on the rest of the thread there.
> >
>
> My first step with Raspbian is to enable the Camera interface which results into an appending of the following lines to config.txt:
>
> start_x=1
> gpu_mem=128
>
> AFAIK a smaller value for gpu_mem wont work. Please provide your settings which results in this crash.

start_x=1
gpu_mem=64

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-10  6:24           ` Stefan Wahren
  2019-01-10  6:34             ` Peter Robinson
@ 2019-01-10  7:05             ` Peter Robinson
  1 sibling, 0 replies; 37+ messages in thread
From: Peter Robinson @ 2019-01-10  7:05 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

> > I get difference results with 5.0-rc1 but neither of the above apps
> > work either, will follow up based on the rest of the thread there.
> >
>
> My first step with Raspbian is to enable the Camera interface which results into an appending of the following lines to config.txt:
>
> start_x=1
> gpu_mem=128
>
> AFAIK a smaller value for gpu_mem wont work. Please provide your settings which results in this crash.

OK with that, plus my 4.20.1 kernel (and the 09/01/19 firmware) I'm
starting to get somewhere.

I can get a picture with the qv4l2 app ;-)

If I try with cheese I get the following two crashes, I then tried
with qv4l2 again (no reboot) and got the final crash, basically once
cheese/gstreamer pokes it tht's it and it doesn't come back. The
"Comm: v4l2src0:src" are the cheese/gstreamer crash.

[   26.013706] vchiq: module is from the staging directory, the
quality is unknown, you have been warned.
[   26.040943] vchiq: vchiq_init_state: slot_zero = 415842fa, is_master = 0
[   26.937936] media: Linux media interface: v0.10
[   27.052339] videodev: Linux video capture interface: v2.00
[   27.351732] snd_bcm2835: module is from the staging directory, the
quality is unknown, you have been warned.
[   27.385975] bcm2835_audio bcm2835_audio: card created with 8 channels
[   27.406702] bcm2835_v4l2: module is from the staging directory, the
quality is unknown, you have been warned.
[   28.059932] bcm2835-v4l2: scene mode selected 0, was 0
[   28.061098] bcm2835-v4l2: V4L2 device registered as video0 - stills
mode > 1280x720
[   28.074773] bcm2835-v4l2: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.
[   78.307961] bcm2835_audio bcm2835_audio: vchi message timeout, msg=5
[  138.790296] bcm2835-v4l2: Failed to enable capture port - error -1.
Disabling camera port again
[  138.818456] ------------[ cut here ]------------
[  138.823246] WARNING: CPU: 2 PID: 1464 at
drivers/media/common/videobuf2/videobuf2-core.c:1471
vb2_start_streaming+0xb4/0x12c [videobuf2_common]
[  138.836377] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables ip6table_filter ip6_tables cmac bnep sunrpc
vfat fat vc4 snd_soc_core bcm2835_v4l2(C) snd_bcm2835(C)
videobuf2_vmalloc ac97_bus snd_pcm_dmaengine videobuf2_memops
videobuf2_v4l2 snd_seq videobuf2_common snd_seq_device snd_pcm
v4l2_common videodev brcmfmac media snd_timer snd brcmutil soundcore
drm_kms_helper cfg80211 drm hci_uart fb_sys_fops syscopyarea btqca
sysfillrect btbcm joydev sysimgblt btintel bluetooth raspberrypi_hwmon
ecdh_generic rfkill vchiq(C) bcm2835_thermal bcm2835_rng bcm2835_wdt
leds_gpio cpufreq_dt lz4 lz4_compress zram hid_logitech_hidpp
hid_logitech_dj smsc95xx usbnet mii mmc_block sdhci_iproc dwc2
crc32_arm_ce sdhci_pltfm
[  138.836522]  gpio_raspberrypi_exp udc_core sdhci pwm_bcm2835
i2c_bcm2835 bcm2835 bcm2835_dma phy_generic
[  138.934289] CPU: 2 PID: 1464 Comm: v4l2src0:src Tainted: G
C        4.20.1-200.fc29.armv7hl #1
[  138.943729] Hardware name: BCM2835
[  138.947196] [<c03127a4>] (unwind_backtrace) from [<c030cbf0>]
(show_stack+0x18/0x1c)
[  138.955058] [<c030cbf0>] (show_stack) from [<c0b14f80>]
(dump_stack+0x80/0xa0)
[  138.962390] [<c0b14f80>] (dump_stack) from [<c03507b4>] (__warn+0xdc/0xf8)
[  138.969366] [<c03507b4>] (__warn) from [<c0350b28>]
(warn_slowpath_null+0x40/0x4c)
[  138.977070] [<c0350b28>] (warn_slowpath_null) from [<bf70b2d4>]
(vb2_start_streaming+0xb4/0x12c [videobuf2_common])
[  138.987713] [<bf70b2d4>] (vb2_start_streaming [videobuf2_common])
from [<bf70c78c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  139.000054] [<bf70c78c>] (vb2_core_streamon [videobuf2_common])
from [<bf681a34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  139.011453] [<bf681a34>] (__video_do_ioctl [videodev]) from
[<bf68219c>] (video_usercopy+0x508/0x5d4 [videodev])
[  139.021827] [<bf68219c>] (video_usercopy [videodev]) from
[<c04ffae8>] (vfs_ioctl+0x28/0x3c)
[  139.030391] [<c04ffae8>] (vfs_ioctl) from [<c0500308>]
(do_vfs_ioctl+0x8c/0x838)
[  139.037896] [<c0500308>] (do_vfs_ioctl) from [<c0500b0c>]
(ksys_ioctl+0x58/0x74)
[  139.045398] [<c0500b0c>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  139.053160] Exception stack(0xd0b2ffa8 to 0xd0b2fff0)
[  139.058281] ffa0:                   00000000 aa812138 0000001e
40045612 01658708 b590cd10
[  139.066577] ffc0: 00000000 aa812138 ab8af99c 00000036 00000020
b6f388f8 01658700 aa80cc90
[  139.074869] ffe0: b5b4dcec a69fa974 ab8786f4 b590cd1c
[  139.080031] ---[ end trace eed7fb71749a2e2c ]---
[  139.211923] bcm2835-v4l2: vidioc_s_fmt_vid_cap device busy
[  177.331656] bcm2835-v4l2: Failed to enable capture port - error -1.
Disabling camera port again
[  177.362943] ------------[ cut here ]------------
[  177.367736] WARNING: CPU: 1 PID: 1531 at
drivers/media/common/videobuf2/videobuf2-core.c:1471
vb2_start_streaming+0xb4/0x12c [videobuf2_common]
[  177.380847] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables ip6table_filter ip6_tables cmac bnep sunrpc
vfat fat vc4 snd_soc_core bcm2835_v4l2(C) snd_bcm2835(C)
videobuf2_vmalloc ac97_bus snd_pcm_dmaengine videobuf2_memops
videobuf2_v4l2 snd_seq videobuf2_common snd_seq_device snd_pcm
v4l2_common videodev brcmfmac media snd_timer snd brcmutil soundcore
drm_kms_helper cfg80211 drm hci_uart fb_sys_fops syscopyarea btqca
sysfillrect btbcm joydev sysimgblt btintel bluetooth raspberrypi_hwmon
ecdh_generic rfkill vchiq(C) bcm2835_thermal bcm2835_rng bcm2835_wdt
leds_gpio cpufreq_dt lz4 lz4_compress zram hid_logitech_hidpp
hid_logitech_dj smsc95xx usbnet mii mmc_block sdhci_iproc dwc2
crc32_arm_ce sdhci_pltfm
[  177.381107]  gpio_raspberrypi_exp udc_core sdhci pwm_bcm2835
i2c_bcm2835 bcm2835 bcm2835_dma phy_generic
[  177.479003] CPU: 1 PID: 1531 Comm: v4l2src0:src Tainted: G
WC        4.20.1-200.fc29.armv7hl #1
[  177.488452] Hardware name: BCM2835
[  177.491936] [<c03127a4>] (unwind_backtrace) from [<c030cbf0>]
(show_stack+0x18/0x1c)
[  177.499807] [<c030cbf0>] (show_stack) from [<c0b14f80>]
(dump_stack+0x80/0xa0)
[  177.507148] [<c0b14f80>] (dump_stack) from [<c03507b4>] (__warn+0xdc/0xf8)
[  177.514137] [<c03507b4>] (__warn) from [<c0350b28>]
(warn_slowpath_null+0x40/0x4c)
[  177.521863] [<c0350b28>] (warn_slowpath_null) from [<bf70b2d4>]
(vb2_start_streaming+0xb4/0x12c [videobuf2_common])
[  177.532507] [<bf70b2d4>] (vb2_start_streaming [videobuf2_common])
from [<bf70c78c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  177.544926] [<bf70c78c>] (vb2_core_streamon [videobuf2_common])
from [<bf681a34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  177.556424] [<bf681a34>] (__video_do_ioctl [videodev]) from
[<bf68219c>] (video_usercopy+0x508/0x5d4 [videodev])
[  177.566859] [<bf68219c>] (video_usercopy [videodev]) from
[<c04ffae8>] (vfs_ioctl+0x28/0x3c)
[  177.575434] [<c04ffae8>] (vfs_ioctl) from [<c0500308>]
(do_vfs_ioctl+0x8c/0x838)
[  177.582949] [<c0500308>] (do_vfs_ioctl) from [<c0500b0c>]
(ksys_ioctl+0x58/0x74)
[  177.590465] [<c0500b0c>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  177.598233] Exception stack(0xc9e49fa8 to 0xc9e49ff0)
[  177.603363] 9fa0:                   00000000 aa9100e8 0000001f
40045612 011a78a0 b59aed10
[  177.611666] 9fc0: 00000000 aa9100e8 ab9c899c 00000036 00000020
b6fda8f8 011a7898 aa907720
[  177.619967] 9fe0: b5befcec a6afa974 ab9916f4 b59aed1c
[  177.625167] ---[ end trace eed7fb71749a2e2d ]---
[  177.761663] bcm2835-v4l2: vidioc_s_fmt_vid_cap device busy
[  218.865174] Unable to handle kernel NULL pointer dereference at
virtual address 00000001
[  218.873455] pgd = 4a1eb2da
[  218.876252] [00000001] *pgd=00000000
[  218.879920] Internal error: Oops: 5 [#1] SMP ARM
[  218.884610] Modules linked in: fuse ip6t_rpfilter ip6t_REJECT
nf_reject_ipv6 xt_conntrack ebtable_nat ip6table_nat nf_nat_ipv6
ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat_ipv4
nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack
nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip_set nfnetlink
ebtable_filter ebtables ip6table_filter ip6_tables cmac bnep sunrpc
vfat fat vc4 snd_soc_core bcm2835_v4l2(C) snd_bcm2835(C)
videobuf2_vmalloc ac97_bus snd_pcm_dmaengine videobuf2_memops
videobuf2_v4l2 snd_seq videobuf2_common snd_seq_device snd_pcm
v4l2_common videodev brcmfmac media snd_timer snd brcmutil soundcore
drm_kms_helper cfg80211 drm hci_uart fb_sys_fops syscopyarea btqca
sysfillrect btbcm joydev sysimgblt btintel bluetooth raspberrypi_hwmon
ecdh_generic rfkill vchiq(C) bcm2835_thermal bcm2835_rng bcm2835_wdt
leds_gpio cpufreq_dt lz4 lz4_compress zram hid_logitech_hidpp
hid_logitech_dj smsc95xx usbnet mii mmc_block sdhci_iproc dwc2
crc32_arm_ce sdhci_pltfm
[  218.884870]  gpio_raspberrypi_exp udc_core sdhci pwm_bcm2835
i2c_bcm2835 bcm2835 bcm2835_dma phy_generic
[  218.982626] CPU: 3 PID: 1552 Comm: qv4l2 Tainted: G        WC
 4.20.1-200.fc29.armv7hl #1
[  218.991458] Hardware name: BCM2835
[  218.994955] PC is at vchiq_mmal_port_enable+0x90/0x138 [bcm2835_v4l2]
[  219.001501] LR is at _cond_resched+0x48/0x50
[  219.005831] pc : [<bf793ec0>]    lr : [<c0b2a8b4>]    psr: 00070013
[  219.012209] sp : c6727d90  ip : 002dc121  fp : 00000001
[  219.017518] r10: bf69a200  r9 : df278004  r8 : dffe6380
[  219.022821] r7 : df278000  r6 : bf79a880  r5 : bf78f600  r4 : df278490
[  219.029443] r3 : 00000001  r2 : df278518  r1 : 00000001  r0 : 00000000
[  219.036069] Flags: nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  219.043309] Control: 10c5383d  Table: 1276806a  DAC: 00000051
[  219.049145] Process qv4l2 (pid: 1552, stack limit = 0x266508dd)
[  219.055151] Stack: (0xc6727d90 to 0xc6728000)
[  219.059578] 7d80:                                     df278000
df278490 bf78f600 dffe6000
[  219.067885] 7da0: dffe6660 bf79a880 bf67da08 dffe6380 c6727e78
bf69a200 00000001 bf78fa54
[  219.076189] 7dc0: c6727dcc 00000004 d090ee78 00000008 dffe6528
dffe64dc dffe6624 bf70b28c
[  219.084493] 7de0: dffe6528 00000000 dffe6058 bf67da08 dffe6380
bf70c78c 40045612 bf681a34
[  219.092800] 7e00: c6727e2c c04babdc e39a99bc bf7951f4 c328d200
00000000 d6be1b40 c328d200
[  219.101103] 7e20: c124f850 00000004 c6727e7c c04c0b90 c6727e78
c031691c c6727e78 00000000
[  219.109407] 7e40: c6727e78 00000000 bf6816d8 40045612 00000000
00000004 00000000 bf68219c
[  219.117710] 7e60: 0007ffff 00000000 00000000 bedf8368 d6be1b40
00000001 00000001 00000001
[  219.126015] 7e80: 00000000 00002003 00000000 00000000 00000000
00000000 00000000 00000000
[  219.134318] 7ea0: 00000000 00000000 00000001 05cf1000 01efb000
00000000 00000000 00000000
[  219.142623] 7ec0: 00002000 00000000 a1743000 e27e93c0 c3a1d738
c3a1d730 a1743000 c049bad0
[  219.150926] 7ee0: 00000001 00000003 01efb000 c0b2a8b4 00000000
c0b2a8b4 df801c30 bedf8368
[  219.159230] 7f00: df801c30 d6be1b40 40045612 bedf8368 0000000c
00000036 00000000 c04ffae8
[  219.167532] 7f20: bedf8368 c0500308 00000001 00000056 00000012
c6727f48 00000001 e31dd210
[  219.175837] 7f40: c3400bb0 c6725612 c6727f0b c6727f3c 2262e000
00000000 c6727f58 c126ab28
[  219.184141] 7f60: d6be1b40 40045612 00000000 d6be1b40 d6be1b41
40045612 bedf8368 0000000c
[  219.192445] 7f80: 00000036 c0500b0c 47d64200 b5f11000 40045612
00000036 c0301204 c6726000
[  219.200750] 7fa0: 00000036 c0301000 47d64200 b5f11000 0000000c
40045612 bedf8368 00000001
[  219.209053] 7fc0: 47d64200 b5f11000 40045612 00000036 b5e74e40
0000000c b6f34508 00000000
[  219.217357] 7fe0: bedf8368 bedf8358 b5efa804 b5bce1f0 400f0010
0000000c 00000000 00000000
[  219.225785] [<bf793ec0>] (vchiq_mmal_port_enable [bcm2835_v4l2])
from [<bf78fa54>] (start_streaming+0x124/0x1f0 [bcm2835_v4l2])
[  219.237498] [<bf78fa54>] (start_streaming [bcm2835_v4l2]) from
[<bf70b28c>] (vb2_start_streaming+0x6c/0x12c [videobuf2_common])
[  219.249221] [<bf70b28c>] (vb2_start_streaming [videobuf2_common])
from [<bf70c78c>] (vb2_core_streamon+0x110/0x138 [videobuf2_common])
[  219.261644] [<bf70c78c>] (vb2_core_streamon [videobuf2_common])
from [<bf681a34>] (__video_do_ioctl+0x35c/0x494 [videodev])
[  219.273142] [<bf681a34>] (__video_do_ioctl [videodev]) from
[<bf68219c>] (video_usercopy+0x508/0x5d4 [videodev])
[  219.283585] [<bf68219c>] (video_usercopy [videodev]) from
[<c04ffae8>] (vfs_ioctl+0x28/0x3c)
[  219.292163] [<c04ffae8>] (vfs_ioctl) from [<c0500308>]
(do_vfs_ioctl+0x8c/0x838)
[  219.299678] [<c0500308>] (do_vfs_ioctl) from [<c0500b0c>]
(ksys_ioctl+0x58/0x74)
[  219.307193] [<c0500b0c>] (ksys_ioctl) from [<c0301000>]
(ret_fast_syscall+0x0/0x54)
[  219.314966] Exception stack(0xc6727fa8 to 0xc6727ff0)
[  219.320095] 7fa0:                   47d64200 b5f11000 0000000c
40045612 bedf8368 00000001
[  219.328400] 7fc0: 47d64200 b5f11000 40045612 00000036 b5e74e40
0000000c b6f34508 00000000
[  219.336699] 7fe0: bedf8368 bedf8358 b5efa804 b5bce1f0
[  219.341831] Code: e1a00007 ebfffbd4 e1a01000 ea000007 (e5911000)
[  219.348216] ---[ end trace eed7fb71749a2e2e ]---

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-10  6:34             ` Peter Robinson
@ 2019-01-10 18:48               ` Stefan Wahren
  2019-01-11  6:10                 ` Peter Robinson
  0 siblings, 1 reply; 37+ messages in thread
From: Stefan Wahren @ 2019-01-10 18:48 UTC (permalink / raw)
  To: Peter Robinson
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

Hi Peter,

> Peter Robinson <pbrobinson@gmail.com> hat am 10. Januar 2019 um 07:34 geschrieben:
> 
> 
> > > Hi Stefan,
> > >
> > ...
> > >
> > > I get difference results with 5.0-rc1 but neither of the above apps
> > > work either, will follow up based on the rest of the thread there.
> > >
> >
> > My first step with Raspbian is to enable the Camera interface which results into an appending of the following lines to config.txt:
> >
> > start_x=1
> > gpu_mem=128
> >
> > AFAIK a smaller value for gpu_mem wont work. Please provide your settings which results in this crash.
> 
> start_x=1
> gpu_mem=64

even with those settings i'm getting a picture in qv4l2 (v1.12.3) and no crash.

According to dmesg i also have 64M reserved for CMA. How many do you have?

Does your qc4l2 make use of OpenGL (not in my case)?

Stefan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-10 18:48               ` Stefan Wahren
@ 2019-01-11  6:10                 ` Peter Robinson
  2019-01-11 16:43                   ` Dave Stevenson
  0 siblings, 1 reply; 37+ messages in thread
From: Peter Robinson @ 2019-01-11  6:10 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: devel, tiwai, gregkh, mikebrady, Eric Anholt, linux-rpi-kernel,
	Dave Stevenson, nsaenzjulienne, linux-arm-kernel

Hi Stefan,

> > > > I get difference results with 5.0-rc1 but neither of the above apps
> > > > work either, will follow up based on the rest of the thread there.
> > > >
> > >
> > > My first step with Raspbian is to enable the Camera interface which results into an appending of the following lines to config.txt:
> > >
> > > start_x=1
> > > gpu_mem=128
> > >
> > > AFAIK a smaller value for gpu_mem wont work. Please provide your settings which results in this crash.
> >
> > start_x=1
> > gpu_mem=64
>
> even with those settings i'm getting a picture in qv4l2 (v1.12.3) and no crash.
>
> According to dmesg i also have 64M reserved for CMA. How many do you have?

I have 192Mb of CMA with LXDE, the vc4 driver uses CMA rather than the
gpu_mem via the firmware so that's what we set it to (and to 256Mb for
GNOME)

> Does your qc4l2 make use of OpenGL (not in my case)?

Yes, mine does. The crash with qv4l2 was only when I tried Cheese
first, if I reboot and just use qv4l2 it works fine when configured
with 128Mb without any crash. Which display driver are you using? Are
you using vc4 or the proprietary closed one? With vc4 using cma rather
than gpu_mem I wonder if we can reduce the amount needed there, but in
the interim I've at least now got picture output when using purely
qv4l2 and a reserve of 128Mb

I'm not sure quite what gstreamer1/cheese is doing to cause that crash.

Peter

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-11  6:10                 ` Peter Robinson
@ 2019-01-11 16:43                   ` Dave Stevenson
  2019-01-12  5:26                     ` Peter Robinson
  0 siblings, 1 reply; 37+ messages in thread
From: Dave Stevenson @ 2019-01-11 16:43 UTC (permalink / raw)
  To: Peter Robinson
  Cc: Stefan Wahren, devel, tiwai, Greg KH, mikebrady, Eric Anholt,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE, nsaenzjulienne,
	linux-arm-kernel

Hi Peter

On Fri, 11 Jan 2019 at 06:10, Peter Robinson <pbrobinson@gmail.com> wrote:
>
> Hi Stefan,
>
> > > > > I get difference results with 5.0-rc1 but neither of the above apps
> > > > > work either, will follow up based on the rest of the thread there.
> > > > >
> > > >
> > > > My first step with Raspbian is to enable the Camera interface which results into an appending of the following lines to config.txt:
> > > >
> > > > start_x=1
> > > > gpu_mem=128
> > > >
> > > > AFAIK a smaller value for gpu_mem wont work. Please provide your settings which results in this crash.
> > >
> > > start_x=1
> > > gpu_mem=64
> >
> > even with those settings i'm getting a picture in qv4l2 (v1.12.3) and no crash.
> >
> > According to dmesg i also have 64M reserved for CMA. How many do you have?
>
> I have 192Mb of CMA with LXDE, the vc4 driver uses CMA rather than the
> gpu_mem via the firmware so that's what we set it to (and to 256Mb for
> GNOME)

As Stefan says, with Raspbian the default gpu_mem to use the camera is 128MB.
The memory required depends on your use case as it includes the
buffers for the output images.
Checking on a running system, a V2 camera streaming 1080P YU12 with 3
V4L2 buffers is using 58MB of gpu_mem for the camera stack. H264
encode isntead of YU12 and it's around 63MB.
With the vc4 driver loaded there's only a small number of other
allocations left from the gpu_mem heap, so it's around the 70MB mark
that will be the minimum to get the camera running.

> > Does your qc4l2 make use of OpenGL (not in my case)?
>
> Yes, mine does. The crash with qv4l2 was only when I tried Cheese
> first, if I reboot and just use qv4l2 it works fine when configured
> with 128Mb without any crash. Which display driver are you using? Are
> you using vc4 or the proprietary closed one? With vc4 using cma rather
> than gpu_mem I wonder if we can reduce the amount needed there, but in
> the interim I've at least now got picture output when using purely
> qv4l2 and a reserve of 128Mb
>
> I'm not sure quite what gstreamer1/cheese is doing to cause that crash.

Can you confirm what resolution and format they are using in your
failure case? "v4l2-ctl -V" after they've been run will tell you.

Your earlier request:
> As a side note it would be a useful debug feature from a support PoV
> if the following line could also note which firmware is loaded:
>
> [    8.087691] raspberrypi-firmware soc:firmware: Attached to firmware
> from 2019-01-09 20:07
>
> Something like "attached to extended/reduced/whatecer firmware from XXXX-XX-XX"

A very valid suggestion.
I've made the firmware changes to advertise the build variant and
firmware hash via the mailbox service, and that should be in the next
firmware release.
Pull request https://github.com/raspberrypi/linux/pull/2806 has added
the Linux kernel changes to our kernel rpi-4.19.y branch.
With the updated firmware, "vcgencmd version" will also report the
build variant for you.

  Dave

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload
  2019-01-11 16:43                   ` Dave Stevenson
@ 2019-01-12  5:26                     ` Peter Robinson
  0 siblings, 0 replies; 37+ messages in thread
From: Peter Robinson @ 2019-01-12  5:26 UTC (permalink / raw)
  To: Dave Stevenson
  Cc: Stefan Wahren, devel, tiwai, Greg KH, mikebrady, Eric Anholt,
	moderated list:BROADCOM BCM2835 ARM ARCHITECTURE, nsaenzjulienne,
	linux-arm-kernel

> > > > > > I get difference results with 5.0-rc1 but neither of the above apps
> > > > > > work either, will follow up based on the rest of the thread there.
> > > > > >
> > > > >
> > > > > My first step with Raspbian is to enable the Camera interface which results into an appending of the following lines to config.txt:
> > > > >
> > > > > start_x=1
> > > > > gpu_mem=128
> > > > >
> > > > > AFAIK a smaller value for gpu_mem wont work. Please provide your settings which results in this crash.
> > > >
> > > > start_x=1
> > > > gpu_mem=64
> > >
> > > even with those settings i'm getting a picture in qv4l2 (v1.12.3) and no crash.
> > >
> > > According to dmesg i also have 64M reserved for CMA. How many do you have?
> >
> > I have 192Mb of CMA with LXDE, the vc4 driver uses CMA rather than the
> > gpu_mem via the firmware so that's what we set it to (and to 256Mb for
> > GNOME)
>
> As Stefan says, with Raspbian the default gpu_mem to use the camera is 128MB.
> The memory required depends on your use case as it includes the
> buffers for the output images.
> Checking on a running system, a V2 camera streaming 1080P YU12 with 3
> V4L2 buffers is using 58MB of gpu_mem for the camera stack. H264
> encode isntead of YU12 and it's around 63MB.
> With the vc4 driver loaded there's only a small number of other
> allocations left from the gpu_mem heap, so it's around the 70MB mark
> that will be the minimum to get the camera running.
>
> > > Does your qc4l2 make use of OpenGL (not in my case)?
> >
> > Yes, mine does. The crash with qv4l2 was only when I tried Cheese
> > first, if I reboot and just use qv4l2 it works fine when configured
> > with 128Mb without any crash. Which display driver are you using? Are
> > you using vc4 or the proprietary closed one? With vc4 using cma rather
> > than gpu_mem I wonder if we can reduce the amount needed there, but in
> > the interim I've at least now got picture output when using purely
> > qv4l2 and a reserve of 128Mb
> >
> > I'm not sure quite what gstreamer1/cheese is doing to cause that crash.
>
> Can you confirm what resolution and format they are using in your
> failure case? "v4l2-ctl -V" after they've been run will tell you.

Format Video Capture:
    Width/Height      : 3280/2464
    Pixel Format      : 'BGR4' (32-bit BGRA/X 8-8-8-8)
    Field             : None
    Bytes per Line    : 13184
    Size Image        : 32485376
    Colorspace        : SMPTE 170M
    Transfer Function : Default (maps to Rec. 709)
    YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization      : Default (maps to Full Range)
    Flags             :


> Your earlier request:
> > As a side note it would be a useful debug feature from a support PoV
> > if the following line could also note which firmware is loaded:
> >
> > [    8.087691] raspberrypi-firmware soc:firmware: Attached to firmware
> > from 2019-01-09 20:07
> >
> > Something like "attached to extended/reduced/whatecer firmware from XXXX-XX-XX"
>
> A very valid suggestion.
> I've made the firmware changes to advertise the build variant and
> firmware hash via the mailbox service, and that should be in the next
> firmware release.
> Pull request https://github.com/raspberrypi/linux/pull/2806 has added
> the Linux kernel changes to our kernel rpi-4.19.y branch.
> With the updated firmware, "vcgencmd version" will also report the
> build variant for you.
>
>   Dave

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2019-01-12  5:27 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera Stefan Wahren
2018-12-19  8:07   ` Peter Robinson
2018-10-25 15:29 ` [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading Stefan Wahren
2018-12-19  7:54   ` Peter Robinson
2018-10-25 15:29 ` [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end Stefan Wahren
2018-12-19  7:53   ` Peter Robinson
2018-10-25 15:29 ` [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration Stefan Wahren
2018-10-26  8:07   ` Dan Carpenter
2018-10-25 15:29 ` [PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio Stefan Wahren
2018-10-26  8:09   ` Dan Carpenter
2018-10-26  8:18     ` Dan Carpenter
2018-10-25 15:29 ` [PATCH RFC 07/11] staging: bcm2835-audio: Enable compile test Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 08/11] staging: bcm2835-audio: use module_platform_driver() macro Stefan Wahren
2018-10-25 15:29 ` [PATCH RFX 09/11] staging: bcm2835-audio: Drop DT dependency Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 10/11] staging: bcm2835-camera: Provide more specific probe error messages Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config Stefan Wahren
2018-10-26 10:55   ` Nicolas Saenz Julienne
2018-10-26 11:06 ` [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Nicolas Saenz Julienne
2018-10-28 20:10   ` Stefan Wahren
2019-01-08  7:21 ` Peter Robinson
2019-01-08  8:48   ` Stefan Wahren
2019-01-08  8:56     ` Peter Robinson
2019-01-08 10:20       ` Stefan Wahren
2019-01-10  5:09         ` Peter Robinson
2019-01-10  6:24           ` Stefan Wahren
2019-01-10  6:34             ` Peter Robinson
2019-01-10 18:48               ` Stefan Wahren
2019-01-11  6:10                 ` Peter Robinson
2019-01-11 16:43                   ` Dave Stevenson
2019-01-12  5:26                     ` Peter Robinson
2019-01-10  7:05             ` Peter Robinson
2019-01-08 17:10   ` Dave Stevenson
2019-01-09  8:33     ` Stefan Wahren
2019-01-09 11:58       ` Nicolas Saenz Julienne
2019-01-10  5:22     ` Peter Robinson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.