On 05/03/2020 17:59, Thomas Zimmermann wrote: > The tilcdc driver uses empty implementations for its encoders. Replace > the code with the generic simple encoder. > > Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de>
Acked-by: Jyri Sarha <jsa...@ti.com> > --- > drivers/gpu/drm/tilcdc/tilcdc_external.c | 10 +++------- > drivers/gpu/drm/tilcdc/tilcdc_panel.c | 8 ++------ > 2 files changed, 5 insertions(+), 13 deletions(-) > > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_external.c > b/drivers/gpu/drm/tilcdc/tilcdc_external.c > index 28b7f703236e..b177525588c1 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_external.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_external.c > @@ -10,6 +10,7 @@ > #include <drm/drm_atomic_helper.h> > #include <drm/drm_bridge.h> > #include <drm/drm_of.h> > +#include <drm/drm_simple_kms_helper.h> > > #include "tilcdc_drv.h" > #include "tilcdc_external.h" > @@ -83,10 +84,6 @@ int tilcdc_add_component_encoder(struct drm_device *ddev) > return 0; > } > > -static const struct drm_encoder_funcs tilcdc_external_encoder_funcs = { > - .destroy = drm_encoder_cleanup, > -}; > - > static > int tilcdc_attach_bridge(struct drm_device *ddev, struct drm_bridge *bridge) > { > @@ -131,9 +128,8 @@ int tilcdc_attach_external_device(struct drm_device *ddev) > if (!priv->external_encoder) > return -ENOMEM; > > - ret = drm_encoder_init(ddev, priv->external_encoder, > - &tilcdc_external_encoder_funcs, > - DRM_MODE_ENCODER_NONE, NULL); > + ret = drm_simple_encoder_init(ddev, priv->external_encoder, > + DRM_MODE_ENCODER_NONE); > if (ret) { > dev_err(ddev->dev, "drm_encoder_init() failed %d\n", ret); > return ret; > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c > b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > index 5584e656b857..12823d60c4e8 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > @@ -16,6 +16,7 @@ > #include <drm/drm_connector.h> > #include <drm/drm_modeset_helper_vtables.h> > #include <drm/drm_probe_helper.h> > +#include <drm/drm_simple_kms_helper.h> > > #include "tilcdc_drv.h" > #include "tilcdc_panel.h" > @@ -74,10 +75,6 @@ static void panel_encoder_mode_set(struct drm_encoder > *encoder, > /* nothing needed */ > } > > -static const struct drm_encoder_funcs panel_encoder_funcs = { > - .destroy = drm_encoder_cleanup, > -}; > - > static const struct drm_encoder_helper_funcs panel_encoder_helper_funcs = { > .dpms = panel_encoder_dpms, > .prepare = panel_encoder_prepare, > @@ -102,8 +99,7 @@ static struct drm_encoder *panel_encoder_create(struct > drm_device *dev, > encoder = &panel_encoder->base; > encoder->possible_crtcs = 1; > > - ret = drm_encoder_init(dev, encoder, &panel_encoder_funcs, > - DRM_MODE_ENCODER_LVDS, NULL); > + ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_LVDS); > if (ret < 0) > goto fail; > > -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel