diff options
author | Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com> | 2017-11-03 21:19:06 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-14 19:32:45 +0300 |
commit | 4fc6f65965481bd2cdb8827a6fd991ed076b1006 (patch) | |
tree | 77f8215a25caf2c2c99b876e769f530ca2547617 /drivers | |
parent | fcb4019e090b959dbcbfc7bbbc1ebd99c924fa11 (diff) | |
download | linux-4fc6f65965481bd2cdb8827a6fd991ed076b1006.tar.xz |
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: Jerry (Fangzhi) Zuo <Jerry.Zuo@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 3b05da7a90e8..f8efb98b1fa7 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -245,6 +245,16 @@ static const struct drm_connector_helper_funcs dm_dp_mst_connector_helper_funcs .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 * 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( dev, &amdgpu_encoder->base, - NULL, + &amdgpu_dm_encoder_funcs, DRM_MODE_ENCODER_DPMST, NULL); |