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:43:40 +1000 |
commit | c2c2f6cb79141ca22f84c36887fd867373c35c4e (patch) | |
tree | 197813330630bd04a21fb9f913f070d3603c5f14 | |
parent | 7af4dec166d22f0b4fe30649fc5263a91126c64d (diff) | |
download | lwn-c2c2f6cb79141ca22f84c36887fd867373c35c4e.tar.gz lwn-c2c2f6cb79141ca22f84c36887fd867373c35c4e.zip |
drm/nouveau/bios: fetch images beyond the first one in the rom
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/bios/image.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/image.c b/drivers/gpu/drm/nouveau/core/subdev/bios/image.c index 64ed641b82b4..dd8fd2f4263b 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/image.c +++ b/drivers/gpu/drm/nouveau/core/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; } |