提交 53d35dc6 编写于 作者: A Andrey Grodzovsky 提交者: Alex Deucher

drm/amd/display: Fix the NULL pointer. (v2)

ret value in amdgpu_dm_atomic_check was not rest to EINVAL
after drm_atomic_add_affected_planes and by this making
any subsequent validation failure pass when returning
to atomic_check.

v2: Add WARN_ON print for dc_commit_streams in
amdgpu_dm_atomic_commit_tail since this should never
fail.
Signed-off-by: NAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Acked-by: NHarry Wentland <Harry.Wentland@amd.com>
Reviewed-by: NAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 0e19401f
...@@ -2392,7 +2392,7 @@ void amdgpu_dm_atomic_commit_tail( ...@@ -2392,7 +2392,7 @@ void amdgpu_dm_atomic_commit_tail(
} }
/* DC is optimized not to do anything if 'streams' didn't change. */ /* DC is optimized not to do anything if 'streams' didn't change. */
dc_commit_streams(dm->dc, commit_streams, commit_streams_count); WARN_ON(!dc_commit_streams(dm->dc, commit_streams, commit_streams_count));
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
...@@ -2858,6 +2858,8 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, ...@@ -2858,6 +2858,8 @@ int amdgpu_dm_atomic_check(struct drm_device *dev,
ret = drm_atomic_add_affected_planes(state, crtc); ret = drm_atomic_add_affected_planes(state, crtc);
if (ret) if (ret)
return ret; return ret;
ret = -EINVAL;
} }
for (i = 0; i < set_count; i++) { for (i = 0; i < set_count; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册