Skip to contentSkip to conversation

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

PATCH In review [email protected] 2 participants 2 messages Apr 6, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

From: "Leo (Sunpeng) Li" <[email protected]>

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

Author: Anthony Koo <[email protected]>
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.

Change-Id I9f43d71e5018947ed3e3b6b2bb56cd87fbf06b32
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -8
index a3ca21b..689380d 100644
@@ -2053,7 +2053,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev,
 	const struct amdgpu_framebuffer *amdgpu_fb =
 		to_amdgpu_framebuffer(plane_state->fb);
 	const struct drm_crtc *crtc = plane_state->crtc;
-	struct dc_transfer_func *input_tf;
 	int ret = 0;
 
 	if (!fill_rects_from_plane_state(plane_state, dc_plane_state))
@@ -2067,13 +2066,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev,
 	if (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
 	 * every time.
Signature · 6 lines
2.7.4

_______________________________________________
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): 1523044191-30968-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 5 lines · On 2018-04-06 03:49 PM, [email protected] wrote:

From: "Leo (Sunpeng) Li" <[email protected]>

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

Quoted 8 lines

Author: Anthony Koo <[email protected]>
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.

Change-Id I9f43d71e5018947ed3e3b6b2bb56cd87fbf06b32

I'll merge it to amd-stg with this week's promotion (the one that introduced the bug). I'll drop the Change-Id when I do.

Harry

Quoted 21 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index a3ca21b..689380d 100644
@@ -2053,7 +2053,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev,
 	const struct amdgpu_framebuffer *amdgpu_fb =
 		to_amdgpu_framebuffer(plane_state->fb);
 	const struct drm_crtc *crtc = plane_state->crtc;
-	struct dc_transfer_func *input_tf;
 	int ret = 0;
 
 	if (!fill_rects_from_plane_state(plane_state, dc_plane_state))
@@ -2067,13 +2066,6 @@ static int fill_plane_attributes(struct amdgpu_device *adev,
 	if (ret)
 		return ret;
 

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int fill_plane_attributes(struct amdgpu_device *adev, · line 2071

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -7
-	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
 	 * every time.

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx