drm/vc4: Make sure that the thread is not merely parsed, it's finished.

The CTnCS register will say it's not running when the thread has
finished parsing the command list, but there may be outstanding work
still.  Instead, we need to look at the PCS bits, which indicate
whether the pipeline is totally finished.

Signed-off-by: Eric Anholt <eric@anholt.net>
drm/vc4: Try harder at resetting the GPU.

Instead of just asking it to please stop the threads and start again,
cut the power to the chip.

Signed-off-by: Eric Anholt <eric@anholt.net>
drm/vc4: Rename the "check if bin needs OOM handling or is idle" function.

Signed-off-by: Eric Anholt <eric@anholt.net>
drm/vc4: We only need to wait for render idle after we submit render.

Of course, no bins can be submitted during this time anyway, so it's
not really relevant, but it cleans up the code.

Signed-off-by: Eric Anholt <eric@anholt.net>
drm/vc4: No need to wait for full idle after bin is idle.

There are no outstanding renders yet, since it's our job to fire them
off after bin is done.

Signed-off-by: Eric Anholt <eric@anholt.net>
drm/vc4: Sanity check the frame counts after the job thinks it's done.

If we didn't make it to a frame count update (for example, the render
count with fbo-generatemipmap-formats), it might be that something
smashed the render command lists such that they executed a HALT early
instead of actually running to completion.

Signed-off-by: Eric Anholt <eric@anholt.net>