Commit bfa71b7
drm/i915: Unlink NV12 planes earlier
unlink_nv12_plane() will clobber parts of the plane state
potentially already set up by plane_atomic_check(), so we
must make sure not to call the two in the wrong order.
The problem happens when a plane previously selected as
a Y plane is now configured as a normal plane by user space.
plane_atomic_check() will first compute the proper plane
state based on the userspace request, and unlink_nv12_plane()
later clears some of the state.
This used to work on account of unlink_nv12_plane() skipping
the state clearing based on the plane visibility. But I removed
that check, thinking it was an impossible situation. Now when
that situation happens unlink_nv12_plane() will just WARN
and proceed to clobber the state.
Rather than reverting to the old way of doing things, I think
it's more clear if we unlink the NV12 planes before we even
compute the new plane state.
Cc: [email protected]
Reported-by: Khaled Almahallawy <[email protected]>
Closes: https://lore.kernel.org/intel-gfx/[email protected]/
Tested-by: Khaled Almahallawy <[email protected]>
Fixes: 6a01df2 ("drm/i915: Remove pointless visible check in unlink_nv12_plane()")
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Uma Shankar <[email protected]>
(cherry picked from commit 017ecd0)
Signed-off-by: Joonas Lahtinen <[email protected]>1 parent 6ad2a66 commit bfa71b7
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
439 | 442 | | |
440 | 443 | | |
441 | 444 | | |
442 | 445 | | |
443 | 446 | | |
| 447 | + | |
| 448 | + | |
444 | 449 | | |
445 | 450 | | |
446 | 451 | | |
| |||
1513 | 1518 | | |
1514 | 1519 | | |
1515 | 1520 | | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1516 | 1524 | | |
1517 | 1525 | | |
1518 | 1526 | | |
| |||
1550 | 1558 | | |
1551 | 1559 | | |
1552 | 1560 | | |
1553 | | - | |
1554 | | - | |
| 1561 | + | |
1555 | 1562 | | |
1556 | 1563 | | |
1557 | 1564 | | |
| |||
0 commit comments