Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hi Hans, On Fri, 2015-02-13 at 10:24 +0100, Hans Verkuil wrote: Jurgen, Raimond, On 02/13/2015 10:12 AM, Hans Verkuil wrote: Hi Jurgen, On 02/04/2015 06:21 PM, Jurgen Kramer wrote: On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Can you comment on this question? The UNBALANCED warnings have not reappeared (so far). And they are still gone? If that's the case, then I'll merge the patch fixing this for 3.20. With respect to the risc error: the only reason I can think of is that it is a race condition when the risc program is updated. I'll see if I can spend some time on this today or on Monday. Can you give me an indication how often you see this risc error message? Can you both apply this patch and let me know what it says the next time you get a risc error message? I just realized that important information was never logged, so with luck this might help me pinpoint the problem. So far I got one mpeg error: [81639.485605] cx23885[2]: mpeg risc op code error 10001 0 [81639.485610] cx23885[2]: TS1 B - dma channel status dump [81639.485612] cx23885[2]: cmds: init risc lo : 0x053aa000 [81639.485615] cx23885[2]: cmds: init risc hi : 0x [81639.485617] cx23885[2]: cmds: cdt base : 0x00010580 [81639.485620] cx23885[2]: cmds: cdt size : 0x000a [81639.485622] cx23885[2]: cmds: iq base: 0x00010400 [81639.485625] cx23885[2]: cmds: iq size: 0x0010 [81639.485628] cx23885[2]: cmds: risc pc lo : 0x048e5048 [81639.485630] cx23885[2]: cmds: risc pc hi : 0x [81639.485633] cx23885[2]: cmds: iq wr ptr : 0x4105 [81639.485636] cx23885[2]: cmds: iq rd ptr : 0x4109 [81639.485638] cx23885[2]: cmds: cdt current: 0x000105a8 [81639.485640] cx23885[2]: cmds: pci target lo : 0xadc44000 [81639.485642] cx23885[2]: cmds: pci target hi : 0x [81639.485645] cx23885[2]: cmds: line / byte: 0x0020 [81639.485648] cx23885[2]: risc0: 0x1c0002f0 [ write sol eol count=752 ] [81639.485651] cx23885[2]: risc1: 0xadc44000 [ readc sol eol irq1 23 22 18 14 count=0 ] [81639.485655] cx23885[2]: risc2: 0x [ INVALID count=0 ] [81639.485658] cx23885[2]: risc3: 0x1c0002f0 [ write sol eol count=752 ] [81639.485661] cx23885[2]: (0x00010400) iq 0: 0xadc448d0 [ readc sol eol irq1 23 22 18 14 count=2256 ] [81639.485665] cx23885[2]: (0x00010404) iq 1: 0x [ INVALID count=0 ] [81639.485667] cx23885[2]: (0x00010408) iq 2: 0x1c0002f0 [ write sol eol count=752 ] [81639.485670] cx23885[2]: iq 3: 0xadc44bc0 [ arg #1 ] [81639.485672] cx23885[2]: iq 4: 0x [ arg #2 ] [81639.485674] cx23885[2]: (0x00010414) iq 5: 0x7100 [ jump irq1 count=0 ] [81639.485677] cx23885[2]: iq 6: 0x1c0002f0 [ arg #1 ] [81639.485679] cx23885[2]: iq 7: 0xadc44000 [ arg #2 ] [81639.485682] cx23885[2]: (0x00010420) iq 8: 0x [ INVALID count=0 ] [81639.485684] cx23885[2]: (0x00010424) iq 9: 0x1c0002f0 [ write sol eol count=752 ] [81639.485687] cx23885[2]: iq a: 0xadc442f0 [ arg #1 ] [81639.485689] cx23885[2]: iq b: 0x [ arg #2 ] [81639.485691] cx23885[2]: (0x00010430) iq c: 0x1c0002f0 [ write sol eol count=752 ] [81639.485694] cx23885[2]: iq d: 0xadc445e0 [ arg #1 ] [81639.485696] cx23885[2]: iq e: 0x [ arg #2 ] [81639.485698] cx23885[2]: (0x0001043c) iq f: 0x1c0002f0 [ write sol eol count=752 ] [81639.485701] cx23885[2]: iq 10: 0x3efdbb2f [ arg #1 ] [81639.485704] cx23885[2]: iq 11: 0xbb1ae8fd [ arg #2 ] [81639.485704] cx23885[2]: fifo: 0x5000 - 0x6000 [81639.485705] cx23885[2]: ctrl: 0x00010400 - 0x10460 [81639.485707] cx23885[2]: ptr1_reg: 0x5700 [81639.485709] cx23885[2]: ptr2_reg: 0x000105a8 [81639.485711] cx23885[2]: cnt1_reg: 0x0012 [81639.485714] cx23885[2]: cnt2_reg: 0x0005 Best regards, Jurgen -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hi Jurgen, On 02/04/2015 06:21 PM, Jurgen Kramer wrote: On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Can you comment on this question? The UNBALANCED warnings have not reappeared (so far). And they are still gone? If that's the case, then I'll merge the patch fixing this for 3.20. With respect to the risc error: the only reason I can think of is that it is a race condition when the risc program is updated. I'll see if I can spend some time on this today or on Monday. Can you give me an indication how often you see this risc error message? Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Jurgen, Raimond, On 02/13/2015 10:12 AM, Hans Verkuil wrote: Hi Jurgen, On 02/04/2015 06:21 PM, Jurgen Kramer wrote: On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Can you comment on this question? The UNBALANCED warnings have not reappeared (so far). And they are still gone? If that's the case, then I'll merge the patch fixing this for 3.20. With respect to the risc error: the only reason I can think of is that it is a race condition when the risc program is updated. I'll see if I can spend some time on this today or on Monday. Can you give me an indication how often you see this risc error message? Can you both apply this patch and let me know what it says the next time you get a risc error message? I just realized that important information was never logged, so with luck this might help me pinpoint the problem. Thanks, Hans diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 1ad4994..b66b8d4 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -1628,7 +1628,7 @@ static int cx23885_irq_ts(struct cx23885_tsport *port, u32 status) dprintk(7, (VID_BC_MSK_OF 0x%08x)\n, VID_BC_MSK_OF); - printk(KERN_ERR %s: mpeg risc op code error\n, dev-name); + printk(KERN_ERR %s: mpeg risc op code error %x %d\n, dev-name, status, port == dev-ts2); cx_clear(port-reg_dma_ctl, port-dma_ctl_val); cx23885_sram_channel_dump(dev, -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 02/13/2015 05:14 PM, Jurgen Kramer wrote: Hi, On Fri, 2015-02-13 at 10:12 +0100, Hans Verkuil wrote: Hi Jurgen, On 02/04/2015 06:21 PM, Jurgen Kramer wrote: On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Can you comment on this question? I still get the risc errors at regular intervals. I am not sure what the real impact is. I do get the occasional failed recording (dreaded 0 byte recoderings). Did you get those failed recordings in the past (i.e. before the 'convert to vb2' commit) as well? Or are these new since that commit? The UNBALANCED warnings have not reappeared (so far). And they are still gone? If that's the case, then I'll merge the patch fixing this for 3.20. No, these are gone. Ah, good news. With respect to the risc error: the only reason I can think of is that it is a race condition when the risc program is updated. I'll see if I can spend some time on this today or on Monday. Can you give me an indication how often you see this risc error message? dmesg |grep risc op code error [ 1267.999719] cx23885[1]: mpeg risc op code error [17830.312766] cx23885[2]: mpeg risc op code error [37820.312372] cx23885[2]: mpeg risc op code error [48973.897721] cx23885[2]: mpeg risc op code error [126673.151447] cx23885[0]: mpeg risc op code error [208262.607584] cx23885[2]: mpeg risc op code error [212564.803499] cx23885[2]: mpeg risc op code error [288834.700570] cx23885[1]: mpeg risc op code error [298753.789105] cx23885[2]: mpeg risc op code error [341900.746719] cx23885[2]: mpeg risc op code error [346513.849946] cx23885[1]: mpeg risc op code error [359267.169552] cx23885[2]: mpeg risc op code error [370728.293458] cx23885[1]: mpeg risc op code error [423626.314834] cx23885[1]: mpeg risc op code error uptime: 17:14:03 up 4 days, 22:22, 2 users, load average: 0.19, 0.39, 0.34 I understand that you record continuously? Or only at specific times? Sorry for all these questions, but they help me locate the problem. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hi, On Fri, 2015-02-13 at 10:12 +0100, Hans Verkuil wrote: Hi Jurgen, On 02/04/2015 06:21 PM, Jurgen Kramer wrote: On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Can you comment on this question? I still get the risc errors at regular intervals. I am not sure what the real impact is. I do get the occasional failed recording (dreaded 0 byte recoderings). The UNBALANCED warnings have not reappeared (so far). And they are still gone? If that's the case, then I'll merge the patch fixing this for 3.20. No, these are gone. With respect to the risc error: the only reason I can think of is that it is a race condition when the risc program is updated. I'll see if I can spend some time on this today or on Monday. Can you give me an indication how often you see this risc error message? dmesg |grep risc op code error [ 1267.999719] cx23885[1]: mpeg risc op code error [17830.312766] cx23885[2]: mpeg risc op code error [37820.312372] cx23885[2]: mpeg risc op code error [48973.897721] cx23885[2]: mpeg risc op code error [126673.151447] cx23885[0]: mpeg risc op code error [208262.607584] cx23885[2]: mpeg risc op code error [212564.803499] cx23885[2]: mpeg risc op code error [288834.700570] cx23885[1]: mpeg risc op code error [298753.789105] cx23885[2]: mpeg risc op code error [341900.746719] cx23885[2]: mpeg risc op code error [346513.849946] cx23885[1]: mpeg risc op code error [359267.169552] cx23885[2]: mpeg risc op code error [370728.293458] cx23885[1]: mpeg risc op code error [423626.314834] cx23885[1]: mpeg risc op code error uptime: 17:14:03 up 4 days, 22:22, 2 users, load average: 0.19, 0.39, 0.34 Best regards, Jurgen -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hi Hans, On Fri, 2015-02-13 at 10:24 +0100, Hans Verkuil wrote: Jurgen, Raimond, On 02/13/2015 10:12 AM, Hans Verkuil wrote: Hi Jurgen, On 02/04/2015 06:21 PM, Jurgen Kramer wrote: On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Can you comment on this question? The UNBALANCED warnings have not reappeared (so far). And they are still gone? If that's the case, then I'll merge the patch fixing this for 3.20. With respect to the risc error: the only reason I can think of is that it is a race condition when the risc program is updated. I'll see if I can spend some time on this today or on Monday. Can you give me an indication how often you see this risc error message? Can you both apply this patch and let me know what it says the next time you get a risc error message? I just realized that important information was never logged, so with luck this might help me pinpoint the problem. I'll apply it tonight and will keep you posted. Jurgen -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hi, On Fri, 2015-02-13 at 17:42 +0100, Hans Verkuil wrote: On 02/13/2015 05:14 PM, Jurgen Kramer wrote: Hi, On Fri, 2015-02-13 at 10:12 +0100, Hans Verkuil wrote: Hi Jurgen, On 02/04/2015 06:21 PM, Jurgen Kramer wrote: On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Can you comment on this question? I still get the risc errors at regular intervals. I am not sure what the real impact is. I do get the occasional failed recording (dreaded 0 byte recoderings). Did you get those failed recordings in the past (i.e. before the 'convert to vb2' commit) as well? Or are these new since that commit? I only got the T980C's last December. I also had the occasional failed recording with my old PCI cards. The UNBALANCED warnings have not reappeared (so far). And they are still gone? If that's the case, then I'll merge the patch fixing this for 3.20. No, these are gone. Ah, good news. With respect to the risc error: the only reason I can think of is that it is a race condition when the risc program is updated. I'll see if I can spend some time on this today or on Monday. Can you give me an indication how often you see this risc error message? dmesg |grep risc op code error [ 1267.999719] cx23885[1]: mpeg risc op code error [17830.312766] cx23885[2]: mpeg risc op code error [37820.312372] cx23885[2]: mpeg risc op code error [48973.897721] cx23885[2]: mpeg risc op code error [126673.151447] cx23885[0]: mpeg risc op code error [208262.607584] cx23885[2]: mpeg risc op code error [212564.803499] cx23885[2]: mpeg risc op code error [288834.700570] cx23885[1]: mpeg risc op code error [298753.789105] cx23885[2]: mpeg risc op code error [341900.746719] cx23885[2]: mpeg risc op code error [346513.849946] cx23885[1]: mpeg risc op code error [359267.169552] cx23885[2]: mpeg risc op code error [370728.293458] cx23885[1]: mpeg risc op code error [423626.314834] cx23885[1]: mpeg risc op code error uptime: 17:14:03 up 4 days, 22:22, 2 users, load average: 0.19, 0.39, 0.34 I understand that you record continuously? Or only at specific times? No not continuously, occasionally when there is something interesting :-), but quite regularly (series etc). Sorry for all these questions, but they help me locate the problem. No problem :-) Regards, Jurgen -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 04.02.2015 21:53, Raimonds Cicans wrote: On 04.02.2015 18:19, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Raimond, do you still see the AMD iommu faults with this patch? I have limited access to this box at workdays. I will try to test your patch tomorrow. Unfortunately I still see AMD iommu faults. Test environment: kernel: 3.18.1 (I was unable to compile drivers on kernel 3.13.10) media tree: pure main media tree + your patch test: 1) warm reboot 2) run command w_scan -fs -s S13E0 -D0c -a X where X - receiver's number Tests were run on single receiver Observations: 1) Tests were run three times on first receiver and three times on second. Only one test from three failed on first receiver. All tests failed on second receiver. 2) I have feeling that with your patch faults on first receiver appear less often but this may be pure luck or placebo. Raimonds Cicans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? Raimond, do you still see the AMD iommu faults with this patch? Regards, Hans [ 172.946876] dvb_ca adapter 0: DVB CAM detected and initialised successfully [ 276.938186] dvb_ca adapter 1: DVB CAM detected and initialised successfully [ 405.007902] dvb_ca adapter 2: DVB CAM detected and initialised successfully [ 8031.928944] traps: polkitd[1017] general protection ip:7f8754445022 sp:7fff3ef612d0 error:0 in libmozjs-17.0.so[7f8754306000+3b3000] [18977.465763] perf interrupt took too long (2510 2500), lowering kernel.perf_event_max_sample_rate to 5 [60407.000404] cx23885[1]: mpeg risc op code error [60407.000409] cx23885[1]: TS1 B - dma channel status dump [60407.000411] cx23885[1]: cmds: init risc lo : 0xb8869000 [60407.000414] cx23885[1]: cmds: init risc hi : 0x [60407.000417] cx23885[1]: cmds: cdt base : 0x00010580 [60407.000420] cx23885[1]: cmds: cdt size : 0x000a [60407.000422] cx23885[1]: cmds: iq base: 0x00010400 [60407.000425] cx23885[1]: cmds: iq size: 0x0010 [60407.000427] cx23885[1]: cmds: risc pc lo : 0xc9601048 [60407.000430] cx23885[1]: cmds: risc pc hi : 0x [60407.000433] cx23885[1]: cmds: iq wr ptr : 0x4105 [60407.000435] cx23885[1]: cmds: iq rd ptr : 0x4109 [60407.000438] cx23885[1]: cmds: cdt current: 0x000105a8 [60407.000441] cx23885[1]: cmds: pci target lo : 0xb8988000 [60407.000443] cx23885[1]: cmds: pci target hi : 0x [60407.000445] cx23885[1]: cmds: line / byte: 0x0020 [60407.000448] cx23885[1]: risc0: 0x1c0002f0 [ write sol eol count=752 ] [60407.000452] cx23885[1]: risc1: 0xb8988000 [ writerm sol 23 20 19 resync count=0 ] [60407.000455] cx23885[1]: risc2: 0x [ INVALID count=0 ] [60407.000457] cx23885[1]: risc3: 0x1c0002f0 [ write sol eol count=752 ] [60407.000460] cx23885[1]: (0x00010400) iq 0: 0xb89888d0 [ writerm sol 23 20 19 resync count=2256 ] [60407.000464] cx23885[1]: iq 1: 0x [ arg #1 ] [60407.000466] cx23885[1]: iq 2: 0x1c0002f0 [ arg #2 ] [60407.000468] cx23885[1]: (0x0001040c) iq 3: 0xb8988bc0 [ writerm sol 23 20 19 resync count=3008 ] [60407.000472] cx23885[1]: iq 4: 0x [ arg #1 ] [60407.000474] cx23885[1]: iq 5: 0x7100 [ arg #2 ] [60407.000476] cx23885[1]: (0x00010418) iq 6: 0x1c0002f0 [ write sol eol count=752 ] [60407.000479] cx23885[1]: iq 7: 0xb8988000 [ arg #1 ] [60407.000481] cx23885[1]: iq 8: 0x [ arg #2 ] [60407.000483] cx23885[1]: (0x00010424) iq 9: 0x1c0002f0 [ write sol eol count=752 ] [60407.000486] cx23885[1]: iq a: 0xb89882f0 [ arg #1 ] [60407.000488] cx23885[1]: iq b: 0x [ arg #2 ] [60407.000490] cx23885[1]: (0x00010430) iq c: 0x1c0002f0 [ write sol eol count=752 ] [60407.000493] cx23885[1]: iq d: 0xb89885e0 [ arg #1 ] [60407.000495] cx23885[1]: iq e: 0x [ arg #2 ] [60407.000497] cx23885[1]: (0x0001043c) iq f: 0x1c0002f0 [ write sol eol count=752 ] [60407.000500] cx23885[1]: iq 10: 0x6a76032d [ arg #1 ] [60407.000502] cx23885[1]: iq 11: 0x3a68baa3 [ arg #2 ] [60407.000503] cx23885[1]: fifo: 0x5000 - 0x6000 [60407.000504] cx23885[1]: ctrl: 0x00010400 - 0x10460 [60407.000506] cx23885[1]: ptr1_reg: 0x5860 [60407.000508] cx23885[1]: ptr2_reg: 0x000105a8 [60407.000511] cx23885[1]: cnt1_reg: 0x0028 [60407.000513] cx23885[1]: cnt2_reg: 0x0005 [63048.983736] dvb_ca adapter 2: DVB CAM detected and initialised successfully [97553.449010] dvb_ca adapter 0: DVB CAM detected and initialised successfully Regards, Jurgen -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On Wed, 2015-02-04 at 17:19 +0100, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: OK, I suspected that might be the case. Is the UNBALANCED warning gone with my vb2 patch? When you see this risc error, does anything break (broken up video) or crash, or does it just keep on streaming? The UNBALANCED warnings have not reappeared (so far). Regards, Jurgen -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 04.02.2015 18:19, Hans Verkuil wrote: On 02/04/2015 05:06 PM, Jurgen Kramer wrote: Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Raimond, do you still see the AMD iommu faults with this patch? I have limited access to this box at workdays. I will try to test your patch tomorrow. Raimonds Cicans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hi Hans, On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: On 02/01/2015 02:06 PM, Raimonds Cicans wrote: On 29.01.2015 14:12, Hans Verkuil wrote: On 01/29/15 12:51, Raimonds Cicans wrote: On 29.01.2015 09:33, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Maybe... But on other hand this did not happen on old kernel with old driver. And when I did bisection on old kernel + media tree I started to receive this message only on new driver. Was CONFIG_IOMMU_SUPPORT enabled in the old kernel? zgrep CONFIG_IOMMU_SUPPORT /proc/config.gz CONFIG_IOMMU_SUPPORT=y Raimonds Cicans Raimonds and Jurgen, Can you both test with the following patch applied to the driver: Unfortunately the mpeg error is not (completely) gone: [ 172.946876] dvb_ca adapter 0: DVB CAM detected and initialised successfully [ 276.938186] dvb_ca adapter 1: DVB CAM detected and initialised successfully [ 405.007902] dvb_ca adapter 2: DVB CAM detected and initialised successfully [ 8031.928944] traps: polkitd[1017] general protection ip:7f8754445022 sp:7fff3ef612d0 error:0 in libmozjs-17.0.so[7f8754306000+3b3000] [18977.465763] perf interrupt took too long (2510 2500), lowering kernel.perf_event_max_sample_rate to 5 [60407.000404] cx23885[1]: mpeg risc op code error [60407.000409] cx23885[1]: TS1 B - dma channel status dump [60407.000411] cx23885[1]: cmds: init risc lo : 0xb8869000 [60407.000414] cx23885[1]: cmds: init risc hi : 0x [60407.000417] cx23885[1]: cmds: cdt base : 0x00010580 [60407.000420] cx23885[1]: cmds: cdt size : 0x000a [60407.000422] cx23885[1]: cmds: iq base: 0x00010400 [60407.000425] cx23885[1]: cmds: iq size: 0x0010 [60407.000427] cx23885[1]: cmds: risc pc lo : 0xc9601048 [60407.000430] cx23885[1]: cmds: risc pc hi : 0x [60407.000433] cx23885[1]: cmds: iq wr ptr : 0x4105 [60407.000435] cx23885[1]: cmds: iq rd ptr : 0x4109 [60407.000438] cx23885[1]: cmds: cdt current: 0x000105a8 [60407.000441] cx23885[1]: cmds: pci target lo : 0xb8988000 [60407.000443] cx23885[1]: cmds: pci target hi : 0x [60407.000445] cx23885[1]: cmds: line / byte: 0x0020 [60407.000448] cx23885[1]: risc0: 0x1c0002f0 [ write sol eol count=752 ] [60407.000452] cx23885[1]: risc1: 0xb8988000 [ writerm sol 23 20 19 resync count=0 ] [60407.000455] cx23885[1]: risc2: 0x [ INVALID count=0 ] [60407.000457] cx23885[1]: risc3: 0x1c0002f0 [ write sol eol count=752 ] [60407.000460] cx23885[1]: (0x00010400) iq 0: 0xb89888d0 [ writerm sol 23 20 19 resync count=2256 ] [60407.000464] cx23885[1]: iq 1: 0x [ arg #1 ] [60407.000466] cx23885[1]: iq 2: 0x1c0002f0 [ arg #2 ] [60407.000468] cx23885[1]: (0x0001040c) iq 3: 0xb8988bc0 [ writerm sol 23 20 19 resync count=3008 ] [60407.000472] cx23885[1]: iq 4: 0x [ arg #1 ] [60407.000474] cx23885[1]: iq 5: 0x7100 [ arg #2 ] [60407.000476] cx23885[1]: (0x00010418) iq 6: 0x1c0002f0 [ write sol eol count=752 ] [60407.000479] cx23885[1]: iq 7: 0xb8988000 [ arg #1 ] [60407.000481] cx23885[1]: iq 8: 0x [ arg #2 ] [60407.000483] cx23885[1]: (0x00010424) iq 9: 0x1c0002f0 [ write sol eol count=752 ] [60407.000486] cx23885[1]: iq a: 0xb89882f0 [ arg #1 ] [60407.000488] cx23885[1]: iq b: 0x [ arg #2 ] [60407.000490] cx23885[1]: (0x00010430) iq c: 0x1c0002f0 [ write sol eol count=752 ] [60407.000493] cx23885[1]: iq d: 0xb89885e0 [ arg #1 ] [60407.000495] cx23885[1]: iq e: 0x [ arg #2 ] [60407.000497] cx23885[1]: (0x0001043c) iq f: 0x1c0002f0 [ write sol eol count=752 ] [60407.000500] cx23885[1]: iq 10: 0x6a76032d [ arg #1 ] [60407.000502] cx23885[1]: iq 11: 0x3a68baa3 [ arg #2 ] [60407.000503] cx23885[1]: fifo: 0x5000 - 0x6000 [60407.000504] cx23885[1]: ctrl: 0x00010400 - 0x10460 [60407.000506] cx23885[1]: ptr1_reg: 0x5860 [60407.000508] cx23885[1]: ptr2_reg: 0x000105a8
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 02/01/2015 02:06 PM, Raimonds Cicans wrote: On 29.01.2015 14:12, Hans Verkuil wrote: On 01/29/15 12:51, Raimonds Cicans wrote: On 29.01.2015 09:33, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Maybe... But on other hand this did not happen on old kernel with old driver. And when I did bisection on old kernel + media tree I started to receive this message only on new driver. Was CONFIG_IOMMU_SUPPORT enabled in the old kernel? zgrep CONFIG_IOMMU_SUPPORT /proc/config.gz CONFIG_IOMMU_SUPPORT=y Raimonds Cicans Raimonds and Jurgen, Can you both test with the following patch applied to the driver: diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 1ad4994..72df5ae 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -1497,6 +1497,7 @@ void cx23885_buf_queue(struct cx23885_tsport *port, struct cx23885_buffer *buf) buf-risc.jmp[0] = cpu_to_le32(RISC_JUMP | RISC_CNT_INC); buf-risc.jmp[1] = cpu_to_le32(buf-risc.dma + 12); buf-risc.jmp[2] = cpu_to_le32(0); /* bits 63-32 */ + wmb(); spin_lock_irqsave(dev-slock, flags); if (list_empty(cx88q-active)) { @@ -1505,10 +1506,12 @@ void cx23885_buf_queue(struct cx23885_tsport *port, struct cx23885_buffer *buf) buf, buf-vb.v4l2_buf.index, __func__); } else { buf-risc.cpu[0] |= cpu_to_le32(RISC_IRQ1); + wmb(); prev = list_entry(cx88q-active.prev, struct cx23885_buffer, queue); list_add_tail(buf-queue, cx88q-active); prev-risc.jmp[1] = cpu_to_le32(buf-risc.dma); + wmb(); dprintk(1, [%p/%d] %s - append to active\n, buf, buf-vb.v4l2_buf.index, __func__); } I wonder if there is some PCI write reordering going on that is causing some of the weird behavior that you see. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On Mon, 2015-02-02 at 10:36 +0100, Hans Verkuil wrote: On 02/01/2015 02:06 PM, Raimonds Cicans wrote: On 29.01.2015 14:12, Hans Verkuil wrote: On 01/29/15 12:51, Raimonds Cicans wrote: On 29.01.2015 09:33, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Maybe... But on other hand this did not happen on old kernel with old driver. And when I did bisection on old kernel + media tree I started to receive this message only on new driver. Was CONFIG_IOMMU_SUPPORT enabled in the old kernel? zgrep CONFIG_IOMMU_SUPPORT /proc/config.gz CONFIG_IOMMU_SUPPORT=y Raimonds Cicans Hi Hans, Raimonds and Jurgen, Can you both test with the following patch applied to the driver: diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 1ad4994..72df5ae 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -1497,6 +1497,7 @@ void cx23885_buf_queue(struct cx23885_tsport *port, struct cx23885_buffer *buf) buf-risc.jmp[0] = cpu_to_le32(RISC_JUMP | RISC_CNT_INC); buf-risc.jmp[1] = cpu_to_le32(buf-risc.dma + 12); buf-risc.jmp[2] = cpu_to_le32(0); /* bits 63-32 */ + wmb(); spin_lock_irqsave(dev-slock, flags); if (list_empty(cx88q-active)) { @@ -1505,10 +1506,12 @@ void cx23885_buf_queue(struct cx23885_tsport *port, struct cx23885_buffer *buf) buf, buf-vb.v4l2_buf.index, __func__); } else { buf-risc.cpu[0] |= cpu_to_le32(RISC_IRQ1); + wmb(); prev = list_entry(cx88q-active.prev, struct cx23885_buffer, queue); list_add_tail(buf-queue, cx88q-active); prev-risc.jmp[1] = cpu_to_le32(buf-risc.dma); + wmb(); dprintk(1, [%p/%d] %s - append to active\n, buf, buf-vb.v4l2_buf.index, __func__); } I wonder if there is some PCI write reordering going on that is causing some of the weird behavior that you see. I'll test this patch on top of the other patches. So far the only messages left are the mpeg errors. Regards, Jurgen -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 29.01.2015 14:12, Hans Verkuil wrote: On 01/29/15 12:51, Raimonds Cicans wrote: On 29.01.2015 09:33, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Maybe... But on other hand this did not happen on old kernel with old driver. And when I did bisection on old kernel + media tree I started to receive this message only on new driver. Was CONFIG_IOMMU_SUPPORT enabled in the old kernel? zgrep CONFIG_IOMMU_SUPPORT /proc/config.gz CONFIG_IOMMU_SUPPORT=y Raimonds Cicans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 29.01.2015 09:33, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Maybe... But on other hand this did not happen on old kernel with old driver. And when I did bisection on old kernel + media tree I started to receive this message only on new driver. And I can not disable this feature because then USB and LAN stop working. Ray -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 01/29/15 12:51, Raimonds Cicans wrote: On 29.01.2015 09:33, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Maybe... But on other hand this did not happen on old kernel with old driver. And when I did bisection on old kernel + media tree I started to receive this message only on new driver. Was CONFIG_IOMMU_SUPPORT enabled in the old kernel? Regards, Hans And I can not disable this feature because then USB and LAN stop working. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hi Raimonds, On 01/11/2015 10:33 AM, Raimonds Cicans wrote: Hello. I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card As far as I can tell this has nothing to do with the cx23885 driver but is a bug in the amd iommu/BIOS. See e.g.: https://bbs.archlinux.org/viewtopic.php?pid=1309055 I managed to reproduce the Intel equivalent if I enable CONFIG_IOMMU_SUPPORT. Most likely due to broken BIOS/ACPI/whatever information that's read by the kernel. I would recommend disabling this kernel option. Regards, Hans sometimes this message was followed by storm of following messages: cx23885[0]: mpeg risc op code error ... -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
I reported a bit similar looking bug few weeks ago. It could be coming from same issue. cx23885 streaming lockdep error (VB2 related?) http://www.spinics.net/lists/linux-media/msg84733.html addition of that lockdep slash I saw many times random lockups and was forced to hard boot whole machine. Antti On 01/12/2015 05:27 PM, Raimonds Cicans wrote: On 12.01.2015 12:55, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: This makes no sense. The cx23885 driver in 3.17.7 doesn't use vb2. Are you using the media_build repo perhaps to install the latest media drivers on a 3.17 kernel? Sorry for misinforming you. IMHO I saw somewhere that 453afdd was included in 3.17.0-rc_something. In last two weeks I did too much tests. As far as I remember kernel / driver combinations was following 3.13.10 built in driver - not affected 3.17.7 + https://github.com/ljalves/linux_media (media tree + few new TBS open source drivers) - affected 3.18.1 + https://github.com/ljalves/linux_media (media tree + few new TBS open source drivers) - affected 3.19.0-rc3 built in driver (+ few new TBS open source drivers injected by https://github.com/bas-t/saa716x-intree) - affected Bisection I did on pure 3.13.10 + pure media tree As you can see bug(s) are kernel version agnostic 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card sometimes this message was followed by storm of following messages: cx23885[0]: mpeg risc op code error This looks awfully like the bug that is fixed in commit 7675fe99d280ea83388a4382c54573c80db37cda. ... 2) [ cut here ] WARNING: CPU: 1 PID: 6946 at drivers/iommu/amd_iommu.c:2637 dma_ops_domain_unmap.part.12+0x55/0x72() CPU: 1 PID: 6946 Comm: w_scan Tainted: GW 3.19.0-rc3-myrc01 #1 Hmm, and this says 3.19-rc3. I really need to know what kernel and media drivers you are using! Look above Yesterday I did git bisect on Linux media tree (v3.13 - HEAD) and found that your commit is guilty in the first message. Try with commit 7675fe99d280ea83388a4382c54573c80db37cda. Did not help. Same errors. I think the only relevant bug is #2. Just before Christmas I found some issues with the vb2 threading code, although that was for video output streams, not video capture. But it may well be that similar problems exist for capture. I'll look at that this week or early next week. I did new checks on 3.18.2 + https://github.com/ljalves/linux_media (media tree + few new TBS open source drivers) and found strange coincidence: I did two tests in following way: started w_scan on first front-end and after 5-10 seconds on second and after some time received first bug in both tests. Than just for fun reversed order. I did two tests in following way: started w_scan on second front-end and after 5-10 seconds on first and after some time received second bug followed after some time by first bug in both tests. Then I wanted to check following sequences: 1) init first front-end - start scan on second - start scan on first 2) init second front-end - start scan on first - start scan on second By init I mean: run dvb-fe-tool -sDVBS -a0 // or -a1 But on first test of first sequence I received new bug: [ 369.295899] BUG: unable to handle kernel NULL pointer dereference at(nil) [ 369.295945] IP: [c05173df] cx23885_buf_prepare+0x8c/0xa9 [cx23885] [ 369.295989] PGD 0 [ 369.296002] Oops: [#1] SMP [ 369.296020] Modules linked in: ip6table_filter ip6_tables act_police cls_basic cls_flow cls_fw cls_u32 sch_fq_codel sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq xt_CHECKSUM ipt_rpfilter xt_statistic xt_CT xt_realm xt_addrtype xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ipt_ECN ipt_CLUSTERIP ipt_ah xt_set nf_nat_ftp xt_time xt_TCPMSS xt_tcpmss xt_policy xt_pkttype xt_physdev br_netfilter xt_NFQUEUE xt_NFLOG xt_mark xt_mac xt_length xt_helper xt_hashlimit xt_DSCP xt_dscp xt_CLASSIFY xt_AUDIT iptable_raw iptable_nat nf_nat_ipv4 nf_nat iptable_mangle hwmon_vid bridge stp llc ipv6 cx25840(O) snd_hda_codec_hdmi snd_usb_audio snd_hwdep uvcvideo(O) snd_usbmidi_lib videobuf2_vmalloc(O) snd_rawmidi ir_lirc_codec(O) ir_xmp_decoder(O) lirc_dev(O) ir_mce_kbd_decoder(O) ir_sharp_decoder(O) ir_sanyo_decoder(O) [ 369.296375] ir_sony_decoder(O) ir_jvc_decoder(O) ir_rc6_decoder(O) ir_rc5_decoder(O) ir_nec_decoder(O) rc_rc6_mce(O) mceusb(O) cx23885(O) tveeprom(O) cx2341x(O) tda18271(O) videobuf2_dvb(O) videobuf2_dma_sg(O) videobuf2_memops(O) videobuf2_core(O) v4l2_common(O) videodev(O) k10temp rc_core(O) microcode saa716x_core(O) dvb_core(O) cx24117(O) i2c_piix4 snd_hda_intel snd_hda_controller snd_hda_codec r8169 mii nouveau ttm drm_kms_helper [ 369.296547] CPU: 0 PID: 7016 Comm: vb2-cx23885[0] Tainted: G
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 01/11/2015 10:33 AM, Raimonds Cicans wrote: Hello. I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: This makes no sense. The cx23885 driver in 3.17.7 doesn't use vb2. Are you using the media_build repo perhaps to install the latest media drivers on a 3.17 kernel? 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card sometimes this message was followed by storm of following messages: cx23885[0]: mpeg risc op code error This looks awfully like the bug that is fixed in commit 7675fe99d280ea83388a4382c54573c80db37cda. ... 2) [ cut here ] WARNING: CPU: 1 PID: 6946 at drivers/iommu/amd_iommu.c:2637 dma_ops_domain_unmap.part.12+0x55/0x72() Modules linked in: ip6table_filter ip6_tables act_police cls_basic cls_flow cls_fw cls_u32 sch_fq_codel sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq xt_CHECKSUM ipt_rpfilter xt_statistic xt_CT xt_realm xt_addrtype xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ipt_ECN ipt_CLUSTERIP ipt_ah xt_set nf_nat_ftp xt_time xt_TCPMSS xt_tcpmss xt_policy xt_pkttype xt_physdev br_netfilter xt_NFQUEUE xt_NFLOG xt_mark xt_mac xt_length xt_helper xt_hashlimit xt_DSCP xt_dscp xt_CLASSIFY xt_AUDIT iptable_raw iptable_nat nf_nat_ipv4 nf_nat iptable_mangle hwmon_vid bridge stp llc ipv6 cx24117 cx25840 snd_usb_audio snd_hwdep snd_usbmidi_lib uvcvideo snd_rawmidi videobuf2_vmalloc snd_hda_codec_hdmi ir_xmp_decoder ir_lirc_codec lirc_dev ir_mce_kbd_decoder ir_sharp_decoder ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder rc_rc6_mce microcode k10temp mceusb cx23885 tda18271 altera_stapl videobuf2_dvb videobuf2_core videobuf2_dma_sg videobuf2_memops tveeprom cx2341x rc_core v4l2_common videodev si2157 si2168 saa716x_budget saa716x_core dvb_core nouveau i2c_algo_bit ttm snd_hda_intel drm_kms_helper snd_hda_controller sp5100_tco r8169 i2c_piix4 snd_hda_codec drm mii CPU: 1 PID: 6946 Comm: w_scan Tainted: GW 3.19.0-rc3-myrc01 #1 Hmm, and this says 3.19-rc3. I really need to know what kernel and media drivers you are using! Hardware name: To be filled by O.E.M. To be filled by O.E.M./M5A97 LE R2.0, BIOS 2501 04/09/2014 0009 b0640fe8 b00bcf46 00d27000 b04eb2a0 00d46000 00d27000 8800b8287938 0001 01f8 Call Trace: [b0640fe8] ? dump_stack+0x40/0x50 [b00bcf46] ? warn_slowpath_common+0x93/0xab [b04eb2a0] ? dma_ops_domain_unmap.part.12+0x55/0x72 [b04eb2a0] ? dma_ops_domain_unmap.part.12+0x55/0x72 [b04ecc8c] ? __unmap_single.isra.15+0x7b/0xcf [b04ed43a] ? free_coherent+0x46/0x7e [c05b064f] ? __vb2_queue_cancel+0x1b8/0x1d6 [videobuf2_core] [c05b22e1] ? __reqbufs+0x15b/0x334 [videobuf2_core] [c05b2647] ? vb2_thread_stop+0x100/0x146 [videobuf2_core] [c05bc0ce] ? vb2_dvb_stop_feed+0x41/0x58 [videobuf2_dvb] [c052b4ea] ? dvb_dmxdev_filter_start+0x35/0x301 [dvb_core] [c052d12f] ? dmx_section_feed_stop_filtering+0x40/0x7b [dvb_core] [c052b307] ? dvb_dmxdev_feed_stop+0x5d/0x89 [dvb_core] [c052b60f] ? dvb_dmxdev_filter_start+0x15a/0x301 [dvb_core] [c052bd3f] ? dvb_demux_do_ioctl+0x1cc/0x4fe [dvb_core] [b016973d] ? path_openat+0x44d/0x55d [c052bb73] ? dvb_dmxdev_ts_callback+0xc2/0xc2 [dvb_core] [c052a6b9] ? dvb_usercopy+0xa7/0x127 [dvb_core] [b016a38f] ? do_filp_open+0x2b/0x6f [c052aa3f] ? dvb_demux_ioctl+0xd/0x11 [dvb_core] [c052aa32] ? dvb_dvr_ioctl+0x11/0x11 [dvb_core] [b016bf68] ? do_vfs_ioctl+0x360/0x424 [b0173706] ? __fd_install+0x15/0x40 [b015d5a9] ? do_sys_open+0x1b3/0x1c5 [b016c05f] ? SyS_ioctl+0x33/0x58 [b0646452] ? system_call_fastpath+0x12/0x17 ---[ end trace 2f92b32249912b0e ]--- 3) after enabling debug in DMA API, I started receiving following message: [ cut here ] WARNING: CPU: 1 PID: 6946 at lib/dma-debug.c:1093 check_unmap+0x180/0x7c6() cx23885 :0a:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00d27000] [size=504 bytes] Modules linked in: ip6table_filter ip6_tables act_police cls_basic cls_flow cls_fw cls_u32 sch_fq_codel sch_tbf sch_prio sch_htb
Re: [REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
On 12.01.2015 12:55, Hans Verkuil wrote: On 01/11/2015 10:33 AM, Raimonds Cicans wrote: After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: This makes no sense. The cx23885 driver in 3.17.7 doesn't use vb2. Are you using the media_build repo perhaps to install the latest media drivers on a 3.17 kernel? Sorry for misinforming you. IMHO I saw somewhere that 453afdd was included in 3.17.0-rc_something. In last two weeks I did too much tests. As far as I remember kernel / driver combinations was following 3.13.10 built in driver - not affected 3.17.7 + https://github.com/ljalves/linux_media (media tree + few new TBS open source drivers) - affected 3.18.1 + https://github.com/ljalves/linux_media (media tree + few new TBS open source drivers) - affected 3.19.0-rc3 built in driver (+ few new TBS open source drivers injected by https://github.com/bas-t/saa716x-intree) - affected Bisection I did on pure 3.13.10 + pure media tree As you can see bug(s) are kernel version agnostic 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card sometimes this message was followed by storm of following messages: cx23885[0]: mpeg risc op code error This looks awfully like the bug that is fixed in commit 7675fe99d280ea83388a4382c54573c80db37cda. ... 2) [ cut here ] WARNING: CPU: 1 PID: 6946 at drivers/iommu/amd_iommu.c:2637 dma_ops_domain_unmap.part.12+0x55/0x72() CPU: 1 PID: 6946 Comm: w_scan Tainted: GW 3.19.0-rc3-myrc01 #1 Hmm, and this says 3.19-rc3. I really need to know what kernel and media drivers you are using! Look above Yesterday I did git bisect on Linux media tree (v3.13 - HEAD) and found that your commit is guilty in the first message. Try with commit 7675fe99d280ea83388a4382c54573c80db37cda. Did not help. Same errors. I think the only relevant bug is #2. Just before Christmas I found some issues with the vb2 threading code, although that was for video output streams, not video capture. But it may well be that similar problems exist for capture. I'll look at that this week or early next week. I did new checks on 3.18.2 + https://github.com/ljalves/linux_media (media tree + few new TBS open source drivers) and found strange coincidence: I did two tests in following way: started w_scan on first front-end and after 5-10 seconds on second and after some time received first bug in both tests. Than just for fun reversed order. I did two tests in following way: started w_scan on second front-end and after 5-10 seconds on first and after some time received second bug followed after some time by first bug in both tests. Then I wanted to check following sequences: 1) init first front-end - start scan on second - start scan on first 2) init second front-end - start scan on first - start scan on second By init I mean: run dvb-fe-tool -sDVBS -a0 // or -a1 But on first test of first sequence I received new bug: [ 369.295899] BUG: unable to handle kernel NULL pointer dereference at(nil) [ 369.295945] IP: [c05173df] cx23885_buf_prepare+0x8c/0xa9 [cx23885] [ 369.295989] PGD 0 [ 369.296002] Oops: [#1] SMP [ 369.296020] Modules linked in: ip6table_filter ip6_tables act_police cls_basic cls_flow cls_fw cls_u32 sch_fq_codel sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq xt_CHECKSUM ipt_rpfilter xt_statistic xt_CT xt_realm xt_addrtype xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ipt_ECN ipt_CLUSTERIP ipt_ah xt_set nf_nat_ftp xt_time xt_TCPMSS xt_tcpmss xt_policy xt_pkttype xt_physdev br_netfilter xt_NFQUEUE xt_NFLOG xt_mark xt_mac xt_length xt_helper xt_hashlimit xt_DSCP xt_dscp xt_CLASSIFY xt_AUDIT iptable_raw iptable_nat nf_nat_ipv4 nf_nat iptable_mangle hwmon_vid bridge stp llc ipv6 cx25840(O) snd_hda_codec_hdmi snd_usb_audio snd_hwdep uvcvideo(O) snd_usbmidi_lib videobuf2_vmalloc(O) snd_rawmidi ir_lirc_codec(O) ir_xmp_decoder(O) lirc_dev(O) ir_mce_kbd_decoder(O) ir_sharp_decoder(O) ir_sanyo_decoder(O) [ 369.296375] ir_sony_decoder(O) ir_jvc_decoder(O) ir_rc6_decoder(O) ir_rc5_decoder(O) ir_nec_decoder(O) rc_rc6_mce(O) mceusb(O) cx23885(O) tveeprom(O) cx2341x(O) tda18271(O) videobuf2_dvb(O) videobuf2_dma_sg(O) videobuf2_memops(O) videobuf2_core(O) v4l2_common(O) videodev(O) k10temp rc_core(O) microcode saa716x_core(O) dvb_core(O) cx24117(O) i2c_piix4 snd_hda_intel snd_hda_controller snd_hda_codec r8169 mii nouveau ttm drm_kms_helper [ 369.296547] CPU: 0 PID: 7016 Comm: vb2-cx23885[0] Tainted: G O 3.18.1-hardened-r1-myrc06-NOSEC #1 [ 369.296574] Hardware name: To be filled by O.E.M. To be filled by O.E.M./M5A97 LE R2.0, BIOS 2501 04/09/2014 [ 369.296601] task: 88020c720830 ti: 88020c720db0 task.ti: 88020c720db0 [ 369.296622] RIP: 0010:[c05173df] [c05173df]
[REGRESSION] media: cx23885 broken by commit 453afdd [media] cx23885: convert to vb2
Hello. I contacted you because I am hit by regression caused by your commit: 453afdd [media] cx23885: convert to vb2 My system: AMD Athlon(tm) II X2 240e Processor on Asus M5A97 LE R2.0 motherboard TBS6981 card (Dual DVB-S/S2 PCIe receiver, cx23885 in kernel driver) After upgrade from kernel 3.13.10 (do not have commit) to 3.17.7 (have commit) I started receiving following IOMMU related messages: 1) AMD-Vi: Event logged [IO_PAGE_FAULT device=0a:00.0 domain=0x001d address=0x0637c000 flags=0x] where device=0a:00.0 is TBS6981 card sometimes this message was followed by storm of following messages: cx23885[0]: mpeg risc op code error ... 2) [ cut here ] WARNING: CPU: 1 PID: 6946 at drivers/iommu/amd_iommu.c:2637 dma_ops_domain_unmap.part.12+0x55/0x72() Modules linked in: ip6table_filter ip6_tables act_police cls_basic cls_flow cls_fw cls_u32 sch_fq_codel sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq xt_CHECKSUM ipt_rpfilter xt_statistic xt_CT xt_realm xt_addrtype xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ipt_ECN ipt_CLUSTERIP ipt_ah xt_set nf_nat_ftp xt_time xt_TCPMSS xt_tcpmss xt_policy xt_pkttype xt_physdev br_netfilter xt_NFQUEUE xt_NFLOG xt_mark xt_mac xt_length xt_helper xt_hashlimit xt_DSCP xt_dscp xt_CLASSIFY xt_AUDIT iptable_raw iptable_nat nf_nat_ipv4 nf_nat iptable_mangle hwmon_vid bridge stp llc ipv6 cx24117 cx25840 snd_usb_audio snd_hwdep snd_usbmidi_lib uvcvideo snd_rawmidi videobuf2_vmalloc snd_hda_codec_hdmi ir_xmp_decoder ir_lirc_codec lirc_dev ir_mce_kbd_decoder ir_sharp_decoder ir_sanyo_decoder ir_sony_decoder ir_jvc_decoder ir_rc6_decoder ir_rc5_decoder ir_nec_decoder rc_rc6_mce microcode k10temp mceusb cx23885 tda18271 altera_stapl videobuf2_dvb videobuf2_core videobuf2_dma_sg videobuf2_memops tveeprom cx2341x rc_core v4l2_common videodev si2157 si2168 saa716x_budget saa716x_core dvb_core nouveau i2c_algo_bit ttm snd_hda_intel drm_kms_helper snd_hda_controller sp5100_tco r8169 i2c_piix4 snd_hda_codec drm mii CPU: 1 PID: 6946 Comm: w_scan Tainted: GW 3.19.0-rc3-myrc01 #1 Hardware name: To be filled by O.E.M. To be filled by O.E.M./M5A97 LE R2.0, BIOS 2501 04/09/2014 0009 b0640fe8 b00bcf46 00d27000 b04eb2a0 00d46000 00d27000 8800b8287938 0001 01f8 Call Trace: [b0640fe8] ? dump_stack+0x40/0x50 [b00bcf46] ? warn_slowpath_common+0x93/0xab [b04eb2a0] ? dma_ops_domain_unmap.part.12+0x55/0x72 [b04eb2a0] ? dma_ops_domain_unmap.part.12+0x55/0x72 [b04ecc8c] ? __unmap_single.isra.15+0x7b/0xcf [b04ed43a] ? free_coherent+0x46/0x7e [c05b064f] ? __vb2_queue_cancel+0x1b8/0x1d6 [videobuf2_core] [c05b22e1] ? __reqbufs+0x15b/0x334 [videobuf2_core] [c05b2647] ? vb2_thread_stop+0x100/0x146 [videobuf2_core] [c05bc0ce] ? vb2_dvb_stop_feed+0x41/0x58 [videobuf2_dvb] [c052b4ea] ? dvb_dmxdev_filter_start+0x35/0x301 [dvb_core] [c052d12f] ? dmx_section_feed_stop_filtering+0x40/0x7b [dvb_core] [c052b307] ? dvb_dmxdev_feed_stop+0x5d/0x89 [dvb_core] [c052b60f] ? dvb_dmxdev_filter_start+0x15a/0x301 [dvb_core] [c052bd3f] ? dvb_demux_do_ioctl+0x1cc/0x4fe [dvb_core] [b016973d] ? path_openat+0x44d/0x55d [c052bb73] ? dvb_dmxdev_ts_callback+0xc2/0xc2 [dvb_core] [c052a6b9] ? dvb_usercopy+0xa7/0x127 [dvb_core] [b016a38f] ? do_filp_open+0x2b/0x6f [c052aa3f] ? dvb_demux_ioctl+0xd/0x11 [dvb_core] [c052aa32] ? dvb_dvr_ioctl+0x11/0x11 [dvb_core] [b016bf68] ? do_vfs_ioctl+0x360/0x424 [b0173706] ? __fd_install+0x15/0x40 [b015d5a9] ? do_sys_open+0x1b3/0x1c5 [b016c05f] ? SyS_ioctl+0x33/0x58 [b0646452] ? system_call_fastpath+0x12/0x17 ---[ end trace 2f92b32249912b0e ]--- 3) after enabling debug in DMA API, I started receiving following message: [ cut here ] WARNING: CPU: 1 PID: 6946 at lib/dma-debug.c:1093 check_unmap+0x180/0x7c6() cx23885 :0a:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00d27000] [size=504 bytes] Modules linked in: ip6table_filter ip6_tables act_police cls_basic cls_flow cls_fw cls_u32 sch_fq_codel sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq xt_CHECKSUM ipt_rpfilter xt_statistic xt_CT xt_realm xt_addrtype xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ipt_ECN ipt_CLUSTERIP ipt_ah xt_set nf_nat_ftp xt_time xt_TCPMSS xt_tcpmss xt_policy xt_pkttype xt_physdev br_netfilter xt_NFQUEUE xt_NFLOG xt_mark xt_mac xt_length xt_helper xt_hashlimit xt_DSCP xt_dscp xt_CLASSIFY xt_AUDIT iptable_raw iptable_nat nf_nat_ipv4 nf_nat iptable_mangle hwmon_vid bridge stp llc ipv6 cx24117 cx25840 snd_usb_audio snd_hwdep snd_usbmidi_lib uvcvideo snd_rawmidi