msm: mdss: allow usage of dma pipe when requesting explicitly
DMA pipe has some limitations that userspace needs to be aware of when
using. In order to ensure that these are handled, these pipes need to be
requested explicitly.
Change-Id: Ife6c08da4e4fe73683d7cf5f9aa5ab8374e022f3
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
diff --git a/drivers/video/msm/mdss/mdss_mdp_overlay.c b/drivers/video/msm/mdss/mdss_mdp_overlay.c
index 0c8b721..7d2f659 100644
--- a/drivers/video/msm/mdss/mdss_mdp_overlay.c
+++ b/drivers/video/msm/mdss/mdss_mdp_overlay.c
@@ -280,7 +280,9 @@
return -ENODEV;
}
- if (fmt->is_yuv || (req->flags & MDP_OV_PIPE_SHARE))
+ if (req->flags & MDP_OV_PIPE_FORCE_DMA)
+ pipe_type = MDSS_MDP_PIPE_TYPE_DMA;
+ else if (fmt->is_yuv || (req->flags & MDP_OV_PIPE_SHARE))
pipe_type = MDSS_MDP_PIPE_TYPE_VIG;
else
pipe_type = MDSS_MDP_PIPE_TYPE_RGB;
diff --git a/include/linux/msm_mdp.h b/include/linux/msm_mdp.h
index 3ec966b..32f71a1 100644
--- a/include/linux/msm_mdp.h
+++ b/include/linux/msm_mdp.h
@@ -166,6 +166,7 @@
#define MDP_BACKEND_COMPOSITION 0x00040000
#define MDP_BORDERFILL_SUPPORTED 0x00010000
#define MDP_SECURE_OVERLAY_SESSION 0x00008000
+#define MDP_OV_PIPE_FORCE_DMA 0x00004000
#define MDP_MEMORY_ID_TYPE_FB 0x00001000
#define MDP_TRANSP_NOP 0xffffffff