Commit 35b9df3c authored by Thomas Zimmermann's avatar Thomas Zimmermann

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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-20-tzimmermann@suse.de
parent f6ebc1b0
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <drm/drm_fourcc.h> #include <drm/drm_fourcc.h>
#include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include "virtgpu_drv.h" #include "virtgpu_drv.h"
...@@ -240,10 +241,6 @@ static const struct drm_connector_funcs virtio_gpu_connector_funcs = { ...@@ -240,10 +241,6 @@ static const struct drm_connector_funcs virtio_gpu_connector_funcs = {
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .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) static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
{ {
struct drm_device *dev = vgdev->ddev; struct drm_device *dev = vgdev->ddev;
...@@ -276,8 +273,7 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index) ...@@ -276,8 +273,7 @@ static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index)
if (vgdev->has_edid) if (vgdev->has_edid)
drm_connector_attach_edid_property(connector); drm_connector_attach_edid_property(connector);
drm_encoder_init(dev, encoder, &virtio_gpu_enc_funcs, drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
DRM_MODE_ENCODER_VIRTUAL, NULL);
drm_encoder_helper_add(encoder, &virtio_gpu_enc_helper_funcs); drm_encoder_helper_add(encoder, &virtio_gpu_enc_helper_funcs);
encoder->possible_crtcs = 1 << index; encoder->possible_crtcs = 1 << index;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment