diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dp.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvd0_display.c | 6 |
3 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 8dbeeea91872..637afe71de56 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -1144,7 +1144,8 @@ init_dp_condition(struct nvbios *bios, uint16_t offset, struct init_exec *iexec) | |||
1144 | break; | 1144 | break; |
1145 | case 1: | 1145 | case 1: |
1146 | case 2: | 1146 | case 2: |
1147 | if (!(entry[5] & cond)) | 1147 | if ((table[0] < 0x40 && !(entry[5] & cond)) || |
1148 | (table[0] == 0x40 && !(entry[4] & cond))) | ||
1148 | iexec->execute = false; | 1149 | iexec->execute = false; |
1149 | break; | 1150 | break; |
1150 | case 5: | 1151 | case 5: |
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 302b2f7d0678..d996134b1b28 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c | |||
@@ -188,6 +188,7 @@ nouveau_dp_bios_data(struct drm_device *dev, struct dcb_entry *dcb, u8 **entry) | |||
188 | case 0x20: | 188 | case 0x20: |
189 | case 0x21: | 189 | case 0x21: |
190 | case 0x30: | 190 | case 0x30: |
191 | case 0x40: | ||
191 | break; | 192 | break; |
192 | default: | 193 | default: |
193 | NV_ERROR(dev, "displayport table 0x%02x unknown\n", table[0]); | 194 | NV_ERROR(dev, "displayport table 0x%02x unknown\n", table[0]); |
@@ -366,6 +367,10 @@ dp_set_downspread(struct drm_device *dev, struct dp_state *dp, bool enable) | |||
366 | if (table[0] >= 0x20 && table[0] <= 0x30) { | 367 | if (table[0] >= 0x20 && table[0] <= 0x30) { |
367 | if (enable) script = ROM16(entry[12]); | 368 | if (enable) script = ROM16(entry[12]); |
368 | else script = ROM16(entry[14]); | 369 | else script = ROM16(entry[14]); |
370 | } else | ||
371 | if (table[0] == 0x40) { | ||
372 | if (enable) script = ROM16(entry[11]); | ||
373 | else script = ROM16(entry[13]); | ||
369 | } | 374 | } |
370 | } | 375 | } |
371 | 376 | ||
@@ -380,6 +385,9 @@ dp_link_train_init(struct drm_device *dev, struct dp_state *dp) | |||
380 | if (table) { | 385 | if (table) { |
381 | if (table[0] >= 0x20 && table[0] <= 0x30) | 386 | if (table[0] >= 0x20 && table[0] <= 0x30) |
382 | script = ROM16(entry[6]); | 387 | script = ROM16(entry[6]); |
388 | else | ||
389 | if (table[0] == 0x40) | ||
390 | script = ROM16(entry[5]); | ||
383 | } | 391 | } |
384 | 392 | ||
385 | nouveau_bios_run_init_table(dev, script, dp->dcb, dp->crtc); | 393 | nouveau_bios_run_init_table(dev, script, dp->dcb, dp->crtc); |
@@ -393,6 +401,9 @@ dp_link_train_fini(struct drm_device *dev, struct dp_state *dp) | |||
393 | if (table) { | 401 | if (table) { |
394 | if (table[0] >= 0x20 && table[0] <= 0x30) | 402 | if (table[0] >= 0x20 && table[0] <= 0x30) |
395 | script = ROM16(entry[8]); | 403 | script = ROM16(entry[8]); |
404 | else | ||
405 | if (table[0] == 0x40) | ||
406 | script = ROM16(entry[7]); | ||
396 | } | 407 | } |
397 | 408 | ||
398 | nouveau_bios_run_init_table(dev, script, dp->dcb, dp->crtc); | 409 | nouveau_bios_run_init_table(dev, script, dp->dcb, dp->crtc); |
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index d69642da8b56..0247250939e8 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c | |||
@@ -1226,6 +1226,11 @@ nvd0_sor_dp_train_adj(struct drm_device *dev, struct dcb_entry *dcb, | |||
1226 | if (table[0] == 0x30) { | 1226 | if (table[0] == 0x30) { |
1227 | config = entry + table[4]; | 1227 | config = entry + table[4]; |
1228 | config += table[5] * preem; | 1228 | config += table[5] * preem; |
1229 | } else | ||
1230 | if (table[0] == 0x40) { | ||
1231 | config = table + table[1]; | ||
1232 | config += table[2] * table[3]; | ||
1233 | config += table[6] * preem; | ||
1229 | } | 1234 | } |
1230 | } | 1235 | } |
1231 | 1236 | ||
@@ -1258,6 +1263,7 @@ nvd0_sor_dp_link_set(struct drm_device *dev, struct dcb_entry *dcb, int crtc, | |||
1258 | table = nouveau_dp_bios_data(dev, dcb, &entry); | 1263 | table = nouveau_dp_bios_data(dev, dcb, &entry); |
1259 | if (table) { | 1264 | if (table) { |
1260 | if (table[0] == 0x30) entry = ROMPTR(dev, entry[10]); | 1265 | if (table[0] == 0x30) entry = ROMPTR(dev, entry[10]); |
1266 | else if (table[0] == 0x40) entry = ROMPTR(dev, entry[9]); | ||
1261 | else entry = NULL; | 1267 | else entry = NULL; |
1262 | 1268 | ||
1263 | while (entry) { | 1269 | while (entry) { |