drm/amdgpu: add count field for the SDMA NOP packet v2
authorJammy Zhou <Jammy.Zhou@amd.com>
Mon, 31 Aug 2015 06:01:05 +0000 (14:01 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Sep 2015 16:21:35 +0000 (12:21 -0400)
This is added to support the burst NOP

v2: squash the typo fix

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/cikd.h
drivers/gpu/drm/amd/amdgpu/iceland_sdma_pkt_open.h
drivers/gpu/drm/amd/amdgpu/tonga_sdma_pkt_open.h

index a3e3dfaa01a4330a276f604ae912b65af3d9c512..7f6d457f250a477cbfc9cb82b0efecd0207a0ea4 100644 (file)
                                         (((op) & 0xFF) << 0))
 /* sDMA opcodes */
 #define        SDMA_OPCODE_NOP                                   0
+#      define SDMA_NOP_COUNT(x)                          (((x) & 0x3FFF) << 16)
 #define        SDMA_OPCODE_COPY                                  1
 #       define SDMA_COPY_SUB_OPCODE_LINEAR                0
 #       define SDMA_COPY_SUB_OPCODE_TILED                 1
index c723602c7b0cc865570200646b79fe6e890f9056..ee6a041cb288d7c84044883191c0e44a14d17df1 100644 (file)
 #define SDMA_PKT_NOP_HEADER_sub_op_shift  8
 #define SDMA_PKT_NOP_HEADER_SUB_OP(x) (((x) & SDMA_PKT_NOP_HEADER_sub_op_mask) << SDMA_PKT_NOP_HEADER_sub_op_shift)
 
+/*define for count field*/
+#define SDMA_PKT_NOP_HEADER_count_offset 0
+#define SDMA_PKT_NOP_HEADER_count_mask   0x00003FFF
+#define SDMA_PKT_NOP_HEADER_count_shift  16
+#define SDMA_PKT_NOP_HEADER_COUNT(x) (((x) & SDMA_PKT_NOP_HEADER_count_mask) << SDMA_PKT_NOP_HEADER_count_shift)
 
 #endif /* __ICELAND_SDMA_PKT_OPEN_H_ */
index 099b7b56113c6e5cfab9ed977dcdd6e4b7d3d3e3..e5ebd084288dbc3ab7437de8a06fbde44b7658eb 100644 (file)
 #define SDMA_PKT_NOP_HEADER_sub_op_shift  8
 #define SDMA_PKT_NOP_HEADER_SUB_OP(x) (((x) & SDMA_PKT_NOP_HEADER_sub_op_mask) << SDMA_PKT_NOP_HEADER_sub_op_shift)
 
+/*define for count field*/
+#define SDMA_PKT_NOP_HEADER_count_offset 0
+#define SDMA_PKT_NOP_HEADER_count_mask   0x00003FFF
+#define SDMA_PKT_NOP_HEADER_count_shift  16
+#define SDMA_PKT_NOP_HEADER_COUNT(x) (((x) & SDMA_PKT_NOP_HEADER_count_mask) << SDMA_PKT_NOP_HEADER_count_shift)
 
 #endif /* __TONGA_SDMA_PKT_OPEN_H_ */