Skip to content

Commit 99145f8

Browse files
committed
staging: vchiq_arm: Add TODO for some explanations
There is still an open TODO about some high-level descriptions mostly related to the VideoCore interface (ABI, IOCTL) and the thread architecture. This should be more helpful than a separate document describing VCHIQ. Signed-off-by: Stefan Wahren <[email protected]>
1 parent 1078a2e commit 99145f8

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
What: /dev/vchiq
2+
Date: October 2016
3+
KernelVersion: 4.9
4+
5+
Description:
6+
The ioctl interface for the VCHIQ character device.
7+
Following actions are supported:
8+
9+
/* TODO: Please explain each IOCTL in short */
10+
11+
* VCHIQ_IOC_CONNECT:
12+
13+
* VCHIQ_IOC_SHUTDOWN:
14+
15+
* VCHIQ_IOC_CREATE_SERVICE:
16+
17+
* VCHIQ_IOC_REMOVE_SERVICE:
18+
19+
* VCHIQ_IOC_QUEUE_MESSAGE:
20+
21+
* VCHIQ_IOC_QUEUE_BULK_TRANSMIT:
22+
23+
* VCHIQ_IOC_QUEUE_BULK_RECEIVE:
24+
25+
* VCHIQ_IOC_AWAIT_COMPLETION:
26+
27+
* VCHIQ_IOC_DEQUEUE_MESSAGE:
28+
29+
* VCHIQ_IOC_GET_CLIENT_ID:
30+
31+
* VCHIQ_IOC_GET_CONFIG:
32+
33+
* VCHIQ_IOC_CLOSE_SERVICE:
34+
35+
* VCHIQ_IOC_USE_SERVICE:
36+
37+
* VCHIQ_IOC_RELEASE_SERVICE:
38+
39+
* VCHIQ_IOC_SET_SERVICE_OPTION:
40+
41+
* VCHIQ_IOC_DUMP_PHYS_MEM:
42+
43+
* VCHIQ_IOC_LIB_VERSION:
44+
45+
* VCHIQ_IOC_CLOSE_DELIVERED:

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ static const struct vchiq_platform_info bcm2711_info = {
8383

8484
struct vchiq_arm_state {
8585
/* Keepalive-related data */
86+
/* TODO: Please elaborate the purpose of this thread
87+
* What needs to be kept alive?
88+
*/
8689
struct task_struct *ka_thread;
8790
struct completion ka_evt;
8891
atomic_t ka_use_count;

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ struct vchiq_slot_info {
174174
short release_count;
175175
};
176176

177+
/* TODO: Please explain the meaning of "service" in the context of VCHIQ */
177178
struct vchiq_service {
178179
struct vchiq_service_base base;
179180
unsigned int handle;
@@ -289,6 +290,10 @@ struct vchiq_shared_state {
289290
int debug[DEBUG_MAX];
290291
};
291292

293+
/*
294+
* TODO: Mark all structs which are shared with the VideoCore and must not
295+
* be modified (ABI)
296+
*/
292297
struct vchiq_slot_zero {
293298
int magic;
294299
short version;
@@ -325,12 +330,17 @@ struct vchiq_state {
325330
struct vchiq_instance **instance;
326331

327332
/* Processes incoming messages */
333+
/* TODO: This is the only thread which handles incoming messages
334+
* or just asynchronous messages ?
335+
*/
328336
struct task_struct *slot_handler_thread;
329337

330338
/* Processes recycled slots */
339+
/* TODO: Please elaborate more ... (purpose) */
331340
struct task_struct *recycle_thread;
332341

333342
/* Processes synchronous messages */
343+
/* TODO: Please elaborate more ... (direction, purpose) */
334344
struct task_struct *sync_thread;
335345

336346
/* Local implementation of the trigger remote event */

0 commit comments

Comments
 (0)