Commit 9b1cbf8
drm: apple: respect drm_plane_state zpos
The for_each_oldnew_plane_in_state iterator is nondeterministic
in terms of the order of planes. DCP expects surfaces to be
fed to it in the correct order. Relying on the iterator to
lazily increment the index into surf[] means we cannot meet
this expectation. The constant reordering of planes in
the surf[] array seems to cause DCP to crash under certain
circumstances. Cursors will also often be drawn under the main
plane, which is less than ideal.
Populate surf[] in the order everyone expects us to. This fixes
a whole host of odd behaviour when wiring up multiple DRM universal
planes.
Signed-off-by: James Calligeros <[email protected]>1 parent 86eac5a commit 9b1cbf8
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1295 | 1295 | | |
1296 | 1296 | | |
1297 | 1297 | | |
1298 | | - | |
1299 | | - | |
1300 | 1298 | | |
1301 | 1299 | | |
1302 | 1300 | | |
| |||
1307 | 1305 | | |
1308 | 1306 | | |
1309 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
1310 | 1319 | | |
1311 | 1320 | | |
1312 | 1321 | | |
| |||
1333 | 1342 | | |
1334 | 1343 | | |
1335 | 1344 | | |
1336 | | - | |
1337 | 1345 | | |
1338 | 1346 | | |
1339 | 1347 | | |
| |||
1383 | 1391 | | |
1384 | 1392 | | |
1385 | 1393 | | |
1386 | | - | |
1387 | 1394 | | |
1388 | 1395 | | |
1389 | 1396 | | |
| |||
0 commit comments