exynos/fimg2d: add g2d_check_space()
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Tue, 8 Sep 2015 15:22:28 +0000 (17:22 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 21 Sep 2015 16:43:14 +0000 (17:43 +0100)
commit2362c88251d4bba0bb76d2a25f233004c6f99134
treeed097aa38a1a9f993a68757adeec9a008f512993
parent9017619714eb432fa9bb1e94139cc2ad40fc7001
exynos/fimg2d: add g2d_check_space()

This is going to be used to check if the command buffers have
enough space left prior to actual submission of the commands.

Use this in g2d_{solid_fill,copy,copy_with_scale}().

For this the parameter validation before buffer space
checking so that we can exit early if it fails.
Also don't reset the G2D context in this situation since
the buffers are not partially submitted anymore.

The repeat mode in g2d_copy_with_scale() is checked first
to make computation of space easier.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
exynos/exynos_fimg2d.c