drm/vkms: Use simple encoder
The vkms 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-21-tzimmermann@suse.de
This commit is contained in:
parent
35b9df3cde
commit
d19561579d
@ -3,6 +3,7 @@
|
|||||||
#include "vkms_drv.h"
|
#include "vkms_drv.h"
|
||||||
#include <drm/drm_atomic_helper.h>
|
#include <drm/drm_atomic_helper.h>
|
||||||
#include <drm/drm_probe_helper.h>
|
#include <drm/drm_probe_helper.h>
|
||||||
|
#include <drm/drm_simple_kms_helper.h>
|
||||||
|
|
||||||
static void vkms_connector_destroy(struct drm_connector *connector)
|
static void vkms_connector_destroy(struct drm_connector *connector)
|
||||||
{
|
{
|
||||||
@ -17,10 +18,6 @@ static const struct drm_connector_funcs vkms_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 vkms_encoder_funcs = {
|
|
||||||
.destroy = drm_encoder_cleanup,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int vkms_conn_get_modes(struct drm_connector *connector)
|
static int vkms_conn_get_modes(struct drm_connector *connector)
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
@ -70,8 +67,7 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
|
|||||||
|
|
||||||
drm_connector_helper_add(connector, &vkms_conn_helper_funcs);
|
drm_connector_helper_add(connector, &vkms_conn_helper_funcs);
|
||||||
|
|
||||||
ret = drm_encoder_init(dev, encoder, &vkms_encoder_funcs,
|
ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
|
||||||
DRM_MODE_ENCODER_VIRTUAL, NULL);
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
DRM_ERROR("Failed to init encoder\n");
|
DRM_ERROR("Failed to init encoder\n");
|
||||||
goto err_encoder;
|
goto err_encoder;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user