]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75
authorYifeng Li <tomli@tomli.me>
Mon, 1 Apr 2019 15:46:58 +0000 (17:46 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit52f808d9185c68d7207dc3e65d1c82b56031078c
treeafc44da457f3734fbd9e4dbf75fba4462867da23
parenteeae53e9d2d26a4119524e6a551a11c3d227491f
fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75

BugLink: https://bugs.launchpad.net/bugs/1838576
commit dcf9070595e100942c539e229dde4770aaeaa4e9 upstream.

On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), the amount of Video
RAM is not detected correctly by the xf86-video-siliconmotion driver.
This is because sm712fb overwrites the GPR71 Scratch Pad Register, which
is set by BIOS on x86 and used to indicate amount of VRAM.

Other Scratch Pad Registers, including GPR70/74/75, don't have the same
side-effect, but overwriting to them is still questionable, as they are
not related to modesetting.

Stop writing to SR70/71/74/75 (a.k.a GPR70/71/74/75).

Signed-off-by: Yifeng Li <tomli@tomli.me>
Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/video/fbdev/sm712fb.c