Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Use GFP_ATOMIC in dc_create_stream_for_sink

This can be called while preemption is disabled, for example by
dcn32_internal_validate_bw which is called with the FPU active.

Fixes "BUG: scheduling while atomic" messages I encounter on my Navi31
machine.

Signed-off-by: Natalie Vock <natalie.vock@gmx.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit b42dae2ebc5c84a68de63ec4ffdfec49362d53f1)
Cc: stable@vger.kernel.org

authored by

Natalie Vock and committed by
Alex Deucher
28dfe431 64ac7c09

+2 -2
+2 -2
drivers/gpu/drm/amd/display/dc/core/dc_stream.c
··· 170 170 if (sink == NULL) 171 171 goto fail; 172 172 173 - stream = kzalloc_obj(struct dc_stream_state); 173 + stream = kzalloc_obj(struct dc_stream_state, GFP_ATOMIC); 174 174 if (stream == NULL) 175 175 goto fail; 176 176 177 - stream->update_scratch = kzalloc((int32_t) dc_update_scratch_space_size(), GFP_KERNEL); 177 + stream->update_scratch = kzalloc((int32_t) dc_update_scratch_space_size(), GFP_ATOMIC); 178 178 if (stream->update_scratch == NULL) 179 179 goto fail; 180 180