* [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-15 16:01 ` Alex Deucher
0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2019-11-15 16:01 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: 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.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
.../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 0046a099c9e9..120e62c5193c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -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.
*/
--
2.23.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-15 16:01 ` Alex Deucher
0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2019-11-15 16:01 UTC (permalink / raw)
To: amd-gfx; +Cc: 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.
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
.../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 0046a099c9e9..120e62c5193c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -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.
*/
--
2.23.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-20 23:24 ` Alex Deucher
0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2019-11-20 23:24 UTC (permalink / raw)
To: amd-gfx list; +Cc: Alex Deucher
Ping?
On Fri, Nov 15, 2019 at 11:01 AM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Removing this causes hangs in some games, so re-add it, but add
> a timeout so we don't hang while switching flip types.
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> index 0046a099c9e9..120e62c5193c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> @@ -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.
> */
> --
> 2.23.0
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-20 23:24 ` Alex Deucher
0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2019-11-20 23:24 UTC (permalink / raw)
To: amd-gfx list; +Cc: Alex Deucher
Ping?
On Fri, Nov 15, 2019 at 11:01 AM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Removing this causes hangs in some games, so re-add it, but add
> a timeout so we don't hang while switching flip types.
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> index 0046a099c9e9..120e62c5193c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> @@ -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.
> */
> --
> 2.23.0
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-25 2:56 ` Ernst Sjöstrand
0 siblings, 0 replies; 10+ messages in thread
From: Ernst Sjöstrand @ 2019-11-25 2:56 UTC (permalink / raw)
To: Alex Deucher; +Cc: Alex Deucher, amd-gfx list
The same bug is listed twice. Did you mean a third bug?
Den tors 21 nov. 2019 kl 00:25 skrev Alex Deucher <alexdeucher@gmail.com>:
>
> Ping?
>
> On Fri, Nov 15, 2019 at 11:01 AM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > Removing this causes hangs in some games, so re-add it, but add
> > a timeout so we don't hang while switching flip types.
> >
> > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > ---
> > .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> > 1 file changed, 19 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > index 0046a099c9e9..120e62c5193c 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > @@ -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.
> > */
> > --
> > 2.23.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] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-25 2:56 ` Ernst Sjöstrand
0 siblings, 0 replies; 10+ messages in thread
From: Ernst Sjöstrand @ 2019-11-25 2:56 UTC (permalink / raw)
To: Alex Deucher; +Cc: Alex Deucher, amd-gfx list
The same bug is listed twice. Did you mean a third bug?
Den tors 21 nov. 2019 kl 00:25 skrev Alex Deucher <alexdeucher@gmail.com>:
>
> Ping?
>
> On Fri, Nov 15, 2019 at 11:01 AM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > Removing this causes hangs in some games, so re-add it, but add
> > a timeout so we don't hang while switching flip types.
> >
> > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > ---
> > .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> > 1 file changed, 19 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > index 0046a099c9e9..120e62c5193c 100644
> > --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > @@ -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.
> > */
> > --
> > 2.23.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] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-25 14:36 ` Alex Deucher
0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2019-11-25 14:36 UTC (permalink / raw)
To: Ernst Sjöstrand; +Cc: Alex Deucher, amd-gfx list
On Sun, Nov 24, 2019 at 9:56 PM Ernst Sjöstrand <ernstp@gmail.com> wrote:
>
> The same bug is listed twice. Did you mean a third bug?
No just a typo. Already fixed up locally.
Alex
>
>
> Den tors 21 nov. 2019 kl 00:25 skrev Alex Deucher <alexdeucher@gmail.com>:
> >
> > Ping?
> >
> > On Fri, Nov 15, 2019 at 11:01 AM Alex Deucher <alexdeucher@gmail.com> wrote:
> > >
> > > Removing this causes hangs in some games, so re-add it, but add
> > > a timeout so we don't hang while switching flip types.
> > >
> > > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > > Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> > > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > > ---
> > > .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> > > 1 file changed, 19 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > > index 0046a099c9e9..120e62c5193c 100644
> > > --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > > +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > > @@ -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.
> > > */
> > > --
> > > 2.23.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] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-25 14:36 ` Alex Deucher
0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2019-11-25 14:36 UTC (permalink / raw)
To: Ernst Sjöstrand; +Cc: Alex Deucher, amd-gfx list
On Sun, Nov 24, 2019 at 9:56 PM Ernst Sjöstrand <ernstp@gmail.com> wrote:
>
> The same bug is listed twice. Did you mean a third bug?
No just a typo. Already fixed up locally.
Alex
>
>
> Den tors 21 nov. 2019 kl 00:25 skrev Alex Deucher <alexdeucher@gmail.com>:
> >
> > Ping?
> >
> > On Fri, Nov 15, 2019 at 11:01 AM Alex Deucher <alexdeucher@gmail.com> wrote:
> > >
> > > Removing this causes hangs in some games, so re-add it, but add
> > > a timeout so we don't hang while switching flip types.
> > >
> > > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > > Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> > > Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > > ---
> > > .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> > > 1 file changed, 19 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > > index 0046a099c9e9..120e62c5193c 100644
> > > --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > > +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> > > @@ -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.
> > > */
> > > --
> > > 2.23.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] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-26 19:37 ` Harry Wentland
0 siblings, 0 replies; 10+ messages in thread
From: Harry Wentland @ 2019-11-26 19:37 UTC (permalink / raw)
To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
On 2019-11-15 11:01 a.m., Alex Deucher wrote:
> Removing this causes hangs in some games, so re-add it, but add
> a timeout so we don't hang while switching flip types.
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Patch is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> index 0046a099c9e9..120e62c5193c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> @@ -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.
> */
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout
@ 2019-11-26 19:37 ` Harry Wentland
0 siblings, 0 replies; 10+ messages in thread
From: Harry Wentland @ 2019-11-26 19:37 UTC (permalink / raw)
To: Alex Deucher, amd-gfx; +Cc: Alex Deucher
On 2019-11-15 11:01 a.m., Alex Deucher wrote:
> Removing this causes hangs in some games, so re-add it, but add
> a timeout so we don't hang while switching flip types.
>
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Patch is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Harry
> ---
> .../drm/amd/display/dc/dcn20/dcn20_hwseq.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> index 0046a099c9e9..120e62c5193c 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
> @@ -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.
> */
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-11-26 19:37 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 16:01 [PATCH] drm/amd/display: re-enable wait in pipelock, but add timeout Alex Deucher
2019-11-15 16:01 ` Alex Deucher
[not found] ` <20191115160119.658620-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-11-20 23:24 ` Alex Deucher
2019-11-20 23:24 ` Alex Deucher
[not found] ` <CADnq5_P5m-eWDy5Xb5qs2HpcZbh3FxLTAxhxsXRZGDbkYrTZnA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-11-25 2:56 ` Ernst Sjöstrand
2019-11-25 2:56 ` Ernst Sjöstrand
[not found] ` <CAD=4a=UAKO9Y+6fwy8QTBsemUuGe6yhwB8eVgkGHZzYWa_nDpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-11-25 14:36 ` Alex Deucher
2019-11-25 14:36 ` Alex Deucher
2019-11-26 19:37 ` Harry Wentland
2019-11-26 19:37 ` Harry Wentland
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.