提交 5771ec8f 编写于 作者: L Leo (Sunpeng) Li 提交者: Alex Deucher

drm/amd/display: ASSERT on dc_create_state failing.

dc_create_state() returns NULL on allocation failure. Raise warning when
that happens.
Signed-off-by: NLeo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: NHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 9a5d9c48
...@@ -702,6 +702,7 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev) ...@@ -702,6 +702,7 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
dc_release_state(cached_state->context); dc_release_state(cached_state->context);
cached_state->context = dc_create_state(); cached_state->context = dc_create_state();
ASSERT(cached_state->context);
dc_resource_state_copy_construct_current(adev->dm.dc, cached_state->context); dc_resource_state_copy_construct_current(adev->dm.dc, cached_state->context);
for_each_new_crtc_in_state(adev->dm.cached_state, crtc, new_crtc_state, i) { for_each_new_crtc_in_state(adev->dm.cached_state, crtc, new_crtc_state, i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册