<pre>
This patch move rdma sout from mtk_ddp_mout_en into mtk_ddp_sout_sel

Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 90 +++++++++++++++++-----------------
 1 file changed, 45 insertions(+), 45 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c
index 592f852..60cfde7 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c
@@ -295,51 +295,6 @@ static unsigned int mtk_ddp_mout_en(enum mtk_ddp_comp_id cur,
        } else if (cur == DDP_COMPONENT_OD1 && next == DDP_COMPONENT_RDMA1) {
                *addr = DISP_REG_CONFIG_DISP_OD_MOUT_EN;
                value = OD1_MOUT_EN_RDMA1;
-       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI0) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
-               value = RDMA0_SOUT_DPI0;
-       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI1) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
-               value = RDMA0_SOUT_DPI1;
-       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI1) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
-               value = RDMA0_SOUT_DSI1;
-       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI2) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
-               value = RDMA0_SOUT_DSI2;
-       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI3) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
-               value = RDMA0_SOUT_DSI3;
-       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI1) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
-               value = RDMA1_SOUT_DSI1;
-       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI2) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
-               value = RDMA1_SOUT_DSI2;
-       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI3) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
-               value = RDMA1_SOUT_DSI3;
-       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI0) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
-               value = RDMA1_SOUT_DPI0;
-       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI1) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
-               value = RDMA1_SOUT_DPI1;
-       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DPI0) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
-               value = RDMA2_SOUT_DPI0;
-       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DPI1) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
-               value = RDMA2_SOUT_DPI1;
-       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI1) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
-               value = RDMA2_SOUT_DSI1;
-       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI2) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
-               value = RDMA2_SOUT_DSI2;
-       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI3) {
-               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
-               value = RDMA2_SOUT_DSI3;
        } else {
                value = 0;
        }
@@ -421,6 +376,51 @@ static unsigned int mtk_ddp_sout_sel(void __iomem *config_regs,
        } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI0) {
                *addr = DISP_REG_CONFIG_DSI_SEL;
                value = DSI_SEL_IN_RDMA;
+       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI0) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
+               value = RDMA0_SOUT_DPI0;
+       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DPI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
+               value = RDMA0_SOUT_DPI1;
+       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
+               value = RDMA0_SOUT_DSI1;
+       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI2) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
+               value = RDMA0_SOUT_DSI2;
+       } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI3) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN;
+               value = RDMA0_SOUT_DSI3;
+       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
+               value = RDMA1_SOUT_DSI1;
+       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI2) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
+               value = RDMA1_SOUT_DSI2;
+       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI3) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
+               value = RDMA1_SOUT_DSI3;
+       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI0) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
+               value = RDMA1_SOUT_DPI0;
+       } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA1_SOUT_EN;
+               value = RDMA1_SOUT_DPI1;
+       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DPI0) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
+               value = RDMA2_SOUT_DPI0;
+       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DPI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
+               value = RDMA2_SOUT_DPI1;
+       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI1) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
+               value = RDMA2_SOUT_DSI1;
+       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI2) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
+               value = RDMA2_SOUT_DSI2;
+       } else if (cur == DDP_COMPONENT_RDMA2 && next == DDP_COMPONENT_DSI3) {
+               *addr = DISP_REG_CONFIG_DISP_RDMA2_SOUT;
+               value = RDMA2_SOUT_DSI3;
        } else {
                value = 0;
        }
-- 
1.8.1.1.dirty

</pre><!--type:text--><!--{--><pre>************* Email Confidentiality Notice
 ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe
 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank
 you!</pre><!--}-->