Commit 4992a7f7 authored by Tian Tao's avatar Tian Tao

drm/hisilicon: Use simple encoder

The hibmc driver uses empty implementations for its encoders. Replace
the code with the generic simple encoder.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/1609140936-57002-1-git-send-email-tiantao6@hisilicon.com
parent 2313f470
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_probe_helper.h> #include <drm/drm_probe_helper.h>
#include <drm/drm_print.h> #include <drm/drm_print.h>
#include <drm/drm_simple_kms_helper.h>
#include "hibmc_drm_drv.h" #include "hibmc_drm_drv.h"
#include "hibmc_drm_regs.h" #include "hibmc_drm_regs.h"
...@@ -90,10 +91,6 @@ static const struct drm_encoder_helper_funcs hibmc_encoder_helper_funcs = { ...@@ -90,10 +91,6 @@ static const struct drm_encoder_helper_funcs hibmc_encoder_helper_funcs = {
.mode_set = hibmc_encoder_mode_set, .mode_set = hibmc_encoder_mode_set,
}; };
static const struct drm_encoder_funcs hibmc_encoder_funcs = {
.destroy = drm_encoder_cleanup,
};
int hibmc_vdac_init(struct hibmc_drm_private *priv) int hibmc_vdac_init(struct hibmc_drm_private *priv)
{ {
struct drm_device *dev = &priv->dev; struct drm_device *dev = &priv->dev;
...@@ -109,8 +106,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv) ...@@ -109,8 +106,7 @@ int hibmc_vdac_init(struct hibmc_drm_private *priv)
} }
encoder->possible_crtcs = 0x1; encoder->possible_crtcs = 0x1;
ret = drm_encoder_init(dev, encoder, &hibmc_encoder_funcs, ret = drm_simple_encoder_init(dev, encoder, DRM_MODE_ENCODER_DAC);
DRM_MODE_ENCODER_DAC, NULL);
if (ret) { if (ret) {
drm_err(dev, "failed to init encoder: %d\n", ret); drm_err(dev, "failed to init encoder: %d\n", ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment