未验证 提交 b4a6aaea 编写于 作者: J Joel Stanley 提交者: Maxime Ripard

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.

Fixes: 696029eb ("drm/aspeed: Add sysfs for output settings")
Reported-by: NOskar Senft <osk@google.com>
Signed-off-by: NJoel Stanley <joel@jms.id.au>
Reviewed-by: NJeremy Kerr <jk@codeconstruct.com.au>
Tested-by: NOskar Senft <osk@google.com>
Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20211117010145.297253-1-joel@jms.id.au
上级 96c5f82e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册