[Mesa-dev] [PATCH] r600g: don't emit WAIT_UNTIL on cayman/TN

Marek Olšák maraeo at gmail.com
Sun Jan 27 19:59:47 PST 2013


We should emit PS_PARTIAL_FLUSH instead, because that is what was
replaced by WAIT_UNTIL. r600g currently doesn't use PS_PARTIAL_FLUSH
at all, which might cause some issues if WAIT_UNTIL is not used
either.

Marek

On Mon, Jan 28, 2013 at 4:16 AM,  <alexdeucher at gmail.com> wrote:
> From: Alex Deucher <alexander.deucher at amd.com>
>
> It shouldn't be needed and older kernels don't support
> it.
>
> Fixes:
> https://bugs.freedesktop.org/show_bug.cgi?id=59945
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>  src/gallium/drivers/r600/r600_hw_context.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
> index e13b502..310c19e 100644
> --- a/src/gallium/drivers/r600/r600_hw_context.c
> +++ b/src/gallium/drivers/r600/r600_hw_context.c
> @@ -683,7 +683,8 @@ void r600_flush_emit(struct r600_context *rctx)
>         }
>         if (wait_until) {
>                 /* wait for things to settle */
> -               r600_write_config_reg(cs, R_008040_WAIT_UNTIL, wait_until);
> +               if (rctx->family < CHIP_CAYMAN)
> +                       r600_write_config_reg(cs, R_008040_WAIT_UNTIL, wait_until);
>         }
>
>         /* everything is properly flushed */
> @@ -862,7 +863,8 @@ void r600_context_emit_fence(struct r600_context *ctx, struct r600_resource *fen
>         va = r600_resource_va(&ctx->screen->screen, (void*)fence_bo);
>         va = va + (offset << 2);
>
> -       r600_write_config_reg(cs, R_008040_WAIT_UNTIL, S_008040_WAIT_3D_IDLE(1));
> +       if (ctx->family < CHIP_CAYMAN)
> +               r600_write_config_reg(cs, R_008040_WAIT_UNTIL, S_008040_WAIT_3D_IDLE(1));
>
>         cs->buf[cs->cdw++] = PKT3(PKT3_EVENT_WRITE_EOP, 4, 0);
>         cs->buf[cs->cdw++] = EVENT_TYPE(EVENT_TYPE_CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_INDEX(5);
> --
> 1.7.7.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list