Commit 8bdbd8b
committed
drm/panthor: Make sure we handle 'unknown group state' case properly
When we check for state values returned by the FW, we only cover part of
the 0:7 range. Make sure we catch FW inconsistencies by adding a default
to the switch statement, and flagging the group state as unknown in that
case.
When an unknown state is detected, we trigger a reset, and consider the
group as unusable after that point, to prevent the potential corruption
from creeping in other places if we continue executing stuff on this
context.
v2:
- Add Steve's R-b
- Fix commit message
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/dri-devel/[email protected]/T/#u
Suggested-by: Steven Price <[email protected]>
Signed-off-by: Boris Brezillon <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Reviewed-by: Liviu Dudau <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]1 parent 08f4413 commit 8bdbd8b
1 file changed
+35
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
493 | 505 | | |
494 | 506 | | |
495 | 507 | | |
| |||
1127 | 1139 | | |
1128 | 1140 | | |
1129 | 1141 | | |
| 1142 | + | |
1130 | 1143 | | |
1131 | 1144 | | |
1132 | 1145 | | |
| |||
1137 | 1150 | | |
1138 | 1151 | | |
1139 | 1152 | | |
1140 | | - | |
| 1153 | + | |
| 1154 | + | |
1141 | 1155 | | |
1142 | 1156 | | |
1143 | 1157 | | |
| |||
1148 | 1162 | | |
1149 | 1163 | | |
1150 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
1151 | 1176 | | |
1152 | 1177 | | |
1153 | 1178 | | |
1154 | 1179 | | |
1155 | 1180 | | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1156 | 1187 | | |
1157 | 1188 | | |
1158 | 1189 | | |
| |||
1783 | 1814 | | |
1784 | 1815 | | |
1785 | 1816 | | |
| 1817 | + | |
1786 | 1818 | | |
1787 | 1819 | | |
1788 | 1820 | | |
| |||
2557 | 2589 | | |
2558 | 2590 | | |
2559 | 2591 | | |
2560 | | - | |
| 2592 | + | |
| 2593 | + | |
2561 | 2594 | | |
2562 | 2595 | | |
2563 | 2596 | | |
| |||
0 commit comments