mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Failure to stop CAMSS stream (sc8280xp)
@ 2024-07-03 13:07 Johan Hovold
  2024-07-03 14:30 ` Bryan O'Donoghue
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2024-07-03 13:07 UTC (permalink / raw)
  To: Robert Foss, Todor Tomov, Bryan O'Donoghue
  Cc: Mauro Carvalho Chehab, Kieran Bingham, linux-media,
	linux-arm-msm, linux-kernel

Hi,

I've been testing Bryan's work that enables the camera on the Lenovo
ThinkPad X13s and keep triggering the below warnings when stopping a
stream (e.g. closing qcam) which indicate that this is a driver bug.

After this happens qcam fails to start again (something returns -EBUSY).

Is this a known issue with CAMSS or is something missing in the sc8280xp
integration?

I'm using the following (squashed) devicetree patch from Bryan to enable
the camera (everything else is upstream):

	https://github.com/jhovold/linux/commit/85b41b8d0efd418509df548592f95b43b9663409

The issue was there with 6.9 as well so it's not a (recent) regression.

Probing the camera sometimes, but infrequently, also fails with:

	qcom-camss ac5a000.camss: Failed to power up pipeline: -13

and I'm seeing the following warning on every boot:

	i2c-qcom-cci ac4c000.cci: Found 19200000 cci clk rate while 37500000 was expected

Johan


[ 1265.509677] ------------[ cut here ]------------
[ 1265.509831] WARNING: CPU: 5 PID: 919 at drivers/media/common/videobuf2/videobuf2-core.c:2183 __vb2_queue_cancel+0x230/0x2c8 [videobuf2_common]
...
[ 1265.510417] CPU: 5 PID: 919 Comm: qcam Not tainted 6.10.0-rc5 #124
[ 1265.510428] Hardware name: LENOVO 21BYZ9SRUS/21BYZ9SRUS, BIOS N3HET87W (1.59 ) 12/05/2023
...
[ 1265.510630] Call trace:
[ 1265.510636]  __vb2_queue_cancel+0x230/0x2c8 [videobuf2_common]
[ 1265.510648]  vb2_core_streamoff+0x24/0xcc [videobuf2_common]
[ 1265.510660]  vb2_ioctl_streamoff+0x5c/0xa8 [videobuf2_v4l2]
[ 1265.510673]  v4l_streamoff+0x24/0x30 [videodev]
[ 1265.510707]  __video_do_ioctl+0x190/0x3f4 [videodev]
[ 1265.510732]  video_usercopy+0x304/0x8c4 [videodev]
[ 1265.510757]  video_ioctl2+0x18/0x34 [videodev]
[ 1265.510782]  v4l2_ioctl+0x40/0x60 [videodev]
[ 1265.510807]  __arm64_sys_ioctl+0xa8/0xec
[ 1265.510820]  invoke_syscall+0x48/0x118
[ 1265.510834]  el0_svc_common.constprop.0+0x40/0xe0
[ 1265.510845]  do_el0_svc+0x1c/0x28
[ 1265.510856]  el0_svc+0x48/0x114
[ 1265.510867]  el0t_64_sync_handler+0xc0/0xc4
[ 1265.510876]  el0t_64_sync+0x190/0x194
[ 1265.510885] irq event stamp: 279668
[ 1265.510892] hardirqs last  enabled at (279667): [<ffffa0c6a09d7754>] _raw_spin_unlock_irqrestore+0x74/0x78
[ 1265.510904] hardirqs last disabled at (279668): [<ffffa0c6a09c8860>] el1_dbg+0x24/0x8c
[ 1265.510913] softirqs last  enabled at (279636): [<ffffa0c69ffe76e4>] fpsimd_restore_current_state+0x34/0xc4
[ 1265.510924] softirqs last disabled at (279634): [<ffffa0c69ffe76b4>] fpsimd_restore_current_state+0x4/0xc4
[ 1265.510935] ---[ end trace 0000000000000000 ]---
[ 1265.510944] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 0 in active state
[ 1265.511175] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 1 in active state
[ 1265.511398] videobuf2_common: driver bug: stop_streaming operation is leaving buffer 2 in active state

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

* Re: Failure to stop CAMSS stream (sc8280xp)
  2024-07-03 13:07 Failure to stop CAMSS stream (sc8280xp) Johan Hovold
@ 2024-07-03 14:30 ` Bryan O'Donoghue
  2024-07-03 15:12   ` Johan Hovold
  0 siblings, 1 reply; 4+ messages in thread
From: Bryan O'Donoghue @ 2024-07-03 14:30 UTC (permalink / raw)
  To: Johan Hovold, Robert Foss, Todor Tomov
  Cc: Mauro Carvalho Chehab, Kieran Bingham, linux-media,
	linux-arm-msm, linux-kernel

On 03/07/2024 14:07, Johan Hovold wrote:
> Is this a known issue with CAMSS or is something missing in the sc8280xp
> integration?

A known issue on my end, I also want to root cause intermittent sensor 
startup failure, before switching on the sensor upstream for more common 
use.


> I'm using the following (squashed) devicetree patch from Bryan to enable
> the camera (everything else is upstream):
> 
> 	https://github.com/jhovold/linux/commit/85b41b8d0efd418509df548592f95b43b9663409
> 
> The issue was there with 6.9 as well so it's not a (recent) regression.
> 
> Probing the camera sometimes, but infrequently, also fails with:
> 
> 	qcom-camss ac5a000.camss: Failed to power up pipeline: -13

Yes this. If you recall on the pm8010 I had mentioned to you about a 
wait-time to startup the regulator - thinking it was the regulator 
causing this error.

More likely the GPIO reset polarity or delay needs to be tweaked in the 
sensor driver.

> and I'm seeing the following warning on every boot:
> 
> 	i2c-qcom-cci ac4c000.cci: Found 19200000 cci clk rate while 37500000 was expected

That's hanging around for quite a long time 19.2 MHz is a perfectly 
valid clock, useless error message.

---
bod

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

* Re: Failure to stop CAMSS stream (sc8280xp)
  2024-07-03 14:30 ` Bryan O'Donoghue
