* [PATCH 0/1] drm/amdgpu/display: fix context switch issues in dcn20_validate_bandwidth
@ 2020-08-08 20:42 Daniel Kolesa
2020-08-08 20:42 ` [PATCH 1/1] drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal Daniel Kolesa
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Kolesa @ 2020-08-08 20:42 UTC (permalink / raw)
To: amd-gfx; +Cc: Daniel Kolesa
This is likely the real fix for issues such as
https://gitlab.freedesktop.org/drm/amd/-/issues/1215, or perhaps
https://gitlab.freedesktop.org/drm/amd/-/issues/1191, and should
be probably backported into existing stable trees.
Daniel Kolesa (1):
drm/amdgpu/display: use GFP_ATOMIC in
dcn20_validate_bandwidth_internal
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.28.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/1] drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal 2020-08-08 20:42 [PATCH 0/1] drm/amdgpu/display: fix context switch issues in dcn20_validate_bandwidth Daniel Kolesa @ 2020-08-08 20:42 ` Daniel Kolesa 2020-08-10 15:38 ` Alex Deucher 0 siblings, 1 reply; 4+ messages in thread From: Daniel Kolesa @ 2020-08-08 20:42 UTC (permalink / raw) To: amd-gfx; +Cc: Daniel Kolesa GFP_KERNEL may and will sleep, and this is being executed in a non-preemptible context; this will mess things up since it's called inbetween DC_FP_START/END, and rescheduling will result in the DC_FP_END later being called in a different context (or just crashing if any floating point/vector registers/instructions are used after the call is resumed in a different context). Signed-off-by: Daniel Kolesa <daniel@octaforge.org> --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 991eddd10952..c31d1f30e505 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3141,7 +3141,7 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co int vlevel = 0; int pipe_split_from[MAX_PIPES]; int pipe_cnt = 0; - display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_KERNEL); + display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC); DC_LOGGER_INIT(dc->ctx->logger); BW_VAL_TRACE_COUNT(); -- 2.28.0 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal 2020-08-08 20:42 ` [PATCH 1/1] drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal Daniel Kolesa @ 2020-08-10 15:38 ` Alex Deucher 2020-08-10 15:53 ` Daniel Kolesa 0 siblings, 1 reply; 4+ messages in thread From: Alex Deucher @ 2020-08-10 15:38 UTC (permalink / raw) To: Daniel Kolesa; +Cc: amd-gfx list On Sat, Aug 8, 2020 at 4:51 PM Daniel Kolesa <daniel@octaforge.org> wrote: > > GFP_KERNEL may and will sleep, and this is being executed in > a non-preemptible context; this will mess things up since it's > called inbetween DC_FP_START/END, and rescheduling will result > in the DC_FP_END later being called in a different context (or > just crashing if any floating point/vector registers/instructions > are used after the call is resumed in a different context). > > Signed-off-by: Daniel Kolesa <daniel@octaforge.org> We should probably find a way to pre-allocate this, but in the meantime, I'll apply the patch. Thanks! Alex > --- > drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c > index 991eddd10952..c31d1f30e505 100644 > --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c > +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c > @@ -3141,7 +3141,7 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co > int vlevel = 0; > int pipe_split_from[MAX_PIPES]; > int pipe_cnt = 0; > - display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_KERNEL); > + display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC); > DC_LOGGER_INIT(dc->ctx->logger); > > BW_VAL_TRACE_COUNT(); > -- > 2.28.0 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal 2020-08-10 15:38 ` Alex Deucher @ 2020-08-10 15:53 ` Daniel Kolesa 0 siblings, 0 replies; 4+ messages in thread From: Daniel Kolesa @ 2020-08-10 15:53 UTC (permalink / raw) To: Alex Deucher; +Cc: amd-gfx list On Mon, Aug 10, 2020, at 17:38, Alex Deucher wrote: > On Sat, Aug 8, 2020 at 4:51 PM Daniel Kolesa <daniel@octaforge.org> wrote: > > > > GFP_KERNEL may and will sleep, and this is being executed in > > a non-preemptible context; this will mess things up since it's > > called inbetween DC_FP_START/END, and rescheduling will result > > in the DC_FP_END later being called in a different context (or > > just crashing if any floating point/vector registers/instructions > > are used after the call is resumed in a different context). > > > > Signed-off-by: Daniel Kolesa <daniel@octaforge.org> > > We should probably find a way to pre-allocate this, but in the > meantime, I'll apply the patch. Indeed. But this should work as an immediate solution for people experiencing issues. For me it completely stopped dmesg noise on ppc64le and aarch64, and seemingly even fixed the screen flicker problem on POWER that I had to formerly work around by forcing the clocks to high (been running it for days and it's worked perfectly fine with adaptive during the time). Daniel > > Thanks! > > Alex > > > > --- > > drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c > > index 991eddd10952..c31d1f30e505 100644 > > --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c > > +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c > > @@ -3141,7 +3141,7 @@ static bool dcn20_validate_bandwidth_internal(struct dc *dc, struct dc_state *co > > int vlevel = 0; > > int pipe_split_from[MAX_PIPES]; > > int pipe_cnt = 0; > > - display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_KERNEL); > > + display_e2e_pipe_params_st *pipes = kzalloc(dc->res_pool->pipe_count * sizeof(display_e2e_pipe_params_st), GFP_ATOMIC); > > DC_LOGGER_INIT(dc->ctx->logger); > > > > BW_VAL_TRACE_COUNT(); > > -- > > 2.28.0 > > > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-10 15:53 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-08-08 20:42 [PATCH 0/1] drm/amdgpu/display: fix context switch issues in dcn20_validate_bandwidth Daniel Kolesa 2020-08-08 20:42 ` [PATCH 1/1] drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal Daniel Kolesa 2020-08-10 15:38 ` Alex Deucher 2020-08-10 15:53 ` Daniel Kolesa
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.