Re: [Nouveau] [PATCH] ram/gf100-: error out if a ridiculous amount of vram is detected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Someone will have to trudge through a mmiotrace and figure out what
magic bit we need to set in order to bring it out of deep sleep. Or
perhaps NVIDIA will graciously tell us, which they eventually did for
GK104/GK106 (but their instructions appear to be insufficient for at
least some GK106's).

But I've seen these errors every so often on various cards... we stick
things at the end of VRAM, which causes no end of confusion when we
think that it's a few PB out :)

On Wed, May 20, 2015 at 5:35 PM, Tobias Klausmann
<tobias.johannes.klausmann@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxxxx>
>> Cc: stable@xxxxxxxxxx
>> ---
>>   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;
>
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux