msm: sde: Add v4l2 rotator driver to enable multi-context usecase

Current application interface of fbdev rotator driver has limited
support on multiple concurrent rotator sessions.  Using v4l2 m2m
framework will enable concurrent multi-session using standard
v4l2 interface.  This will also enable third-party clients to
use rotator service in background mode.

The driver supports same feature set as current fbdev rotator
driver, such as rotation, flip, and scale operation.

CRs-Fixed: 972831
Change-Id: I0bba76f2233c142b5a22451f824df7900ac60afa
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
diff --git a/drivers/media/platform/msm/Kconfig b/drivers/media/platform/msm/Kconfig
index 19567ad..8958679 100644
--- a/drivers/media/platform/msm/Kconfig
+++ b/drivers/media/platform/msm/Kconfig
@@ -1,16 +1,3 @@
-#
-# MSM camera configuration
-#
-
-comment "Qualcomm Technologies, Inc. MSM Camera And Video"
-
-menuconfig SPECTRA_CAMERA
-    bool "Qualcomm Technologies, Inc. Spectra camera and video capture support"
-    depends on ARCH_QCOM && VIDEO_V4L2 && I2C
-    ---help---
-      Say Y here to enable selecting the video adapters for
-      Qualcomm Technologies, Inc. Spectra camera and video capture.
-      Enabling this adds support for the camera driver stack including sensor,
-      IFE and postprocessing drivers.
-
 source "drivers/media/platform/msm/vidc/Kconfig"
+
+source "drivers/media/platform/msm/sde/Kconfig"
diff --git a/drivers/media/platform/msm/Makefile b/drivers/media/platform/msm/Makefile
index 7605fdb..523a8b4 100644
--- a/drivers/media/platform/msm/Makefile
+++ b/drivers/media/platform/msm/Makefile
@@ -1,5 +1,6 @@
 #
-# Makefile for the QCOM specific video device drivers
+# Makefile for the qti specific video device drivers
 # based on V4L2.
 #
 obj-$(CONFIG_MSM_VIDC_V4L2) += vidc/
+obj-y += sde/
diff --git a/drivers/media/platform/msm/sde/rotator/sde_rotator_core.h b/drivers/media/platform/msm/sde/rotator/sde_rotator_core.h
index 5052ea1..0aee4f7 100644
--- a/drivers/media/platform/msm/sde/rotator/sde_rotator_core.h
+++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_core.h
@@ -59,9 +59,9 @@
 /* use client provided dma buf instead of ion fd */
 #define SDE_ROTATION_EXT_DMA_BUF	0x20000
 
-/*********************************************************************
- *configuration structures
- *********************************************************************/
+/**********************************************************************
+ * configuration structures
+ **********************************************************************/
 
 struct sde_rotation_buf_info {
 	uint32_t width;
@@ -108,37 +108,37 @@
 	/* The output buffer for the request */
 	struct sde_layer_buffer	output;
 
-	 /*
-	  * DMA pipe selection for this request by client:
-	  * 0: DMA pipe 0
-	  * 1: DMA pipe 1
-	  * or SDE_ROTATION_HW_ANY if client wants
-	  * driver to allocate any that is available
-	  *
-	  * OR
-	  *
-	  * Reserved
-	  */
+	/*
+	 * DMA pipe selection for this request by client:
+	 * 0: DMA pipe 0
+	 * 1: DMA pipe 1
+	 * or SDE_ROTATION_HW_ANY if client wants
+	 * driver to allocate any that is available
+	 *
+	 * OR
+	 *
+	 * Reserved
+	 */
 	uint32_t	pipe_idx;
 
-	 /*
-	  * Write-back block selection for this request by client:
-	  * 0: Write-back block 0
-	  * 1: Write-back block 1
-	  * or SDE_ROTATION_HW_ANY if client wants
-	  * driver to allocate any that is available
-	  *
-	  * OR
-	  *
-	  * Priority selection for this request by client:
-	  * 0: Highest
-	  * 1..n: Limited by the lowest available priority
-	  */
+	/*
+	 * Write-back block selection for this request by client:
+	 * 0: Write-back block 0
+	 * 1: Write-back block 1
+	 * or SDE_ROTATION_HW_ANY if client wants
+	 * driver to allocate any that is available
+	 *
+	 * OR
+	 *
+	 * Priority selection for this request by client:
+	 * 0: Highest
+	 * 1..n: Limited by the lowest available priority
+	 */
 	uint32_t	wb_idx;
 
-	 /*
-	  * Sequence ID of this request within the session
-	  */
+	/*
+	 * Sequence ID of this request within the session
+	 */
 	uint32_t	sequence_id;
 
 	/* Which session ID is this request scheduled on */