@ 2024-07-03 15:12   ` Johan Hovold
  2024-07-03 15:46     ` Bryan O'Donoghue
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hovold @ 2024-07-03 15:12 UTC (permalink / raw)
  To: Bryan O'Donoghue
  Cc: Robert Foss, Todor Tomov, Mauro Carvalho Chehab, Kieran Bingham,
	linux-media, linux-arm-msm, linux-kernel

On Wed, Jul 03, 2024 at 03:30:09PM +0100, Bryan O'Donoghue wrote:
> On 03/07/2024 14:07, Johan Hovold wrote:
> > Is this a known issue with CAMSS or is something missing in the sc8280xp
> > integration?
> 
> A known issue on my end,

Ok, good. Do you know already if this is a generic CAMSS issue or
something with the sc8280xp integration? I believe I heard someone
saying that they had seen something similar on other Qualcomm platforms.

> I also want to root cause intermittent sensor 
> startup failure, before switching on the sensor upstream for more common 
> use.

> > The issue was there with 6.9 as well so it's not a (recent) regression.
> > 
> > Probing the camera sometimes, but infrequently, also fails with:
> > 
> > 	qcom-camss ac5a000.camss: Failed to power up pipeline: -13
> 
> Yes this. If you recall on the pm8010 I had mentioned to you about a 
> wait-time to startup the regulator - thinking it was the regulator 
> causing this error.
> 
> More likely the GPIO reset polarity or delay needs to be tweaked in the 
> sensor driver.

Ok. Seems to happen quite rarely here. I have also seen a probe deferral
warning (which should be suppressed if it's legit) that may or may not
be related:

	ov5675 24-0010: failed to get HW configuration: -517

> > and I'm seeing the following warning on every boot:
> > 
> > 	i2c-qcom-cci ac4c000.cci: Found 19200000 cci clk rate while 37500000 was expected
> 
> That's hanging around for quite a long time 19.2 MHz is a perfectly 
> valid clock, useless error message.

Ok, but please do something to get rid of this warning as well. With
too much noise in the logs, people may fail to notice real issues.

Johan

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

* Re: Failure to stop CAMSS stream (sc8280xp)
  2024-07-03 15:12   ` Johan Hovold
@ 2024-07-03 15:46     ` Bryan O'Donoghue
  0 siblings, 0 replies; 4+ messages in thread
From: Bryan O'Donoghue @ 2024-07-03 15:46 UTC (permalink / raw)
  To: Johan Hovold, Bryan O'Donoghue
  Cc: Robert Foss, Todor Tomov, Mauro Carvalho Chehab, Kieran Bingham,
	linux-media, linux-arm-msm, linux-kernel

On 03/07/2024 16:12, Johan Hovold wrote:
> On Wed, Jul 03, 2024 at 03:30:09PM +0100, Bryan O'Donoghue wrote:
>> On 03/07/2024 14:07, Johan Hovold wrote:
>>> Is this a known issue with CAMSS or is something missing in the sc8280xp
>>> integration?
>>
>> A known issue on my end,
> 
> Ok, good. Do you know already if this is a generic CAMSS issue or
> something with the sc8280xp integration? I believe I heard someone
> saying that they had seen something similar on other Qualcomm platforms.

It seems generic but, I only really started to see it on x13s, then 
again I use x13s as a semi-daily driver...

> 
>> I also want to root cause intermittent sensor
>> startup failure, before switching on the sensor upstream for more common
>> use.
> 
>>> The issue was there with 6.9 as well so it's not a (recent) regression.
>>>
>>> Probing the camera sometimes, but infrequently, also fails with:
>>>
>>> 	qcom-camss ac5a000.camss: Failed to power up pipeline: -13
>>
>> Yes this. If you recall on the pm8010 I had mentioned to you about a
>> wait-time to startup the regulator - thinking it was the regulator
>> causing this error.
>>
>> More likely the GPIO reset polarity or delay needs to be tweaked in the
>> sensor driver.
> 
> Ok. Seems to happen quite rarely here. I have also seen a probe deferral
> warning (which should be suppressed if it's legit) that may or may not
> be related:
> 
> 	ov5675 24-0010: failed to get HW configuration: -517

Hah odd, I haven't seen probe deferral myself - perhaps not in the intrd 
for my laptop.

> 
>>> and I'm seeing the following warning on every boot:
>>>
>>> 	i2c-qcom-cci ac4c000.cci: Found 19200000 cci clk rate while 37500000 was expected
>>
>> That's hanging around for quite a long time 19.2 MHz is a perfectly
>> valid clock, useless error message.
> 
> Ok, but please do something to get rid of this warning as well. With
> too much noise in the logs, people may fail to notice real issues.

ack

---
bod


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

end of thread, other threads:[~2024-07-03 15:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-03 13:07 Failure to stop CAMSS stream (sc8280xp) Johan Hovold
2024-07-03 14:30 ` Bryan O'Donoghue
2024-07-03 15:12   ` Johan Hovold
2024-07-03 15:46     ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®