diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-09-22 11:08:01 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-12-02 15:37:18 +1000 |
commit | 7dd715d47e240466c4bba6a81b3fc678a964b41a (patch) | |
tree | 6e373bf0a1f39f7b438e75e735459cc7a57122ad | |
parent | 9eb9890a7fa209781949bb13214a8451cff9e125 (diff) | |
download | nouveau-7dd715d47e240466c4bba6a81b3fc678a964b41a.tar.gz |
bios: fetch images beyond the first one in the rom
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | nvkm/subdev/bios/image.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nvkm/subdev/bios/image.c b/nvkm/subdev/bios/image.c index 64ed641b8..dd8fd2f42 100644 --- a/nvkm/subdev/bios/image.c +++ b/nvkm/subdev/bios/image.c @@ -47,7 +47,7 @@ nvbios_imagen(struct nouveau_bios *bios, struct nvbios_image *image) return false; image->size = pcir.image_size; image->type = pcir.image_type; - image->last = true; + image->last = pcir.last; return true; } @@ -55,7 +55,10 @@ bool nvbios_image(struct nouveau_bios *bios, int idx, struct nvbios_image *image) { memset(image, 0x00, sizeof(*image)); - if (idx) - return false; - return nvbios_imagen(bios, image); + do { + image->base += image->size; + if (image->last || !nvbios_imagen(bios, image)) + return false; + } while(idx--); + return true; } |