On Saturday 26 November 2005 07:30, Geoffrey Kruse wrote:Hallo Hans!I've started work on this problem yesterday. I discovered that the MPEG data is placed at the correct memory location so the shift happens either in the DMA handling (most likely) or in the internal buffer handling of the driver. I can easily reproduce it, so that helps a lot. I hope I can find the cause quickly. I have several ideas, but it needs more debugging and tracing.Did you find the cause for the bug mentioned above? I don't want to rush, I'm just a bit curious...I'm slowly closing in on it. It's not as easy to reproduce as I thought so it is slow going. The bug is probably in the dma_from_device() function in ivtv-irq.c and is probably related to somehow incorrect handling of a DMA error. I have to wait for it to happen again before I can be more certain. HansI see this problem on every single recording on my pvr 500. Please let me know if there is anything I can do to help debug this since it is so easy for me to reproduce.Can you do the following for me: edit ivtv-irq.c, go to the function dma_from_device(), go to the end of the function and add a IVTV_INFO line just before the 'goto redo_dma;' line: spin_unlock_irqrestore(&itv->DMA_slock, flags); if (redo_dma < 3) { redo_dma++; IVTV_INFO("redma %lx\n", redo_dma); goto redo_dma; } IVTV_DEBUG_WARN( "ENC: REDO DMA took too many tries.\n"); ret = -ENOMEM; } return ret; } Whenever things go wrong I always see a 'redma' line in the log. So it is clearly related to a DMA error that the firmware does not correctly recover from. Do you see the same message? Hans
SOrry for the long delay in a response, I was out of town. I tried inserting the line as you described, unfortunately, I get a kernel oops when I set ivtv_debug=3 with or without the modification. I am using 0.4.0 release. Below is the log of the oops. Please let me know what else I can do to help.
GeoffDec 6 18:35:20 localhost kernel: PCI: Found IRQ 10 for device 0000:00:0d.0
Dec 6 18:35:30 localhost kernel: cc8e0e6eDec 6 18:35:30 localhost kernel: Modules linked in: xfs lm78 w1_therm wire 8250_pci 8250 serial_core microcode cpuid msr sg sd_mod scsi_mod apm non_fatal nvidia i2c_sensor processor dm_mirror dm_mod eth1394 uhci_hcd ehci_hcd ohci_hcd ohci1394 usbcore ieee1394 evdev tda9887 wm8775 cx25840 firmware_class snd_als4000 snd_sb_common tuner snd_pcm_oss snd_mixer_oss tveeprom i2c_piix4 ivtv i2c_algo_bit snd_pcm snd_page_alloc snd_opl3_lib i2c_core 3c59x snd_timer snd_hwdep snd_mpu401_uart snd_rawmidi snd intel_agp
Dec 6 18:35:30 localhost kernel: CPU: 0Dec 6 18:35:30 localhost kernel: EIP: 0060:[pg0 +206118510/1069216768] Tainted: P VLI
Dec 6 18:35:30 localhost kernel: EFLAGS: 00010202 (2.6.13.4)Dec 6 18:35:30 localhost kernel: EIP is at ivtv_v4l2_open+0x17e/ 0x3d0 [ivtv] Dec 6 18:35:30 localhost kernel: eax: cb03a6e8 ebx: c03ba5a0 ecx: cc8e0cf0 edx: c250c6a0 Dec 6 18:35:30 localhost kernel: esi: c250c6a0 edi: cb03a6e8 ebp: 00000000 esp: c63fbecc
Dec 6 18:35:30 localhost kernel: ds: 007b es: 007b ss: 0068Dec 6 18:35:30 localhost kernel: Process mythbackend (pid: 3848, threadinfo=c63fa000 task=cad7faa0) Dec 6 18:35:30 localhost kernel: Stack: cb03a6e8 c0161145 c12889e0 c250c6a0 00000000 c015d0b6 cbc74860 c03ba5a0 Dec 6 18:35:30 localhost kernel: c250c6a0 cb03a6e8 00000000 c0279f86 000000ff c015d310 00000051 00000000 Dec 6 18:35:30 localhost kernel: c12889e0 00000000 cb03a6e8 c015d1d3 c250c6a0 00000000 c250c6a0 cb03a6e8
Dec 6 18:35:30 localhost kernel: Call Trace:Dec 6 18:35:30 localhost kernel: [generic_permission+85/288] generic_permission+0x55/0x120
Dec 6 18:35:30 localhost kernel: [cdev_get+22/128] cdev_get+0x16/0x80Dec 6 18:35:30 localhost kernel: [video_open+134/384] video_open +0x86/0x180 Dec 6 18:35:30 localhost kernel: [exact_match+0/16] exact_match +0x0/0x10 Dec 6 18:35:30 localhost kernel: [chrdev_open+131/352] chrdev_open +0x83/0x160 Dec 6 18:35:30 localhost kernel: [dentry_open+204/496] dentry_open +0xcc/0x1f0
Dec 6 18:35:30 localhost kernel: [filp_open+64/80] filp_open+0x40/0x50Dec 6 18:35:30 localhost kernel: [get_unused_fd+73/176] get_unused_fd+0x49/0xb0
Dec 6 18:35:30 localhost kernel: [getname+195/240] getname+0xc3/0xf0 Dec 6 18:35:30 localhost kernel: [sys_open+69/224] sys_open+0x45/0xe0Dec 6 18:35:30 localhost kernel: [syscall_call+7/11] syscall_call +0x7/0xb Dec 6 18:35:30 localhost kernel: Code: 5b 5e 5f 5d c3 a1 c8 00 00 00 89 6c 24 08 c7 04 24 2c c0 8f cc 89 44 24 04 e8 2f 9a 83 f3 b8 fa ff ff ff 83 c4 1c 5b 5e 5f 5d c3 <a1> c8 00 00 00 89 6c 24 08 c7 04 24 e0 bf 8f cc 89 44 24 04 e8
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ ivtv-devel mailing list [email protected] http://ivtvdriver.org/mailman/listinfo/ivtv-devel
