summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
index 3ae787a377b1..1a63eaf5e1d9 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
@@ -918,7 +918,7 @@ static struct dpp *dcn31_dpp_create(
uint32_t inst)
{
struct dcn3_dpp *dpp =
- kzalloc(sizeof(struct dcn3_dpp), GFP_KERNEL);
+ kzalloc_obj(struct dcn3_dpp, GFP_KERNEL);
if (!dpp)
return NULL;
@@ -936,7 +936,7 @@ static struct output_pixel_processor *dcn31_opp_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_opp *opp =
- kzalloc(sizeof(struct dcn20_opp), GFP_KERNEL);
+ kzalloc_obj(struct dcn20_opp, GFP_KERNEL);
if (!opp) {
BREAK_TO_DEBUGGER();
@@ -953,7 +953,7 @@ static struct dce_aux *dcn31_aux_engine_create(
uint32_t inst)
{
struct aux_engine_dce110 *aux_engine =
- kzalloc(sizeof(struct aux_engine_dce110), GFP_KERNEL);
+ kzalloc_obj(struct aux_engine_dce110, GFP_KERNEL);
if (!aux_engine)
return NULL;
@@ -990,7 +990,7 @@ static struct dce_i2c_hw *dcn31_i2c_hw_create(
uint32_t inst)
{
struct dce_i2c_hw *dce_i2c_hw =
- kzalloc(sizeof(struct dce_i2c_hw), GFP_KERNEL);
+ kzalloc_obj(struct dce_i2c_hw, GFP_KERNEL);
if (!dce_i2c_hw)
return NULL;
@@ -1005,8 +1005,7 @@ static struct mpc *dcn31_mpc_create(
int num_mpcc,
int num_rmu)
{
- struct dcn30_mpc *mpc30 = kzalloc(sizeof(struct dcn30_mpc),
- GFP_KERNEL);
+ struct dcn30_mpc *mpc30 = kzalloc_obj(struct dcn30_mpc, GFP_KERNEL);
if (!mpc30)
return NULL;
@@ -1025,8 +1024,8 @@ static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
{
int i;
- struct dcn20_hubbub *hubbub3 = kzalloc(sizeof(struct dcn20_hubbub),
- GFP_KERNEL);
+ struct dcn20_hubbub *hubbub3 = kzalloc_obj(struct dcn20_hubbub,
+ GFP_KERNEL);
if (!hubbub3)
return NULL;
@@ -1058,7 +1057,7 @@ static struct timing_generator *dcn31_timing_generator_create(
uint32_t instance)
{
struct optc *tgn10 =
- kzalloc(sizeof(struct optc), GFP_KERNEL);
+ kzalloc_obj(struct optc, GFP_KERNEL);
if (!tgn10)
return NULL;
@@ -1092,7 +1091,7 @@ static struct link_encoder *dcn31_link_encoder_create(
const struct encoder_init_data *enc_init_data)
{
struct dcn20_link_encoder *enc20 =
- kzalloc(sizeof(struct dcn20_link_encoder), GFP_KERNEL);
+ kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
if (!enc20 || enc_init_data->hpd_source >= ARRAY_SIZE(link_enc_hpd_regs))
return NULL;
@@ -1121,7 +1120,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
return NULL;
- enc20 = kzalloc(sizeof(struct dcn20_link_encoder), GFP_KERNEL);
+ enc20 = kzalloc_obj(struct dcn20_link_encoder, GFP_KERNEL);
if (!enc20)
return NULL;
@@ -1138,7 +1137,7 @@ static struct link_encoder *dcn31_link_enc_create_minimal(
static struct panel_cntl *dcn31_panel_cntl_create(const struct panel_cntl_init_data *init_data)
{
struct dcn31_panel_cntl *panel_cntl =
- kzalloc(sizeof(struct dcn31_panel_cntl), GFP_KERNEL);
+ kzalloc_obj(struct dcn31_panel_cntl, GFP_KERNEL);
if (!panel_cntl)
return NULL;
@@ -1168,7 +1167,7 @@ static struct vpg *dcn31_vpg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_vpg *vpg31 = kzalloc(sizeof(struct dcn31_vpg), GFP_KERNEL);
+ struct dcn31_vpg *vpg31 = kzalloc_obj(struct dcn31_vpg, GFP_KERNEL);
if (!vpg31)
return NULL;
@@ -1185,7 +1184,7 @@ static struct afmt *dcn31_afmt_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_afmt *afmt31 = kzalloc(sizeof(struct dcn31_afmt), GFP_KERNEL);
+ struct dcn31_afmt *afmt31 = kzalloc_obj(struct dcn31_afmt, GFP_KERNEL);
if (!afmt31)
return NULL;
@@ -1204,7 +1203,7 @@ static struct apg *dcn31_apg_create(
struct dc_context *ctx,
uint32_t inst)
{
- struct dcn31_apg *apg31 = kzalloc(sizeof(struct dcn31_apg), GFP_KERNEL);
+ struct dcn31_apg *apg31 = kzalloc_obj(struct dcn31_apg, GFP_KERNEL);
if (!apg31)
return NULL;
@@ -1236,7 +1235,7 @@ static struct stream_encoder *dcn315_stream_encoder_create(
vpg_inst = eng_id;
afmt_inst = eng_id;
- enc1 = kzalloc(sizeof(struct dcn10_stream_encoder), GFP_KERNEL);
+ enc1 = kzalloc_obj(struct dcn10_stream_encoder, GFP_KERNEL);
vpg = dcn31_vpg_create(ctx, vpg_inst);
afmt = dcn31_afmt_create(ctx, afmt_inst);
@@ -1286,7 +1285,8 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
apg_inst = hpo_dp_inst;
/* allocate HPO stream encoder and create VPG sub-block */
- hpo_dp_enc31 = kzalloc(sizeof(struct dcn31_hpo_dp_stream_encoder), GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_stream_encoder,
+ GFP_KERNEL);
vpg = dcn31_vpg_create(ctx, vpg_inst);
apg = dcn31_apg_create(ctx, apg_inst);
@@ -1312,7 +1312,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
struct dcn31_hpo_dp_link_encoder *hpo_dp_enc31;
/* allocate HPO link encoder */
- hpo_dp_enc31 = kzalloc(sizeof(struct dcn31_hpo_dp_link_encoder), GFP_KERNEL);
+ hpo_dp_enc31 = kzalloc_obj(struct dcn31_hpo_dp_link_encoder, GFP_KERNEL);
if (!hpo_dp_enc31)
return NULL; /* out of memory */
@@ -1326,7 +1326,7 @@ static struct hpo_dp_link_encoder *dcn31_hpo_dp_link_encoder_create(
static struct dce_hwseq *dcn31_hwseq_create(
struct dc_context *ctx)
{
- struct dce_hwseq *hws = kzalloc(sizeof(struct dce_hwseq), GFP_KERNEL);
+ struct dce_hwseq *hws = kzalloc_obj(struct dce_hwseq, GFP_KERNEL);
if (hws) {
hws->ctx = ctx;
@@ -1500,7 +1500,7 @@ static struct hubp *dcn31_hubp_create(
uint32_t inst)
{
struct dcn20_hubp *hubp2 =
- kzalloc(sizeof(struct dcn20_hubp), GFP_KERNEL);
+ kzalloc_obj(struct dcn20_hubp, GFP_KERNEL);
if (!hubp2)
return NULL;
@@ -1520,8 +1520,8 @@ static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool
uint32_t pipe_count = pool->res_cap->num_dwb;
for (i = 0; i < pipe_count; i++) {
- struct dcn30_dwbc *dwbc30 = kzalloc(sizeof(struct dcn30_dwbc),
- GFP_KERNEL);
+ struct dcn30_dwbc *dwbc30 = kzalloc_obj(struct dcn30_dwbc,
+ GFP_KERNEL);
if (!dwbc30) {
dm_error("DC: failed to create dwbc30!\n");
@@ -1545,8 +1545,8 @@ static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *
uint32_t pipe_count = pool->res_cap->num_dwb;
for (i = 0; i < pipe_count; i++) {
- struct dcn30_mmhubbub *mcif_wb30 = kzalloc(sizeof(struct dcn30_mmhubbub),
- GFP_KERNEL);
+ struct dcn30_mmhubbub *mcif_wb30 = kzalloc_obj(struct dcn30_mmhubbub,
+ GFP_KERNEL);
if (!mcif_wb30) {
dm_error("DC: failed to create mcif_wb30!\n");
@@ -1568,7 +1568,7 @@ static struct display_stream_compressor *dcn31_dsc_create(
struct dc_context *ctx, uint32_t inst)
{
struct dcn20_dsc *dsc =
- kzalloc(sizeof(struct dcn20_dsc), GFP_KERNEL);
+ kzalloc_obj(struct dcn20_dsc, GFP_KERNEL);
if (!dsc) {
BREAK_TO_DEBUGGER();
@@ -1596,7 +1596,7 @@ static struct clock_source *dcn31_clock_source_create(
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
- kzalloc(sizeof(struct dce110_clk_src), GFP_KERNEL);
+ kzalloc_obj(struct dce110_clk_src, GFP_KERNEL);
if (!clk_src)
return NULL;
@@ -2167,7 +2167,7 @@ struct resource_pool *dcn315_create_resource_pool(
struct dc *dc)
{
struct dcn315_resource_pool *pool =
- kzalloc(sizeof(struct dcn315_resource_pool), GFP_KERNEL);
+ kzalloc_obj(struct dcn315_resource_pool, GFP_KERNEL);
if (!pool)
return NULL;