diff options
-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 e0997d6e6d77..6dd00ffa63a0 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 }, |