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: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
9a5d9c48d8
commit
5771ec8fe8
@ -702,6 +702,7 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
|
||||
dc_release_state(cached_state->context);
|
||||
|
||||
cached_state->context = dc_create_state();
|
||||
ASSERT(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) {
|
||||
|
Loading…
Reference in New Issue
Block a user