[PATCH] rnndb: Add registers for msm YUV support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Note:
chroma_samp_type can be used by both MDP4 and MDP5, thus
moved to mdp_common.

Signed-off-by: Stephane Viau <sviau@xxxxxxxxxxxxxx>
---
 rnndb/mdp/mdp4.xml       | 16 ++++++++++++
 rnndb/mdp/mdp5.xml       | 64 +++++++++++++++++++++++++++++++++++++++++-------
 rnndb/mdp/mdp_common.xml | 13 ++++++++++
 3 files changed, 84 insertions(+), 9 deletions(-)

diff --git a/rnndb/mdp/mdp4.xml b/rnndb/mdp/mdp4.xml
index d4747e0..3d5e4df 100644
--- a/rnndb/mdp/mdp4.xml
+++ b/rnndb/mdp/mdp4.xml
@@ -50,6 +50,16 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 		<value name="CURSOR_ARGB" value="1"/>
 		<value name="CURSOR_XRGB" value="2"/>
 	</enum>
+	<enum name="mdp4_frame_format">
+		<value name="FRAME_LINEAR" value="0"/>
+		<value name="FRAME_TILE_ARGB_4X4" value="1"/>
+		<value name="FRAME_TILE_YCBCR_420" value="2"/>
+	</enum>
+	<enum name="mdp4_scale_unit">
+		<value name="SCALE_FIR" value="0"/>
+		<value name="SCALE_MN_PHASE" value="1"/>
+		<value name="SCALE_PIXEL_RPT" value="2"/>
+	</enum>
 
 	<bitset name="mdp4_layermixer_in_cfg" inline="yes">
 		<brief>appears to map pipe to mixer stage</brief>
@@ -271,6 +281,7 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 		<reg32 offset="0x0010" name="SRCP0_BASE"/>
 		<reg32 offset="0x0014" name="SRCP1_BASE"/>
 		<reg32 offset="0x0018" name="SRCP2_BASE"/>
+		<reg32 offset="0x001c" name="SRCP3_BASE"/>
 		<reg32 offset="0x0040" name="SRC_STRIDE_A">
 			<bitfield name="P0" low="0" high="15" type="uint"/>
 			<bitfield name="P1" low="16" high="31" type="uint"/>
@@ -293,12 +304,17 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 			<bitfield name="UNPACK_COUNT" low="13" high="14" type="uint"/>
 			<bitfield name="UNPACK_TIGHT" pos="17" type="boolean"/>
 			<bitfield name="UNPACK_ALIGN_MSB" pos="18" type="boolean"/>
+			<bitfield name="FETCH_PLANES" low="19" high="20" type="uint"/>
 			<bitfield name="SOLID_FILL" pos="22" type="boolean"/>
+			<bitfield name="CHROMA_SAMP" low="26" high="27" type="mdp_chroma_samp_type"/>
+			<bitfield name="FRAME_FORMAT" low="29" high="30" type="mdp4_frame_format"/>
 		</reg32>
 		<reg32 offset="0x0054" name="SRC_UNPACK" type="mdp_unpack_pattern"/>
 		<reg32 offset="0x0058" name="OP_MODE">
 			<bitfield name="SCALEX_EN" pos="0" type="boolean"/>
 			<bitfield name="SCALEY_EN" pos="1" type="boolean"/>
+			<bitfield name="SCALEX_UNIT_SEL" low="2" high="3" type="mdp4_scale_unit"/>
+			<bitfield name="SCALEY_UNIT_SEL" low="4" high="5" type="mdp4_scale_unit"/>
 			<bitfield name="SRC_YCBCR" pos="9" type="boolean"/>
 			<bitfield name="DST_YCBCR" pos="10" type="boolean"/>
 			<bitfield name="CSC_EN" pos="11" type="boolean"/>
