Skip to contentSkip to conversation

drm/tegra: sor: Remove usage of drm_simple_encoder_init()

PATCH Applied Jacob McLemore 2 participants 2 messages May 23 – May 28

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/tegra: sor: Remove usage of drm_simple_encoder_init()

Remove the deprecated trivial helper drm_simple_encoder_init(). Inline the call to drm_encoder_init and add instance of drm_encoder_funcs.

---
Saw this was a good first task in Documentation/gpu/todo.rst. This is my first patch, so apologies if I've set up anything wrong in either my email client or gitconfig and the patch ends up invalid.

---
 drivers/gpu/drm/tegra/sor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/tegra/sor.c +5 -2
index de8b2dfc4984..4ac23aedb682 100644
@@ -25,7 +25,6 @@
 #include <drm/drm_file.h>
 #include <drm/drm_panel.h>
 #include <drm/drm_print.h>
-#include <drm/drm_simple_kms_helper.h>
 
 #include "dc.h"
 #include "dp.h"
@@ -3038,6 +3037,10 @@ static const struct tegra_sor_ops tegra_sor_dp_ops = {
 	.probe = tegra_sor_dp_probe,
 };
 
+static const struct drm_encoder_funcs tegra_sor_encoder_funcs_cleanup = {
+	.destroy = drm_encoder_cleanup,
+};
+
 static int tegra_sor_init(struct host1x_client *client)
 {
 	struct drm_device *drm = dev_get_drvdata(client->host);
@@ -3081,7 +3084,7 @@ static int tegra_sor_init(struct host1x_client *client)
 				 &tegra_sor_connector_helper_funcs);
 	sor->output.connector.dpms = DRM_MODE_DPMS_OFF;
 
-	drm_simple_encoder_init(drm, &sor->output.encoder, encoder);
+	drm_encoder_init(drm, &sor->output.encoder, &tegra_sor_encoder_funcs_cleanup, encoder, NULL);
 	drm_encoder_helper_add(&sor->output.encoder, helpers);
 
 	drm_connector_attach_encoder(&sor->output.connector,

base-commit: 79bd2dded182b1d458b18e62684b7f82ffc682e5

Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Jacob McLemore

Remove the deprecated trivial helper drm_simple_encoder_init(). Inline the call to drm_encoder_init and add instance of drm_encoder_funcs.

Quoted 8 lines

---
Saw this was a good first task in Documentation/gpu/todo.rst. This is my first patch, so apologies if I've set up anything wrong in either my email client or gitconfig and the patch ends up invalid.

---
 drivers/gpu/drm/tegra/sor.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Applied, though I had to fix a few checkpatch warnings. Make sure to always run that fix anything that it flags (though sometimes it can go a bit overboard, so apply some common sense, too).

Thanks,
Thierry