]> www.infradead.org Git - users/dwmw2/linux.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>
Sun, 21 Aug 2022 13:15:42 +0000 (15:15 +0200)
commitf517da5234f837197bd9d47e85e73f8ac452574f
treea3dd7f3f0bf89dd55fd591ef300d60a18e04ff34
parent5aec7cb08bb72dd861459c8826373b9d2cf81114
drm/vc4: plane: Fix margin calculations for the right/bottom edges

[ Upstream commit b7c3d6821627861f4ea3e1f2b595d0ed9e80aac8 ]

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: 666e73587f90 ("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