mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
drm/amd/display: Free gamma after calculating legacy transfer function
[ Upstream commit 0e3a7c2ec93b15f43a2653e52e9608484391aeaf ] [Why] We're leaking memory by not freeing the gamma used to calculate the transfer function for legacy gamma. [How] Release the gamma after we're done with it. Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
252e8b514a
commit
50afba5c12
1 changed files with 2 additions and 0 deletions
|
|
@ -210,6 +210,8 @@ static int __set_legacy_tf(struct dc_transfer_func *func,
|
|||
res = mod_color_calculate_regamma_params(func, gamma, true, has_rom,
|
||||
NULL);
|
||||
|
||||
dc_gamma_release(&gamma);
|
||||
|
||||
return res ? 0 : -ENOMEM;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue