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: stable@vger.kernel.org
Reviewed-by: Josip Pavic <josip.pavic@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>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