2024年11月05日 第14讲 ISP Bubble恢复机制详解 极客笔记
本讲是Camera KMD ISP子系统专题的第14讲,我们讲解Camera KMD ISP子系统之ISP Bubble处理。
更多资源:
| 资源 | 描述 | 
|---|---|
| 在线课程 | 极客笔记在线课程 | 
| 知识星球 | 星球名称:深入浅出Android Camera  星球ID: 17296815  | 
| 极客笔记圈 | 
struct cam_isp_context {
    struct list_head               active_req_list;//reg_upd中断将isp request保存到这里并等待buffer done中断
    struct list_head               pending_req_list;//umd submit的isp request保存到这里等待sof(epoch)时crm apply其到HW
    struct list_head               wait_req_list;//apply之后保存isp request到这个链表并且等待reg_upd中断
    struct list_head               free_req_list;//保存所有可用的isp request对象
}




cam_req_mgr_process_error(void *priv, void *data)
{
    switch (err_info->error) {
        case CRM_KMD_ERR_BUBBLE:
            idx = __cam_req_mgr_find_slot_for_req(in_q, err_info->req_id);//在in_q中找到bubble request对应下标
     __cam_req_mgr_tbl_set_all_skip_cnt(&link->req.l_tbl);//让bubble这次遍历skip掉pd 1的request
            in_q->rd_idx = idx;//重置rd_idx为bubble request对应的下标
            slot_diff = in_q->last_applied_idx - idx;//计算出最新applied request到 发生bubble request的下标偏差
            //把出现bubble request开始到last appiled之间的request都标为CRM_SLOT_STATUS_REQ_ADDED,
            //这些request都需要在SOF/EOF来时重新配置到realtime HW
            for (i = 0; i < slot_diff; i++) {
                __cam_req_mgr_inc_idx(&idx, 1, link->req.l_tbl->num_slots);
                if (in_q->slot[idx].status == CRM_SLOT_STATUS_REQ_APPLIED)
                    in_q->slot[idx].status = CRM_SLOT_STATUS_REQ_ADDED;
            }
            __cam_req_mgr_apply_on_bubble(link, err_info);//立刻重新配置pd 2的设备的request到hw
    }
}

req5在下一个SOF重新配置给ISP HW,如果这是bubbled req5 buf done还没到,就等下个sof再检查bubbled req5 buf done是否到达,到达就reapply req5到isp hw

req5在下一个SOF重新配置给ISP HW,如果这是bubbled req5 buf done还没到,就等下个sof再检查bubbled req5 buf done是否到达,到达就reapply req5到isp hw

本文链接:http://so.lmcjl.com/news/17093/