aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Kazlauskas <[email protected]>2019-10-11 12:26:10 -0400
committerAlex Deucher <[email protected]>2019-10-25 16:50:07 -0400
commit0e3a7c2ec93b15f43a2653e52e9608484391aeaf (patch)
tree1dc8f3e0e97a30220b391e0ccdfd3a7a3ba40fbe
parent73469970a9bb09baff681012905fe956e18d981a (diff)
drm/amd/display: Free gamma after calculating legacy transfer function
[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 <[email protected]> Reviewed-by: Leo Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
index b43bb7f90e4e..2233d293a707 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
@@ -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;
}