media: mexon-ge2d: fixup frames size in registers
authorNeil Armstrong <narmstrong@baylibre.com>
Thu, 3 Jun 2021 08:42:15 +0000 (10:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:16 +0000 (14:23 +0200)
commit0d05a58ea3b945491a36b4bc4d925903224141ea
tree0e6acc2df9e05d2e34f1b974055e27ef4d747272
parent498ab2d70a9d80dfa1ba97f6973c48aac332d9f6
media: mexon-ge2d: fixup frames size in registers

[ Upstream commit 79e8c421a099bfbcebe59740153e55aa0442ced6 ]

The CLIP, SRC & DST registers are coded to take the pixel/line start & end,
starting from 0. Thus the end should be the width/height minus 1.

It can be an issue with clipping and rotation, where it will add spurious
lines from uninitialized or unwanted data with a shift in the result.

Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/meson/ge2d/ge2d.c