mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
14348a5c18aeb2f633611c4d6dbb698dea069517
First rather messy version using a mixture of module parameters
and sysfs files via global variables! TODO: Tidy and use debugfs?
These drivers allow short strings to be sent from RP1's MIPI DSI
on VC=0 DT=0x29 with configurable bit-rate and number of lanes;
and for the same to be received by CSI-2 and placed in a buffer.
The test drivers do not use DRM, V4L2 or the ISP-FE. They have
different compatible strings from the "real" drivers and can
rub shoulders with them, provided both are not enabled at once.
The test drivers must be enabled by DTS, which also determines
direction (currently MIPI0 DSI transmit -> MIPI1 CSI-2 receive).
A small change is made in "rp1_dsi_dsi.c" (shared with the real
DSI driver) to enable HS commands; which should not break any
existing (incomplete) functionality, but future changes in
this area are anticipated and may cause merge issues.
Based on my dsi-clocks-v3 branch as it needs changes from there
(on top of the previous change to delay clock startup).
Example DSI -> CSI-2 loopbcak test script (run as root):
#!/bin/bash
anyfail=0
for nl in 2 4; do
for mbps in 80 320 1200 1500; do
string="DSI to CSI-2 loopback test, ${nl} lanes x ${mbps} Mbps"
echo $string
echo $mbps >/sys/module/rp1_csi_test/parameters/mbps
echo $mbps >/sys/module/rp1_dsi_test/parameters/mbps
echo $nl >/sys/module/rp1_csi_test/parameters/num_lanes
echo $nl >/sys/module/rp1_dsi_test/parameters/num_lanes
echo -ne '\0' >/sys/kernel/rp1_dsi_test/rp1_dsi_test # stop DSI
cat /sys/kernel/rp1_dsi_test/rp1_dsi_test >/dev/null # sync
echo -ne '\0' >/sys/kernel/rp1_csi_test/rp1_csi_test # restart CSI-2
cat /sys/kernel/rp1_csi_test/rp1_csi_test >/dev/null # sync
echo -n $string >/sys/kernel/rp1_dsi_test/rp1_dsi_test # start and send DSI
cat /sys/kernel/rp1_dsi_test/rp1_dsi_test >/dev/null # sync
sleep 0.05 # wait for arrival
if ! grep -q "${string}" /sys/kernel/rp1_csi_test/rp1_csi_test; then
echo FAILED FOR $nl $mbps
anyfail=`expr ${anyfail} + 1`
fi
done
done
if [ $anyfail -eq 0 ]; then
echo SUCCESS
else
echo FAILURES: $anyfail
exit 1
fi
Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Linux kernel
There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.
In order to build the documentation, use make htmldocs or
make pdfdocs. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.
Description
Languages
C
97.7%
Assembly
1.3%
Shell
0.3%
Makefile
0.3%
Python
0.2%
Other
0.1%