2020-11-27 08:19:29

by Tian Tao

[permalink] [raw]
Subject: [PATCH drm/hisilicon 0/3] Add the new api to install irq

patch #1 is code refactorings to use devm_drm_dev_alloc and
devm_drm_irq_install.
patch #2 add the new api to install irq, patch #3 is hibmc driver uses
the newly added api to register interrupts.

Tian Tao (3):
drm/hisilicon: Code refactoring for hibmc_drm_drv
drm/irq: Add the new api to install irq
drm/hisilicon: Use the new api devm_drm_irq_install

drivers/gpu/drm/drm_irq.c | 34 ++++++++++++++
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +-
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 56 ++++++++++--------------
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 2 +-
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 +-
drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 8 ++--
include/drm/drm_irq.h | 2 +-
7 files changed, 67 insertions(+), 39 deletions(-)

--
2.7.4


2020-11-27 09:41:11

by Tian Tao

[permalink] [raw]
Subject: [PATCH drm/hisilicon 3/3] drm/hisilicon: Use the new api devm_drm_irq_install

Use devm_drm_irq_install to register interrupts so that
drm_irq_uninstall is not called when hibmc is removed.

Signed-off-by: Tian Tao <[email protected]>
---
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
index ea3d81b..77792e3 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
@@ -247,9 +247,6 @@ static int hibmc_unload(struct drm_device *dev)

drm_atomic_helper_shutdown(dev);

- if (dev->irq_enabled)
- drm_irq_uninstall(dev);
-
pci_disable_msi(dev->pdev);
hibmc_kms_fini(priv);
hibmc_mm_fini(priv);
@@ -284,7 +281,7 @@ 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, dev->pdev->irq);
+ ret = devm_drm_irq_install(dev, dev->pdev->irq);
if (ret)
drm_warn(dev, "install irq failed: %d\n", ret);
}
--
2.7.4