From: Jacob McLemore Date: Sat, 23 May 2026 01:26:24 +0000 (-0500) Subject: drm/tegra: sor: Remove usage of drm_simple_encoder_init() X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=05a07a31deda59b60483b5359b5c0ccb693d7311;p=thirdparty%2Flinux.git 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. Signed-off-by: Jacob McLemore Signed-off-by: Thierry Reding Link: https://patch.msgid.link/20260523012824.81043-1-jmclemore.lkml@gmail.com --- diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 93e5ffd4f206b..865b211ae7527 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -23,10 +23,10 @@ #include #include #include +#include #include #include #include -#include #include "dc.h" #include "dp.h" @@ -3039,6 +3039,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); @@ -3082,7 +3086,8 @@ 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,