Commit d95ef8af authored by Ben Skeggs's avatar Ben Skeggs Committed by Greg Kroah-Hartman

drm/nouveau/bios: require checksum to match for fast acpi shadow method

commit 5dc7f4aa upstream.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c256b8e
...@@ -12,6 +12,7 @@ struct nvbios_source { ...@@ -12,6 +12,7 @@ struct nvbios_source {
bool rw; bool rw;
bool ignore_checksum; bool ignore_checksum;
bool no_pcir; bool no_pcir;
bool require_checksum;
}; };
int nvbios_extend(struct nvkm_bios *, u32 length); int nvbios_extend(struct nvkm_bios *, u32 length);
......
...@@ -86,9 +86,12 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd) ...@@ -86,9 +86,12 @@ shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd)
nvbios_checksum(&bios->data[image.base], image.size)) { nvbios_checksum(&bios->data[image.base], image.size)) {
nvkm_debug(subdev, "%08x: checksum failed\n", nvkm_debug(subdev, "%08x: checksum failed\n",
image.base); image.base);
if (mthd->func->rw) if (!mthd->func->require_checksum) {
if (mthd->func->rw)
score += 1;
score += 1; score += 1;
score += 1; } else
return 0;
} else { } else {
score += 3; score += 3;
} }
......
...@@ -99,6 +99,7 @@ nvbios_acpi_fast = { ...@@ -99,6 +99,7 @@ nvbios_acpi_fast = {
.init = acpi_init, .init = acpi_init,
.read = acpi_read_fast, .read = acpi_read_fast,
.rw = false, .rw = false,
.require_checksum = true,
}; };
const struct nvbios_source const struct nvbios_source
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment