]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Don't leak memory when updating streams
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Mon, 28 Jan 2019 14:00:52 +0000 (09:00 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Jan 2019 16:45:24 +0000 (11:45 -0500)
commitdfa4d9de58fe97e31afe67fec7759f1348cf0710
treea7496b7d0d4fb96fd50bb55818cf35bd30603910
parent0570bb3b041bc73009dfe44fbb9cc5286f7bc6bc
drm/amd/display: Don't leak memory when updating streams

[Why]
The flip and full structures were allocated but never freed.

[How]
Free them at the end of the function. There's a small behavioral
change here with the function returning early if the allocation fails
but we wouldn't should be doing anything in that case anyway.

Fixes: c00e0cc0fdc0 ("drm/amd/display: Call into DC once per multiplane flip")
Fixes: ea39594e0855 ("drm/amd/display: Perform plane updates only when needed")
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c