Lines Matching refs:gpu
18 u32 (*sample)(struct etnaviv_gpu *gpu,
40 static u32 perf_reg_read(struct etnaviv_gpu *gpu, in perf_reg_read() argument
44 gpu_write(gpu, domain->profile_config, signal->data); in perf_reg_read()
46 return gpu_read(gpu, domain->profile_read); in perf_reg_read()
49 static u32 pipe_reg_read(struct etnaviv_gpu *gpu, in pipe_reg_read() argument
53 u32 clock = gpu_read(gpu, VIVS_HI_CLOCK_CONTROL); in pipe_reg_read()
57 for (i = 0; i < gpu->identity.pixel_pipes; i++) { in pipe_reg_read()
60 gpu_write(gpu, VIVS_HI_CLOCK_CONTROL, clock); in pipe_reg_read()
61 gpu_write(gpu, domain->profile_config, signal->data); in pipe_reg_read()
62 value += gpu_read(gpu, domain->profile_read); in pipe_reg_read()
68 gpu_write(gpu, VIVS_HI_CLOCK_CONTROL, clock); in pipe_reg_read()
73 static u32 hi_total_cycle_read(struct etnaviv_gpu *gpu, in hi_total_cycle_read() argument
79 if (gpu->identity.model == chipModel_GC880 || in hi_total_cycle_read()
80 gpu->identity.model == chipModel_GC2000 || in hi_total_cycle_read()
81 gpu->identity.model == chipModel_GC2100) in hi_total_cycle_read()
84 return gpu_read(gpu, reg); in hi_total_cycle_read()
87 static u32 hi_total_idle_cycle_read(struct etnaviv_gpu *gpu, in hi_total_idle_cycle_read() argument
93 if (gpu->identity.model == chipModel_GC880 || in hi_total_idle_cycle_read()
94 gpu->identity.model == chipModel_GC2000 || in hi_total_idle_cycle_read()
95 gpu->identity.model == chipModel_GC2100) in hi_total_idle_cycle_read()
98 return gpu_read(gpu, reg); in hi_total_idle_cycle_read()
430 static unsigned int num_pm_domains(const struct etnaviv_gpu *gpu) in num_pm_domains() argument
437 if (gpu->identity.features & meta->feature) in num_pm_domains()
444 static const struct etnaviv_pm_domain *pm_domain(const struct etnaviv_gpu *gpu, in pm_domain() argument
453 if (!(gpu->identity.features & meta->feature)) in pm_domain()
467 int etnaviv_pm_query_dom(struct etnaviv_gpu *gpu, in etnaviv_pm_query_dom() argument
470 const unsigned int nr_domains = num_pm_domains(gpu); in etnaviv_pm_query_dom()
476 dom = pm_domain(gpu, domain->iter); in etnaviv_pm_query_dom()
491 int etnaviv_pm_query_sig(struct etnaviv_gpu *gpu, in etnaviv_pm_query_sig() argument
494 const unsigned int nr_domains = num_pm_domains(gpu); in etnaviv_pm_query_sig()
501 dom = pm_domain(gpu, signal->domain); in etnaviv_pm_query_sig()
537 void etnaviv_perfmon_process(struct etnaviv_gpu *gpu, in etnaviv_perfmon_process() argument
548 val = sig->sample(gpu, dom, sig); in etnaviv_perfmon_process()