Daniel Vetter
2020-Jul-09 12:33 UTC
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
Exactly matches the one in the helpers. This avoids me having to roll out dma-fence critical section annotations to this copy. Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> Cc: David Airlie <airlied at linux.ie> Cc: Gerd Hoffmann <kraxel at redhat.com> Cc: virtualization at lists.linux-foundation.org --- drivers/gpu/drm/virtio/virtgpu_display.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index f3ce49c5a34c..af55b334be2f 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -314,25 +314,6 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev, return &virtio_gpu_fb->base; } -static void vgdev_atomic_commit_tail(struct drm_atomic_state *state) -{ - struct drm_device *dev = state->dev; - - drm_atomic_helper_commit_modeset_disables(dev, state); - drm_atomic_helper_commit_modeset_enables(dev, state); - drm_atomic_helper_commit_planes(dev, state, 0); - - drm_atomic_helper_fake_vblank(state); - drm_atomic_helper_commit_hw_done(state); - - drm_atomic_helper_wait_for_vblanks(dev, state); - drm_atomic_helper_cleanup_planes(dev, state); -} - -static const struct drm_mode_config_helper_funcs virtio_mode_config_helpers = { - .atomic_commit_tail = vgdev_atomic_commit_tail, -}; - static const struct drm_mode_config_funcs virtio_gpu_mode_funcs = { .fb_create = virtio_gpu_user_framebuffer_create, .atomic_check = drm_atomic_helper_check, @@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) drm_mode_config_init(vgdev->ddev); vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; /* modes will be validated against the framebuffer size */ vgdev->ddev->mode_config.min_width = XRES_MIN; -- 2.27.0
Gerd Hoffmann
2020-Jul-09 12:48 UTC
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
On Thu, Jul 09, 2020 at 02:33:39PM +0200, Daniel Vetter wrote:> Exactly matches the one in the helpers. > > This avoids me having to roll out dma-fence critical section > annotations to this copy. > > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> > Cc: David Airlie <airlied at linux.ie> > Cc: Gerd Hoffmann <kraxel at redhat.com> > Cc: virtualization at lists.linux-foundation.orgAcked-by: Gerd Hoffmann <kraxel at redhat.com>
Sam Ravnborg
2020-Jul-09 14:05 UTC
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
On Thu, Jul 09, 2020 at 02:33:39PM +0200, Daniel Vetter wrote:> Exactly matches the one in the helpers. > > This avoids me having to roll out dma-fence critical section > annotations to this copy. > > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> > Cc: David Airlie <airlied at linux.ie> > Cc: Gerd Hoffmann <kraxel at redhat.com> > Cc: virtualization at lists.linux-foundation.org > --- > drivers/gpu/drm/virtio/virtgpu_display.c | 20 -------------------- > 1 file changed, 20 deletions(-)Very nice catch: Reviewed-by: Sam Ravnborg <sam at ravnborg.org>> > diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c > index f3ce49c5a34c..af55b334be2f 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_display.c > +++ b/drivers/gpu/drm/virtio/virtgpu_display.c > @@ -314,25 +314,6 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev, > return &virtio_gpu_fb->base; > } > > -static void vgdev_atomic_commit_tail(struct drm_atomic_state *state) > -{ > - struct drm_device *dev = state->dev; > - > - drm_atomic_helper_commit_modeset_disables(dev, state); > - drm_atomic_helper_commit_modeset_enables(dev, state); > - drm_atomic_helper_commit_planes(dev, state, 0); > - > - drm_atomic_helper_fake_vblank(state); > - drm_atomic_helper_commit_hw_done(state); > - > - drm_atomic_helper_wait_for_vblanks(dev, state); > - drm_atomic_helper_cleanup_planes(dev, state); > -} > - > -static const struct drm_mode_config_helper_funcs virtio_mode_config_helpers = { > - .atomic_commit_tail = vgdev_atomic_commit_tail, > -}; > - > static const struct drm_mode_config_funcs virtio_gpu_mode_funcs = { > .fb_create = virtio_gpu_user_framebuffer_create, > .atomic_check = drm_atomic_helper_check, > @@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) > drm_mode_config_init(vgdev->ddev); > vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; > vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; > - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; > > /* modes will be validated against the framebuffer size */ > vgdev->ddev->mode_config.min_width = XRES_MIN; > -- > 2.27.0 > > _______________________________________________ > dri-devel mailing list > dri-devel at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
2020-Jul-14 09:13 UTC
[PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
On Thu, Jul 09, 2020 at 04:05:31PM +0200, Sam Ravnborg wrote:> On Thu, Jul 09, 2020 at 02:33:39PM +0200, Daniel Vetter wrote: > > Exactly matches the one in the helpers. > > > > This avoids me having to roll out dma-fence critical section > > annotations to this copy. > > > > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com> > > Cc: David Airlie <airlied at linux.ie> > > Cc: Gerd Hoffmann <kraxel at redhat.com> > > Cc: virtualization at lists.linux-foundation.org > > --- > > drivers/gpu/drm/virtio/virtgpu_display.c | 20 -------------------- > > 1 file changed, 20 deletions(-) > Very nice catch: > Reviewed-by: Sam Ravnborg <sam at ravnborg.org>Patch applied, thanks for reviewing.> > > > diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c > > index f3ce49c5a34c..af55b334be2f 100644 > > --- a/drivers/gpu/drm/virtio/virtgpu_display.c > > +++ b/drivers/gpu/drm/virtio/virtgpu_display.c > > @@ -314,25 +314,6 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev, > > return &virtio_gpu_fb->base; > > } > > > > -static void vgdev_atomic_commit_tail(struct drm_atomic_state *state) > > -{ > > - struct drm_device *dev = state->dev; > > - > > - drm_atomic_helper_commit_modeset_disables(dev, state); > > - drm_atomic_helper_commit_modeset_enables(dev, state); > > - drm_atomic_helper_commit_planes(dev, state, 0); > > - > > - drm_atomic_helper_fake_vblank(state); > > - drm_atomic_helper_commit_hw_done(state); > > - > > - drm_atomic_helper_wait_for_vblanks(dev, state); > > - drm_atomic_helper_cleanup_planes(dev, state); > > -} > > - > > -static const struct drm_mode_config_helper_funcs virtio_mode_config_helpers = { > > - .atomic_commit_tail = vgdev_atomic_commit_tail, > > -}; > > - > > static const struct drm_mode_config_funcs virtio_gpu_mode_funcs = { > > .fb_create = virtio_gpu_user_framebuffer_create, > > .atomic_check = drm_atomic_helper_check, > > @@ -346,7 +327,6 @@ void virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) > > drm_mode_config_init(vgdev->ddev); > > vgdev->ddev->mode_config.quirk_addfb_prefer_host_byte_order = true; > > vgdev->ddev->mode_config.funcs = &virtio_gpu_mode_funcs; > > - vgdev->ddev->mode_config.helper_private = &virtio_mode_config_helpers; > > > > /* modes will be validated against the framebuffer size */ > > vgdev->ddev->mode_config.min_width = XRES_MIN; > > -- > > 2.27.0 > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel at lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel-- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Maybe Matching Threads
- [PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
- [PATCH 2/2] drm/virtio: Remove open-coded commit-tail function
- [PATCH -next] drm/virtio: Fix non static symbol warning
- [PATCH -next] drm/virtio: Fix non static symbol warning
- [PATCH] drm/virtio: fix vblank handling