]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/armada: Fix off-by-one error in armada_overlay_get_property()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 17 Jul 2023 13:25:40 +0000 (15:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:15 +0000 (09:48 +0200)
commit971154071555e7fb656aefffaf072ed3d2b937e1
treec910eddc868c7ad60f79b50c40a46d6bbf955e1d
parentd7b3918b5c5894bc64c3f1796e38ce8bb62d4d07
drm/armada: Fix off-by-one error in armada_overlay_get_property()

[ Upstream commit 5f0d984053f74983a287100a9519b2fabb785fb5 ]

As ffs() returns one more than the index of the first bit set (zero
means no bits set), the color key mode value is shifted one position too
much.

Fix this by using FIELD_GET() instead.

Fixes: c96103b6c49ff9a8 ("drm/armada: move colorkey properties into overlay plane state")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a4d779d954a7515ddbbf31cb0f0d8184c0e7c879.1689600265.git.geert+renesas@glider.be
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/armada/armada_overlay.c