Commit 2615b53a authored by Alex Deucher's avatar Alex Deucher

drm/radeon/cik: switch to type3 nop packet for compute rings (v2)

Type 2 packets are deprecated on CIK MEC and we should use
type 3 nop packets.  Setting the count field to the max value
(0x3fff) indicates that only one dword should be skipped
like a type 2 packet.

v2: add comment to code
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarJerome Glisse <jglisse@redhat.com>
parent 963e81f9
...@@ -5467,10 +5467,11 @@ static int cik_startup(struct radeon_device *rdev) ...@@ -5467,10 +5467,11 @@ static int cik_startup(struct radeon_device *rdev)
return r; return r;
/* set up the compute queues */ /* set up the compute queues */
/* type-2 packets are deprecated on MEC, use type-3 instead */
ring = &rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX]; ring = &rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX];
r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP1_RPTR_OFFSET, r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP1_RPTR_OFFSET,
CP_HQD_PQ_RPTR, CP_HQD_PQ_WPTR, CP_HQD_PQ_RPTR, CP_HQD_PQ_WPTR,
0, 0xfffff, RADEON_CP_PACKET2); 0, 0xfffff, PACKET3(PACKET3_NOP, 0x3FFF));
if (r) if (r)
return r; return r;
ring->me = 1; /* first MEC */ ring->me = 1; /* first MEC */
...@@ -5478,10 +5479,11 @@ static int cik_startup(struct radeon_device *rdev) ...@@ -5478,10 +5479,11 @@ static int cik_startup(struct radeon_device *rdev)
ring->queue = 0; /* first queue */ ring->queue = 0; /* first queue */
ring->wptr_offs = CIK_WB_CP1_WPTR_OFFSET; ring->wptr_offs = CIK_WB_CP1_WPTR_OFFSET;
/* type-2 packets are deprecated on MEC, use type-3 instead */
ring = &rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX]; ring = &rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX];
r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP2_RPTR_OFFSET, r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP2_RPTR_OFFSET,
CP_HQD_PQ_RPTR, CP_HQD_PQ_WPTR, CP_HQD_PQ_RPTR, CP_HQD_PQ_WPTR,
0, 0xffffffff, RADEON_CP_PACKET2); 0, 0xffffffff, PACKET3(PACKET3_NOP, 0x3FFF));
if (r) if (r)
return r; return r;
/* dGPU only have 1 MEC */ /* dGPU only have 1 MEC */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment