diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-05-19 23:59:34 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-06-16 14:04:44 +1000 |
commit | b88afa43967578741e3b258c80e01969fddd5fe6 (patch) | |
tree | db5b2b729ed52b8f7b6d9f634899811616da09f7 /drivers/gpu/drm/nouveau/nvkm/subdev/bios | |
parent | ca9c2d5b28b4d5aa1d229950b88f7c559eee4164 (diff) | |
download | talos-op-linux-b88afa43967578741e3b258c80e01969fddd5fe6.tar.gz talos-op-linux-b88afa43967578741e3b258c80e01969fddd5fe6.zip |
drm/nouveau/bios/init: add or/link args separate from output path
As of DCB 4.1, these are not the same thing.
Compatibility temporarily in place until callers have been updated.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/bios')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c index 249d018ee32c..b1256aba2fdb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c @@ -87,8 +87,8 @@ static inline int init_or(struct nvbios_init *init) { if (init_exec(init)) { - if (init->outp) - return ffs(init->outp->or) - 1; + if (init->or >= 0) + return init->or; error("script needs OR!!\n"); } return 0; @@ -98,8 +98,8 @@ static inline int init_link(struct nvbios_init *init) { if (init_exec(init)) { - if (init->outp) - return !(init->outp->sorconf.link & 1); + if (init->link) + return init->link == 2; error("script needs OR link\n"); } return 0; @@ -2277,6 +2277,12 @@ int nvbios_exec(struct nvbios_init *init) { struct nvkm_bios *bios = init->subdev->device->bios; + + if (init->bios) { + init->or = init->outp ? ffs(init->outp->or) - 1 : -1; + init->link = init->outp ? init->outp->sorconf.link : 0; + } + init->nested++; while (init->offset) { u8 opcode = nvbios_rd08(bios, init->offset); |