From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Yifeng Li <tomli@tomli.me>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 5/8] fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM.
Date: Sun, 31 Mar 2019 12:20:08 +0000 [thread overview]
Message-ID: <20190331122008.3ohmdjp54nts42kh@debian> (raw)
In-Reply-To: <20190316222504.27170-6-tomli@tomli.me>
On Sun, Mar 17, 2019 at 06:25:01AM +0800, Yifeng Li wrote:
> On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), running fbtest or X
> will crash the machine instantly, because the VRAM/framebuffer is not
> mapped correctly.
>
> On SM712, the framebuffer starts at the beginning of address space, but
> SM720's framebuffer starts at the 1 MiB offset from the beginning. However,
> sm712fb fails to take this into account, as a result, writing to the
> framebuffer will destroy all the registers and kill the system immediately.
> Another problem is the driver assumes 8 MiB of VRAM for SM720, but some
> SM720 system, such as this IBM Thinkpad, only has 4 MiB of VRAM.
>
> Fix this problem by removing the hardcoded VRAM size, adding a function to
> query the amount of VRAM from register MCR76 on SM720, and adding proper
> framebuffer offset.
>
> Please note that the memory map may have additional problems on Big-Endian
> system, which is not available for testing by myself. But I highly suspect
> that the original code is also broken on Big-Endian machines for SM720, so
> at least we are not making the problem worse. More, the driver also assumed
> SM710/SM712 has 4 MiB of VRAM, but it has a 2 MiB version as well, and used
> in earlier laptops, such as IBM Thinkpad 240X, the driver would probably
> crash on them. I've never seen one of those machines and cannot fix it, but
> I have documented these problems in the comments.
>
> Signed-off-by: Yifeng Li <tomli@tomli.me>
> Cc: stable@vger.kernel.org # v4.4+
Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
--
Regards
Sudip
next prev parent reply other threads:[~2019-03-31 12:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-16 22:24 [PATCH 0/8] fbdev: sm712fb: fix a series of lockups, crashes and gliches Yifeng Li
2019-03-16 22:24 ` [PATCH 1/8] fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F Yifeng Li
2019-03-31 12:18 ` Sudip Mukherjee
2019-03-16 22:24 ` [PATCH 2/8] fbdev: sm712fb: fix brightness control on reboot, don't set SR30 Yifeng Li
2019-03-31 12:19 ` Sudip Mukherjee
2019-03-16 22:24 ` [PATCH 3/8] fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75 Yifeng Li
2019-03-31 12:19 ` Sudip Mukherjee
2019-03-16 22:25 ` [PATCH 4/8] fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA Yifeng Li
2019-03-31 12:19 ` Sudip Mukherjee
2019-03-16 22:25 ` [PATCH 5/8] fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM Yifeng Li
2019-03-24 21:39 ` Sudip Mukherjee
2019-03-31 12:20 ` Sudip Mukherjee [this message]
2019-03-16 22:25 ` [PATCH 6/8] fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting Yifeng Li
2019-03-31 12:20 ` Sudip Mukherjee
2019-03-16 22:25 ` [PATCH 7/8] fbdev: sm712fb: fix support for 1024x768-16 mode Yifeng Li
2019-03-31 12:20 ` Sudip Mukherjee
2019-03-16 22:25 ` [PATCH 8/8] fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display Yifeng Li
2019-03-31 12:21 ` Sudip Mukherjee
2019-03-31 12:18 ` [PATCH 0/8] fbdev: sm712fb: fix a series of lockups, crashes and gliches Sudip Mukherjee
2019-04-01 15:13 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190331122008.3ohmdjp54nts42kh@debian \
--to=sudipm.mukherjee@gmail.com \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=teddy.wang@siliconmotion.com \
--cc=tomli@tomli.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).