summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/bios
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-11-07 14:20:43 +1000
committerDave Airlie <airlied@redhat.com>2016-11-07 14:20:43 +1000
commitafdd548f742ca454fc343696de472f3aaa5dc488 (patch)
tree29f3d0087452fdcf7166d83c82a936af26f3e8e0 /drivers/gpu/drm/nouveau/nvkm/subdev/bios
parent7b624ad8fea1be7ff4c22643e212191aa6a2a3c2 (diff)
parentb27add13f500469127afdf011dbcc9c649e16e54 (diff)
downloadblackbird-op-linux-afdd548f742ca454fc343696de472f3aaa5dc488.tar.gz
blackbird-op-linux-afdd548f742ca454fc343696de472f3aaa5dc488.zip
Merge branch 'linux-4.10' of git://github.com/skeggsb/linux into drm-next
- Initial atomic modesetting support. Used for "legacy" KMS interfaces, ioctl not exposed by default, but there is a commandline option to enable it. - Initial DP 1.2 MST support - Misc other code cleanups + fixes * 'linux-4.10' of git://github.com/skeggsb/linux: (64 commits) drm/nouveau/fifo/gf100-: protect channel preempt with subdev mutex drm/nouveau/gr: fallback to legacy paths during firmware lookup drm/nouveau/kms/nv50: initial support for DP 1.2 multi-stream drm/nouveau/kms/nv50: allow encoder update to be called from other modules drm/nouveau/kms/nv50: rename remaining nv50_crtc to nv50_head drm/nouveau/kms/nv50: remove code to create ctxdma for every framebuffer drm/nouveau/kms/nv50: remove code to support non-atomic page flips drm/nouveau/kms/nv50: remove code to support non-atomic connector properties drm/nouveau/kms/nv50: remove code to support non-atomic dpms drm/nouveau/kms/nv50: remove code to support non-atomic modesets drm/nouveau/kms/nv50: transition to atomic interfaces internally drm/nouveau/kms/nv50: turn mode_set_base_atomic() into a stub drm/nouveau/kms/nv50: convert encoder mode_fixup into an atomic_check() drm/nouveau/kms/nv50: clean-up encoder functions drm/nouveau/kms/nv50: ensure encoder normal power state is enabled at startup drm/nouveau/kms/nv50: prepare ctxdma interface to be usable with atomic drm/nouveau/kms/nv50: separate out cursor channel commit drm/nouveau/kms/nv50: separate out base channel commit drm/nouveau/kms/nv50: separate out vblank dmi commit drm/nouveau/kms/nv50: separate out procamp commit ...
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/bios')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c7
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c1
4 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c
index 80fed7e78dcb..e2905815049b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c
@@ -25,7 +25,7 @@
#include <subdev/bios/bit.h>
#include <subdev/bios/fan.h>
-u16
+static u16
nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
{
struct bit_entry bit_P;
@@ -52,7 +52,7 @@ nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
return 0x0000;
}
-u16
+static u16
nvbios_fan_entry(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr,
u8 *cnt, u8 *len)
{
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h
index 212800ecdce9..7d1d3c6b4b72 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/priv.h
@@ -12,6 +12,7 @@ struct nvbios_source {
bool rw;
bool ignore_checksum;
bool no_pcir;
+ bool require_checksum;
};
int nvbios_extend(struct nvkm_bios *, u32 length);
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
index b2557e87afdd..7deb81b6dbac 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c
@@ -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)) {
nvkm_debug(subdev, "%08x: checksum failed\n",
image.base);
- if (mthd->func->rw)
+ if (!mthd->func->require_checksum) {
+ if (mthd->func->rw)
+ score += 1;
score += 1;
- score += 1;
+ } else
+ return 0;
} else {
score += 3;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c
index 8fecb5ff22a0..06572f8ce914 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowacpi.c
@@ -99,6 +99,7 @@ nvbios_acpi_fast = {
.init = acpi_init,
.read = acpi_read_fast,
.rw = false,
+ .require_checksum = true,
};
const struct nvbios_source
OpenPOWER on IntegriCloud