blob: 4da14474a3022b50776f067d424343a53eb786c9 [file] [log] [blame]
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _PANFROST_DRM_H_
20#define _PANFROST_DRM_H_
21#include "drm.h"
22#ifdef __cplusplus
23extern "C" {
24#endif
25#define DRM_PANFROST_SUBMIT 0x00
26#define DRM_PANFROST_WAIT_BO 0x01
27#define DRM_PANFROST_CREATE_BO 0x02
28#define DRM_PANFROST_MMAP_BO 0x03
29#define DRM_PANFROST_GET_PARAM 0x04
30#define DRM_PANFROST_GET_BO_OFFSET 0x05
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070031#define DRM_PANFROST_PERFCNT_ENABLE 0x06
32#define DRM_PANFROST_PERFCNT_DUMP 0x07
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070033#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
34#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
35#define DRM_IOCTL_PANFROST_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_CREATE_BO, struct drm_panfrost_create_bo)
36#define DRM_IOCTL_PANFROST_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MMAP_BO, struct drm_panfrost_mmap_bo)
37#define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param)
38#define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070039#define DRM_IOCTL_PANFROST_PERFCNT_ENABLE DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_ENABLE, struct drm_panfrost_perfcnt_enable)
40#define DRM_IOCTL_PANFROST_PERFCNT_DUMP DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_DUMP, struct drm_panfrost_perfcnt_dump)
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070041#define PANFROST_JD_REQ_FS (1 << 0)
42struct drm_panfrost_submit {
43 __u64 jc;
44 __u64 in_syncs;
45 __u32 in_sync_count;
46 __u32 out_sync;
47 __u64 bo_handles;
48 __u32 bo_handle_count;
49 __u32 requirements;
50};
51struct drm_panfrost_wait_bo {
52 __u32 handle;
53 __u32 pad;
54 __s64 timeout_ns;
55};
56struct drm_panfrost_create_bo {
57 __u32 size;
58 __u32 flags;
59 __u32 handle;
60 __u32 pad;
61 __u64 offset;
62};
63struct drm_panfrost_mmap_bo {
64 __u32 handle;
65 __u32 flags;
66 __u64 offset;
67};
68enum drm_panfrost_param {
69 DRM_PANFROST_PARAM_GPU_PROD_ID,
70};
71struct drm_panfrost_get_param {
72 __u32 param;
73 __u32 pad;
74 __u64 value;
75};
76struct drm_panfrost_get_bo_offset {
77 __u32 handle;
78 __u32 pad;
79 __u64 offset;
80};
Christopher Ferrisb8a95e22019-10-02 18:29:20 -070081struct drm_panfrost_perfcnt_enable {
82 __u32 enable;
83 __u32 counterset;
84};
85struct drm_panfrost_perfcnt_dump {
86 __u64 buf_ptr;
87};
Christopher Ferrisaeddbcf2019-07-08 12:45:46 -070088#ifdef __cplusplus
89}
90#endif
91#endif