]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: plane: Fix margin calculations for the right/bottom edges
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 13 Jun 2022 14:47:32 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:24 +0000 (14:23 +0200)
commit3ad1259ab1d9e6e0d5804c79d8edab7cd853b4a3
treea993b5368591edfc58c8bc32965290e61cdea383
parent22ec11b86314fc84a051d1259c243954a42069ce
drm/vc4: plane: Fix margin calculations for the right/bottom edges

[ Upstream commit e3f6e40a5e0a2dd5ddfca98963fdd4b7bc76a70d ]

The current plane margin calculation code clips the right and bottom
edges of the range based using the left and top margins.

This is obviously wrong, so let's fix it.

Fixes: 188f608deb8f ("drm/vc4: Take margin setup into account when updating planes")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20220613144800.326124-6-maxime@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_plane.c