From: Ben Skeggs Date: Mon, 22 Sep 2014 01:08:01 +0000 (+1000) Subject: drm/nouveau/bios: fetch images beyond the first one in the rom X-Git-Tag: v3.19-rc1~73^2~15^2~66 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c2c2f6cb79141ca22f84c36887fd867373c35c4e;p=uclinux-h8%2Flinux.git drm/nouveau/bios: fetch images beyond the first one in the rom Signed-off-by: Ben Skeggs --- 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; }