drm/amd/display: Free gamma after calculating legacy transfer function
Subsystems (3)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +2 -0
@@ -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 ; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191011162610.1112-1-nicholas.kazlauskas-5C7GfCeVMHo@public.gmane.org
Li, Sun peng (Leo)
Reviewed-by Leo LiQuoted 4 lines · Nicholas Kazlauskas
[Why]
We're leaking memory by not freeing the gamma used to calculate the transfer function for legacy gamma.
Quoted 8 lines
[How]
Release the gamma after we're done with it.Cc Philip Yang <[email protected]>Cc Harry Wentland <[email protected]>Cc Bhawanpreet Lakha <[email protected]>Cc Leo Li <[email protected]>Signed-off-by Nicholas Kazlauskas <[email protected]
Thanks!
Quoted 10 lines
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +0
-0
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c static int __set_legacy_tf(struct dc_transfer_func *func, · line 217
Quoted 8 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +2
-0@@ -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 ; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx