Commit 12a7f320 authored by Alex Deucher's avatar Alex Deucher Committed by Greg Kroah-Hartman

drm/radeon: use packet2 for nop on hawaii with old firmware

commit 0e16e4cf upstream.

Older firmware didn't support the new nop packet.

v2 (Andreas Boll):
 - Drop usage of packet3 for new firmware
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
Signed-off-by: default avatarAndreas Boll <andreas.boll.dev@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 50c24c23
......@@ -7901,6 +7901,7 @@ int cik_irq_process(struct radeon_device *rdev)
static int cik_startup(struct radeon_device *rdev)
{
struct radeon_ring *ring;
u32 nop;
int r;
/* enable pcie gen2/3 link */
......@@ -8034,9 +8035,15 @@ static int cik_startup(struct radeon_device *rdev)
}
cik_irq_set(rdev);
if (rdev->family == CHIP_HAWAII) {
nop = RADEON_CP_PACKET2;
} else {
nop = PACKET3(PACKET3_NOP, 0x3FFF);
}
ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX];
r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP_RPTR_OFFSET,
PACKET3(PACKET3_NOP, 0x3FFF));
nop);
if (r)
return r;
......@@ -8044,7 +8051,7 @@ static int cik_startup(struct radeon_device *rdev)
/* type-2 packets are deprecated on MEC, use type-3 instead */
ring = &rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX];
r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP1_RPTR_OFFSET,
PACKET3(PACKET3_NOP, 0x3FFF));
nop);
if (r)
return r;
ring->me = 1; /* first MEC */
......@@ -8055,7 +8062,7 @@ static int cik_startup(struct radeon_device *rdev)
/* type-2 packets are deprecated on MEC, use type-3 instead */
ring = &rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX];
r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP2_RPTR_OFFSET,
PACKET3(PACKET3_NOP, 0x3FFF));
nop);
if (r)
return r;
/* 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