提交 a67297d4 编写于 作者: X Xiaojie Yuan 提交者: Alex Deucher

drm/amd/display: Fix misuse of plane state destroy helper

drm_plane_state is subclassed by dm_plane_state, so atomic driver should
use __drm_atomic_helper_plane_destroy_state() to destroy a state.
drm_atomic_helper_plane_destroy_state() frees drm_plane_state which is
allocated inside dm_plane_state, this is problematic.

Fixes: 95ae03a ("drm/amd/display: Create dm_plane_state.")
Signed-off-by: NXiaojie Yuan <Xiaojie.Yuan@amd.com>
Reviewed-by: NAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 d7ec53d9
......@@ -1431,7 +1431,8 @@ void dm_drm_plane_destroy_state(struct drm_plane *plane,
dc_surface_release(dc_surface);
}
drm_atomic_helper_plane_destroy_state(plane, state);
__drm_atomic_helper_plane_destroy_state(state);
kfree(dm_plane_state);
}
static const struct drm_plane_funcs dm_plane_funcs = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册