本帖最后由 wzh_bupt 于 2015-4-11 21:06 编辑
Hi,版主你好
我的显示器上,图像显示出来了,但好像有奇偶场问题,请问从哪里开始排查?
我的ipu interlaced 是如下写的。有几个问题请教一下:
1)__ipu_ch_get_third_buf_cpmem_num,这里面third buffer 是干什么用的,奇偶场两个buffer 不就够了吗?
2)stride *= 2; 这个为啥乘2,代表什么意思?
3) 0xfff38 表示什么意思,这个数据是干什么用的?
4)奇偶场问题,是ipu interlace 问题还是LDB 通道设置问题?
谢谢了先!
============
static inline void _ipu_ch_param_set_interlaced_scan(uint32_t ch)
{
u32 stride;
int32_t sub_ch = 0;
sub_ch = __ipu_ch_get_third_buf_cpmem_num(ch);
ipu_ch_param_set_field(ipu_ch_param_addr(ch), 0, 113, 1, 1);
if (sub_ch > 0)
ipu_ch_param_set_field(ipu_ch_param_addr(sub_ch), 0, 113, 1, 1);
stride = ipu_ch_param_read_field(ipu_ch_param_addr(ch), 1, 102, 14) + 1;
/* ILO is 20-bit and 8-byte aligned */
if (stride/8 > 0xfffff)
dev_warn(g_ipu_dev,
"IDMAC%d's ILO exceeds IPU limitation\n", ch);
if (stride%8)
dev_warn(g_ipu_dev,
"IDMAC%d's ILO is not 8-byte aligned\n", ch);
if (1 == ch_rear_cam_mode()) {
ipu_ch_param_mod_field(ipu_ch_param_addr(ch), 1, 58, 20, 0xfff38);
}else{
ipu_ch_param_mod_field(ipu_ch_param_addr(ch), 1, 58, 20, stride / 8);
}
if (sub_ch > 0)
ipu_ch_param_mod_field(ipu_ch_param_addr(sub_ch), 1, 58, 20,
stride / 8);
stride *= 2;
ipu_ch_param_mod_field(ipu_ch_param_addr(ch), 1, 102, 14, stride - 1);
if (sub_ch > 0)
ipu_ch_param_mod_field(ipu_ch_param_addr(sub_ch), 1, 102, 14,
stride - 1);
} |