From: Tobias Klausmann <tobias.johannes.klausmann-AqjdNwhu20eELgA04lAiVw@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>,
Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] ram/gf100-: error out if a ridiculous amount of vram is detected
Date: Wed, 20 May 2015 23:35:23 +0200 [thread overview]
Message-ID: <555CFE1B.5060200@mni.thm.de> (raw)
In-Reply-To: <1432152067-32104-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Any idea on how to solve the problem. other than just reporting it?
But for now this adds a helpful error message... you may add my R-b.
On 20.05.2015 22:01, Ilia Mirkin wrote:
> Some newer chips have trouble coming up, and we get bad MMIO reads from
> them, like 0xbadf100. This ends up translating into crazy amounts of
> VRAM, which destroys all sorts of other logic down the line. Instead,
> fail device init.
>
> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
> Cc: stable@kernel.org
> ---
> drm/nouveau/nvkm/subdev/fb/ramgf100.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drm/nouveau/nvkm/subdev/fb/ramgf100.c b/drm/nouveau/nvkm/subdev/fb/ramgf100.c
> index de9f395..9d4d196 100644
> --- a/drm/nouveau/nvkm/subdev/fb/ramgf100.c
> +++ b/drm/nouveau/nvkm/subdev/fb/ramgf100.c
> @@ -545,6 +545,12 @@ gf100_ram_create_(struct nvkm_object *parent, struct nvkm_object *engine,
> }
> }
>
> + /* if over 1TB of VRAM is reported, something went very wrong, bail */
> + if (ram->size > (1ULL << 40)) {
> + nv_error(pfb, "invalid vram size: %llx\n", ram->size);
> + return -EINVAL;
> + }
> +
> /* if all controllers have the same amount attached, there's no holes */
> if (uniform) {
> offset = rsvd_head;
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-05-20 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 20:01 [PATCH] ram/gf100-: error out if a ridiculous amount of vram is detected Ilia Mirkin
[not found] ` <1432152067-32104-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2015-05-20 21:35 ` Tobias Klausmann [this message]
2015-05-20 21:47 ` [Nouveau] " Ilia Mirkin
2015-05-21 4:45 ` Ben Skeggs
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=555CFE1B.5060200@mni.thm.de \
--to=tobias.johannes.klausmann-aqjdnwhu20eelga04laivw@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/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