diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-03-05 18:59:33 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-02 15:16:44 +0300 |
commit | d088b69f5017f86628a875592414545ba23938f8 (patch) | |
tree | 6a36d53c6e537e08af96cce9f03a24adda6a02d1 /drivers/gpu/drm/gma500/cdv_intel_lvds.c | |
parent | 3d5e73abb7be15e18c88e4cdcfed6b7f27f47656 (diff) | |
download | linux-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/cdv_intel_lvds.c')
-rw-r--r-- | drivers/gpu/drm/gma500/cdv_intel_lvds.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c index ea0a5d9a0acc..18de10e9ff9a 100644 --- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c +++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c @@ -12,6 +12,8 @@ #include <linux/i2c.h> #include <linux/pm_runtime.h> +#include <drm/drm_simple_kms_helper.h> + #include "cdv_device.h" #include "intel_bios.h" #include "power.h" @@ -499,16 +501,6 @@ static const struct drm_connector_funcs cdv_intel_lvds_connector_funcs = { .destroy = cdv_intel_lvds_destroy, }; - -static void cdv_intel_lvds_enc_destroy(struct drm_encoder *encoder) -{ - drm_encoder_cleanup(encoder); -} - -static const struct drm_encoder_funcs cdv_intel_lvds_enc_funcs = { - .destroy = cdv_intel_lvds_enc_destroy, -}; - /* * Enumerate the child dev array parsed from VBT to check whether * the LVDS is present. @@ -616,10 +608,7 @@ void cdv_intel_lvds_init(struct drm_device *dev, &cdv_intel_lvds_connector_funcs, DRM_MODE_CONNECTOR_LVDS); - drm_encoder_init(dev, encoder, - &cdv_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; |