Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196576
b: refs/heads/master
c: 92b9618
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed May 19, 2010
1 parent 73e3958 commit 2ea7bd5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9170a82438230da63ed09cf6fd1f4d2f87baf68c
refs/heads/master: 92b9618761465d190b68519bcc6a6fbd8847cf2c
39 changes: 23 additions & 16 deletions trunk/drivers/gpu/drm/nouveau/nouveau_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,7 @@ parse_init_table(struct nvbios *bios, unsigned int offset,
* is changed back to EXECUTE.
*/

int count = 0, i, res;
int count = 0, i, ret;
uint8_t id;

/*
Expand All @@ -3145,26 +3145,33 @@ parse_init_table(struct nvbios *bios, unsigned int offset,
for (i = 0; itbl_entry[i].name && (itbl_entry[i].id != id); i++)
;

if (itbl_entry[i].name) {
BIOSLOG(bios, "0x%04X: [ (0x%02X) - %s ]\n",
offset, itbl_entry[i].id, itbl_entry[i].name);

/* execute eventual command handler */
res = (*itbl_entry[i].handler)(bios, offset, iexec);
if (!res)
break;
/*
* Add the offset of the current command including all data
* of that command. The offset will then be pointing on the
* next op code.
*/
offset += res;
} else {
if (!itbl_entry[i].name) {
NV_ERROR(bios->dev,
"0x%04X: Init table command not found: "
"0x%02X\n", offset, id);
return -ENOENT;
}

BIOSLOG(bios, "0x%04X: [ (0x%02X) - %s ]\n", offset,
itbl_entry[i].id, itbl_entry[i].name);

/* execute eventual command handler */
ret = (*itbl_entry[i].handler)(bios, offset, iexec);
if (ret < 0) {
NV_ERROR(bios->dev, "0x%04X: Failed parsing init "
"table opcode: %s %d\n", offset,
itbl_entry[i].name, ret);
}

if (ret <= 0)
break;

/*
* Add the offset of the current command including all data
* of that command. The offset will then be pointing on the
* next op code.
*/
offset += ret;
}

if (offset >= bios->length)
Expand Down

0 comments on commit 2ea7bd5

Please sign in to comment.