提交 c8b4f288 编写于 作者: A Alex Deucher

drm/amdgpu: switch UVD code to use UVD_NO_OP for padding

Replace packet2's with packet0 writes to UVD_NO_OP.  The
value written to UVD_NO_OP does not matter.
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 4d6bdbad
...@@ -957,8 +957,10 @@ static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo, ...@@ -957,8 +957,10 @@ static int amdgpu_uvd_send_msg(struct amdgpu_ring *ring, struct amdgpu_bo *bo,
ib->ptr[3] = addr >> 32; ib->ptr[3] = addr >> 32;
ib->ptr[4] = PACKET0(mmUVD_GPCOM_VCPU_CMD, 0); ib->ptr[4] = PACKET0(mmUVD_GPCOM_VCPU_CMD, 0);
ib->ptr[5] = 0; ib->ptr[5] = 0;
for (i = 6; i < 16; ++i) for (i = 6; i < 16; i += 2) {
ib->ptr[i] = PACKET2(0); ib->ptr[i] = PACKET0(mmUVD_NO_OP, 0);
ib->ptr[i+1] = 0;
}
ib->length_dw = 16; ib->length_dw = 16;
if (direct) { if (direct) {
......
...@@ -116,7 +116,7 @@ static int uvd_v4_2_sw_init(void *handle) ...@@ -116,7 +116,7 @@ static int uvd_v4_2_sw_init(void *handle)
ring = &adev->uvd.ring; ring = &adev->uvd.ring;
sprintf(ring->name, "uvd"); sprintf(ring->name, "uvd");
r = amdgpu_ring_init(adev, ring, 512, CP_PACKET2, 0xf, r = amdgpu_ring_init(adev, ring, 512, PACKET0(mmUVD_NO_OP, 0), 0xf,
&adev->uvd.irq, 0, AMDGPU_RING_TYPE_UVD); &adev->uvd.irq, 0, AMDGPU_RING_TYPE_UVD);
return r; return r;
......
...@@ -112,7 +112,7 @@ static int uvd_v5_0_sw_init(void *handle) ...@@ -112,7 +112,7 @@ static int uvd_v5_0_sw_init(void *handle)
ring = &adev->uvd.ring; ring = &adev->uvd.ring;
sprintf(ring->name, "uvd"); sprintf(ring->name, "uvd");
r = amdgpu_ring_init(adev, ring, 512, CP_PACKET2, 0xf, r = amdgpu_ring_init(adev, ring, 512, PACKET0(mmUVD_NO_OP, 0), 0xf,
&adev->uvd.irq, 0, AMDGPU_RING_TYPE_UVD); &adev->uvd.irq, 0, AMDGPU_RING_TYPE_UVD);
return r; return r;
......
...@@ -116,7 +116,7 @@ static int uvd_v6_0_sw_init(void *handle) ...@@ -116,7 +116,7 @@ static int uvd_v6_0_sw_init(void *handle)
ring = &adev->uvd.ring; ring = &adev->uvd.ring;
sprintf(ring->name, "uvd"); sprintf(ring->name, "uvd");
r = amdgpu_ring_init(adev, ring, 512, CP_PACKET2, 0xf, r = amdgpu_ring_init(adev, ring, 512, PACKET0(mmUVD_NO_OP, 0), 0xf,
&adev->uvd.irq, 0, AMDGPU_RING_TYPE_UVD); &adev->uvd.irq, 0, AMDGPU_RING_TYPE_UVD);
return r; return r;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#define mmUVD_UDEC_ADDR_CONFIG 0x3bd3 #define mmUVD_UDEC_ADDR_CONFIG 0x3bd3
#define mmUVD_UDEC_DB_ADDR_CONFIG 0x3bd4 #define mmUVD_UDEC_DB_ADDR_CONFIG 0x3bd4
#define mmUVD_UDEC_DBW_ADDR_CONFIG 0x3bd5 #define mmUVD_UDEC_DBW_ADDR_CONFIG 0x3bd5
#define mmUVD_NO_OP 0x3bff
#define mmUVD_LMI_RBC_RB_64BIT_BAR_LOW 0x3c69 #define mmUVD_LMI_RBC_RB_64BIT_BAR_LOW 0x3c69
#define mmUVD_LMI_RBC_RB_64BIT_BAR_HIGH 0x3c68 #define mmUVD_LMI_RBC_RB_64BIT_BAR_HIGH 0x3c68
#define mmUVD_LMI_RBC_IB_64BIT_BAR_LOW 0x3c67 #define mmUVD_LMI_RBC_IB_64BIT_BAR_LOW 0x3c67
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#define mmUVD_UDEC_DB_ADDR_CONFIG 0x3bd4 #define mmUVD_UDEC_DB_ADDR_CONFIG 0x3bd4
#define mmUVD_UDEC_DBW_ADDR_CONFIG 0x3bd5 #define mmUVD_UDEC_DBW_ADDR_CONFIG 0x3bd5
#define mmUVD_POWER_STATUS_U 0x3bfd #define mmUVD_POWER_STATUS_U 0x3bfd
#define mmUVD_NO_OP 0x3bff
#define mmUVD_LMI_RBC_RB_64BIT_BAR_LOW 0x3c69 #define mmUVD_LMI_RBC_RB_64BIT_BAR_LOW 0x3c69
#define mmUVD_LMI_RBC_RB_64BIT_BAR_HIGH 0x3c68 #define mmUVD_LMI_RBC_RB_64BIT_BAR_HIGH 0x3c68
#define mmUVD_LMI_RBC_IB_64BIT_BAR_LOW 0x3c67 #define mmUVD_LMI_RBC_IB_64BIT_BAR_LOW 0x3c67
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册