mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-30 12:49:36 +00:00
drm/hisilicon/hibmc: Convert to Linux IRQ interfaces
Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Tian Tao <tiantao6@hisilicon.com> Reviewed-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20210706075425.9257-1-tzimmermann@suse.de
This commit is contained in:
parent
b0fee7df43
commit
39a364a19e
1 changed files with 8 additions and 5 deletions
|
@ -19,7 +19,6 @@
|
|||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
#include <drm/drm_gem_vram_helper.h>
|
||||
#include <drm/drm_irq.h>
|
||||
#include <drm/drm_managed.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
|
||||
|
@ -28,7 +27,7 @@
|
|||
|
||||
DEFINE_DRM_GEM_FOPS(hibmc_fops);
|
||||
|
||||
static irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
|
||||
static irqreturn_t hibmc_interrupt(int irq, void *arg)
|
||||
{
|
||||
struct drm_device *dev = (struct drm_device *)arg;
|
||||
struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
|
||||
|
@ -63,7 +62,6 @@ static const struct drm_driver hibmc_driver = {
|
|||
.dumb_create = hibmc_dumb_create,
|
||||
.dumb_map_offset = drm_gem_ttm_dumb_map_offset,
|
||||
.gem_prime_mmap = drm_gem_prime_mmap,
|
||||
.irq_handler = hibmc_drm_interrupt,
|
||||
};
|
||||
|
||||
static int __maybe_unused hibmc_pm_suspend(struct device *dev)
|
||||
|
@ -251,9 +249,12 @@ static int hibmc_hw_init(struct hibmc_drm_private *priv)
|
|||
|
||||
static int hibmc_unload(struct drm_device *dev)
|
||||
{
|
||||
struct hibmc_drm_private *priv = to_hibmc_drm_private(dev);
|
||||
struct pci_dev *pdev = to_pci_dev(dev->dev);
|
||||
|
||||
drm_atomic_helper_shutdown(dev);
|
||||
|
||||
drm_irq_uninstall(dev);
|
||||
free_irq(pdev->irq, dev);
|
||||
|
||||
pci_disable_msi(to_pci_dev(dev->dev));
|
||||
|
||||
|
@ -290,7 +291,9 @@ static int hibmc_load(struct drm_device *dev)
|
|||
if (ret) {
|
||||
drm_warn(dev, "enabling MSI failed: %d\n", ret);
|
||||
} else {
|
||||
ret = drm_irq_install(dev, pdev->irq);
|
||||
/* PCI devices require shared interrupts. */
|
||||
ret = request_irq(pdev->irq, hibmc_interrupt, IRQF_SHARED,
|
||||
dev->driver->name, dev);
|
||||
if (ret)
|
||||
drm_warn(dev, "install irq failed: %d\n", ret);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue