GNU Linux-libre 4.19.286-gnu1
[releases.git] / drivers / staging / vc04_services / interface / vchi / TODO
1 1) Import drivers using VCHI.
2
3 VCHI is just a tool to let drivers talk to the firmware.  Here are
4 some of the ones we want:
5
6   - vc_mem (https://github.com/raspberrypi/linux/blob/rpi-4.4.y/drivers/char/broadcom/vc_mem.c)
7
8   This driver is what the vcdbg userspace program uses to set up its
9   requests to the firmware, which are transmitted across VCHIQ.  vcdbg
10   is really useful for debugging firmware interactions.
11
12   - VCSM (https://github.com/raspberrypi/linux/tree/rpi-4.4.y/drivers/char/broadcom/vc_sm)
13
14   This driver is used for talking about regions of VC memory across
15   firmware protocols including VCHI.  We'll want to extend this driver
16   to manage these buffers as dmabufs so that we can zero-copy import
17   camera images into vc4 for rendering/display.
18
19 2) Garbage-collect unused code
20
21 One of the reasons this driver wasn't upstreamed previously was that
22 there's a lot code that got built that's probably unnecessary these
23 days.  Once we have the set of VCHI-using drivers we want in tree, we
24 should be able to do a sweep of the code to see what's left that's
25 unused.
26
27 3) Make driver more portable
28
29 Building this driver with arm/multi_v7_defconfig or arm64/defconfig
30 leads to data corruption during the following command: 
31   
32   vchiq_test -f 1
33
34 This should be fixed.
35
36 4) Fix kernel module support
37
38 Even the VPU firmware doesn't support a VCHI re-connect, the driver
39 should properly handle a module unload. This also includes that all
40 resouces must be freed (kthreads, debugfs entries, ...) and global
41 variables avoided.
42
43 5) Cleanup logging mechanism
44
45 The driver should probably be using the standard kernel logging mechanisms
46 such as dev_info, dev_dbg, and friends.
47
48 6) Documentation
49
50 A short top-down description of this driver's architecture (function of
51 kthreads, userspace, limitations) could be very helpful for reviewers.