drm/qxl: remove dependency on DRM simple helpers

Simple KMS helper are deprecated since they only add an intermediate
layer between drivers and the atomic modesetting.
This patch removes the drm_simple_encoder_init() helper usage in the
qxl display driver by open coding it and using the encoder atomic
helpers directly. This is a step to eventually get rid of this simple
KMS helper, once all drivers that use it have been converted.

Signed-off-by: Diogo Silva <diogompaissilva@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260707-qxl-simple-v2-1-08d21bc74a41@gmail.com
This commit is contained in:
Diogo Silva 2026-07-07 18:14:55 +02:00 committed by Thomas Zimmermann
parent 104c009172
commit c03adcddd5

View File

@ -31,12 +31,12 @@
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_encoder.h>
#include <drm/drm_framebuffer.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_plane_helper.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
#include <drm/drm_simple_kms_helper.h>
#include <drm/drm_gem_atomic_helper.h>
#include <drm/drm_vblank.h>
#include <drm/drm_vblank_helper.h>
@ -1095,6 +1095,10 @@ static const struct drm_connector_helper_funcs qxl_connector_helper_funcs = {
.best_encoder = qxl_best_encoder,
};
static const struct drm_encoder_funcs qxl_encoder_funcs = {
.destroy = drm_encoder_cleanup,
};
static enum drm_connector_status qxl_conn_detect(
struct drm_connector *connector,
bool force)
@ -1169,10 +1173,10 @@ static int qdev_output_init(struct drm_device *dev, int num_output)
drm_connector_init(dev, &qxl_output->base,
&qxl_connector_funcs, DRM_MODE_CONNECTOR_VIRTUAL);
ret = drm_simple_encoder_init(dev, &qxl_output->enc,
DRM_MODE_ENCODER_VIRTUAL);
ret = drm_encoder_init(dev, &qxl_output->enc, &qxl_encoder_funcs,
DRM_MODE_ENCODER_VIRTUAL, NULL);
if (ret) {
drm_err(dev, "drm_simple_encoder_init() failed, error %d\n",
drm_err(dev, "drm_encoder_init() failed, error %d\n",
ret);
goto err_drm_connector_cleanup;
}