drm/aspeed: Fix vga_pw sysfs output
authorJoel Stanley <joel@jms.id.au>
Wed, 17 Nov 2021 01:01:45 +0000 (09:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:47 +0000 (09:04 +0100)
commit94850e2dda990fc07dfac15a65c167ac620b734a
tree59ae253716b569ceceb44874a8250580d90e604d
parent555721765bd6174a735f4539474fab3d68886373
drm/aspeed: Fix vga_pw sysfs output

[ Upstream commit b4a6aaeaf4aa79f23775f6688a7e8db3ee1c1303 ]

Before the drm driver had support for this file there was a driver that
exposed the contents of the vga password register to userspace. It would
present the entire register instead of interpreting it.

The drm implementation chose to mask of the lower bit, without explaining
why. This breaks the existing userspace, which is looking for 0xa8 in
the lower byte.

Change our implementation to expose the entire register.

Fixes: 696029eb36c0 ("drm/aspeed: Add sysfs for output settings")
Reported-by: Oskar Senft <osk@google.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Tested-by: Oskar Senft <osk@google.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20211117010145.297253-1-joel@jms.id.au
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/aspeed/aspeed_gfx_drv.c