drm/amd/display: avoid sleeping in atomic context while creating new state (V2)
Subsystems (3)
PATCH 1/1 drm/amd/display: avoid sleeping in atomic context while creating new state (V2)
This patch fixes the warning messages that are caused due to calling sleep in atomic context as below:
BUG: sleeping function called from invalid context at mm/slab.h:419 in_atomic(): 1, irqs_disabled(): 1, pid: 5, name: kworker/u4:0 CPU: 1 PID: 5 Comm: kworker/u4:0 Tainted: G W 4.14.35 #941 Workqueue: events_unbound commit_work Call Trace: dump_stack+0x4d/0x63 ___might_sleep+0x11f/0x12e kmem_cache_alloc_trace+0x41/0xea dc_create_state+0x1f/0x30 dc_commit_updates_for_stream+0x73/0x4cf ? amdgpu_get_crtc_scanoutpos+0x82/0x16b amdgpu_dm_do_flip+0x239/0x298 amdgpu_dm_commit_planes.isra.23+0x379/0x54b ? dc_commit_state+0x3da/0x404 amdgpu_dm_atomic_commit_tail+0x4fc/0x5d2 ? wait_for_common+0x5b/0x69 commit_tail+0x42/0x64 process_one_work+0x1b0/0x314 worker_thread+0x1cb/0x2c1 ? create_worker+0x1da/0x1da kthread+0x156/0x15e ? kthread_flush_work+0xea/0xea ret_from_fork+0x22/0x40
V2: fix applicable only to dc_create_state() and not dc_create().
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -953,7 +953,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)struct dc_state *dc_create_state (void ) {struct dc_state *context =kzalloc (sizeof (struct dc_state ), -GFP_KERNEL ); +GFP_ATOMIC );if (!context)return NULL ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1527760764-17760-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-byAll of the V2 patches are:
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Shirish S <[email protected]>
Sent: Thursday, May 31, 2018 5:59:24 AM
To: [email protected]; Wentland, Harry
Cc: S, Shirish
Subject: [PATCH] drm/amd/display: avoid sleeping in atomic context while creating new state (V2)
This patch fixes the warning messages that are caused due to calling sleep in atomic context as below:
BUG: sleeping function called from invalid context at mm/slab.h:419 in_atomic(): 1, irqs_disabled(): 1, pid: 5, name: kworker/u4:0 CPU: 1 PID: 5 Comm: kworker/u4:0 Tainted: G W 4.14.35 #941 Workqueue: events_unbound commit_work Call Trace: dump_stack+0x4d/0x63 ___might_sleep+0x11f/0x12e kmem_cache_alloc_trace+0x41/0xea dc_create_state+0x1f/0x30 dc_commit_updates_for_stream+0x73/0x4cf ? amdgpu_get_crtc_scanoutpos+0x82/0x16b amdgpu_dm_do_flip+0x239/0x298 amdgpu_dm_commit_planes.isra.23+0x379/0x54b ? dc_commit_state+0x3da/0x404 amdgpu_dm_atomic_commit_tail+0x4fc/0x5d2 ? wait_for_common+0x5b/0x69 commit_tail+0x42/0x64 process_one_work+0x1b0/0x314 worker_thread+0x1cb/0x2c1 ? create_worker+0x1da/0x1da kthread+0x156/0x15e ? kthread_flush_work+0xea/0xea ret_from_fork+0x22/0x40
V2: fix applicable only to dc_create_state() and not dc_create().
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -953,7 +953,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)struct dc_state *dc_create_state (void ) {struct dc_state *context =kzalloc (sizeof (struct dc_state ), -GFP_KERNEL ); +GFP_ATOMIC );if (!context)return NULL ;
--
2.7.4
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Harry Wentland
Reviewed-byQuoted 27 lines · Shirish S
This patch fixes the warning messages that are caused due to calling sleep in atomic context as below:
BUG: sleeping function called from invalid context at mm/slab.h:419 in_atomic(): 1, irqs_disabled(): 1, pid: 5, name: kworker/u4:0 CPU: 1 PID: 5 Comm: kworker/u4:0 Tainted: G W 4.14.35 #941 Workqueue: events_unbound commit_work Call Trace: dump_stack+0x4d/0x63 ___might_sleep+0x11f/0x12e kmem_cache_alloc_trace+0x41/0xea dc_create_state+0x1f/0x30 dc_commit_updates_for_stream+0x73/0x4cf ? amdgpu_get_crtc_scanoutpos+0x82/0x16b amdgpu_dm_do_flip+0x239/0x298 amdgpu_dm_commit_planes.isra.23+0x379/0x54b ? dc_commit_state+0x3da/0x404 amdgpu_dm_atomic_commit_tail+0x4fc/0x5d2 ? wait_for_common+0x5b/0x69 commit_tail+0x42/0x64 process_one_work+0x1b0/0x314 worker_thread+0x1cb/0x2c1 ? create_worker+0x1da/0x1da kthread+0x156/0x15e ? kthread_flush_work+0xea/0xea ret_from_fork+0x22/0x40
Quoted 3 lines
V2: fix applicable only to
dc_create_state()and notdc_create().Signed-off-by Shirish S <[email protected]>
Harry
Quoted 10 lines
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/core/dc.c +0
-0
drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_post_update_surfaces_to_stream(struct dc *dc) · line 959
Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +1
-1@@ -953,7 +953,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc)struct dc_state *dc_create_state (void ) {struct dc_state *context =kzalloc (sizeof (struct dc_state ), -GFP_KERNEL ); +GFP_ATOMIC );if (!context)return NULL ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx