summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2017-09-27 10:53:50 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-28 16:46:15 -0400
commit2004f45ef83f07f43f5da6ede780b08068c7583d (patch)
tree011ac2087c8a8c9272a4c4c5eaacd69d44c2319a /drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
parent82b400a62f2fd42b87f91a298c5641d0ead99251 (diff)
downloadlinux-2004f45ef83f07f43f5da6ede780b08068c7583d.tar.gz
linux-2004f45ef83f07f43f5da6ede780b08068c7583d.tar.bz2
linux-2004f45ef83f07f43f5da6ede780b08068c7583d.zip
drm/amd/display: Use kernel alloc/free
Abstractions are frowned upon. cocci script: virtual context virtual patch virtual org virtual report @@ expression ptr; @@ - dm_alloc(ptr) + kzalloc(ptr, GFP_KERNEL) @@ expression ptr, size; @@ - dm_realloc(ptr, size) + krealloc(ptr, size, GFP_KERNEL) @@ expression ptr; @@ - dm_free(ptr) + kfree(ptr) v2: use GFP_KERNEL, not GFP_ATOMIC. add cocci script Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
index 1b0f64756be6..91f43a1b88ee 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c
@@ -481,8 +481,8 @@ static void dcn_dml_wm_override(
{
int i, in_idx, active_count;
- struct _vcs_dpi_display_e2e_pipe_params_st *input = dm_alloc(pool->pipe_count *
- sizeof(struct _vcs_dpi_display_e2e_pipe_params_st));
+ struct _vcs_dpi_display_e2e_pipe_params_st *input = kzalloc(pool->pipe_count * sizeof(struct _vcs_dpi_display_e2e_pipe_params_st),
+ GFP_KERNEL);
struct wm {
double urgent;
struct _vcs_dpi_cstate_pstate_watermarks_st cpstate;
@@ -560,7 +560,7 @@ static void dcn_dml_wm_override(
pipe->plane_state->flip_immediate);
in_idx++;
}
- dm_free(input);
+ kfree(input);
}
static void split_stream_across_pipes(