提交 ac8cc241 编写于 作者: B Ben Skeggs

drm/nv50/devinit: reverse the logic for running encoder init scripts

A single U encoder table can match multiple DCB entries, whereas the
reverse is not true and can lead to us not matching a DCB entry at
all, and fail to initialise some encoders.
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 8e992c8d
...@@ -78,12 +78,13 @@ nv50_devinit_init(struct nouveau_object *object) ...@@ -78,12 +78,13 @@ nv50_devinit_init(struct nouveau_object *object)
if (ret) if (ret)
return ret; return ret;
/* if we ran the init tables, execute first script pointer for each /* if we ran the init tables, we have to execute the first script
* display table output entry that has a matching dcb entry. * pointer of each dcb entry's display encoder table in order
* to properly initialise each encoder.
*/ */
while (priv->base.post && ver) { while (priv->base.post && dcb_outp_parse(bios, i, &ver, &hdr, &outp)) {
u16 data = nvbios_outp_parse(bios, i++, &ver, &hdr, &cnt, &len, &info); if (nvbios_outp_match(bios, outp.hasht, outp.hashm,
if (data && dcb_outp_match(bios, info.type, info.mask, &ver, &len, &outp)) { &ver, &hdr, &cnt, &len, &info)) {
struct nvbios_init init = { struct nvbios_init init = {
.subdev = nv_subdev(priv), .subdev = nv_subdev(priv),
.bios = bios, .bios = bios,
...@@ -95,7 +96,8 @@ nv50_devinit_init(struct nouveau_object *object) ...@@ -95,7 +96,8 @@ nv50_devinit_init(struct nouveau_object *object)
nvbios_exec(&init); nvbios_exec(&init);
} }
}; i++;
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册