HVR-1200, cx23885 driver and Message Signaled Interrupts
Hi,
I'm successfully using a HVR1200, however the board reports MSI capabilities and the driver doesn't seem to enable it. Is there any work happening on supporting MSI? Anyway I can help testing things out?
$ lspci -v -s 4:0.0 04:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder (rev 02) Subsystem: Hauppauge computer works Inc. Device 71d3 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at ef800000 (64-bit, non-prefetchable) [size=2M] Capabilities: [40] Express Endpoint, MSI 00 Capabilities: [80] Power Management version 2 Capabilities: [90] Vital Product Data <?> Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Capabilities: [100] Advanced Error Reporting <?> Capabilities: [200] Virtual Channel <?> Kernel driver in use: cx23885 Kernel modules: cx23885
Regards,
Peter
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Am Samstag, 3. Januar 2009 05:38:47 schrieb Peter Hoeg:
Quoted 21 lines
Hi,
I'm successfully using a HVR1200, however the board reports MSI capabilities and the driver doesn't seem to enable it. Is there any work happening on supporting MSI? Anyway I can help testing things out?
$ lspci -v -s 4:0.0 04:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder (rev 02) Subsystem: Hauppauge computer works Inc. Device 71d3 Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at ef800000 (64-bit, non-prefetchable) [size=2M] Capabilities: [40] Express Endpoint, MSI 00 Capabilities: [80] Power Management version 2 Capabilities: [90] Vital Product Data <?> Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Capabilities: [100] Advanced Error Reporting <?> Capabilities: [200] Virtual Channel <?> Kernel driver in use: cx23885 Kernel modules: cx23885
Quoted 8 lines
Regards,
Peter_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi Peter, hi List,
attached is a patch that enables MSI on the cx23885. I tested this patch for a while now on a Dvico FusionHDTV Dual Express and have not found any side effects. It works on versions 2.6.27.x and 2.6.28. 2.6.28-gitx not tried yet.
Regards,
Hans-Frieder
--- linux-2.6.28.orig/drivers/media/video/cx23885/cx23885-core.c 2008-10-25
18:10:32.000000000 +0200
+++ linux-2.6.28/drivers/media/video/cx23885/cx23885-core.c 2009-01-03
17:08:55.665685231 +0100
@@ -44,6 +44,10 @@ static unsigned int card[] = {[0 ... (C
module_param_array(card, int, NULL, 0444); MODULE_PARM_DESC(card, "card type");
+static int enable_msi;
+module_param(enable_msi, int, 0444); +MODULE_PARM_DESC(enable_msi, "Enable Message Signaled Interrupt (MSI)"); +
#define dprintk(level, fmt, arg...)\
do { if (debug >= level)\
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ## arg);\
@@ -1750,7 +1754,11 @@ static int __devinit cx23885_initdev(str
goto fail_irq;
}
- err = request_irq(pci_dev->irq, cx23885_irq,
+ if (enable_msi && (pci_enable_msi(pci_dev) >= 0))
+ err = request_irq(pci_dev->irq, cx23885_irq,
+ IRQF_DISABLED, dev->name, dev);
+ else
+ err = request_irq(pci_dev->irq, cx23885_irq,
IRQF_SHARED | IRQF_DISABLED, dev->name, dev);
if (err < 0) {
printk(KERN_ERR "%s: can't get IRQ %d\n",
@@ -1778,6 +1786,8 @@ static void __devexit cx23885_finidev(st
/* unregister stuff */
free_irq(pci_dev->irq, dev);
+ if (pci_dev->msi_enabled)
+ pci_disable_msi(pci_dev);
pci_set_drvdata(pci_dev, NULL);
mutex_lock(&devlist);
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hans-Frieder,
Quoted 5 lines
Hi Peter, hi List,
attached is a patch that enables MSI on the cx23885. I tested this patch for a while now on a Dvico FusionHDTV Dual Express and have not found any side effects. It works on versions 2.6.27.x and 2.6.28. 2.6.28-gitx not tried yet.
I applied your patch against trunk v4l-dvb tree on stock Ubuntu kernel 2.6.27-9.
While the module loads properly when passed enable_msi=1 and /proc/interrupts as well as lspci tell me that everything should be set up fine, I am not getting any interrupts delivered as per attached output of:
cat /proc/interrupts
For troubleshooting purposes I have also attached the output of:
dmesg | egrep -i "tv|dvb|haupp|cx|tda"
/peter
CPU0 CPU1 CPU2 CPU3
0: 97 0 0 0 IO-APIC-edge timer 1: 2 0 0 0 IO-APIC-edge i8042 7: 1 0 0 0 IO-APIC-edge 8: 1 0 0 0 IO-APIC-edge rtc0 9: 0 0 0 0 IO-APIC-fasteoi acpi 14: 0 0 0 0 IO-APIC-edge pata_amd 15: 0 0 0 0 IO-APIC-edge pata_amd 19: 3 0 0 0 IO-APIC-fasteoi ohci1394 22: 0 0 0 0 IO-APIC-fasteoi ohci_hcd:usb2 23: 36617 0 0 0 IO-APIC-fasteoi ehci_hcd:usb1 2296: 80049 0 0 0 PCI-MSI-edge eth0 2297: 28609 0 0 0 PCI-MSI-edge nvidia 2298: 0 0 0 0 PCI-MSI-edge cx23885[0] 2299: 93157 0 0 0 PCI-MSI-edge HDA Intel 2300: 40654 0 0 0 PCI-MSI-edge ahci NMI: 0 0 0 0 Non-maskable interrupts LOC: 71788 53748 36915 41838 Local timer interrupts RES: 1833 1221 2251 1362 Rescheduling interrupts CAL: 8509 14113 12544 12361 function call interrupts TLB: 904 2409 1062 2674 TLB shootdowns TRM: 0 0 0 0 Thermal event interrupts THR: 0 0 0 0 Threshold APIC interrupts SPU: 0 0 0 0 Spurious interrupts ERR: 1 [ 10.300582] cx23885 driver version 0.0.1 loaded [ 10.301146] cx23885 0000:04:00.0: PCI INT A -> Link[APC8] -> GSI 16 (level, low) -> IRQ 16 [ 10.301284] CORE cx23885[0]: subsystem: 0070:71d3, board: Hauppauge WinTV-HVR1200 [card=7,autodetected] [ 10.467050] tveeprom 0-0050: Hauppauge model 71949, rev H2E9, serial# 3390611 [ 10.467120] tveeprom 0-0050: MAC address is 00-0D-FE-33-BC-93 [ 10.467185] tveeprom 0-0050: tuner model is Philips 18271_8295 (idx 149, type 54) [ 10.467259] tveeprom 0-0050: TV standards PAL(B/G) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xf4) [ 10.467337] tveeprom 0-0050: audio processor is CX23885 (idx 39) [ 10.467402] tveeprom 0-0050: decoder processor is CX23885 (idx 33) [ 10.467468] tveeprom 0-0050: has no radio [ 10.467531] cx23885[0]: hauppauge eeprom: model=71949 [ 10.467597] cx23885_dvb_register() allocating 1 frontend(s) [ 10.467687] cx23885[0]: cx23885 based dvb card [ 10.926369] tda829x 1-0042: type set to tda8295 [ 11.068189] tda18271 1-0060: creating new instance [ 11.104359] TDA18271HD/C1 detected @ 1-0060 [ 12.165988] DVB: registering new adapter (cx23885[0]) [ 12.166056] DVB: registering adapter 0 frontend 0 (NXP TDA10048HN DVB-T)... [ 12.166548] cx23885_dev_checkrevision() Hardware revision = 0xb0 [ 12.166617] cx23885[0]/0: found at 0000:04:00.0, rev: 2, irq: 16, latency: 0, mmio: 0xef800000 [ 12.166697] cx23885 0000:04:00.0: setting latency timer to 64 [ 373.247511] tda10048_firmware_upload: waiting for firmware upload (dvb-fe-tda10048-1.0.fw)... [ 373.247518] firmware: requesting dvb-fe-tda10048-1.0.fw [ 373.262265] tda10048_firmware_upload: firmware read 24878 bytes. [ 373.262270] tda10048_firmware_upload: firmware uploading [ 375.822028] tda10048_firmware_upload: firmware uploaded
04:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder (rev 02)
Subsystem: Hauppauge computer works Inc. Device 71d3
Flags: bus master, fast devsel, latency 0, IRQ 2298
Memory at ef800000 (64-bit, non-prefetchable) [size=2M]
Capabilities: [40] Express Endpoint, MSI 00
Capabilities: [80] Power Management version 2
Capabilities: [90] Vital Product Data <?>
Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [200] Virtual Channel <?>
Kernel driver in use: cx23885
Kernel modules: cx23885
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Am Sunday 04 January 2009 07:27:00 schrieben Sie:
Quoted 18 lines
Hans-Frieder,
Quoted 6 lines
Hi Peter, hi List,
attached is a patch that enables MSI on the cx23885. I tested this patch for a while now on a Dvico FusionHDTV Dual Express and have not found any side effects. It works on versions 2.6.27.x and 2.6.28. 2.6.28-gitx not tried yet.
I applied your patch against trunk v4l-dvb tree on stock Ubuntu kernel 2.6.27-9.
While the module loads properly when passed enable_msi=1 and
/proc/interruptsas well as lspci tell me that everything should be set up fine, I am not getting any interrupts delivered as per attached output of:
cat/proc/interrupts
Quoted 4 lines
For troubleshooting purposes I have also attached the output of:
dmesg | egrep -i "tv|dvb|haupp|cx|tda"/peter
Hm, strange!
I attached the same data that you collected for my environment. The only difference that I see is, that I get in dmesg (or kern.log) immediately after the line
cx23885 0000:03:00.0: setting latency timer to 64
the confirmation that MSI is activated:
cx23885 0000:03:00.0: irq 315 for MSI/MSI-X
It seems that for your card, the PCI code is stuck halfways?!
As you have other devices running with MSI, can you please check whether you see a line ... irq xyz for MSI/MSI-X for them? This would narrow down the region in the code to search for the problem.
Regards,
Hans-Frieder
[ 8.928904] cx23885 driver version 0.0.1 loaded [ 8.930726] cx23885 0000:03:00.0: PCI INT A -> Link[LN0A] -> GSI 19 (level, low) -> IRQ 19 [ 8.931185] CORE cx23885[0]: subsystem: 18ac:db78, board: DViCO FusionHDTV DVB-T Dual Express [card=11,autodetected] [ 9.258821] input: i2c IR (FusionHDTV) as /devices/virtual/input/input2 [ 9.317611] ir-kbd-i2c: i2c IR (FusionHDTV) detected at i2c-0/0-006b/ir0 [cx23885[0]] [ 9.318109] cx23885_dvb_register() allocating 1 frontend(s) [ 9.318178] cx23885[0]: cx23885 based dvb card [ 9.398854] xc2028 0-0061: creating new instance [ 9.398916] xc2028 0-0061: type set to XCeive xc2028/xc3028 tuner [ 9.398980] DVB: registering new adapter (cx23885[0]) [ 9.399036] DVB: registering adapter 0 frontend 0 (Zarlink ZL10353 DVB-T)... [ 9.399555] cx23885_dvb_register() allocating 1 frontend(s) [ 9.399612] cx23885[0]: cx23885 based dvb card [ 9.400354] xc2028 1-0061: creating new instance [ 9.400408] xc2028 1-0061: type set to XCeive xc2028/xc3028 tuner [ 9.400464] DVB: registering new adapter (cx23885[0]) [ 9.400519] DVB: registering adapter 1 frontend 0 (Zarlink ZL10353 DVB-T)... [ 9.400927] cx23885_dev_checkrevision() Hardware revision = 0xb0 [ 9.400990] cx23885[0]/0: found at 0000:03:00.0, rev: 2, irq: 19, latency: 0, mmio: 0xfea00000 [ 9.401069] cx23885 0000:03:00.0: setting latency timer to 64 [ 9.401140] cx23885 0000:03:00.0: irq 315 for MSI/MSI-X [ 34.554403] i2c-adapter i2c-0: firmware: requesting xc3028-v27.fw [ 34.655312] xc2028 0-0061: Loading 80 firmware images from xc3028-v27.fw, type: xc2028 firmware, ver 2.7 [ 34.856389] xc2028 0-0061: Loading firmware for type=BASE F8MHZ (3), id 0000000000000000. [ 36.003429] xc2028 0-0061: Loading firmware for type=D2633 DTV8 (210), id 0000000000000000. [ 36.017390] xc2028 0-0061: Loading SCODE for type=DTV78 ZARLINK456 SCODE HAS_IF_4760 (62000100), id 0000000000000000. [ 36.381875] i2c-adapter i2c-1: firmware: requesting xc3028-v27.fw [ 36.393020] xc2028 1-0061: Loading 80 firmware images from xc3028-v27.fw, type: xc2028 firmware, ver 2.7 [ 36.393225] xc2028 1-0061: Loading firmware for type=BASE F8MHZ (3), id 0000000000000000. [ 37.336752] xc2028 1-0061: Loading firmware for type=D2633 DTV8 (210), id 0000000000000000. [ 37.350886] xc2028 1-0061: Loading SCODE for type=DTV78 ZARLINK456 SCODE HAS_IF_4760 (62000100), id 0000000000000000. [ 177.654931] xc2028 1-0061: Loading firmware for type=D2633 DTV78 (110), id 0000000000000000. [ 177.669134] xc2028 1-0061: Loading SCODE for type=DTV78 ZARLINK456 SCODE HAS_IF_4760 (62000100), id 0000000000000000.
03:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder (rev 02)
Subsystem: DViCO Corporation Device db78
Flags: bus master, fast devsel, latency 0, IRQ 315
Memory at fea00000 (64-bit, non-prefetchable) [size=2M]
Capabilities: [40] Express Endpoint, MSI 00
Capabilities: [80] Power Management version 2
Capabilities: [90] Vital Product Data <?>
Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable+
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [200] Virtual Channel <?>
Kernel driver in use: cx23885
Kernel modules: cx23885
CPU0 CPU1
0: 45 1 IO-APIC-edge timer 1: 0 2 IO-APIC-edge i8042 6: 0 5 IO-APIC-edge floppy 7: 1 0 IO-APIC-edge 8: 0 1 IO-APIC-edge rtc0 9: 0 0 IO-APIC-fasteoi acpi 12: 0 5 IO-APIC-edge i8042 20: 1 668 IO-APIC-fasteoi nvidia 21: 0 0 IO-APIC-fasteoi ehci_hcd:usb3 22: 0 0 IO-APIC-fasteoi ohci_hcd:usb2, ohci_hcd:usb4 23: 0 0 IO-APIC-fasteoi ehci_hcd:usb1 314: 6 13426 PCI-MSI-edge eth1 315: 3 2383 PCI-MSI-edge cx23885[0] 316: 0 215 PCI-MSI-edge HDA Intel 317: 11 11955 PCI-MSI-edge ahci NMI: 0 0 Non-maskable interrupts LOC: 27488 21523 Local timer interrupts RES: 2678 2372 Rescheduling interrupts CAL: 1001 85 Function call interrupts TLB: 417 173 TLB shootdowns TRM: 0 0 Thermal event interrupts THR: 0 0 Threshold APIC interrupts SPU: 0 0 Spurious interrupts ERR: 1 MIS: 0
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi,
Quoted 7 lines
cx23885 0000:03:00.0: setting latency timer to 64
the confirmation that MSI is activated:
cx23885 0000:03:00.0: irq 315 for MSI/MSI-XIt seems that for your card, the PCI code is stuck halfways?!
As you have other devices running with MSI, can you please check whether you see a line ... irq xyz for MSI/MSI-X for them?
I am not getting that message for any of the other devices. Here is the output of: dmesg | grep -i msi
[ 1.533883] pcieport-driver 0000:00:0b.0: found MSI capability [ 1.534197] pcieport-driver 0000:00:0c.0: found MSI capability [ 1.534501] pcieport-driver 0000:00:0d.0: found MSI capability [ 2.905219] forcedeth 0000:00:0f.0: highdma pwrctl mgmt timirq lnktim
msi desc-v3
Maybe your message comes because you have some DEBUG_MSI_INTERRUPTS flag set or something (purely guessing here) as my other devices using MSI are working perfectly and this has to be looked for elsewhere.
Any other info I can provide that will shed some light on the situation?
/peter
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 3 lines · Peter Hoeg
Quoted 3 lines
cx23885 0000:03:00.0: setting latency timer to 64
the confirmation that MSI is activated:
cx23885 0000:03:00.0: irq 315 for MSI/MSI-X
Has anybody else tried the MSI patch for cx23885 on a HVR1200?
/peter
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb