From: Marin Mitov <mitov@issp.bas.bg>
To: linux-kernel@vger.kernel.org
Cc: David Airlie <airlied@linux.ie>
Subject: [regression] matrox drm/mga driver do not use interrupts
Date: Fri, 27 May 2011 12:04:38 +0300 [thread overview]
Message-ID: <201105271204.38705.mitov@issp.bas.bg> (raw)
Hi all,
I observed that matrox drm/mga driver do not use interrupts in 2.6.39,
while it uses it in 2.6.32.41 (different kernels, same userland, all 32 bits,
IRQ assigned to VGA in BIOS).
One finds in Xorg.0.log:
(II) MGA(0): [drm] failure adding irq handler, there is a device already using that irq
which is misleading, because no other device is using it. A small kernel module
that simply request_irq()/free_irq() is getting the same IRQ without a problem.
Debugging the drm/mga couple traced the problem to this operator:
(in drivers/gpu/drm/drm_irq.c, drm_control() function)
if (dev->if_version < DRM_IF_VERSION(1, 2) &&
ctl->irq != drm_dev_to_irq(dev))
return -EINVAL;
where:
ctl->irq = -22, drm_dev_to_irq(dev) = 16 (the correct value), and
return -EINVAL; is executed.
If I change ctl->irq = 16, just before the if operator, all is working OK.
Just for info, almost the same hardware/chipsets/VGA(matrox) is
working OK in 2.6.39/64 bits, but userland (64 bits too) is a newer version).
I am ready for testing patches, I use 3 Matrox g450 AGP adapters on 2 - 32 bits
systems and 1 - 64 bits system.
Please, help in solving the problem.
Marin Mitov
P.S. Here is some logs:
2.6.39
==========================
dmesg
[drm] Initialized drm 1.1.0 20060810
matrox_w1 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[drm] No driver support for vblank timestamp query.
[drm] Initialized mga 3.2.1 20051102 for 0000:01:00.0 on minor 0
agpgart-amd64 0000:00:00.0: AGP 3.0 bridge
agpgart-amd64 0000:00:00.0: bridge is in legacy mode, falling back to 2.x
agpgart-amd64 0000:00:00.0: putting AGP V2 device into 4x mode
matrox_w1 0000:01:00.0: putting AGP V2 device into 4x mode
[drm] Initialized card for AGP DMA.
cat /proc/interrupts
12: 2 3495 IO-APIC-edge i8042
14: 1 4429 IO-APIC-edge ide0
15: 1 584 IO-APIC-edge ide1
17: 3 2422 IO-APIC-fasteoi skge@pci:0000:00:0a.0
18: 0 30 IO-APIC-fasteoi sata_promise
20: 6 18571 IO-APIC-fasteoi sata_via
grep MGA /var/log/Xorg.0.log
(II) MGA(0): [DRI] installation complete
(II) MGA(0): [drm] Mapped 128 DMA buffers
(II) MGA(0): [drm] failure adding irq handler, there is a device already using that irq
(II) MGA(0): Direct rendering enabled
2.6.32.41
=============================
dmesg
[drm] Initialized drm 1.1.0 20060810
pci 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[drm] Initialized mga 3.2.1 20051102 for 0000:01:00.0 on minor 0
agpgart-amd64 0000:00:00.0: AGP 3.0 bridge
agpgart-amd64 0000:00:00.0: bridge is in legacy mode, falling back to 2.x
agpgart-amd64 0000:00:00.0: putting AGP V2 device into 4x mode
matrox_w1 0000:01:00.0: putting AGP V2 device into 4x mode
[drm] Initialized card for AGP DMA.
platform mga_warp.0: firmware: using built-in firmware matrox/g400_warp.fw
cat /proc/interrupts
12: 26 24183 IO-APIC-edge i8042
14: 4 4452 IO-APIC-edge ide0
15: 2 7128 IO-APIC-edge ide1
16: 0 0 IO-APIC-fasteoi mga@pci:0000:01:00.0
17: 43 56704 IO-APIC-fasteoi skge@pci:0000:00:0a.0
18: 0 207 IO-APIC-fasteoi sata_promise
20: 18 20682 IO-APIC-fasteoi sata_via
grep MGA /var/log/Xorg.0.log
(II) MGA(0): [DRI] installation complete
(II) MGA(0): [drm] Mapped 128 DMA buffers
(II) MGA(0): [drm] dma control initialized, using IRQ 16
(II) MGA(0): Direct rendering enabled
reply other threads:[~2011-05-27 9:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201105271204.38705.mitov@issp.bas.bg \
--to=mitov@issp.bas.bg \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®