summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/psb_intel_lvds.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-03-05 18:59:33 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2020-04-02 15:16:44 +0300
commitd088b69f5017f86628a875592414545ba23938f8 (patch)
tree6a36d53c6e537e08af96cce9f03a24adda6a02d1 /drivers/gpu/drm/gma500/psb_intel_lvds.c
parent3d5e73abb7be15e18c88e4cdcfed6b7f27f47656 (diff)
downloadlinux-d088b69f5017f86628a875592414545ba23938f8.tar.xz
drm/gma500: Use simple encoder
The gma500 driver uses empty implementations for some of its encoders. Replace the code with the generic simple encoder. As a side effect, the patch also removes an indirection in the encoder setup for Medfield. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200305155950.2705-6-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/gma500/psb_intel_lvds.c')
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_lvds.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
index afaebab7bc17..063c66bb946d 100644
--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
@@ -11,6 +11,8 @@
#include <linux/i2c.h>
#include <linux/pm_runtime.h>
+#include <drm/drm_simple_kms_helper.h>
+
#include "intel_bios.h"
#include "power.h"
#include "psb_drv.h"
@@ -621,18 +623,6 @@ const struct drm_connector_funcs psb_intel_lvds_connector_funcs = {
.destroy = psb_intel_lvds_destroy,
};
-
-static void psb_intel_lvds_enc_destroy(struct drm_encoder *encoder)
-{
- drm_encoder_cleanup(encoder);
-}
-
-const struct drm_encoder_funcs psb_intel_lvds_enc_funcs = {
- .destroy = psb_intel_lvds_enc_destroy,
-};
-
-
-
/**
* psb_intel_lvds_init - setup LVDS connectors on this device
* @dev: drm device
@@ -683,9 +673,7 @@ void psb_intel_lvds_init(struct drm_device *dev,
&psb_intel_lvds_connector_funcs,
DRM_MODE_CONNECTOR_LVDS);
- drm_encoder_init(dev, encoder,
- &psb_intel_lvds_enc_funcs,
- DRM_MODE_ENCODER_LVDS, NULL);
+ drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_LVDS);
gma_connector_attach_encoder(gma_connector, gma_encoder);
gma_encoder->type = INTEL_OUTPUT_LVDS;