Commit 3864300
committed
displayport: save and restore compound query state around speculative MST pre-check
The speculative uncompressed pre-check calls compoundQueryAttachMSTGeneric
to determine if DSC can be skipped. However, this function mutates shared
state that the subsequent DSC path depends on:
1. compoundQueryResult is set to false on failure but never reset,
poisoning all subsequent compoundQueryAttachMSTGeneric calls which
unconditionally return the (now-false) flag.
2. Per-device compound_query_state (timeslots_used_by_query and
bandwidthAllocatedForIndex) is only partially rolled back on failure.
Intermediate branch devices between the source and the bottleneck
retain their uncompressed timeslot allocations. When the DSC path
calls compoundQueryAttachMSTGeneric again, these devices are skipped
via the bandwidthAllocatedForIndex bitmask, keeping incorrect
(too-large) uncompressed allocations instead of the correct
(smaller) compressed ones.
Fix this by saving all relevant state before the speculative call and
restoring it on failure, so the DSC path always starts from a clean
slate. Also clear pErrorCode on rollback since the speculative failure
is not a real error.1 parent e91a9fb commit 3864300
1 file changed
+60
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
1428 | 1428 | | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1429 | 1467 | | |
1430 | 1468 | | |
1431 | 1469 | | |
1432 | 1470 | | |
1433 | 1471 | | |
1434 | 1472 | | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
1435 | 1477 | | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
| 1478 | + | |
| 1479 | + | |
1440 | 1480 | | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1441 | 1494 | | |
1442 | 1495 | | |
1443 | 1496 | | |
| |||
0 commit comments