drm/atmel-hlcdc: Use simple encoder
The atmel-hlcdc driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-3-tzimmermann@suse.de
This commit is contained in:
@@ -11,9 +11,10 @@
|
|||||||
#include <linux/media-bus-format.h>
|
#include <linux/media-bus-format.h>
|
||||||
#include <linux/of_graph.h>
|
#include <linux/of_graph.h>
|
||||||
|
|
||||||
|
#include <drm/drm_bridge.h>
|
||||||
#include <drm/drm_encoder.h>
|
#include <drm/drm_encoder.h>
|
||||||
#include <drm/drm_of.h>
|
#include <drm/drm_of.h>
|
||||||
#include <drm/drm_bridge.h>
|
#include <drm/drm_simple_kms_helper.h>
|
||||||
|
|
||||||
#include "atmel_hlcdc_dc.h"
|
#include "atmel_hlcdc_dc.h"
|
||||||
|
|
||||||
@@ -22,10 +23,6 @@ struct atmel_hlcdc_rgb_output {
|
|||||||
int bus_fmt;
|
int bus_fmt;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct drm_encoder_funcs atmel_hlcdc_panel_encoder_funcs = {
|
|
||||||
.destroy = drm_encoder_cleanup,
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct atmel_hlcdc_rgb_output *
|
static struct atmel_hlcdc_rgb_output *
|
||||||
atmel_hlcdc_encoder_to_rgb_output(struct drm_encoder *encoder)
|
atmel_hlcdc_encoder_to_rgb_output(struct drm_encoder *encoder)
|
||||||
{
|
{
|
||||||
@@ -98,9 +95,8 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = drm_encoder_init(dev, &output->encoder,
|
ret = drm_simple_encoder_init(dev, &output->encoder,
|
||||||
&atmel_hlcdc_panel_encoder_funcs,
|
DRM_MODE_ENCODER_NONE);
|
||||||
DRM_MODE_ENCODER_NONE, NULL);
|
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user