diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/fb/sddr3.c | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c b/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c index 66fe959b4f74..7fbbe05d5c60 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/gddr5.c | |||
@@ -40,7 +40,7 @@ nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts) | |||
40 | int WL, CL, WR, at[2], dt, ds; | 40 | int WL, CL, WR, at[2], dt, ds; |
41 | int rq = ram->freq < 1000000; /* XXX */ | 41 | int rq = ram->freq < 1000000; /* XXX */ |
42 | 42 | ||
43 | switch (ram->ramcfg.version) { | 43 | switch (ram->next->bios.ramcfg_ver) { |
44 | case 0x11: | 44 | case 0x11: |
45 | pd = ram->next->bios.ramcfg_11_01_80; | 45 | pd = ram->next->bios.ramcfg_11_01_80; |
46 | lf = ram->next->bios.ramcfg_11_01_40; | 46 | lf = ram->next->bios.ramcfg_11_01_40; |
@@ -54,7 +54,7 @@ nouveau_gddr5_calc(struct nouveau_ram *ram, bool nuts) | |||
54 | return -ENOSYS; | 54 | return -ENOSYS; |
55 | } | 55 | } |
56 | 56 | ||
57 | switch (ram->timing.version) { | 57 | switch (ram->next->bios.timing_ver) { |
58 | case 0x20: | 58 | case 0x20: |
59 | WL = (ram->next->bios.timing[1] & 0x00000f80) >> 7; | 59 | WL = (ram->next->bios.timing[1] & 0x00000f80) >> 7; |
60 | CL = (ram->next->bios.timing[1] & 0x0000001f); | 60 | CL = (ram->next->bios.timing[1] & 0x0000001f); |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/sddr3.c b/drivers/gpu/drm/nouveau/core/subdev/fb/sddr3.c index f84c6542c3c3..3d77fc5add77 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/sddr3.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/sddr3.c | |||
@@ -72,8 +72,13 @@ nouveau_sddr3_calc(struct nouveau_ram *ram) | |||
72 | { | 72 | { |
73 | struct nouveau_bios *bios = nouveau_bios(ram); | 73 | struct nouveau_bios *bios = nouveau_bios(ram); |
74 | int CWL, CL, WR, DLL = 0, ODT = 0; | 74 | int CWL, CL, WR, DLL = 0, ODT = 0; |
75 | u8 ver; | ||
75 | 76 | ||
76 | switch (!!ram->timing.data * ram->timing.version) { | 77 | ver = !!ram->timing.data * ram->timing.version; |
78 | if (ram->next) | ||
79 | ver = ram->next->bios.timing_ver; | ||
80 | |||
81 | switch (ver) { | ||
77 | case 0x10: | 82 | case 0x10: |
78 | if (ram->timing.size < 0x17) { | 83 | if (ram->timing.size < 0x17) { |
79 | /* XXX: NV50: Get CWL from the timing register */ | 84 | /* XXX: NV50: Get CWL from the timing register */ |
@@ -86,9 +91,9 @@ nouveau_sddr3_calc(struct nouveau_ram *ram) | |||
86 | ODT = nv_ro08(bios, ram->timing.data + 0x0e) & 0x07; | 91 | ODT = nv_ro08(bios, ram->timing.data + 0x0e) & 0x07; |
87 | break; | 92 | break; |
88 | case 0x20: | 93 | case 0x20: |
89 | CWL = (nv_ro16(bios, ram->timing.data + 0x04) & 0x0f80) >> 7; | 94 | CWL = (ram->next->bios.timing[1] & 0x00000f80) >> 7; |
90 | CL = nv_ro08(bios, ram->timing.data + 0x04) & 0x1f; | 95 | CL = (ram->next->bios.timing[1] & 0x0000001f) >> 0; |
91 | WR = nv_ro08(bios, ram->timing.data + 0x0a) & 0x7f; | 96 | WR = (ram->next->bios.timing[2] & 0x007f0000) >> 16; |
92 | /* XXX: Get these values from the VBIOS instead */ | 97 | /* XXX: Get these values from the VBIOS instead */ |
93 | DLL = !(ram->mr[1] & 0x1); | 98 | DLL = !(ram->mr[1] & 0x1); |
94 | ODT = (ram->mr[1] & 0x004) >> 2 | | 99 | ODT = (ram->mr[1] & 0x004) >> 2 | |