freedreno/a3xx: WFI fixes/cleanup
authorRob Clark <robclark@freedesktop.org>
Fri, 13 Jun 2014 21:39:59 +0000 (17:39 -0400)
committerRob Clark <robclark@freedesktop.org>
Sun, 22 Jun 2014 11:25:43 +0000 (07:25 -0400)
commitc63450e8298a34aa0f4077a846b5b0467cdeb567
tree2dff165e5f801450ea29c512076f6232472b9c2f
parentb2c1f3a0198d2abf98e965a7a022ad8c9ec4f43c
freedreno/a3xx: WFI fixes/cleanup

Blob driver seems to need WFI in some cases after CP_EVENT_WRITE,
implying that this is asynchronous and should reset needs_wfi.
Also, CP_INVALIDATE_STATE seems to need WFI.  But CP_LOAD_STATE
does not.

The blob driver also puts WFIs before writing GRAS_CL_VPORT registers.
The latter may be a work-around, as these registers should be banked/
context registers.  I haven't yet found a lockup that this averts, but
I expect viewport to change infrequently so out of paranoia I will
keep these for now.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_draw.c
src/gallium/drivers/freedreno/a3xx/fd3_emit.c
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
src/gallium/drivers/freedreno/a3xx/fd3_query.c
src/gallium/drivers/freedreno/freedreno_context.h