Lines Matching refs:this

59 static void __gfxpll_rreg(struct loongson_gfxpll *this,  in __gfxpll_rreg()  argument
63 reg->d = readq(this->mmio); in __gfxpll_rreg()
65 reg->w[0] = readl(this->mmio); in __gfxpll_rreg()
66 reg->w[1] = readl(this->mmio + 4); in __gfxpll_rreg()
72 static int loongson_gfxpll_update(struct loongson_gfxpll * const this, in loongson_gfxpll_update() argument
80 static void loongson_gfxpll_get_rates(struct loongson_gfxpll * const this, in loongson_gfxpll_get_rates() argument
85 struct loongson_gfxpll_parms *pparms = &this->parms; in loongson_gfxpll_get_rates()
92 __gfxpll_rreg(this, &gfxpll_reg); in loongson_gfxpll_get_rates()
117 static void loongson_gfxpll_print(struct loongson_gfxpll * const this, in loongson_gfxpll_print() argument
121 struct loongson_gfxpll_parms *parms = &this->parms; in loongson_gfxpll_print()
134 this->funcs->get_rates(this, &dc, &gmc, &gpu); in loongson_gfxpll_print()
143 struct loongson_gfxpll *this = (struct loongson_gfxpll *)data; in loongson_gfxpll_fini() local
145 iounmap(this->mmio); in loongson_gfxpll_fini()
147 kfree(this); in loongson_gfxpll_fini()
150 static int loongson_gfxpll_init(struct loongson_gfxpll * const this) in loongson_gfxpll_init() argument
152 struct loongson_gfxpll_parms *pparms = &this->parms; in loongson_gfxpll_init()
153 struct drm_printer printer = drm_info_printer(this->ddev->dev); in loongson_gfxpll_init()
157 this->mmio = ioremap(this->reg_base, this->reg_size); in loongson_gfxpll_init()
158 if (IS_ERR_OR_NULL(this->mmio)) in loongson_gfxpll_init()
161 this->funcs->print(this, &printer, false); in loongson_gfxpll_init()
178 struct loongson_gfxpll *this; in loongson_gfxpll_create() local
181 this = kzalloc(sizeof(*this), GFP_KERNEL); in loongson_gfxpll_create()
182 if (IS_ERR_OR_NULL(this)) in loongson_gfxpll_create()
185 this->ddev = ddev; in loongson_gfxpll_create()
186 this->reg_size = gfx->gfxpll.reg_size; in loongson_gfxpll_create()
187 this->reg_base = gfx->conf_reg_base + gfx->gfxpll.reg_offset; in loongson_gfxpll_create()
188 this->funcs = &lsdc_gmc_gpu_funcs; in loongson_gfxpll_create()
190 ret = this->funcs->init(this); in loongson_gfxpll_create()
192 kfree(this); in loongson_gfxpll_create()
196 *ppout = this; in loongson_gfxpll_create()
198 return drmm_add_action_or_reset(ddev, loongson_gfxpll_fini, this); in loongson_gfxpll_create()