]> git.baikalelectronics.ru Git - kernel.git/commit
drm/exynos: fix size check in g2d_check_buf_desc_is_valid()
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Mon, 17 Aug 2015 22:51:24 +0000 (00:51 +0200)
committerInki Dae <daeinki@gmail.com>
Wed, 2 Sep 2015 14:10:28 +0000 (23:10 +0900)
commit68777097d8d12915f29b1be2ee9a661013b4f40f
tree5228ad4284d25b58c1bd41a75ce41ab46a24570c
parent0c5fb768f8a8f1e13ada0b51cc4b592395788524
drm/exynos: fix size check in g2d_check_buf_desc_is_valid()

The size check was incomplete. It only computed the
size of area of the drawing rectangle and checked if
the size still fit inside the buffer.

The correct check is to compute the position of the
last byte that the G2D engine is going to access and
then check if that position is still contained in the
buffer. In particular we need the stride information
to determine this.

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