Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452433

[PATCH 2/2] drm: mali-dp: Set the drm->irq_enabled flag to match driver's state.

From Liviu Dudau <Liviu.Dudau@arm.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] drm: mali-dp: Set the drm->irq_enabled flag to match driver's state.
Date 2016-07-29 16:50 +0200
Message-ID <s0hgS-5SV-13@gated-at.bofh.it> (permalink)
References <s0hgS-5SV-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Mali DP driver does not use drm_irq_{un,}install() function so the
drm->irq_enabled flag does not get managed automatically. Among other
DRM framework functions, drm_wait_vblank() checks the value of the
flag and return -EINVAL if not set.

Cc: Brian Starkey <Brian.Starkey@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
 drivers/gpu/drm/arm/malidp_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index 87c9249..a1c01e4 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -377,6 +377,8 @@ static int malidp_bind(struct device *dev)
 	if (ret < 0)
 		goto irq_init_fail;
 
+	drm->irq_enabled = true;
+
 	ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
 	if (ret < 0) {
 		DRM_ERROR("failed to initialise vblank\n");
@@ -402,6 +404,7 @@ fbdev_fail:
 vblank_fail:
 	malidp_se_irq_fini(drm);
 	malidp_de_irq_fini(drm);
+	drm->irq_enabled = false;
 irq_init_fail:
 	component_unbind_all(dev, drm);
 bind_fail:
@@ -439,6 +442,7 @@ static void malidp_unbind(struct device *dev)
 	drm_kms_helper_poll_fini(drm);
 	malidp_se_irq_fini(drm);
 	malidp_de_irq_fini(drm);
+	drm->irq_enabled = false;
 	drm_vblank_cleanup(drm);
 	component_unbind_all(dev, drm);
 	of_node_put(malidp->crtc.port);
-- 
2.9.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Cleanup patches for mali-dp driver Liviu Dudau <Liviu.Dudau@arm.com> - 2016-07-29 16:50 +0200
  [PATCH 2/2] drm: mali-dp: Set the drm->irq_enabled flag to match driver's state. Liviu Dudau <Liviu.Dudau@arm.com> - 2016-07-29 16:50 +0200
    Re: [PATCH 2/2] drm: mali-dp: Set the drm->irq_enabled flag to match  driver's state. Daniel Vetter <daniel@ffwll.ch> - 2016-08-02 15:40 +0200

csiph-web