<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">All of the V2 patches are:</p>
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Shirish S <shirish.s@amd.com><br>
<b>Sent:</b> Thursday, May 31, 2018 5:59:24 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org; Wentland, Harry<br>
<b>Cc:</b> S, Shirish<br>
<b>Subject:</b> [PATCH] drm/amd/display: avoid sleeping in atomic context while creating new state (V2)</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This patch fixes the warning messages that are caused due to calling<br>
sleep in atomic context as below:<br>
<br>
BUG: sleeping function called from invalid context at mm/slab.h:419<br>
in_atomic(): 1, irqs_disabled(): 1, pid: 5, name: kworker/u4:0<br>
CPU: 1 PID: 5 Comm: kworker/u4:0 Tainted: G        W       4.14.35 #941<br>
Workqueue: events_unbound commit_work<br>
Call Trace:<br>
 dump_stack+0x4d/0x63<br>
 ___might_sleep+0x11f/0x12e<br>
 kmem_cache_alloc_trace+0x41/0xea<br>
 dc_create_state+0x1f/0x30<br>
 dc_commit_updates_for_stream+0x73/0x4cf<br>
 ? amdgpu_get_crtc_scanoutpos+0x82/0x16b<br>
 amdgpu_dm_do_flip+0x239/0x298<br>
 amdgpu_dm_commit_planes.isra.23+0x379/0x54b<br>
 ? dc_commit_state+0x3da/0x404<br>
 amdgpu_dm_atomic_commit_tail+0x4fc/0x5d2<br>
 ? wait_for_common+0x5b/0x69<br>
 commit_tail+0x42/0x64<br>
 process_one_work+0x1b0/0x314<br>
 worker_thread+0x1cb/0x2c1<br>
 ? create_worker+0x1da/0x1da<br>
 kthread+0x156/0x15e<br>
 ? kthread_flush_work+0xea/0xea<br>
 ret_from_fork+0x22/0x40<br>
<br>
V2: fix applicable only to dc_create_state() and not dc_create().<br>
<br>
Signed-off-by: Shirish S <shirish.s@amd.com><br>
---<br>
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
index c88f661..839e3f6 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c<br>
@@ -953,7 +953,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)<br>
 struct dc_state *dc_create_state(void)<br>
 {<br>
         struct dc_state *context = kzalloc(sizeof(struct dc_state),<br>
-                                          GFP_KERNEL);<br>
+                                          GFP_ATOMIC);<br>
 <br>
         if (!context)<br>
                 return NULL;<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>