summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vkms/vkms_output.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2023-04-12 16:22:41 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2023-04-12 16:23:04 +0200
commitd8dab40a8b37fe8207e1edf68205c709b477e0a4 (patch)
treeadd4d377bbc4c04f9b6cf20038d6f90a05570506 /drivers/gpu/drm/vkms/vkms_output.c
parent55bf14961db9da61220e6f04bc9919c94b1a6585 (diff)
parentfd35174e13f98f9232c4aa66689816731d34ca28 (diff)
downloadlwn-d8dab40a8b37fe8207e1edf68205c709b477e0a4.tar.gz
lwn-d8dab40a8b37fe8207e1edf68205c709b477e0a4.zip
Merge tag 'drm-misc-next-2023-04-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v6.4-rc1: Cross-subsystem Changes: - Convert MIPI DSIM bridge dt to yaml. Core Changes: - Fix UAF race in drm scheduler. Driver Changes: - Add primary plane positioning support to VKMS. - Convert omapdrm fbdev emulation to in-kernel client. - Assorted small fixes to vkms, vc4, nouveau, vmwgfx. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b7c37d4e-8f16-85dc-0f5f-3bd98f961395@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_output.c')
-rw-r--r--drivers/gpu/drm/vkms/vkms_output.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c
index 991857125bb4..5ce70dd946aa 100644
--- a/drivers/gpu/drm/vkms/vkms_output.c
+++ b/drivers/gpu/drm/vkms/vkms_output.c
@@ -4,21 +4,19 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_probe_helper.h>
-#include <drm/drm_simple_kms_helper.h>
-
-static void vkms_connector_destroy(struct drm_connector *connector)
-{
- drm_connector_cleanup(connector);
-}
static const struct drm_connector_funcs vkms_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
- .destroy = vkms_connector_destroy,
+ .destroy = drm_connector_cleanup,
.reset = drm_atomic_helper_connector_reset,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_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)
{
int count;
@@ -91,7 +89,8 @@ int vkms_output_init(struct vkms_device *vkmsdev, int index)
drm_connector_helper_add(connector, &vkms_conn_helper_funcs);
- ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
+ ret = drm_encoder_init(dev, encoder, &vkms_encoder_funcs,
+ DRM_MODE_ENCODER_VIRTUAL, NULL);
if (ret) {
DRM_ERROR("Failed to init encoder\n");
goto err_encoder;