summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-09-22 01:08:01 (GMT)
committerBen Skeggs <bskeggs@redhat.com>2014-12-02 05:43:40 (GMT)
commitc2c2f6cb79141ca22f84c36887fd867373c35c4e (patch)
tree197813330630bd04a21fb9f913f070d3603c5f14 /drivers/gpu/drm/nouveau
parent7af4dec166d22f0b4fe30649fc5263a91126c64d (diff)
downloadlinux-c2c2f6cb79141ca22f84c36887fd867373c35c4e.tar.xz
drm/nouveau/bios: fetch images beyond the first one in the rom
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/bios/image.c11
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 64ed641..dd8fd2f 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;
}