diff options
author | Marcin KoĆcielnicki <koriakin@0x04.net> | 2010-07-02 15:33:01 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-08-05 18:35:46 -0400 |
commit | e3a1924f3e5aeabdb1a1ae1a87b4097e48b7f2c5 (patch) | |
tree | eac1c09e120ceadbac0c7aa0c051fffef020f1e7 /drivers | |
parent | 1ac7b528a0e924308cfedea5d71b78c31c23b851 (diff) |
drm/nouveau: implement init table op 0x57, INIT_LTIME
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Marcin KoĆcielnicki <koriakin@0x04.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index e0997d6e6d7..6dd00ffa63a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -1928,6 +1928,31 @@ init_condition_time(struct nvbios *bios, uint16_t offset, | |||
1928 | } | 1928 | } |
1929 | 1929 | ||
1930 | static int | 1930 | static int |
1931 | init_ltime(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) | ||
1932 | { | ||
1933 | /* | ||
1934 | * INIT_LTIME opcode: 0x57 ('V') | ||
1935 | * | ||
1936 | * offset (8 bit): opcode | ||
1937 | * offset + 1 (16 bit): time | ||
1938 | * | ||
1939 | * Sleep for "time" miliseconds. | ||
1940 | */ | ||
1941 | |||
1942 | unsigned time = ROM16(bios->data[offset + 1]); | ||
1943 | |||
1944 | if (!iexec->execute) | ||
1945 | return 3; | ||
1946 | |||
1947 | BIOSLOG(bios, "0x%04X: Sleeping for 0x%04X miliseconds\n", | ||
1948 | offset, time); | ||
1949 | |||
1950 | msleep(time); | ||
1951 | |||
1952 | return 3; | ||
1953 | } | ||
1954 | |||
1955 | static int | ||
1931 | init_zm_reg_sequence(struct nvbios *bios, uint16_t offset, | 1956 | init_zm_reg_sequence(struct nvbios *bios, uint16_t offset, |
1932 | struct init_exec *iexec) | 1957 | struct init_exec *iexec) |
1933 | { | 1958 | { |
@@ -3518,6 +3543,7 @@ static struct init_tbl_entry itbl_entry[] = { | |||
3518 | { "INIT_ZM_CR" , 0x53, init_zm_cr }, | 3543 | { "INIT_ZM_CR" , 0x53, init_zm_cr }, |
3519 | { "INIT_ZM_CR_GROUP" , 0x54, init_zm_cr_group }, | 3544 | { "INIT_ZM_CR_GROUP" , 0x54, init_zm_cr_group }, |
3520 | { "INIT_CONDITION_TIME" , 0x56, init_condition_time }, | 3545 | { "INIT_CONDITION_TIME" , 0x56, init_condition_time }, |
3546 | { "INIT_LTIME" , 0x57, init_ltime }, | ||
3521 | { "INIT_ZM_REG_SEQUENCE" , 0x58, init_zm_reg_sequence }, | 3547 | { "INIT_ZM_REG_SEQUENCE" , 0x58, init_zm_reg_sequence }, |
3522 | /* INIT_INDIRECT_REG (0x5A, 7, 0, 0) removed due to no example of use */ | 3548 | /* INIT_INDIRECT_REG (0x5A, 7, 0, 0) removed due to no example of use */ |
3523 | { "INIT_SUB_DIRECT" , 0x5B, init_sub_direct }, | 3549 | { "INIT_SUB_DIRECT" , 0x5B, init_sub_direct }, |