Bug 94721 - [BISECTED] DRM drivers can't regain their IRQ resource after unload
Summary: [BISECTED] DRM drivers can't regain their IRQ resource after unload
Status: NEW
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: x86-64 (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: platform_x86_64@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 09:21 UTC by Thomas Hellstrom
Modified: 2015-03-11 16:49 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.0-RC
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Thomas Hellstrom 2015-03-11 09:21:41 UTC
DRM drivers, at least the vmwgfx driver, when unloaded cause the corresponding PCI device to lose their IRQ. This seems intentional. However, starting with change

b4b55cda587442477a3a9f0669e26bba4b7800c0 is the first bad commit
commit b4b55cda587442477a3a9f0669e26bba4b7800c0
Author: Jiang Liu <jiang.liu@linux.intel.com>
Date:   Thu Feb 5 13:44:47 2015 +0800

    x86/PCI: Refine the way to release PCI IRQ resources

they are not reassigned an IRQ resource on load, and the driver probe fails.

What's probably causing this on the driver side is that the driver does not call pci_disable_device() on pci driver remove. Adding such a call in the vmwgfx PCI driver remove() method indeed fixes the issue for vmwgfx, but other drivers are probably broken as well, so think this might require a fix on the x86/pci side.

If this behavior is intentional, I think at least a warning is required if a driver removes the pci device driver in this manner.

Please see bug discussion at 

http://lists.freedesktop.org/archives/dri-devel/2015-March/078886.html

Thanks,
Thomas Hellström
Comment 1 Thomas Hellstrom 2015-03-11 09:23:52 UTC
Updating CC / flags.
Comment 2 Jiang Liu 2015-03-11 15:11:16 UTC
Hi Thomas,
   There's a patch "[PATCH] x86/PCI: Fully disable devices before releasing IRQ resource" from Alex Williamson <alex.williamson@redhat.com>, which tries to fix this issue from x86/PCI side. 
   Due to GFW, I can't googling and give a link to that email thread, could you please help to update a link to that thread by google?
Comment 3 Thomas Hellstrom 2015-03-11 16:49:39 UTC
(In reply to Jiang Liu from comment #2)
> Hi Thomas,
>    There's a patch "[PATCH] x86/PCI: Fully disable devices before releasing
> IRQ resource" from Alex Williamson <alex.williamson@redhat.com>, which tries
> to fix this issue from x86/PCI side. 
>    Due to GFW, I can't googling and give a link to that email thread, could
> you please help to update a link to that thread by google?

Link to patch is here

https://lkml.org/lkml/2015/3/5/710

Note You need to log in before you can comment on or make changes to this bug.