提交 4fc6f659 编写于 作者: J Jerry (Fangzhi) Zuo 提交者: Alex Deucher

drm/amd/display: Miss register MST encoder cbs

It is to fix: MST display failed to resume from S3

Need to properly setup MST encoder cbs. Otherwise drm_device
encoder doesn't register its own cbs, leading to NULL
encoder->funcs in drm_atomic_helper_resume().
Signed-off-by: NJerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: NRoman Li <Roman.Li@amd.com>
Acked-by: NHarry Wentland <harry.wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 fcb4019e
...@@ -245,6 +245,16 @@ static const struct drm_connector_helper_funcs dm_dp_mst_connector_helper_funcs ...@@ -245,6 +245,16 @@ static const struct drm_connector_helper_funcs dm_dp_mst_connector_helper_funcs
.best_encoder = dm_mst_best_encoder, .best_encoder = dm_mst_best_encoder,
}; };
static void amdgpu_dm_encoder_destroy(struct drm_encoder *encoder)
{
drm_encoder_cleanup(encoder);
kfree(encoder);
}
static const struct drm_encoder_funcs amdgpu_dm_encoder_funcs = {
.destroy = amdgpu_dm_encoder_destroy,
};
static struct amdgpu_encoder * static struct amdgpu_encoder *
dm_dp_create_fake_mst_encoder(struct amdgpu_dm_connector *connector) dm_dp_create_fake_mst_encoder(struct amdgpu_dm_connector *connector)
{ {
...@@ -268,7 +278,7 @@ dm_dp_create_fake_mst_encoder(struct amdgpu_dm_connector *connector) ...@@ -268,7 +278,7 @@ dm_dp_create_fake_mst_encoder(struct amdgpu_dm_connector *connector)
drm_encoder_init( drm_encoder_init(
dev, dev,
&amdgpu_encoder->base, &amdgpu_encoder->base,
NULL, &amdgpu_dm_encoder_funcs,
DRM_MODE_ENCODER_DPMST, DRM_MODE_ENCODER_DPMST,
NULL); NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册