Difference between revisions of "RK3566 EBC Reverse-Engineering"
Jump to navigation
Jump to search
m (→rkf_waveform) |
(Add links to reversing efforts) |
||
Line 11: | Line 11: | ||
The files of interest are <code>ebc_dev_v8.S</code>, which implements a DRM (Direct Rendering Manager) driver for the eInk panel, and the waveform files in the <code>epdlut</code> subdirectory. | The files of interest are <code>ebc_dev_v8.S</code>, which implements a DRM (Direct Rendering Manager) driver for the eInk panel, and the waveform files in the <code>epdlut</code> subdirectory. | ||
There's also a | There's also a simple driver for u-boot: [https://github.com/JeffyCN/rockchip_mirrors/tree/u-boot/drivers/video/rk_eink drivers/video/rk_eink at JeffyCN/rockchip_mirrors] | ||
These two drivers show the two different programming interfaces exposed by the TCON. The U-Boot driver operates in "LUT mode": it writes the waveform LUT to registers in the TCON's MMIO space, and passes buffers of ''pixel'' data to the TCON. The Linux driver operates in "direct mode" uses the LUTs to compute waveforms in software, and passes buffers of ''waveform'' data to the TCON. | |||
Some reversing of the downstream Linux driver has been done here: https://github.com/Ralim/ebc-dev-reverse-engineering | |||
== Reimplementation == | |||
A human-readable C reimplementation of the LUT and pixel data path [https://gitlab.com/smaeul/ebc-dev is available from smaeul here]. This provides everything needed to convert a framebuffer and a waveform data file into a series of "frames" for the panel. The new implementation includes a test suite to verify its output matches the output from the BSP assembly code. It is based on the downstream Linux driver. | |||
== In-Development Driver == | == In-Development Driver == | ||
Line 147: | Line 155: | ||
= Reverse-Engineered Stuff = | = Reverse-Engineered Stuff = | ||
Some C source is avaia | |||
== Structs == | == Structs == | ||
Line 154: | Line 164: | ||
<!-- I don't know why mediawiki scuffs the formatting here --> | <!-- I don't know why mediawiki scuffs the formatting here --> | ||
See https://gitlab.com/smaeul/ebc-dev/-/blob/main/auto_image.h#L124, which is based on [https://gitlab.com/pine64-org/quartz-bsp/linux-next/-/commits/2de5fb11a888c37f366642544e5a53ec2faae32d the v1.04 BSP Linux driver]. | |||
=== ebc === | === ebc === | ||
See https://gitlab.com/smaeul/ebc-dev/-/blob/main/auto_image.h#L200, which is based on [https://gitlab.com/pine64-org/quartz-bsp/linux-next/-/commits/2de5fb11a888c37f366642544e5a53ec2faae32d the v1.04 BSP Linux driver]. | |||
=== rkf_waveform === | === rkf_waveform === | ||
Note: all known waveform data files are the "PVI" variant, not the "RKF" variant. | |||
<source lang="c"> | <source lang="c"> |