[PATCH 4/4] drm/amdgpu: Remove unnecessary write to type field of drm_plane struct

Kevin Brace kevinbrace at gmx.com
Wed Jun 19 12:28:57 UTC 2019


From: Kevin Brace <kevinbrace at bracecomputerlab.com>

drm_universal_plane_init() of DRM core sets type field of drm_plane
struct.  Hence, it is redundant to do so prior to calling
drm_universal_plane_init().

Signed-off-by: Kevin Brace <kevinbrace at bracecomputerlab.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 003ae68034c6..ee8b8a6d5329 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -1998,7 +1998,6 @@ static int initialize_plane(struct amdgpu_display_manager *dm,
 		DRM_ERROR("KMS: Failed to allocate plane\n");
 		return -ENOMEM;
 	}
-	plane->type = type;

 	/*
 	 * HACK: IGT tests expect that the primary plane for a CRTC
@@ -4390,7 +4389,6 @@ static int amdgpu_dm_crtc_init(struct amdgpu_display_manager *dm,
 	if (!cursor_plane)
 		goto fail;

-	cursor_plane->type = DRM_PLANE_TYPE_CURSOR;
 	res = amdgpu_dm_plane_init(dm, cursor_plane, 0,
 					DRM_PLANE_TYPE_CURSOR, NULL);

--
2.17.1



More information about the amd-gfx mailing list