From cc64606a535edd9fd96487631f8ef583226fc575 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 21 Jun 2017 12:08:08 -0700 Subject: gpu: nvgpu: debugfs code to dump HAL functions Prints addresses of device-specific HAL functions to debugfs file hal/gops. The list of functions is produced by dumping the contents of the gpu_ops substruct of the gk20a struct. This interface makes the assumption that there are only function pointers in gpu_ops. Companion Python script nvgpu_debug_hal.py analyzes gk20a.h to determine operation counts and prettyify debugfs interface's output. Jira NVGPU-107 Change-Id: I0910e86638d144979e8630bbc5b330bccfd3ad94 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1542990 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 15e81291..121dd962 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -130,6 +130,11 @@ enum gk20a_cbc_op { enum nvgpu_unit; +/* + * gpu_ops should only contain function pointers! Non-function pointer members + * should go in struct gk20a or be implemented with the boolean flag API defined + * in nvgpu/enabled.h + */ struct gpu_ops { struct { int (*determine_L2_size_bytes)(struct gk20a *gk20a); -- cgit v1.2.2