Loading drivers/video/msm/mdss/mdp3_dma.c +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -16,6 +16,7 @@ #include "mdp3.h" #include "mdp3_dma.h" #include "mdp3_hwio.h" #include "mdss_debug.h" #define DMA_STOP_POLL_SLEEP_US 1000 #define DMA_STOP_POLL_TIMEOUT_US 200000 Loading Loading @@ -634,17 +635,20 @@ static int mdp3_dmap_update(struct mdp3_dma *dma, void *buf, struct mdss_panel_data *panel; int rc = 0; ATRACE_BEGIN(__func__); pr_debug("mdp3_dmap_update\n"); if (dma->output_config.out_sel == MDP3_DMA_OUTPUT_SEL_DSI_CMD) { cb_type = MDP3_DMA_CALLBACK_TYPE_DMA_DONE; if (intf->active) { ATRACE_BEGIN("mdp3_wait_for_dma_comp"); rc = wait_for_completion_timeout(&dma->dma_comp, KOFF_TIMEOUT); if (rc <= 0) { WARN(1, "cmd kickoff timed out (%d)\n", rc); rc = -1; } ATRACE_END("mdp3_wait_for_dma_comp"); } } if (dma->update_src_cfg) { Loading Loading @@ -684,12 +688,15 @@ static int mdp3_dmap_update(struct mdp3_dma *dma, void *buf, mdp3_dma_callback_enable(dma, cb_type); pr_debug("mdp3_dmap_update wait for vsync_comp in\n"); if (dma->output_config.out_sel == MDP3_DMA_OUTPUT_SEL_DSI_VIDEO) { ATRACE_BEGIN("mdp3_wait_for_vsync_comp"); rc = wait_for_completion_timeout(&dma->vsync_comp, KOFF_TIMEOUT); if (rc <= 0) rc = -1; ATRACE_END("mdp3_wait_for_vsync_comp"); } pr_debug("mdp3_dmap_update wait for vsync_comp out\n"); ATRACE_END(__func__); return rc; } Loading drivers/video/msm/mdss/mdp3_ppp.c +13 −3 Original line number Diff line number Diff line /* Copyright (c) 2007, 2013-2014 The Linux Foundation. All rights reserved. /* Copyright (c) 2007, 2013-2015 The Linux Foundation. All rights reserved. * Copyright (C) 2007 Google Incorporated * * This software is licensed under the terms of the GNU General Public Loading Loading @@ -29,6 +29,7 @@ #include "mdp3_ppp.h" #include "mdp3_hwio.h" #include "mdp3.h" #include "mdss_debug.h" #define MDP_IS_IMGTYPE_BAD(x) ((x) >= MDP_IMGTYPE_LIMIT) #define MDP_RELEASE_BW_TIMEOUT 50 Loading Loading @@ -325,7 +326,9 @@ void mdp3_ppp_kickoff(void) init_completion(&ppp_stat->ppp_comp); mdp3_irq_enable(MDP3_PPP_DONE); ppp_enable(); ATRACE_BEGIN("mdp3_wait_for_ppp_comp"); mdp3_ppp_pipe_wait(); ATRACE_END("mdp3_wait_for_ppp_comp"); mdp3_irq_disable(MDP3_PPP_DONE); } Loading Loading @@ -444,10 +447,11 @@ int mdp3_calc_ppp_res(struct msm_fb_data_type *mfd, struct blit_req_list *lreq) u32 dst_write_bw = 0; u64 honest_ppp_ab = 0; u32 fps; ATRACE_BEGIN(__func__); lcount = lreq->count; if (lcount == 0) { pr_err("Blit with request count 0, continue to recover!!!\n"); ATRACE_END(__func__); return 0; } Loading Loading @@ -481,8 +485,11 @@ int mdp3_calc_ppp_res(struct msm_fb_data_type *mfd, struct blit_req_list *lreq) ppp_res.next_ab = honest_ppp_ab; ppp_res.next_ib = honest_ppp_ab; ppp_stat->bw_update = true; ATRACE_INT("mdp3_ppp_bus_quota", honest_ppp_ab); } ppp_res.clk_rate = mdp3_clk_calc(mfd, lreq); ATRACE_INT("mdp3_ppp_clk_rate", ppp_res.clk_rate); ATRACE_END(__func__); return 0; } Loading Loading @@ -991,6 +998,7 @@ int mdp3_ppp_start_blit(struct msm_fb_data_type *mfd, void mdp3_ppp_wait_for_fence(struct blit_req_list *req) { int i, ret = 0; ATRACE_BEGIN(__func__); /* buf sync */ for (i = 0; i < req->acq_fen_cnt; i++) { ret = sync_fence_wait(req->acq_fen[i], Loading @@ -1002,7 +1010,7 @@ void mdp3_ppp_wait_for_fence(struct blit_req_list *req) } sync_fence_put(req->acq_fen[i]); } ATRACE_END(__func__); if (ret < 0) { while (i < req->acq_fen_cnt) { sync_fence_put(req->acq_fen[i]); Loading Loading @@ -1174,6 +1182,7 @@ static void mdp3_ppp_blit_wq_handler(struct work_struct *work) } ppp_stat->bw_update = false; } ATRACE_BEGIN("mpd3_ppp_start"); for (i = 0; i < req->count; i++) { if (!(req->req_list[i].flags & MDP_NO_BLIT)) { /* Do the actual blit. */ Loading @@ -1187,6 +1196,7 @@ static void mdp3_ppp_blit_wq_handler(struct work_struct *work) mdp3_put_img(&req->dst_data[i]); } } ATRACE_END("mdp3_ppp_start"); /* Signal to release fence */ mutex_lock(&ppp_stat->req_mutex); mdp3_ppp_signal_timeline(req); Loading Loading
drivers/video/msm/mdss/mdp3_dma.c +8 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading @@ -16,6 +16,7 @@ #include "mdp3.h" #include "mdp3_dma.h" #include "mdp3_hwio.h" #include "mdss_debug.h" #define DMA_STOP_POLL_SLEEP_US 1000 #define DMA_STOP_POLL_TIMEOUT_US 200000 Loading Loading @@ -634,17 +635,20 @@ static int mdp3_dmap_update(struct mdp3_dma *dma, void *buf, struct mdss_panel_data *panel; int rc = 0; ATRACE_BEGIN(__func__); pr_debug("mdp3_dmap_update\n"); if (dma->output_config.out_sel == MDP3_DMA_OUTPUT_SEL_DSI_CMD) { cb_type = MDP3_DMA_CALLBACK_TYPE_DMA_DONE; if (intf->active) { ATRACE_BEGIN("mdp3_wait_for_dma_comp"); rc = wait_for_completion_timeout(&dma->dma_comp, KOFF_TIMEOUT); if (rc <= 0) { WARN(1, "cmd kickoff timed out (%d)\n", rc); rc = -1; } ATRACE_END("mdp3_wait_for_dma_comp"); } } if (dma->update_src_cfg) { Loading Loading @@ -684,12 +688,15 @@ static int mdp3_dmap_update(struct mdp3_dma *dma, void *buf, mdp3_dma_callback_enable(dma, cb_type); pr_debug("mdp3_dmap_update wait for vsync_comp in\n"); if (dma->output_config.out_sel == MDP3_DMA_OUTPUT_SEL_DSI_VIDEO) { ATRACE_BEGIN("mdp3_wait_for_vsync_comp"); rc = wait_for_completion_timeout(&dma->vsync_comp, KOFF_TIMEOUT); if (rc <= 0) rc = -1; ATRACE_END("mdp3_wait_for_vsync_comp"); } pr_debug("mdp3_dmap_update wait for vsync_comp out\n"); ATRACE_END(__func__); return rc; } Loading
drivers/video/msm/mdss/mdp3_ppp.c +13 −3 Original line number Diff line number Diff line /* Copyright (c) 2007, 2013-2014 The Linux Foundation. All rights reserved. /* Copyright (c) 2007, 2013-2015 The Linux Foundation. All rights reserved. * Copyright (C) 2007 Google Incorporated * * This software is licensed under the terms of the GNU General Public Loading Loading @@ -29,6 +29,7 @@ #include "mdp3_ppp.h" #include "mdp3_hwio.h" #include "mdp3.h" #include "mdss_debug.h" #define MDP_IS_IMGTYPE_BAD(x) ((x) >= MDP_IMGTYPE_LIMIT) #define MDP_RELEASE_BW_TIMEOUT 50 Loading Loading @@ -325,7 +326,9 @@ void mdp3_ppp_kickoff(void) init_completion(&ppp_stat->ppp_comp); mdp3_irq_enable(MDP3_PPP_DONE); ppp_enable(); ATRACE_BEGIN("mdp3_wait_for_ppp_comp"); mdp3_ppp_pipe_wait(); ATRACE_END("mdp3_wait_for_ppp_comp"); mdp3_irq_disable(MDP3_PPP_DONE); } Loading Loading @@ -444,10 +447,11 @@ int mdp3_calc_ppp_res(struct msm_fb_data_type *mfd, struct blit_req_list *lreq) u32 dst_write_bw = 0; u64 honest_ppp_ab = 0; u32 fps; ATRACE_BEGIN(__func__); lcount = lreq->count; if (lcount == 0) { pr_err("Blit with request count 0, continue to recover!!!\n"); ATRACE_END(__func__); return 0; } Loading Loading @@ -481,8 +485,11 @@ int mdp3_calc_ppp_res(struct msm_fb_data_type *mfd, struct blit_req_list *lreq) ppp_res.next_ab = honest_ppp_ab; ppp_res.next_ib = honest_ppp_ab; ppp_stat->bw_update = true; ATRACE_INT("mdp3_ppp_bus_quota", honest_ppp_ab); } ppp_res.clk_rate = mdp3_clk_calc(mfd, lreq); ATRACE_INT("mdp3_ppp_clk_rate", ppp_res.clk_rate); ATRACE_END(__func__); return 0; } Loading Loading @@ -991,6 +998,7 @@ int mdp3_ppp_start_blit(struct msm_fb_data_type *mfd, void mdp3_ppp_wait_for_fence(struct blit_req_list *req) { int i, ret = 0; ATRACE_BEGIN(__func__); /* buf sync */ for (i = 0; i < req->acq_fen_cnt; i++) { ret = sync_fence_wait(req->acq_fen[i], Loading @@ -1002,7 +1010,7 @@ void mdp3_ppp_wait_for_fence(struct blit_req_list *req) } sync_fence_put(req->acq_fen[i]); } ATRACE_END(__func__); if (ret < 0) { while (i < req->acq_fen_cnt) { sync_fence_put(req->acq_fen[i]); Loading Loading @@ -1174,6 +1182,7 @@ static void mdp3_ppp_blit_wq_handler(struct work_struct *work) } ppp_stat->bw_update = false; } ATRACE_BEGIN("mpd3_ppp_start"); for (i = 0; i < req->count; i++) { if (!(req->req_list[i].flags & MDP_NO_BLIT)) { /* Do the actual blit. */ Loading @@ -1187,6 +1196,7 @@ static void mdp3_ppp_blit_wq_handler(struct work_struct *work) mdp3_put_img(&req->dst_data[i]); } } ATRACE_END("mdp3_ppp_start"); /* Signal to release fence */ mutex_lock(&ppp_stat->req_mutex); mdp3_ppp_signal_timeline(req); Loading