diff --git a/rnndb/mdp/mdp5.xml b/rnndb/mdp/mdp5.xml
index 2e61e05..830cf02 100644
--- a/rnndb/mdp/mdp5.xml
+++ b/rnndb/mdp/mdp5.xml
@@ -58,13 +58,6 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 		<value name="PACK_3D_COL_INT"   value="3"/>
 	</enum>
 
-	<enum name="mdp5_chroma_samp_type">
-		<value name="CHROMA_RGB"  value="0"/>
-		<value name="CHROMA_H2V1" value="1"/>
-		<value name="CHROMA_H1V2" value="2"/>
-		<value name="CHROMA_420"  value="3"/>
-	</enum>
-
 	<enum name="mdp5_scale_filter">
 		<value name="SCALE_FILTER_NEAREST" value="0"/>
 		<value name="SCALE_FILTER_BIL" value="1"/>
@@ -256,10 +249,61 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 		<reg32 offset="0x020" name="PACK_3D"/>
 	</array>
 
+	<enum name="mdp5_data_format">
+		<value name="DATA_FORMAT_RGB" value="0"/>
+		<value name="DATA_FORMAT_YUV" value="1"/>
+	</enum>
+
 	<array doffsets="mdp5_cfg->pipe_vig.base[0],mdp5_cfg->pipe_vig.base[1],mdp5_cfg->pipe_vig.base[2],mdp5_cfg->pipe_rgb.base[0],mdp5_cfg->pipe_rgb.base[1],mdp5_cfg->pipe_rgb.base[2],mdp5_cfg->pipe_dma.base[0],mdp5_cfg->pipe_dma.base[1],mdp5_cfg->pipe_vig.base[3],mdp5_cfg->pipe_rgb.base[3]" name="PIPE" length="10" stride="0x400" index="mdp5_pipe">
+		<reg32 offset="0x200" name="OP_MODE">
+			<bitfield name="CSC_DST_DATA_FORMAT" pos="19" type="mdp5_data_format"/>
+			<bitfield name="CSC_SRC_DATA_FORMAT" pos="18" type="mdp5_data_format"/>
+			<bitfield name="CSC_1_EN" pos="17" type="boolean"/>
+		</reg32>
 		<reg32 offset="0x2C4" name="HIST_CTL_BASE"/>
 		<reg32 offset="0x2F0" name="HIST_LUT_BASE"/>
 		<reg32 offset="0x300" name="HIST_LUT_SWAP"/>
+		<reg32 offset="0x320" name="CSC_1_MATRIX_COEFF_0">
+			<bitfield name="COEFF_11" low="0" high="12" type="uint"/>
+			<bitfield name="COEFF_12" low="16" high="28" type="uint"/>
+		</reg32>
+		<reg32 offset="0x324" name="CSC_1_MATRIX_COEFF_1">
+			<bitfield name="COEFF_13" low="0" high="12" type="uint"/>
+			<bitfield name="COEFF_21" low="16" high="28" type="uint"/>
+		</reg32>
+		<reg32 offset="0x328" name="CSC_1_MATRIX_COEFF_2">
+			<bitfield name="COEFF_22" low="0" high="12" type="uint"/>
+			<bitfield name="COEFF_23" low="16" high="28" type="uint"/>
+		</reg32>
+		<reg32 offset="0x32c" name="CSC_1_MATRIX_COEFF_3">
+			<bitfield name="COEFF_31" low="0" high="12" type="uint"/>
+			<bitfield name="COEFF_32" low="16" high="28" type="uint"/>
+		</reg32>
+		<reg32 offset="0x330" name="CSC_1_MATRIX_COEFF_4">
+			<bitfield name="COEFF_33" low="0" high="12" type="uint"/>
+		</reg32>
+		<array offset="0x334" name="CSC_1_PRE_CLAMP" length="3" stride="4">
+			<reg32 offset="0" name="REG">
+				<bitfield name="HIGH"  low="0"  high="7"  type="uint"/>
+				<bitfield name="LOW"  low="8"  high="15"  type="uint"/>
+			</reg32>
+		</array>
+		<array offset="0x340" name="CSC_1_POST_CLAMP" length="3" stride="4">
+			<reg32 offset="0" name="REG">
+				<bitfield name="HIGH"  low="0"  high="7"  type="uint"/>
+				<bitfield name="LOW"  low="8"  high="15"  type="uint"/>
+			</reg32>
+		</array>
+		<array offset="0x34c" name="CSC_1_PRE_BIAS" length="3" stride="4">
+			<reg32 offset="0" name="REG">
+				<bitfield name="VALUE"  low="0"  high="8"  type="uint"/>
+			</reg32>
+		</array>
+		<array offset="0x358" name="CSC_1_POST_BIAS" length="3" stride="4">
+			<reg32 offset="0" name="REG">
+				<bitfield name="VALUE"  low="0"  high="8"  type="uint"/>
+			</reg32>
+		</array>
 		<!-- SSPP: -->
 		<reg32 offset="0x000" name="SRC_SIZE" type="reg_wh"/>
 		<reg32 offset="0x004" name="SRC_IMG_SIZE" type="reg_wh"/>
