From: Gustavo Padovan <gustavo@padovan.org>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
David Airlie <airlied@linux.ie>,
"open list:VIRTIO GPU DRIVER" <dri-devel@lists.freedesktop.org>,
"open list:VIRTIO GPU DRIVER"
<virtualization@lists.linux-foundation.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] drm/virtio: send vblank event after crtc updates
Date: Tue, 5 Apr 2016 11:21:15 -0700 [thread overview]
Message-ID: <20160405182115.GB24204@joana> (raw)
In-Reply-To: <1458677872-6024-1-git-send-email-gustavo@padovan.org>
Hi,
Any comment on this?
Gustavo
2016-03-22 Gustavo Padovan <gustavo@padovan.org>:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> virtio_gpu was failing to send vblank events when using the atomic IOCTL
> with the DRM_MODE_PAGE_FLIP_EVENT flag set. This patch fixes each and
> enables atomic pageflips updates.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
> drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
> index b70bb8b..4f372e0 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_display.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
> @@ -274,12 +274,24 @@ static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc,
> return 0;
> }
>
> +static void virtio_gpu_crtc_atomic_flush(struct drm_crtc *crtc,
> + struct drm_crtc_state *old_state)
> +{
> + unsigned long flags;
> +
> + spin_lock_irqsave(&crtc->dev->event_lock, flags);
> + if (crtc->state->event)
> + drm_crtc_send_vblank_event(crtc, crtc->state->event);
> + spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
> +}
> +
> static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = {
> .enable = virtio_gpu_crtc_enable,
> .disable = virtio_gpu_crtc_disable,
> .mode_fixup = virtio_gpu_crtc_mode_fixup,
> .mode_set_nofb = virtio_gpu_crtc_mode_set_nofb,
> .atomic_check = virtio_gpu_crtc_atomic_check,
> + .atomic_flush = virtio_gpu_crtc_atomic_flush,
> };
>
> static void virtio_gpu_enc_mode_set(struct drm_encoder *encoder,
> --
> 2.5.0
>
Gustavo
prev parent reply other threads:[~2016-04-05 18:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 19:23 [PATCH 1/2] drm/virtio: use new drm_crtc_send_vblank_event() Gustavo Padovan
2016-03-21 19:23 ` [PATCH 2/2] drm/virtio: send vblank event on plane atomic update Gustavo Padovan
2016-03-22 13:17 ` Daniel Stone
2016-03-22 20:17 ` [PATCH v2] drm/virtio: send vblank event after crtc updates Gustavo Padovan
2016-04-05 18:21 ` Gustavo Padovan [this message]
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=20160405182115.GB24204@joana \
--to=gustavo@padovan.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.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
all inboxes | Powered by JetHome®