On Mon, Jul 29, 2019 at 10:43 PM Kevin Wang <[email protected]> wrote: > > > On 7/30/19 4:14 AM, Alex Deucher wrote: > > From: Evan Quan <[email protected]> > > > > Initialize arcturus SMU metrics table. > > > > Signed-off-by: Evan Quan <[email protected]> > > Reviewed-by: Kevin Wang <[email protected]> > > Reviewed-by: Alex Deucher <[email protected]> > > Signed-off-by: Alex Deucher <[email protected]> > > --- > > drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c > > b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c > > index a0644ef267a9..5f911f092311 100644 > > --- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c > > +++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c > > @@ -267,6 +267,8 @@ static int arcturus_get_workload_type(struct > > smu_context *smu, enum PP_SMC_POWER > > > > static int arcturus_tables_init(struct smu_context *smu, struct smu_table > > *tables) > > { > > + struct smu_table_context *smu_table = &smu->smu_table; > > + > > SMU_TABLE_INIT(tables, SMU_TABLE_PPTABLE, sizeof(PPTable_t), > > PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); > > > > @@ -276,6 +278,11 @@ static int arcturus_tables_init(struct smu_context > > *smu, struct smu_table *table > > SMU_TABLE_INIT(tables, SMU_TABLE_SMU_METRICS, sizeof(SmuMetrics_t), > > PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM); > > > > + smu_table->metrics_table = kzalloc(sizeof(SmuMetrics_t), GFP_KERNEL); > > [kevin]: where is do free operation in driver code ?
It's freed in smu_v11_0_fini_smc_tables() Alex > > + if (!smu_table->metrics_table) > > + return -ENOMEM; > > + smu_table->metrics_time = 0; > > + > > return 0; > > } > > _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
