Configuration Example
This section provides an example to configure the parameters in kernel. The following
code block is an example of the output
file:
{ .dpi_timing = { .pixelclock = 148500000, //div 10, 60 fps .hactive = 1920, //w .hfront_porch = 88, .hback_porch = 148, .hsync_len = 44, .vactive = 1080, //h .vfront_porch = 34, .vback_porch = 6, .vsync_len = 5, }, .dsi_timing = { .dlanes = 4, .bitrate = 900000000, .hsa = 147,//132, .hbp = 480,//508, .hfp = 280,//268, .hact = 5760, }, },
To Configure eDP
dpi_timing
is the timing of the eDP, which needs to be added in the
panel driver. It corresponds to jh7110_lt8911exb.c
under the path
of \linux\drivers\gpu\drm\verisilicon, which maps
lt8911exb_panel_modes
.- Enter
jh7110_lt8911exb.c
file. - Modify the parameters of PLL 1188M under this function according to the
output file.Tip:
- clock = pixelclock/1000
- hdisplay = hactive
- hsync_start = hactive + hfp
- hsync_end = hactive + hfp + hbp
- htotal = hactive + hfp + hbp+ hsync_len
- vdisplay = vactive
- vsync_start = vactive + vfp
- vsync_end = vactive + vfp + vbp
- vtotal = vactive + vfp + vbp + vsync_len
- Perform the following to update the MIPI_Timing[]
parameters:
static int MIPI_Timing[] = // hfp, hs, hbp, hact, htotal, vfp, vs, vbp, vact, vtotal, pixel_CLK/10000 //-----|---|------|-------|--------|-----|-----|-----|--------|--------|--------------- {88, 44, 148, 1920, 2200, 34, 5, 6, 1080, 1125, 15000}; // boe config for linux
- After configuration, it will be synchronized to the DC controller driver and
eDP DSI driver. For example, to update DSI_Timing lanes to
4, you can change the corresponding parameters in
the input file. The corresponding driver code is shown in the following screen:
To Configure MIPI DSI
The following is the DSI timing in output.txt we generated before. Follow the steps
below to configure MIPI
DSI.
.dsi_timing = { .dlanes = 4, .bitrate = 900000000, .hsa = 147,//132, .hbp = 480,//508, .hfp = 280,//268, .hact = 5760, },
- Open jh7110_lt8911exb.c file under the path of \linux\drivers\gpu\drm\verisilicon in Linux. In JH-7110 DevKit, the channel number of eDP is channel 0.
- Locate cdns_dsi_mode2cfg function to modify the hsa, hbp and hfp parameter according to the value in the output.txt generated previously.
- Then locate cdns_dsi_adjust_phy_config function to modify the bitrate parameter according to the value in the output.txt generated previously.