Skip to content

Commit 28dfe43

Browse files
pixelclusteralexdeucher
authored andcommitted
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 b42dae2) Cc: stable@vger.kernel.org
1 parent 64ac7c0 commit 28dfe43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/display/dc/core/dc_stream.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ struct dc_stream_state *dc_create_stream_for_sink(
170170
if (sink == NULL)
171171
goto fail;
172172

173-
stream = kzalloc_obj(struct dc_stream_state);
173+
stream = kzalloc_obj(struct dc_stream_state, GFP_ATOMIC);
174174
if (stream == NULL)
175175
goto fail;
176176

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);
178178
if (stream->update_scratch == NULL)
179179
goto fail;
180180

0 commit comments

Comments
 (0)