forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.h
....@@ -29,45 +29,28 @@
2929 #include "kfd_priv.h"
3030
3131 /**
32
- * struct kernel_queue_ops
33
- *
34
- * @initialize: Initialize a kernel queue, including allocations of GART memory
35
- * needed for the queue.
36
- *
37
- * @uninitialize: Uninitialize a kernel queue and free all its memory usages.
38
- *
39
- * @acquire_packet_buffer: Returns a pointer to the location in the kernel
32
+ * kq_acquire_packet_buffer: Returns a pointer to the location in the kernel
4033 * queue ring buffer where the calling function can write its packet. It is
4134 * Guaranteed that there is enough space for that packet. It also updates the
4235 * pending write pointer to that location so subsequent calls to
4336 * acquire_packet_buffer will get a correct write pointer
4437 *
45
- * @submit_packet: Update the write pointer and doorbell of a kernel queue.
38
+ * kq_submit_packet: Update the write pointer and doorbell of a kernel queue.
4639 *
47
- * @sync_with_hw: Wait until the write pointer and the read pointer of a kernel
48
- * queue are equal, which means the CP has read all the submitted packets.
49
- *
50
- * @rollback_packet: This routine is called if we failed to build an acquired
40
+ * kq_rollback_packet: This routine is called if we failed to build an acquired
5141 * packet for some reason. It just overwrites the pending wptr with the current
5242 * one
5343 *
5444 */
55
-struct kernel_queue_ops {
56
- bool (*initialize)(struct kernel_queue *kq, struct kfd_dev *dev,
57
- enum kfd_queue_type type, unsigned int queue_size);
58
- void (*uninitialize)(struct kernel_queue *kq);
59
- int (*acquire_packet_buffer)(struct kernel_queue *kq,
60
- size_t packet_size_in_dwords,
61
- unsigned int **buffer_ptr);
6245
63
- void (*submit_packet)(struct kernel_queue *kq);
64
- void (*rollback_packet)(struct kernel_queue *kq);
65
-};
46
+int kq_acquire_packet_buffer(struct kernel_queue *kq,
47
+ size_t packet_size_in_dwords,
48
+ unsigned int **buffer_ptr);
49
+void kq_submit_packet(struct kernel_queue *kq);
50
+void kq_rollback_packet(struct kernel_queue *kq);
51
+
6652
6753 struct kernel_queue {
68
- struct kernel_queue_ops ops;
69
- struct kernel_queue_ops ops_asic_specific;
70
-
7154 /* data */
7255 struct kfd_dev *dev;
7356 struct mqd_manager *mqd_mgr;
....@@ -98,9 +81,5 @@
9881
9982 struct list_head list;
10083 };
101
-
102
-void kernel_queue_init_cik(struct kernel_queue_ops *ops);
103
-void kernel_queue_init_vi(struct kernel_queue_ops *ops);
104
-void kernel_queue_init_v9(struct kernel_queue_ops *ops);
10584
10685 #endif /* KFD_KERNEL_QUEUE_H_ */