diff options
| author | Nicholas Kazlauskas <[email protected]> | 2019-01-10 16:52:11 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-02-06 02:16:22 +0000 |
| commit | c448a53aaf9ef69942a8a4d6a9b7b191839d90c1 (patch) | |
| tree | 1cc71fe8a69e4ccbbc4a8bbfa48c223e93261780 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | |
| parent | drm/amd/display: Reformat dm_determine_update_type_for_commit (diff) | |
| download | kernel-c448a53aaf9ef69942a8a4d6a9b7b191839d90c1.tar.gz kernel-c448a53aaf9ef69942a8a4d6a9b7b191839d90c1.zip | |
drm/amd/display: Initialize stream_update to zero
[Why]
The stream_update struct is left unitialized but DC will access
its fields. This usually results in global state validation occur
during any atomic commit with state->allow_modeset = true.
[How]
Initialize the struct to zero for every stream we check.
Signed-off-by: Nicholas Kazlauskas <[email protected]>
Reviewed-by: David Francis <[email protected]>
Acked-by: Bhawanpreet Lakha <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 387f1ba39de4..824e177fba9b 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -5773,7 +5773,6 @@ dm_determine_update_type_for_commit(struct dc *dc, struct dc_surface_update *updates; struct dc_plane_state *surface; - struct dc_stream_update stream_update; enum surface_update_type update_type = UPDATE_TYPE_FAST; updates = kcalloc(MAX_SURFACES, sizeof(*updates), GFP_KERNEL); @@ -5787,6 +5786,8 @@ dm_determine_update_type_for_commit(struct dc *dc, } for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { + struct dc_stream_update stream_update = { 0 }; + new_dm_crtc_state = to_dm_crtc_state(new_crtc_state); old_dm_crtc_state = to_dm_crtc_state(old_crtc_state); num_plane = 0; |
