From: Naman Arora <namanarora029@gmail•com>
To: dri-devel@lists•freedesktop.org
Cc: tzimmermann@suse•de, maarten.lankhorst@linux•intel.com,
mripard@kernel•org, airlied@gmail•com, simona@ffwll•ch,
stefan@agner•ch, alison.wang@nxp•com, jyri.sarha@iki•fi,
tomi.valkeinen@ideasonboard•com, kraxel@redhat•com,
dmitry.osipenko@collabora•com, neil.armstrong@linaro•org,
khilman@baylibre•com, linux-kernel@vger•kernel.org,
virtualization@lists•linux.dev,
linux-amlogic@lists•infradead.org,
linux-arm-kernel@lists•infradead.org,
Naman Arora <namanarora029@gmail•com>
Subject: [PATCH 2/6] drm/tidss: Open-code drm_simple_encoder_init()
Date: Sun, 31 May 2026 13:05:28 +0530 [thread overview]
Message-ID: <20260531073532.8609-3-namanarora029@gmail.com> (raw)
In-Reply-To: <20260531073532.8609-1-namanarora029@gmail.com>
The helper drm_simple_encoder_init() is a thin wrapper around
drm_encoder_init() with a simple destroy-only encoder funcs struct.
Remove the dependency on drm_simple_kms_helper by open-coding the
encoder initialization directly in the driver.
Signed-off-by: Naman Arora <namanarora029@gmail•com>
---
drivers/gpu/drm/tidss/tidss_encoder.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/tidss/tidss_encoder.c b/drivers/gpu/drm/tidss/tidss_encoder.c
index 81a04f767..4d73a271c 100644
--- a/drivers/gpu/drm/tidss/tidss_encoder.c
+++ b/drivers/gpu/drm/tidss/tidss_encoder.c
@@ -13,7 +13,6 @@
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_panel.h>
#include <drm/drm_of.h>
-#include <drm/drm_simple_kms_helper.h>
#include "tidss_crtc.h"
#include "tidss_drv.h"
@@ -81,6 +80,10 @@ static const struct drm_bridge_funcs tidss_bridge_funcs = {
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
};
+static const struct drm_encoder_funcs tidss_drm_encoder_funcs = {
+ .destroy = drm_encoder_cleanup,
+};
+
int tidss_encoder_create(struct tidss_device *tidss,
struct drm_bridge *next_bridge,
u32 encoder_type, u32 possible_crtcs)
@@ -95,8 +98,9 @@ int tidss_encoder_create(struct tidss_device *tidss,
if (IS_ERR(t_enc))
return PTR_ERR(t_enc);
- ret = drm_simple_encoder_init(&tidss->ddev, &t_enc->encoder,
- encoder_type);
+ ret = drm_encoder_init(&tidss->ddev, &t_enc->encoder,
+ &tidss_drm_encoder_funcs,
+ encoder_type, NULL);
if (ret)
return ret;
--
2.20.1
next prev parent reply other threads:[~2026-05-31 7:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 7:35 [PATCH 0/6] drm: Open-code drm_simple_encoder_init() in several drivers Naman Arora
2026-05-31 7:35 ` [PATCH 1/6] drm/fsl-dcu: Open-code drm_simple_encoder_init() Naman Arora
2026-05-31 7:35 ` Naman Arora [this message]
2026-05-31 7:35 ` [PATCH 3/6] drm/virtio: " Naman Arora
2026-05-31 7:46 ` [PATCH 4/6] drm/meson: Open-code drm_simple_encoder_init() in encoder_cvbs Naman Arora
2026-05-31 7:46 ` [PATCH 5/6] drm/meson: Open-code drm_simple_encoder_init() in encoder_hdmi Naman Arora
2026-05-31 7:46 ` [PATCH 6/6] drm/meson: Open-code drm_simple_encoder_init() in encoder_dsi Naman Arora
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=20260531073532.8609-3-namanarora029@gmail.com \
--to=namanarora029@gmail$(echo .)com \
--cc=airlied@gmail$(echo .)com \
--cc=alison.wang@nxp$(echo .)com \
--cc=dmitry.osipenko@collabora$(echo .)com \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=jyri.sarha@iki$(echo .)fi \
--cc=khilman@baylibre$(echo .)com \
--cc=kraxel@redhat$(echo .)com \
--cc=linux-amlogic@lists$(echo .)infradead.org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=maarten.lankhorst@linux$(echo .)intel.com \
--cc=mripard@kernel$(echo .)org \
--cc=neil.armstrong@linaro$(echo .)org \
--cc=simona@ffwll$(echo .)ch \
--cc=stefan@agner$(echo .)ch \
--cc=tomi.valkeinen@ideasonboard$(echo .)com \
--cc=tzimmermann@suse$(echo .)de \
--cc=virtualization@lists$(echo .)linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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