drm/amd/display: re-enable wait in pipelock, but add timeout
Subsystems (3)
PATCH 1/1 drm/amd/display: re-enable wait in pipelock, but add timeout
Removing this causes hangs in some games, so re-add it, but add a timeout so we don't hang while switching flip types.
--- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +19 -0
@@ -1033,6 +1033,25 @@ void dcn20_pipe_control_lock(if (pipe->plane_state !=NULL ) flip_immediate = pipe->plane_state->flip_immediate; +if (flip_immediate && lock) { +const int TIMEOUT_FOR_FLIP_PENDING =100000 ; +int i; + +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + +if (pipe->bottom_pipe !=NULL ) { +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->bottom_pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->bottom_pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + } + } +/* In flip immediate and pipe splitting case, we need to use GSL * for synchronization. Only do setup on locking and on flip type change. */
Signature · 6 lines
2.23.0 _______________________________________________ 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): 20191115160119.658620-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Ping?
Quoted 43 lines · Alex Deucher
Removing this causes hangs in some games, so re-add it, but add a timeout so we don't hang while switching flip types.
Signed-off-by Alex Deucher <[email protected]>--- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +19
-1@@ -1033,6 +1033,25 @@ void dcn20_pipe_control_lock(if (pipe->plane_state !=NULL ) flip_immediate = pipe->plane_state->flip_immediate; +if (flip_immediate && lock) { +const int TIMEOUT_FOR_FLIP_PENDING =100000 ; +int i; + +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + +if (pipe->bottom_pipe !=NULL ) { +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->bottom_pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->bottom_pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + } + } +/* In flip immediate and pipe splitting case, we need to use GSL * for synchronization. Only do setup on locking and on flip type change. */ --
Quoted 2 lines
2.23.0
_______________________________________________
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): CADnq5_P5m-eWDy5Xb5qs2HpcZbh3FxLTAxhxsXRZGDbkYrTZnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
The same bug is listed twice. Did you mean a third bug?
Den tors 21 nov. 2019 kl 00:25 skrev Alex Deucher <[email protected]>:
Quoted 45 lines
Ping?
Quoted 41 lines · Alex Deucher
Removing this causes hangs in some games, so re-add it, but add a timeout so we don't hang while switching flip types.
Signed-off-by Alex Deucher <[email protected]>--- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +19
-0@@ -1033,6 +1033,25 @@ void dcn20_pipe_control_lock(if (pipe->plane_state !=NULL ) flip_immediate = pipe->plane_state->flip_immediate; +if (flip_immediate && lock) { +const int TIMEOUT_FOR_FLIP_PENDING =100000 ; +int i; + +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + +if (pipe->bottom_pipe !=NULL ) { +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->bottom_pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->bottom_pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + } + } +/* In flip immediate and pipe splitting case, we need to use GSL * for synchronization. Only do setup on locking and on flip type change.
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +0
-1*/ --2.23.0
_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): CAD=4a=UAKO9Y+6fwy8QTBsemUuGe6yhwB8eVgkGHZzYWa_nDpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 2 lines · Ernst Sjöstrand
The same bug is listed twice. Did you mean a third bug?
No just a typo. Already fixed up locally.
Alex
Quoted 56 lines
Den tors 21 nov. 2019 kl 00:25 skrev Alex Deucher <[email protected]>:
Quoted 53 lines
Ping?
Quoted 43 lines · Alex Deucher
Removing this causes hangs in some games, so re-add it, but add a timeout so we don't hang while switching flip types.
Signed-off-by Alex Deucher <[email protected]>--- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +19
-1@@ -1033,6 +1033,25 @@ void dcn20_pipe_control_lock(if (pipe->plane_state !=NULL ) flip_immediate = pipe->plane_state->flip_immediate; +if (flip_immediate && lock) { +const int TIMEOUT_FOR_FLIP_PENDING =100000 ; +int i; + +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + +if (pipe->bottom_pipe !=NULL ) { +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->bottom_pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->bottom_pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + } + } +/* In flip immediate and pipe splitting case, we need to use GSL * for synchronization. Only do setup on locking and on flip type change. */ --Quoted 2 lines
2.23.0
_______________________________________________
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 7 lines · Alex Deucher
Removing this causes hangs in some games, so re-add it, but add a timeout so we don't hang while switching flip types.
Patch is
Harry
Quoted 25 lines
--- .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +12
-0@@ -1033,6 +1033,25 @@ void dcn20_pipe_control_lock(if (pipe->plane_state !=NULL ) flip_immediate = pipe->plane_state->flip_immediate; +if (flip_immediate && lock) { +const int TIMEOUT_FOR_FLIP_PENDING =100000 ; +int i; + +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) { +if (!pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + +if (pipe->bottom_pipe !=NULL ) { +for (i =0 ; i <TIMEOUT_FOR_FLIP_PENDING ; ++i) {
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c void dcn20_pipe_control_lock( · line 1057
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +7
-0+if (!pipe->bottom_pipe->plane_res.hubp->funcs->hubp_is_flip_pending (pipe->bottom_pipe->plane_res.hubp)) +break ; +udelay (1 ); + } + } + } +/* In flip immediate and pipe splitting case, we need to use GSL * for synchronization. Only do setup on locking and on flip type change. */
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx