MLK-14369 epdc: sync LUT status to PXP before enable collision detection
authorRobby Cai <robby.cai@nxp.com>
Tue, 28 Feb 2017 13:53:30 +0000 (21:53 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:57 +0000 (15:21 -0500)
on imx7d and imx6ull/imx6sll, the collision detection logic is implemented
in PXP WFE (A on imx7d, or B on imx6ull/imx6sll) instead of the logic
implemented on EPDC on previous SoCs (like imx6sl/imx6dl). The driver need
read the LUT status and send this information to PXP WFE (A on imx7d, or B
on imx6ull/imx6sll) engine, so that PXP WFE engine can detect if there is
an active LUT assigned to the pixels affected by current update.
Without this patch, there could possibly be some false collision report due
to the out-of-sync. The patch intends to fix it.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
drivers/dma/pxp/pxp_dma_v3.c

index dc17d25..b2e68e6 100644 (file)
@@ -1,6 +1,8 @@
 /*
  * Copyright (C) 2010-2016 Freescale Semiconductor, Inc.
  *
+ * Copyright 2017 NXP
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -1263,6 +1265,8 @@ static int pxp_config(struct pxps *pxp, struct pxp_channel *pxp_chan)
 
                if ((proc_data->engine_enable & PXP_ENABLE_WFE_A) == PXP_ENABLE_WFE_A)
                {
+                       pxp_luts_deactivate(pxp, proc_data->lut_sels);
+
                        if (proc_data->lut_cleanup == 0) {
                                /* We should enable histogram in standard mode
                                 * in wfe_a processing for waveform mode selection
@@ -1282,8 +1286,6 @@ static int pxp_config(struct pxps *pxp, struct pxp_channel *pxp_chan)
                                pxp->devdata->pxp_wfe_a_configure(pxp);
                        if (pxp->devdata && pxp->devdata->pxp_wfe_a_process)
                                pxp->devdata->pxp_wfe_a_process(pxp);
-
-                       pxp_luts_deactivate(pxp, proc_data->lut_sels);
                }
 
                if ((proc_data->engine_enable & PXP_ENABLE_WFE_B) == PXP_ENABLE_WFE_B) {