Beispiel #1
0
static int ovl2mem_callback(unsigned int userdata)
{
	int fence_idx = 0;
	int layid = 0;

	DISPMSG("ovl2mem_callback(%x), current tick=%d, release tick: %d\n",
		pgc->session, get_ovl2mem_ticket(), userdata);
	for (layid = 0; layid < (HW_OVERLAY_COUNT + 1); layid++) {
		fence_idx = mtkfb_query_idx_by_ticket(pgc->session, layid, userdata);
		if (fence_idx >= 0) {
			disp_ddp_path_config *data_config = dpmgr_path_get_last_config(pgc->dpmgr_handle);
			WDMA_CONFIG_STRUCT wdma_layer;
			wdma_layer.dstAddress = 0;
			if (data_config && (layid >= HW_OVERLAY_COUNT)) {
				wdma_layer.dstAddress = mtkfb_query_buf_mva(pgc->session, layid, fence_idx);
				wdma_layer.outputFormat = data_config->wdma_config.outputFormat;
				wdma_layer.srcWidth = data_config->wdma_config.srcWidth;
				wdma_layer.srcHeight = data_config->wdma_config.srcHeight;
				wdma_layer.dstPitch = data_config->wdma_config.dstPitch;
				DISPMSG("mem_seq %x-seq+ %d\n", pgc->session, mtkfb_query_frm_seq_by_addr(pgc->session,
					layid, wdma_layer.dstAddress));
				dprec_logger_frame_seq_end(pgc->session, mtkfb_query_frm_seq_by_addr(pgc->session,
					layid, wdma_layer.dstAddress));

				dprec_mmp_dump_wdma_layer(&wdma_layer, 1);

			}
			mtkfb_release_fence(pgc->session, layid, fence_idx);
		}
	}

	atomic_set(&g_release_ticket, userdata);
}
static int ovl2mem_callback(unsigned int userdata)
{
    int fence_idx = 0;
    int layid = 0;

    DISPMSG("ovl2mem_callback(%x), current tick=%d, release tick: %d\n", pgc->session, get_ovl2mem_ticket(), userdata);
    for(layid = 0; layid < (HW_OVERLAY_COUNT + 1); layid++)
    {
        fence_idx = mtkfb_query_idx_by_ticket(pgc->session, layid, userdata);
        if(fence_idx <0) 
		{
			if(fence_idx == -1)
			{
				//DISPPR_ERROR("find fence idx for layer %d,addr 0x%08x fail, unregistered addr%d\n", layid, userdata, fence_idx); 
			}
			else if(fence_idx == -2)
			{

			}
			else
			{
				///DISPPR_ERROR("find fence idx for layer %d,addr 0x%08x fail,reason unknown%d\n", layid, userdata, fence_idx);
			}
		}
		else
		{   
		    disp_ddp_path_config *data_config= dpmgr_path_get_last_config(pgc->dpmgr_handle);
		    if(data_config && (layid == 4))
		    {
		        WDMA_CONFIG_STRUCT wdma_layer;
                wdma_layer.dstAddress = mtkfb_query_buf_mva(pgc->session, layid, fence_idx);
                wdma_layer.outputFormat = data_config->wdma_config.outputFormat;
                wdma_layer.srcWidth = data_config->wdma_config.srcWidth;
                wdma_layer.srcHeight = data_config->wdma_config.srcHeight;
                wdma_layer.dstPitch = data_config->wdma_config.dstPitch;
                
                dprec_mmp_dump_wdma_layer(&wdma_layer, 1);
            }
			mtkfb_release_fence(pgc->session, layid, fence_idx);
		}
    }
    
    atomic_set(&g_release_ticket, userdata);

}