[PATCH 103/103] drm/amd/display: ASSERT on dc_create_state failing.
Harry Wentland
harry.wentland at amd.com
Tue Oct 10 22:41:12 UTC 2017
From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>
dc_create_state() returns NULL on allocation failure. Raise warning when
that happens.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland at amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 6d97486e074b..454422390331 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -671,6 +671,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, crtc_state, i) {
--
2.14.1
More information about the amd-gfx
mailing list