From: Ben Skeggs Date: Mon, 22 Sep 2014 01:21:57 +0000 (+1000) Subject: drm/nouveau/bios: use NPDE to locate images beyond those defined by PCIR X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7205875d09e4fd60d21a448fe070c0ba3e6e9588;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/nouveau/bios: use NPDE to locate images beyond those defined by PCIR 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 dd8fd2f4263b..df85cc6d0fc7 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/image.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/image.c @@ -25,11 +25,13 @@ #include #include #include +#include static bool nvbios_imagen(struct nouveau_bios *bios, struct nvbios_image *image) { struct nvbios_pcirT pcir; + struct nvbios_npdeT npde; u8 ver; u16 hdr; u32 data; @@ -48,6 +50,11 @@ nvbios_imagen(struct nouveau_bios *bios, struct nvbios_image *image) image->size = pcir.image_size; image->type = pcir.image_type; image->last = pcir.last; + + if (!(data = nvbios_npdeTp(bios, image->base, &npde))) + return true; + image->size = npde.image_size; + image->last = npde.last; return true; }