drm/shmobile: Use simple encoder
The shmobile driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> 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-14-tzimmermann@suse.de
This commit is contained in:
parent
0dbd735448
commit
2d2e89dafc
@ -17,6 +17,7 @@
|
|||||||
#include <drm/drm_gem_cma_helper.h>
|
#include <drm/drm_gem_cma_helper.h>
|
||||||
#include <drm/drm_plane_helper.h>
|
#include <drm/drm_plane_helper.h>
|
||||||
#include <drm/drm_probe_helper.h>
|
#include <drm/drm_probe_helper.h>
|
||||||
|
#include <drm/drm_simple_kms_helper.h>
|
||||||
#include <drm/drm_vblank.h>
|
#include <drm/drm_vblank.h>
|
||||||
|
|
||||||
#include "shmob_drm_backlight.h"
|
#include "shmob_drm_backlight.h"
|
||||||
@ -558,15 +559,6 @@ static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
|
|||||||
.mode_set = shmob_drm_encoder_mode_set,
|
.mode_set = shmob_drm_encoder_mode_set,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void shmob_drm_encoder_destroy(struct drm_encoder *encoder)
|
|
||||||
{
|
|
||||||
drm_encoder_cleanup(encoder);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct drm_encoder_funcs encoder_funcs = {
|
|
||||||
.destroy = shmob_drm_encoder_destroy,
|
|
||||||
};
|
|
||||||
|
|
||||||
int shmob_drm_encoder_create(struct shmob_drm_device *sdev)
|
int shmob_drm_encoder_create(struct shmob_drm_device *sdev)
|
||||||
{
|
{
|
||||||
struct drm_encoder *encoder = &sdev->encoder.encoder;
|
struct drm_encoder *encoder = &sdev->encoder.encoder;
|
||||||
@ -576,8 +568,8 @@ int shmob_drm_encoder_create(struct shmob_drm_device *sdev)
|
|||||||
|
|
||||||
encoder->possible_crtcs = 1;
|
encoder->possible_crtcs = 1;
|
||||||
|
|
||||||
ret = drm_encoder_init(sdev->ddev, encoder, &encoder_funcs,
|
ret = drm_simple_encoder_init(sdev->ddev, encoder,
|
||||||
DRM_MODE_ENCODER_LVDS, NULL);
|
DRM_MODE_ENCODER_LVDS);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user