* [PATCH] drm/amdgpu: Inline drm_simple_encoder_init()
@ 2026-07-08 22:20 Nicolás Antinori
2026-07-09 7:17 ` Thomas Zimmermann
0 siblings, 1 reply; 3+ messages in thread
From: Nicolás Antinori @ 2026-07-08 22:20 UTC (permalink / raw)
To: Christian König, Thomas Zimmermann
Cc: Nicolás Antinori, Alex Deucher, Brigham Campbell,
David Airlie, Shuah Khan, Simona Vetter, linux-kernel,
linux-kernel-mentees, amd-gfx, dri-devel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: Inline drm_simple_encoder_init()
2026-07-08 22:20 [PATCH] drm/amdgpu: Inline drm_simple_encoder_init() Nicolás Antinori
@ 2026-07-09 7:17 ` Thomas Zimmermann
2026-07-10 13:27 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Zimmermann @ 2026-07-09 7:17 UTC (permalink / raw)
To: Nicolás Antinori, Christian König
Cc: Alex Deucher, Brigham Campbell, David Airlie, Shuah Khan,
Simona Vetter, linux-kernel, linux-kernel-mentees, amd-gfx,
dri-devel
Am 09.07.26 um 00:20 schrieb Nicolás Antinori:
> 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>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> 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
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: Inline drm_simple_encoder_init()
2026-07-09 7:17 ` Thomas Zimmermann
@ 2026-07-10 13:27 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2026-07-10 13:27 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Nicolás Antinori, Christian König, Alex Deucher,
Brigham Campbell, David Airlie, Shuah Khan, Simona Vetter,
linux-kernel, linux-kernel-mentees, amd-gfx, dri-devel
Applied. Thanks!
On Thu, Jul 9, 2026 at 3:17 AM Thomas Zimmermann <tzimmermann@suse.de> wrote:
>
>
>
> Am 09.07.26 um 00:20 schrieb Nicolás Antinori:
> > 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>
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> > ---
> > 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
> >
>
> --
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
> GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-10 13:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 22:20 [PATCH] drm/amdgpu: Inline drm_simple_encoder_init() Nicolás Antinori
2026-07-09 7:17 ` Thomas Zimmermann
2026-07-10 13:27 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox