The display driver model consists of the display common driver layer, SoC adapter layer, and LCD panel driver layer. The HDF-based display driver model shields the differences between kernel forms through platform and OSAL APIs so that the LCD driver can be easily ported across OSs and chip platforms. The display driver model connects to the display common Hardware Abstraction Layer (HAL), supports the implementation of the Hardware Device Interface (HDI), and provides various driver capability interfaces for graphics services through the Display-HDI.
...
...
@@ -47,7 +46,7 @@ The LCD interfaces include the Mobile Industry Processor Interface (MIPI) Displa
![](figures/ttl-interface.png "ttl-interface")
TTL level signals are generated by TTL devices, which are a major type of digital integrated circuits. TTL devices are manufactured using the bipolar process and feature high speed, low power consumption, and diversified types.
TTL level signals are generated by TTL devices, which are a major type of digital integrated circuits. TTL devices are manufactured using the bipolar process and feature high speed, low power consumption, and diversified types.
The TTL interface is used to transmit data in parallel mode under control signals. It transmits data signals, clock signals, and control signals (such as line synchronization signals, frame synchronization signals, and data validity signals). For the LCD with the TTL, additional peripheral interfaces, such as the Serial Peripheral Interface (SPI) and Inter-Integrated Circuit (I2C), are required for the read and write of the internal registers.
...
...
@@ -208,17 +207,17 @@ The following uses the Hi35xx series chips as an example to describe how to perf
```c++
struct PanelInfo {
uint32_t width;
uint32_t height;
uint32_t hbp;
uint32_t hfp;
uint32_t hsw;
uint32_t vbp;
uint32_t vfp;
uint32_t vsw;
uint32_t frameRate;
enum LcdIntfType intfType;
enum IntfSync intfSync;
uint32_t width; // Width
uint32_t height; // Height
uint32_t hbp; // Horizontal back porch
uint32_t hfp; // Horizontal front porch
uint32_t hsw; // Horizontal synchronization width
uint32_t vbp; // Vertical back porch
uint32_t vfp; // Vertical front porch
uint32_t vsw; // Vertial synchronization width
uint32_t frameRate; // Frame rate
enum LcdIntfType intfType; // LCD interface type
enum IntfSync intfSync; // User timing parameter
struct MipiDsiDesc mipi;
struct BlkDesc blk;
struct PwmCfg pwm;
...
...
@@ -263,11 +262,13 @@ The following uses the Hi35xx series chips as an example to describe how to perf
static int32_t LcdResetOn(void)
{
int32_t ret;
/* Set the pin direction. */
ret = GpioSetDir(RESET_GPIO, GPIO_DIR_OUT);
if (ret != HDF_SUCCESS) {
HDF_LOGE("GpioSetDir failure, ret:%d", ret);
return HDF_FAILURE;
}
/* Write the GPIO. */
ret = GpioWrite(RESET_GPIO, GPIO_VAL_HIGH);
if (ret != HDF_SUCCESS) {
HDF_LOGE("GpioWrite failure, ret:%d", ret);
...
...
@@ -282,6 +283,7 @@ The following uses the Hi35xx series chips as an example to describe how to perf
- Initialize the entry function of the device driver.