From: "Nicolás Antinori" <nico.antinori.7@gmail.com>
To: "Christian König" <christian.koenig@amd.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>
Cc: "Nicolás Antinori" <nico.antinori.7@gmail.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Brigham Campbell" <me@brighamcampbell.com>,
"David Airlie" <airlied@gmail.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Simona Vetter" <simona@ffwll.ch>,
linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linux.dev,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/amdgpu: Inline drm_simple_encoder_init()
Date: Wed, 8 Jul 2026 19:20:21 -0300 [thread overview]
Message-ID: <20260708222035.7324-1-nico.antinori.7@gmail.com> (raw)
Simple KMS helpers are deprecated because they introduce an unnecessary
intermediate layer between atomic modesetting and the DRM driver.
Inline the functionality of drm_simple_encoder_init() to remove
dependencies on these deprecated helpers.
Signed-off-by: Nicolás Antinori <nico.antinori.7@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index 170adaf7e76a..d5b0692fe860 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -2,7 +2,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
-#include <drm/drm_simple_kms_helper.h>
+#include <drm/drm_encoder.h>
#include <drm/drm_gem_framebuffer_helper.h>
#include <drm/drm_vblank.h>
#include <drm/drm_vblank_helper.h>
@@ -316,6 +316,10 @@ static struct drm_plane *amdgpu_vkms_plane_init(struct drm_device *dev,
return plane;
}
+static const struct drm_encoder_funcs drm_encoder_funcs_cleanup = {
+ .destroy = drm_encoder_cleanup,
+};
+
static int amdgpu_vkms_output_init(struct drm_device *dev, struct
amdgpu_vkms_output *output, int index)
{
@@ -342,7 +346,9 @@ static int amdgpu_vkms_output_init(struct drm_device *dev, struct
drm_connector_helper_add(connector, &amdgpu_vkms_conn_helper_funcs);
- ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_VIRTUAL);
+ ret = drm_encoder_init(dev, encoder,
+ &drm_encoder_funcs_cleanup,
+ DRM_MODE_ENCODER_VIRTUAL, NULL);
if (ret) {
DRM_ERROR("Failed to init encoder\n");
goto err_encoder;
--
2.47.3
next reply other threads:[~2026-07-08 22:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 22:20 Nicolás Antinori [this message]
2026-07-09 7:17 ` [PATCH] drm/amdgpu: Inline drm_simple_encoder_init() Thomas Zimmermann
2026-07-10 13:27 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260708222035.7324-1-nico.antinori.7@gmail.com \
--to=nico.antinori.7@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=me@brighamcampbell.com \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox