xref: /linux/drivers/accel/ivpu/ivpu_ms.h (revision 27879e8cb6b0fdb5cdcd76685f290729309711c6)
1 /* SPDX-License-Identifier: GPL-2.0-only OR MIT */
2 /*
3  * Copyright (C) 2020-2024 Intel Corporation
4  */
5 #ifndef __IVPU_MS_H__
6 #define __IVPU_MS_H__
7 
8 #include <linux/list.h>
9 
10 struct drm_device;
11 struct drm_file;
12 struct ivpu_bo;
13 struct ivpu_device;
14 struct ivpu_file_priv;
15 
16 struct ivpu_ms_instance {
17 	struct ivpu_bo *bo;
18 	struct list_head ms_instance_node;
19 	u64 mask;
20 	u64 buff_size;
21 	u64 active_buff_vpu_addr;
22 	u64 inactive_buff_vpu_addr;
23 	void *active_buff_ptr;
24 	void *inactive_buff_ptr;
25 	u64 leftover_bytes;
26 	void *leftover_addr;
27 };
28 
29 int ivpu_ms_start_ioctl(struct drm_device *dev, void *data, struct drm_file *file);
30 int ivpu_ms_stop_ioctl(struct drm_device *dev, void *data, struct drm_file *file);
31 int ivpu_ms_get_data_ioctl(struct drm_device *dev, void *data, struct drm_file *file);
32 int ivpu_ms_get_info_ioctl(struct drm_device *dev, void *data, struct drm_file *file);
33 void ivpu_ms_cleanup(struct ivpu_file_priv *file_priv);
34 void ivpu_ms_cleanup_all(struct ivpu_device *vdev);
35 
36 #endif /* __IVPU_MS_H__ */
37