From: Liviu Dudau <Liviu.Dudau@arm.com>
To: David Airlie <airlied@linux.ie>,
Mali DP Maintainers <malidp@foss.arm.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: DRI devel <dri-devel@lists.freedesktop.org>,
LKML <linux-kernel@vger.kernel.org>,
Brian Starkey <Brian.Starkey@arm.com>
Subject: [PATCH 2/2] drm: mali-dp: Set the drm->irq_enabled flag to match driver's state.
Date: Fri, 29 Jul 2016 15:44:16 +0100 [thread overview]
Message-ID: <20160729144416.2860-3-Liviu.Dudau@arm.com> (raw)
In-Reply-To: <20160729144416.2860-1-Liviu.Dudau@arm.com>
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
next prev parent reply other threads:[~2016-07-29 14:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 14:44 Cleanup patches for mali-dp driver Liviu Dudau
2016-07-29 14:44 ` [PATCH 1/2] drm: mali-dp: Clear the config_valid flag before using it in wait_event Liviu Dudau
2016-07-29 14:44 ` Liviu Dudau [this message]
2016-08-02 13:30 ` [PATCH 2/2] drm: mali-dp: Set the drm->irq_enabled flag to match driver's state Daniel Vetter
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=20160729144416.2860-3-Liviu.Dudau@arm.com \
--to=liviu.dudau@arm.com \
--cc=Brian.Starkey@arm.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=malidp@foss.arm.com \
/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®