From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] drm/rockchip: vop: Wait for pending events when disabling a CRTC
Date: Wed, 6 Apr 2016 12:14:46 +0200 [thread overview]
Message-ID: <1459937686-9142-2-git-send-email-tomeu.vizoso@collabora.com> (raw)
In-Reply-To: <1459937686-9142-1-git-send-email-tomeu.vizoso@collabora.com>
When a VOP is disabled, it will stop raising interrupts. If we had a
pending pageflip when the VOP is disabled, userspace won't get that
event until the corresponding CRTC is enabled again.
So let's wait for any pending events that may be right before disabling
a CRTC.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index f46b1fd1887b..6dc87fa96f29 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -142,6 +142,8 @@ struct vop {
struct vop_win win[];
};
+static void vop_crtc_wait_for_update(struct drm_crtc *crtc);
+
static inline void vop_writel(struct vop *vop, uint32_t offset, uint32_t v)
{
writel(v, vop->regs + offset);
@@ -504,6 +506,9 @@ static void vop_crtc_disable(struct drm_crtc *crtc)
if (!vop->is_enabled)
return;
+ if (crtc->state->event || vop->event)
+ vop_crtc_wait_for_update(crtc);
+
/*
* We need to make sure that all windows are disabled before we
* disable that crtc. Otherwise we might try to scan from a destroyed
--
2.5.5
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-04-06 10:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 10:14 [PATCH 1/2] drm/rockchip: vop: Do check if an update is pending during disable Tomeu Vizoso
2016-04-06 10:14 ` Tomeu Vizoso [this message]
2016-04-08 1:07 ` Mark yao
2016-04-08 10:54 ` Tomeu Vizoso
2016-04-11 1:15 ` Mark yao
2016-04-20 14:23 ` Tomeu Vizoso
2016-05-05 9:34 ` Tomeu Vizoso
2016-05-23 6:32 ` Mark yao
2016-05-24 10:11 ` Tomeu Vizoso
2016-05-25 1:06 ` Mark yao
2016-05-25 1:33 ` Mark yao
2016-06-02 5:57 ` Tomeu Vizoso
2016-06-02 6:25 ` Mark yao
2016-06-02 6:35 ` Tomeu Vizoso
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=1459937686-9142-2-git-send-email-tomeu.vizoso@collabora.com \
--to=tomeu.vizoso@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
/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