summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXianzhong <xianzhong.li@nxp.com>2018-06-05 01:20:10 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitdae939b7c8b5756d77b5eec760a4566b62f605bc (patch)
treedd6971c86ed0b20d0803affcadad09a9874e799a /drivers
parent6af80adc98a315c31017c4750eaa9c6799607d8d (diff)
MGS-3940-3 gpu: imx: dpu-blit: fix the confusable logic
Simplify the code to sync command sequncer in conditions: 1. tile work with dprc/prg (baddr) 2. switch tile to linear (!start) revert 686c717fefdfc118f09085272af03358520acc7c MLK-18398 gpu: imx: imx8_dprc: dpu-blit: Wait the dprc idle before disable it Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/imx/dpu-blit/dpu-blit.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/gpu/imx/dpu-blit/dpu-blit.c b/drivers/gpu/imx/dpu-blit/dpu-blit.c
index 242b3a899747..60377f406e8a 100644
--- a/drivers/gpu/imx/dpu-blit/dpu-blit.c
+++ b/drivers/gpu/imx/dpu-blit/dpu-blit.c
@@ -110,18 +110,17 @@ void dpu_be_configure_prefetch(struct dpu_bliteng *dpu_be,
static bool start = true;
static bool need_handle_start;
struct dprc *dprc;
- static bool tiled_work_unfinished = true;
/* Enable DPR, dprc1 is connected to plane0 */
dprc = dpu_be->dprc[1];
/*
- * Waiting for the previous tiled command finished
- * before disable the dpr.
+ * Force sync command sequncer in conditions:
+ * 1. tile work with dprc/prg (baddr)
+ * 2. switch tile to linear (!start)
*/
- if (tiled_work_unfinished || baddr) {
+ if (!start || baddr) {
dpu_be_wait(dpu_be);
- tiled_work_unfinished = false;
}
if (baddr == 0x0) {
@@ -133,8 +132,6 @@ void dpu_be_configure_prefetch(struct dpu_bliteng *dpu_be,
return;
}
- tiled_work_unfinished = true;
-
if (need_handle_start) {
dprc_first_frame_handle(dprc);
need_handle_start = false;
@@ -148,15 +145,13 @@ void dpu_be_configure_prefetch(struct dpu_bliteng *dpu_be,
start, start,
false);
- if (start)
- dprc_enable(dprc);
-
- dprc_reg_update(dprc);
-
if (start) {
+ dprc_enable(dprc);
need_handle_start = true;
}
+ dprc_reg_update(dprc);
+
start = false;
}
EXPORT_SYMBOL(dpu_be_configure_prefetch);