diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1200-drm-amd-display-Initialize-stream_update-to-zero.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1200-drm-amd-display-Initialize-stream_update-to-zero.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1200-drm-amd-display-Initialize-stream_update-to-zero.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1200-drm-amd-display-Initialize-stream_update-to-zero.patch new file mode 100644 index 00000000..e6d15af0 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1200-drm-amd-display-Initialize-stream_update-to-zero.patch @@ -0,0 +1,45 @@ +From ff6dac82c39683a8c25a149bae133a0c29cd3fe6 Mon Sep 17 00:00:00 2001 +From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> +Date: Thu, 10 Jan 2019 11:52:11 -0500 +Subject: [PATCH 1200/2940] 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. + +Change-Id: Ib7f435cc2c045fc43496bea35d08a14ce8193c33 +Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> +Reviewed-by: David Francis <David.Francis@amd.com> +Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> +--- + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +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 a3f11e63ff66..fb6fe2b8ba7e 100644 +--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c ++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +@@ -5887,7 +5887,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); +@@ -5901,6 +5900,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; +-- +2.17.1 + |