exynos/fimg2d: add g2d_validate_xyz() functions
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Tue, 8 Sep 2015 15:22:29 +0000 (17:22 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 21 Sep 2015 16:43:14 +0000 (17:43 +0100)
commite3c97d1a2473cd06a964599d10465f1e6a4d9015
treee4c7bd71c9a9a88f31150b6ea11764ffcfb6a28a
parent2362c88251d4bba0bb76d2a25f233004c6f99134
exynos/fimg2d: add g2d_validate_xyz() functions

The G2D headers define a number of modes through enums
(like e.g. color, select, repeat, etc.).

This introduces g2d_validate_select_mode() and
g2d_validate_blending_op() which validate a
select mode or blending operation respectively.

Use this together with g2d_check_space() in
g2d_{blend,scale_and_blend}().

For this we move parameter validation to the top and
also validate the select mode of the source image and
the requested blending operation before starting
command submission.

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