@@ -292,8 +336,8 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 			<bitfield name="UNPACK_COUNT" low="12" high="13" type="uint"/>
 			<bitfield name="UNPACK_TIGHT" pos="17" type="boolean"/>
 			<bitfield name="UNPACK_ALIGN_MSB" pos="18" type="boolean"/>
-			<bitfield name="NUM_PLANES" low="19" high="22" type="uint"/>
-			<bitfield name="CHROMA_SAMP" low="23" high="24" type="mdp5_chroma_samp_type"/>
+			<bitfield name="NUM_PLANES" low="19" high="20" type="mdp_sspp_fetch_type"/>
+			<bitfield name="CHROMA_SAMP" low="23" high="24" type="mdp_chroma_samp_type"/>
 		</reg32>
 		<reg32 offset="0x034" name="SRC_UNPACK" type="mdp_unpack_pattern"/>
 		<reg32 offset="0x038" name="SRC_OP_MODE">
@@ -335,6 +379,8 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 		</reg32>
 		<reg32 offset="0x210" name="SCALE_PHASE_STEP_X"/>
 		<reg32 offset="0x214" name="SCALE_PHASE_STEP_Y"/>
+		<reg32 offset="0x218" name="SCALE_CR_PHASE_STEP_X"/>
+		<reg32 offset="0x21c" name="SCALE_CR_PHASE_STEP_Y"/>
 		<reg32 offset="0x220" name="SCALE_INIT_PHASE_X"/>
 		<reg32 offset="0x224" name="SCALE_INIT_PHASE_Y"/>
 	</array>
diff --git a/rnndb/mdp/mdp_common.xml b/rnndb/mdp/mdp_common.xml
index 5154b48..6f805f7 100644
--- a/rnndb/mdp/mdp_common.xml
+++ b/rnndb/mdp/mdp_common.xml
@@ -6,6 +6,19 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
 
 <!-- random bits that seem same between mdp4 and mdp5 (ie. not much) -->
 
+<enum name="mdp_chroma_samp_type">
+    <value name="CHROMA_RGB"  value="0"/>
+    <value name="CHROMA_H2V1" value="1"/>
+    <value name="CHROMA_H1V2" value="2"/>
+    <value name="CHROMA_420"  value="3"/>
+</enum>
+
+<enum name="mdp_sspp_fetch_type">
+    <value name="MDP_PLANE_INTERLEAVED"   value="0"/>
+    <value name="MDP_PLANE_PLANAR"        value="1"/>
+    <value name="MDP_PLANE_PSEUDO_PLANAR" value="2"/>
+</enum>
+
 <enum name="mdp_mixer_stage_id">
 	<value name="STAGE_UNUSED" value="0"/>
 	<value name="STAGE_BASE" value="1"/>
-- 
Qualcomm Innovation Center, Inc.

The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux