Commit 7189576
drm/radeon: Use RMW accessors for changing LNKCTL
Don't assume that only the driver would be accessing LNKCTL. ASPM policy
changes can trigger write to LNKCTL outside of driver's control. And in
the case of upstream bridge, the driver does not even own the device it's
changing the registers for.
Use RMW capability accessors which do proper locking to avoid losing
concurrent updates to the register value.
Suggested-by: Lukas Wunner <lukas@wunner.de>
Fixes: 8a7cd27 ("drm/radeon/cik: add support for pcie gen1/2/3 switching")
Fixes: b9d305d ("drm/radeon: implement pcie gen2/3 support for SI")
Link: https://lore.kernel.org/r/20230717120503.15276-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>1 parent ce7d881 commit 7189576
2 files changed
Lines changed: 20 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9534 | 9534 | | |
9535 | 9535 | | |
9536 | 9536 | | |
9537 | | - | |
9538 | | - | |
9539 | | - | |
9540 | | - | |
9541 | | - | |
9542 | | - | |
9543 | | - | |
9544 | | - | |
9545 | | - | |
9546 | | - | |
9547 | | - | |
| 9537 | + | |
| 9538 | + | |
9548 | 9539 | | |
9549 | 9540 | | |
9550 | 9541 | | |
| |||
9591 | 9582 | | |
9592 | 9583 | | |
9593 | 9584 | | |
9594 | | - | |
9595 | | - | |
9596 | | - | |
9597 | | - | |
9598 | | - | |
9599 | | - | |
9600 | | - | |
9601 | | - | |
9602 | | - | |
9603 | | - | |
9604 | | - | |
9605 | | - | |
9606 | | - | |
9607 | | - | |
9608 | | - | |
| 9585 | + | |
| 9586 | + | |
| 9587 | + | |
| 9588 | + | |
| 9589 | + | |
| 9590 | + | |
| 9591 | + | |
| 9592 | + | |
9609 | 9593 | | |
9610 | 9594 | | |
9611 | 9595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7131 | 7131 | | |
7132 | 7132 | | |
7133 | 7133 | | |
7134 | | - | |
7135 | | - | |
7136 | | - | |
7137 | | - | |
7138 | | - | |
7139 | | - | |
7140 | | - | |
7141 | | - | |
7142 | | - | |
7143 | | - | |
7144 | | - | |
| 7134 | + | |
| 7135 | + | |
7145 | 7136 | | |
7146 | 7137 | | |
7147 | 7138 | | |
| |||
7188 | 7179 | | |
7189 | 7180 | | |
7190 | 7181 | | |
7191 | | - | |
7192 | | - | |
7193 | | - | |
7194 | | - | |
7195 | | - | |
7196 | | - | |
7197 | | - | |
7198 | | - | |
7199 | | - | |
7200 | | - | |
7201 | | - | |
7202 | | - | |
7203 | | - | |
7204 | | - | |
7205 | | - | |
7206 | | - | |
| 7182 | + | |
| 7183 | + | |
| 7184 | + | |
| 7185 | + | |
| 7186 | + | |
| 7187 | + | |
| 7188 | + | |
| 7189 | + | |
7207 | 7190 | | |
7208 | 7191 | | |
7209 | 7192 | | |
| |||
0 commit comments