diff mbox

[v2] virtio-gpu: fix vblank events

Message ID 1476811950-29476-1-git-send-email-gustavo@padovan.org (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo Padovan Oct. 18, 2016, 5:32 p.m. UTC
From: Gerd Hoffmann <kraxel@redhat.com>

virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and
because of that it must be called for disabled planes too.  Ask
drm_atomic_helper_commit_planes to do that.

v2: update to use new drm_atomic_helper_commit_planes() API.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/virtio/virtgpu_display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Gustavo Padovan Nov. 2, 2016, 10 p.m. UTC | #1
ping

2016-10-18 Gustavo Padovan <gustavo@padovan.org>:

> From: Gerd Hoffmann <kraxel@redhat.com>
> 
> virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and
> because of that it must be called for disabled planes too.  Ask
> drm_atomic_helper_commit_planes to do that.
> 
> v2: update to use new drm_atomic_helper_commit_planes() API.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/gpu/drm/virtio/virtgpu_display.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
> index 6848651..64facc8 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_display.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
> @@ -340,8 +340,7 @@ static void vgdev_atomic_commit_tail(struct drm_atomic_state *state)
>  
>  	drm_atomic_helper_commit_modeset_disables(dev, state);
>  	drm_atomic_helper_commit_modeset_enables(dev, state);
> -	drm_atomic_helper_commit_planes(dev, state,
> -					DRM_PLANE_COMMIT_ACTIVE_ONLY);
> +	drm_atomic_helper_commit_planes(dev, state, 0);
>  
>  	drm_atomic_helper_commit_hw_done(state);
>  
> -- 
> 2.5.5
>
Gerd Hoffmann Nov. 3, 2016, 8:35 a.m. UTC | #2
Hi,

Dave, that is the only fix needed for for 4.9, can you pick it up
directly?  Otherwise I can prepare a single-patch pull request with
it ...

thanks,
  Gerd

On Mi, 2016-11-02 at 16:00 -0600, Gustavo Padovan wrote:
> ping
> 
> 2016-10-18 Gustavo Padovan <gustavo@padovan.org>:
> 
> > From: Gerd Hoffmann <kraxel@redhat.com>
> > 
> > virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and
> > because of that it must be called for disabled planes too.  Ask
> > drm_atomic_helper_commit_planes to do that.
> > 
> > v2: update to use new drm_atomic_helper_commit_planes() API.
> > 
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> >  drivers/gpu/drm/virtio/virtgpu_display.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
> > index 6848651..64facc8 100644
> > --- a/drivers/gpu/drm/virtio/virtgpu_display.c
> > +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
> > @@ -340,8 +340,7 @@ static void vgdev_atomic_commit_tail(struct drm_atomic_state *state)
> >  
> >  	drm_atomic_helper_commit_modeset_disables(dev, state);
> >  	drm_atomic_helper_commit_modeset_enables(dev, state);
> > -	drm_atomic_helper_commit_planes(dev, state,
> > -					DRM_PLANE_COMMIT_ACTIVE_ONLY);
> > +	drm_atomic_helper_commit_planes(dev, state, 0);
> >  
> >  	drm_atomic_helper_commit_hw_done(state);
> >  
> > -- 
> > 2.5.5
> >
Gerd Hoffmann Nov. 3, 2016, 8:41 a.m. UTC | #3
On Do, 2016-11-03 at 09:35 +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> Dave, that is the only fix needed for for 4.9, can you pick it up
> directly?  Otherwise I can prepare a single-patch pull request with
> it ...

ok, scratch that, just saw this already is in the -rc4 fixes pull req.

cheers,
  Gerd
diff mbox

Patch

diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index 6848651..64facc8 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -340,8 +340,7 @@  static void vgdev_atomic_commit_tail(struct drm_atomic_state *state)
 
 	drm_atomic_helper_commit_modeset_disables(dev, state);
 	drm_atomic_helper_commit_modeset_enables(dev, state);
-	drm_atomic_helper_commit_planes(dev, state,
-					DRM_PLANE_COMMIT_ACTIVE_ONLY);
+	drm_atomic_helper_commit_planes(dev, state, 0);
 
 	drm_atomic_helper_commit_hw_done(state);