Hi Hans, The GFP_DMA flag asks kmalloc to allocate from memory below 16Mb, i.e. the good old ISA DMA memory pool. To allocate memory that is DMA-able from the PCI bus, you need to use the pci_alloc_* functions, as explained in linux/Documentation/DMA-mapping.txt.
Groeten, Bart Hans Verkuil wrote: > Hi Martin, > > I think it is caused by incorrect kmalloc flags in the driver: when > memory is allocated that must be accessible by DMA, then the __GFP_DMA > should be added to ensure it is allocated from the 32-bit memory. This > flag isn't set. I'll see if I can make a patch for you this weekend. > > Regards, > > Hans > > > On Wednesday 19 July 2006 23:07, Martin Berg wrote: >> Hi, >> I'm facing a problem with a hanging/non-responding capture from my >> PVR 500 card. >> I've tried to find some leads elsewhere - but none seems to match >> my problem. >> The ivtv-users list did not give any responses at all so I'm trying >> here as suggested by the "asking for help" instructions. >> >> Symptoms: >> When either attempting watching live TV in MythTV or >> "cat /dev/video0 > test.mpg" a hang persists for a couple of seconds >> and no output is generated. >> This happens at every attempt. >> The hang only happens for the capture - the rest of the system is >> responding as normal. >> The hang for the cat /dev/video0 > test.mpg is seen when ctrl-C is >> pressed - this takes a couple of seconds to terminate the command. >> >> Problem reproduces using both ivtv 0.4.4 and 0.4.6 >> >> Interestingly the problem only occurs if I allow the CPU to map >> devices out of the normal 32-bit memory address space. >> A simple workaround is therefore to disable this functionality, but >> this will disable around 700MB from my 4GB of RAM, which is obviously >> not a preferred solution. >> >> Any suggestions ? >> >> >> >> Error messages (from dmesg): >> ivtv0 warning: ENC: REG_DMAXFER 2 wait failed >> ivtv0 warning: DEC: REG_ENCSG1LEN wait failed >> ivtv0 warning: ENC: DMA still Pending while stopping capture! >> >> System info: >> ASUS A8V Deluxe motherboard with the Via K8T800 Pro chipset (yep, >> the one with incompability problems with PVR500 - solved by setting >> PCI latency timer to 32 and by using newest BIOS) >> AMD Althon 64 3500 >> 4GB RAM >> SuSE 10 (kernel 2.6.13) - 64 bit version >> >> dmesg output for Ivtv init (slightly edited to remove clearly >> irrelevant information about USB, NIC and APG stuff): >> ivtv: module not supported by Novell, setting U taint flag. >> ivtv: ==================== START INIT IVTV ==================== >> ivtv: version 0.4.6 (tagged release) loading >> ivtv: Linux version: 2.6.13-15.8-default gcc-4.0 >> ivtv: In case of problems please include the debug info between >> ivtv: the START INIT IVTV and END INIT IVTV lines, along with >> ivtv: any module options, when mailing the ivtv-users mailinglist. >> ivtv0: Autodetected WinTV PVR 150 card (cx23416 based) >> ACPI: PCI Interrupt 0000:02:08.0[A] -> GSI 16 (level, low) -> IRQ 185 >> ivtv0: Unreasonably low latency timer, setting to 64 (was 32) >> tveeprom: module not supported by Novell, setting U taint flag. >> tveeprom: Second (radio) tuner idx 101 >> tveeprom: ivtv version >> tveeprom: Hauppauge: model = 23659, rev = D491, serial# = 8092818 >> tveeprom: tuner = Philips FQ1216AME MK4 (idx = 91, type = 56) >> tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom = >> 0x74, v4l2 = 0x00400e17) >> tveeprom: audio processor = CX25843 (type = 25) >> tveeprom: decoder processor = CX25843 (type = 1e) >> ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50] >> ivtv0: This is the first unit of a PVR500 >> tuner: module not supported by Novell, setting U taint flag. >> tuner (ivtv): chip found at addr 0xc0 i2c-bus ivtv i2c driver #0 >> TEA5767 detected. >> ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=60] >> tuner: type set to 62 (Philips TEA5767HN FM Radio) by autodetect >> type set to 62 (Philips TEA5767HN FM Radio) >> tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0 >> ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61] >> cx25840: module not supported by Novell, setting U taint flag. >> cx25840 1-0044: ivtv driver >> cx25840 1-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0) >> BIOS EDD facility v0.16 2004-Jun-25, 5 devices found >> ieee1394: Host added: ID:BUS[0-00:1023] GUID[0011d800000592c6] >> nvidia: module not supported by Novell, setting U taint flag. >> nvidia: module license 'NVIDIA' taints kernel. >> ACPI-0212: *** Warning: Device is not power manageable >> ACPI: PCI Interrupt 0000:00:11.5[C] -> GSI 22 (level, low) -> IRQ 201 >> PCI: Via IRQ fixup for 0000:00:11.5, from 5 to 9 >> PCI: Setting latency timer of device 0000:00:11.5 to 64 >> ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 185 >> cx25840 1-0044: loaded v4l-cx25840.fw firmware (14264 bytes) >> ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44] >> wm8775: module not supported by Novell, setting U taint flag. >> wm8775 1-001b: ivtv driver >> wm8775 1-001b: chip found @ 0x36 (ivtv i2c driver #0) >> ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b] >> tda9887: module not supported by Novell, setting U taint flag. >> tda9887 1-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #0) >> ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43] >> ivtv0: Detected a TEA5767 radio tuner. Enabling radio support. >> ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes) >> ivtv0: Encoder revision: 0x02050032 >> ivtv0: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB >> total) ivtv0: Allocate DMA encoder YUV stream: 161 x 12960 buffers >> (2048KB total) ivtv0: Allocate DMA encoder VBI stream: 80 x 26208 >> buffers (2048KB total) ivtv0: Allocate DMA encoder PCM audio stream: >> 455 x 4608 buffers (2048KB total) >> ivtv0: Create encoder radio stream >> tuner: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4)) by >> ivtv i2c driver #0 >> ivtv0: Initialized WinTV PVR 500 (unit #1), card #0 >> ivtv: ====================== NEXT CARD ====================== >> ivtv1: Autodetected WinTV PVR 150 card (cx23416 based) >> ACPI: PCI Interrupt 0000:02:09.0[A] -> GSI 17 (level, low) -> IRQ 169 >> ivtv1: Unreasonably low latency timer, setting to 64 (was 32) >> tveeprom: Second (radio) tuner idx 101 >> tveeprom: ivtv version >> tveeprom: Hauppauge: model = 23659, rev = D491, serial# = 8092818 >> tveeprom: tuner = Philips FQ1216AME MK4 (idx = 91, type = 56) >> tveeprom: tuner fmt = PAL(B/G) PAL(I) SECAM(L/L') PAL(D/K) (eeprom = >> 0x74, v4l2 = 0x00400e17) >> tveeprom: audio processor = CX25843 (type = 25) >> tveeprom: decoder processor = CX25843 (type = 1e) >> ivtv1: i2c attach to card #1 ok [client=tveeprom, addr=50] >> tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #1 >> ivtv1: i2c attach to card #1 ok [client=(tuner unset), addr=61] >> cx25840 2-0044: ivtv driver >> cx25840 2-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1) >> cx25840 2-0044: loaded v4l-cx25840.fw firmware (14264 bytes) >> ivtv1: i2c attach to card #1 ok [client=cx25840, addr=44] >> wm8775 2-001b: ivtv driver >> wm8775 2-001b: chip found @ 0x36 (ivtv i2c driver #1) >> ivtv1: i2c attach to card #1 ok [client=wm8775, addr=1b] >> tda9887 2-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #1) >> ivtv1: i2c attach to card #1 ok [client=tda9887, addr=43] >> ivtv1: This is the second unit of a PVR500 >> ivtv1: Correcting tveeprom data: no radio present on second unit >> ivtv1: loaded v4l-cx2341x-enc.fw firmware (262144 bytes) >> w83627hf 3-0290: Reading VID from GPIO5 >> ivtv1: Encoder revision: 0x02050032 >> ivtv1: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB >> total) ivtv1: Allocate DMA encoder YUV stream: 161 x 12960 buffers >> (2048KB total) ivtv1: Allocate DMA encoder VBI stream: 80 x 26208 >> buffers (2048KB total) ivtv1: Allocate DMA encoder PCM audio stream: >> 455 x 4608 buffers (2048KB total) >> tuner: type set to 56 (Philips PAL/SECAM multi (FQ1216AME MK4)) by >> ivtv i2c driver #1 >> ivtv1: Initialized WinTV PVR 500 (unit #2), card #1 >> NVRM: loading NVIDIA Linux x86_64 NVIDIA Kernel Module 1.0-7676 Fri >> Jul 29 13:15:16 PDT 2005 >> NVRM: WARNING: You are probably using the kernel's swiotlb >> interface. NVRM: Be very careful with this interface, as it is easy >> NVRM: to exhaust this interface's memory buffer, at which >> NVRM: point it panics the kernel. Please increase the size >> NVRM: of this buffer by specifying a larger buffer size with >> NVRM: the swiotlb kernel option, eg: "swiotlb=65536" >> ivtv: ==================== END INIT IVTV ==================== >> >> lspci: >> 02:08.0 Multimedia video controller: Internext Compression Inc iTVC16 >> (CX23416) MPEG-2 Encoder (rev 01) >> Subsystem: Hauppauge computer works Inc.: Unknown device e807 >> Flags: bus master, medium devsel, latency 64, IRQ 185 >> Memory at 00000000f0000000 (32-bit, prefetchable) [size=64M] >> Capabilities: [44] Power Management version 2 >> >> 02:09.0 Multimedia video controller: Internext Compression Inc iTVC16 >> (CX23416) MPEG-2 Encoder (rev 01) >> Subsystem: Hauppauge computer works Inc.: Unknown device e817 >> Flags: bus master, medium devsel, latency 64, IRQ 169 >> Memory at 00000000f4000000 (32-bit, prefetchable) [size=64M] >> Capabilities: [44] Power Management version 2 > > -- Bart Hartgers - [EMAIL PROTECTED] _______________________________________________ ivtv-devel mailing list [email protected] http://ivtvdriver.org/mailman/listinfo/ivtv-devel
