Skip to content

Commit

Permalink
drm/etnaviv: use submit exec_state for perfmon sampling
Browse files Browse the repository at this point in the history
The GPU exec state may have changed at the time when the perfmon sampling
is done, as it reflects the state of the last submission, not the current
GPU execution state.

So for proper sampling we must use the submit exec_state.

Signed-off-by: Lucas Stach <[email protected]>
  • Loading branch information
lynxeye-dev committed Jan 2, 2018
1 parent 797b015 commit 7a9c0fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/etnaviv/etnaviv_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,7 @@ static void sync_point_perfmon_sample(struct etnaviv_gpu *gpu,
const struct etnaviv_perfmon_request *pmr = submit->pmrs + i;

if (pmr->flags == flags)
etnaviv_perfmon_process(gpu, pmr);
etnaviv_perfmon_process(gpu, pmr, submit->exec_state);
}
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/etnaviv/etnaviv_perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@ int etnaviv_pm_req_validate(const struct drm_etnaviv_gem_submit_pmr *r,
}

void etnaviv_perfmon_process(struct etnaviv_gpu *gpu,
const struct etnaviv_perfmon_request *pmr)
const struct etnaviv_perfmon_request *pmr, u32 exec_state)
{
const struct etnaviv_pm_domain_meta *meta = &doms_meta[gpu->exec_state];
const struct etnaviv_pm_domain_meta *meta = &doms_meta[exec_state];
const struct etnaviv_pm_domain *dom;
const struct etnaviv_pm_signal *sig;
u32 *bo = pmr->bo_vma;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/etnaviv/etnaviv_perfmon.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ int etnaviv_pm_req_validate(const struct drm_etnaviv_gem_submit_pmr *r,
u32 exec_state);

void etnaviv_perfmon_process(struct etnaviv_gpu *gpu,
const struct etnaviv_perfmon_request *pmr);
const struct etnaviv_perfmon_request *pmr, u32 exec_state);

#endif /* __ETNAVIV_PERFMON_H__ */

0 comments on commit 7a9c0fe

Please sign in to comment.