有一些显示器是只给了屏幕的参数,屏幕输入的参数不一定,可能是输出的MIPI 给显示器,显示内部转换后是LVDS RGB,因此需要转换。
屏幕参数
注意:
上面的是DE模式,DE模式一般是不需要Vs和Hs的。
thbp和thpw关系需要关注,假如thbp被定义为thbp + thpw,则计算时需要减去thpw。
转换为MIPI参数
/**
* @clock:
*
* Pixel clock in kHz.
*/
int clock; /* in kHz */
int hdisplay;
int hsync_start;
int hsync_end;
int htotal;
int vdisplay;
int vsync_start;
int vsync_end;
int vtotal;
上面的是两port的lvds,所以单路需要水屏 h相关 x 2,垂直 v 相关不需要改动
hdisplay = thd
hsync_start = thd + thfp
hsync_end = thd + thfp + thpw
htotal = thd + thfp + thpw + thbp
vdisplay = tvd
vsync_start = tvd + tvfp
vsync_end = tvd + tvfp + tvpw
vtotal = tvd + tvfp + tvpw + tvbp
vrefresh = 60
clock = htotal * vtotal * vrefresh /(几根线) //实际上这里是每个 Pixel的 时钟,不需要计算,直接填推荐值即可
测量
测量是使用lvds转rgb方式进行测量的
实际数据
上面两个图位置位于第三个图标注如上
注意:
vs vfp vbp 单位是 hs
hs hfp hbp 单位是pclk