drm/exynos: g2d: wait for engine to finish
commit134a0fe98471b2e15a2b1bc22f4bddbb98bd6e18
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Tue, 27 Sep 2016 15:50:09 +0000 (27 17:50 +0200)
committerInki Dae <daeinki@gmail.com>
Fri, 30 Sep 2016 15:39:40 +0000 (1 00:39 +0900)
tree09809563854add622ba6f9a0408f27bda937dad8
parent5332737432ad5989830dae75df0d3e9cce56e893
drm/exynos: g2d: wait for engine to finish

While the engine works on a runqueue node it does memory access to
the buffers associated with that node.
Make sure that the engine is idle when g2d_close() and/or
g2d_remove() are called, i.e. buffer associated with the process (for
g2d_close()), or all buffers (for g2d_remove()) can be safely be
unmapped.

We have to take into account that the engine might be in an undefined
state, i.e. it hangs and doesn't become idle. In this case, we issue
a hardware reset to return the hardware and the driver context into a
proper state.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_g2d.c