Skip to content

Commit

Permalink
drm/amd/display: Use plane pointer to avoid line breaks
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Harry Wentland authored and Alex Deucher committed Nov 2, 2017
1 parent 55d9038 commit efa6a8b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,13 +1328,16 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
}

for (i = 0; i < dm->dc->caps.max_planes; i++) {
mode_info->planes[i] = kzalloc(sizeof(struct amdgpu_plane),
GFP_KERNEL);
if (!mode_info->planes[i]) {
struct amdgpu_plane *plane;

plane = kzalloc(sizeof(struct amdgpu_plane), GFP_KERNEL);
mode_info->planes[i] = plane;

if (!plane) {
DRM_ERROR("KMS: Failed to allocate plane\n");
goto fail_free_planes;
}
mode_info->planes[i]->base.type = mode_info->plane_type[i];
plane->base.type = mode_info->plane_type[i];

/*
* HACK: IGT tests expect that each plane can only have one
Expand Down

0 comments on commit efa6a8b

Please sign in to comment.