Commit e405c217 authored by Leo (Sunpeng) Li's avatar Leo (Sunpeng) Li Committed by Alex Deucher

drm/amd/display: Fix memleak on input transfer function

Input transfer function creation is now done when the plane is created.
This is done within the following change:

    Author: Anthony Koo <Anthony.Koo@amd.com>
        drm/amd/display: Have DC manage its own allocation of gamma

Therefore, we no longer need to create it when filling in the plane
attributes.
Signed-off-by: default avatarLeo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 84ffa801
...@@ -2011,7 +2011,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev, ...@@ -2011,7 +2011,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev,
const struct amdgpu_framebuffer *amdgpu_fb = const struct amdgpu_framebuffer *amdgpu_fb =
to_amdgpu_framebuffer(plane_state->fb); to_amdgpu_framebuffer(plane_state->fb);
const struct drm_crtc *crtc = plane_state->crtc; const struct drm_crtc *crtc = plane_state->crtc;
struct dc_transfer_func *input_tf;
int ret = 0; int ret = 0;
if (!fill_rects_from_plane_state(plane_state, dc_plane_state)) if (!fill_rects_from_plane_state(plane_state, dc_plane_state))
...@@ -2025,13 +2024,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev, ...@@ -2025,13 +2024,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev,
if (ret) if (ret)
return ret; return ret;
input_tf = dc_create_transfer_func();
if (input_tf == NULL)
return -ENOMEM;
dc_plane_state->in_transfer_func = input_tf;
/* /*
* Always set input transfer function, since plane state is refreshed * Always set input transfer function, since plane state is refreshed
* every time. * every time.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment