gator: Version 5.19
[firefly-linux-kernel-4.4.55.git] / drivers / gator / mali / mali_dd_gator_api.h
1 #if !defined(MALI_DDK_GATOR_API_VERSION)
2         #define MALI_DDK_GATOR_API_VERSION 3
3 #endif
4 #if !defined(MALI_TRUE)
5         #define MALI_TRUE                ((unsigned int)1)
6 #endif
7
8 #if !defined(MALI_FALSE)
9         #define MALI_FALSE               ((unsigned int)0)
10 #endif
11
12 struct mali_dd_hwcnt_info {
13
14         /* Passed from Gator to kbase */
15         //u32 in_mali_dd_hwcnt_version;
16         unsigned short int bitmask[4];
17
18         /* Passed from kbase to Gator */
19
20         /* ptr to counter dump memory */
21         void *kernel_dump_buffer;
22
23         /* size of counter dump memory */
24         unsigned int size;
25
26         unsigned int gpu_id;
27
28         unsigned int nr_cores;
29
30         unsigned int nr_core_groups;
31
32         /* The cached present bitmaps - these are the same as the corresponding hardware registers*/
33         unsigned long int shader_present_bitmap;
34 };
35
36 struct mali_dd_hwcnt_handles;
37 extern struct mali_dd_hwcnt_handles* mali_dd_hwcnt_init(struct mali_dd_hwcnt_info *in_out_info);
38 extern void mali_dd_hwcnt_clear(struct mali_dd_hwcnt_info *in_out_info, struct mali_dd_hwcnt_handles *opaque_handles);
39 extern unsigned int kbase_dd_instr_hwcnt_dump_complete(struct mali_dd_hwcnt_handles *opaque_handles, unsigned int * const success);
40 extern unsigned int kbase_dd_instr_hwcnt_dump_irq(struct mali_dd_hwcnt_handles *opaque_handles);