drm/nouveau/bios: 0 means success for nvbios_extend
Subsystems (3)
PATCH 1/1 drm/nouveau/bios: 0 means success for nvbios_extend
Bugzilla:https://bugs.freedesktop.org/show_bug.cgi?id=89047
CC David Airlie <[email protected]>
CC Ben Skeggs <[email protected]>
Signed-off-by Jan Vesely <[email protected]>
---
It's needed for 3.19 too
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c +1 -1
@@ -44,7 +44,7 @@ shadow_fetch(struct nvkm_bios *bios, u32 upto)const u32 limit = (upto +3 ) & ~3 ;const u32 start = bios->size;void *data = mthd->data; -if (nvbios_extend (bios, limit) >0 ) { +if (nvbios_extend (bios, limit) >=0 ) {u32 read = mthd->func->read (data, start, limit - start, bios); bios->size = start + read; }
drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c +2 -2
@@ -52,7 +52,7 @@ acpi_read_fast(void *data, u32 offset, u32 length, struct nvkm_bios *bios)u32 start = offset & ~0x00000fff ;u32 fetch = limit - start; -if (nvbios_extend (bios, limit) >0 ) { +if (nvbios_extend (bios, limit) >=0 ) {int ret =nouveau_acpi_get_bios_chunk (bios->data, start, fetch);if (ret == fetch)return fetch;
@@ -73,7 +73,7 @@ acpi_read_slow(void *data, u32 offset, u32 length, struct nvkm_bios *bios)u32 start = offset & ~0xfff ;u32 fetch =0 ; -if (nvbios_extend (bios, limit) >0 ) { +if (nvbios_extend (bios, limit) >=0 ) {while (start + fetch < limit) { int ret = nouveau_acpi_get_bios_chunk(bios->data, start + fetch,
Signature · 1 line
2.0.5