Commit c42c275c authored by Yue Hin Lau's avatar Yue Hin Lau Committed by Alex Deucher

drm/amd/display: cleaning up hubp for dcn

removing duplicate functions, renaming struct mi_regs, etc.
Signed-off-by: default avatarYue Hin Lau <Yuehin.Lau@amd.com>
Reviewed-by: default avatarAndrey Grodzovsky <Andrey.Grodzovsky@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e643b1d5
......@@ -29,14 +29,14 @@
#include "dcn10_hubp.h"
#define REG(reg)\
hubp1->mi_regs->reg
hubp1->hubp_regs->reg
#define CTX \
hubp1->base.ctx
#undef FN
#define FN(reg_name, field_name) \
hubp1->mi_shift->field_name, hubp1->mi_mask->field_name
hubp1->hubp_shift->field_name, hubp1->hubp_mask->field_name
void hubp1_set_blank(struct hubp *hubp, bool blank)
{
......@@ -943,15 +943,15 @@ void dcn10_hubp_construct(
struct dcn10_hubp *hubp1,
struct dc_context *ctx,
uint32_t inst,
const struct dcn_mi_registers *mi_regs,
const struct dcn_mi_shift *mi_shift,
const struct dcn_mi_mask *mi_mask)
const struct dcn_mi_registers *hubp_regs,
const struct dcn_mi_shift *hubp_shift,
const struct dcn_mi_mask *hubp_mask)
{
hubp1->base.funcs = &dcn10_hubp_funcs;
hubp1->base.ctx = ctx;
hubp1->mi_regs = mi_regs;
hubp1->mi_shift = mi_shift;
hubp1->mi_mask = mi_mask;
hubp1->hubp_regs = hubp_regs;
hubp1->hubp_shift = hubp_shift;
hubp1->hubp_mask = hubp_mask;
hubp1->base.inst = inst;
hubp1->base.opp_id = 0xf;
hubp1->base.mpcc_id = 0xf;
......
......@@ -367,25 +367,25 @@ static const struct bios_registers bios_regs = {
NBIO_SR(BIOS_SCRATCH_6)
};
#define mi_regs(id)\
#define hubp_regs(id)\
[id] = {\
MI_REG_LIST_DCN10(id)\
HUBP_REG_LIST_DCN10(id)\
}
static const struct dcn_mi_registers mi_regs[] = {
mi_regs(0),
mi_regs(1),
mi_regs(2),
mi_regs(3),
static const struct dcn_mi_registers hubp_regs[] = {
hubp_regs(0),
hubp_regs(1),
hubp_regs(2),
hubp_regs(3),
};
static const struct dcn_mi_shift mi_shift = {
MI_MASK_SH_LIST_DCN10(__SHIFT)
static const struct dcn_mi_shift hubp_shift = {
HUBP_MASK_SH_LIST_DCN10(__SHIFT)
};
static const struct dcn_mi_mask mi_mask = {
MI_MASK_SH_LIST_DCN10(_MASK)
static const struct dcn_mi_mask hubp_mask = {
HUBP_MASK_SH_LIST_DCN10(_MASK)
};
#define clk_src_regs(index, pllid)\
......@@ -768,7 +768,7 @@ static struct hubp *dcn10_hubp_create(
return NULL;
dcn10_hubp_construct(hubp1, ctx, inst,
&mi_regs[inst], &mi_shift, &mi_mask);
&hubp_regs[inst], &hubp_shift, &hubp_mask);
return &hubp1->base;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment