diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-03-05 16:59:47 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-02 14:16:46 +0200 |
commit | 35b9df3cde204c01f5023ca099aa59b000b98e64 (patch) | |
tree | bad04bca5d380807b18e5f1469801a08401c1832 /drivers/gpu/drm/virtio/virtgpu_display.c | |
parent | f6ebc1b0f7725ccf5c282b59bd45fc8ef4d7cfd0 (diff) |
drm/virtgpu: Use simple encoder
The virtgpu driver uses an empty implementation for its encoder. Replace
the code with the generic simple encoder.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-20-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_display.c')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_display.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c index 2b7e6ae65546..cc7fd957a307 100644 --- a/drivers/gpu/drm/virtio/virtgpu_display.c +++ b/drivers/gpu/drm/virtio/virtgpu_display.c @@ -30,6 +30,7 @@ #include <drm/drm_fourcc.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_probe_helper.h> +#include <drm/drm_simple_kms_helper.h> #include "virtgpu_drv.h" @@ -240,10 +241,6 @@ static const struct drm_connector_funcs virtio_gpu_connector_funcs = { .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, }; -static const struct drm_encoder_funcs virtio_gpu_enc_funcs = { - .destroy = drm_encoder_cleanup, -}; - static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index) { struct drm_device *dev = vgdev->ddev; @@ -276,8 +273,7 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index) if (vgdev->has_edid) drm_connector_attach_edid_property(connector); - drm_encoder_init(dev, encoder, &virtio_gpu_enc_funcs, - DRM_MODE_ENCODER_VIRTUAL, NULL); + drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL); drm_encoder_helper_add(encoder, &virtio_gpu_enc_helper_funcs); encoder->possible_crtcs = 1 << index; |