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
This commit is contained in:
parent
f6ebc1b0f7
commit
35b9df3cde
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue