Commit 8cb2f67
drm/amd/display: Fix handling of plane refcount
commit 27227a2 upstream.
[Why]
The mechanism to backup and restore plane states doesn't maintain
refcount, which can cause issues if the refcount of the plane changes
in between backup and restore operations, such as memory leaks if the
refcount was supposed to go down, or double frees / invalid memory
accesses if the refcount was supposed to go up.
[How]
Cache and re-apply current refcount when restoring plane states.
Cc: [email protected]
Reviewed-by: Josip Pavic <[email protected]>
Signed-off-by: Joshua Aberback <[email protected]>
Signed-off-by: Hamza Mahfooz <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 08e5f8e commit 8cb2f67
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3066 | 3066 | | |
3067 | 3067 | | |
3068 | 3068 | | |
| 3069 | + | |
| 3070 | + | |
3069 | 3071 | | |
| 3072 | + | |
3070 | 3073 | | |
3071 | 3074 | | |
3072 | 3075 | | |
| |||
0 commit comments