Commit b88afa43 authored by Ben Skeggs's avatar Ben Skeggs

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent ca9c2d5b
...@@ -7,6 +7,8 @@ struct nvbios_init { ...@@ -7,6 +7,8 @@ struct nvbios_init {
u32 offset; u32 offset;
struct dcb_output *outp; struct dcb_output *outp;
int or;
int link;
union { union {
int head; int head;
int crtc; int crtc;
......
...@@ -87,8 +87,8 @@ static inline int ...@@ -87,8 +87,8 @@ static inline int
init_or(struct nvbios_init *init) init_or(struct nvbios_init *init)
{ {
if (init_exec(init)) { if (init_exec(init)) {
if (init->outp) if (init->or >= 0)
return ffs(init->outp->or) - 1; return init->or;
error("script needs OR!!\n"); error("script needs OR!!\n");
} }
return 0; return 0;
...@@ -98,8 +98,8 @@ static inline int ...@@ -98,8 +98,8 @@ static inline int
init_link(struct nvbios_init *init) init_link(struct nvbios_init *init)
{ {
if (init_exec(init)) { if (init_exec(init)) {
if (init->outp) if (init->link)
return !(init->outp->sorconf.link & 1); return init->link == 2;
error("script needs OR link\n"); error("script needs OR link\n");
} }
return 0; return 0;
...@@ -2277,6 +2277,12 @@ int ...@@ -2277,6 +2277,12 @@ int
nvbios_exec(struct nvbios_init *init) nvbios_exec(struct nvbios_init *init)
{ {
struct nvkm_bios *bios = init->subdev->device->bios; 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++; init->nested++;
while (init->offset) { while (init->offset) {
u8 opcode = nvbios_rd08(bios, init->offset); u8 opcode = nvbios_rd08(bios, init->offset);
......
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