summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/aspeed
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2021-11-17 04:01:45 +0300
committerJoel Stanley <joel@jms.id.au>2021-11-23 11:02:09 +0300
commitc7d1ac102acfb73f4ed4fe5bd49a2d0c16e170a6 (patch)
tree632096d96d96aae92ba2cc2c227f5c43c9f41147 /drivers/gpu/drm/aspeed
parent781a66e81bbb9081e74d9ba0fcee095fefa1048e (diff)
downloadlinux-c7d1ac102acfb73f4ed4fe5bd49a2d0c16e170a6.tar.xz
drm/aspeed: Fix vga_pw sysfs output
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. OpenBMC-Staging-Count: 1 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
Diffstat (limited to 'drivers/gpu/drm/aspeed')
-rw-r--r--drivers/gpu/drm/aspeed/aspeed_gfx_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
index b53fee6f1c17..65f172807a0d 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c
@@ -291,7 +291,7 @@ vga_pw_show(struct device *dev, struct device_attribute *attr, char *buf)
if (rc)
return rc;
- return sprintf(buf, "%u\n", reg & 1);
+ return sprintf(buf, "%u\n", reg);
}
static DEVICE_ATTR_RO(vga_pw);