aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2014-08-01 14:05:29 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-08-05 08:53:57 -0400
commit0e16e4cfde70e1cf00f9fe3a8f601d10e73e0ec6 (patch)
treed31bbaef688d575716566c85eaf7e66ff11214d7 /drivers/gpu
parentcc6f35362585b4d447358da0d5114e4aba275ac1 (diff)
drm/radeon: use packet2 for nop on hawaii with old firmware
Older firmware didn't support the new nop packet. v2 (Andreas Boll): - Drop usage of packet3 for new firmware Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> (v1) Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/cik.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index afdfe04a9290..2cb507ab0b7c 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -8259,6 +8259,7 @@ restart_ih:
8259static int cik_startup(struct radeon_device *rdev) 8259static int cik_startup(struct radeon_device *rdev)
8260{ 8260{
8261 struct radeon_ring *ring; 8261 struct radeon_ring *ring;
8262 u32 nop;
8262 int r; 8263 int r;
8263 8264
8264 /* enable pcie gen2/3 link */ 8265 /* enable pcie gen2/3 link */
@@ -8392,9 +8393,15 @@ static int cik_startup(struct radeon_device *rdev)
8392 } 8393 }
8393 cik_irq_set(rdev); 8394 cik_irq_set(rdev);
8394 8395
8396 if (rdev->family == CHIP_HAWAII) {
8397 nop = RADEON_CP_PACKET2;
8398 } else {
8399 nop = PACKET3(PACKET3_NOP, 0x3FFF);
8400 }
8401
8395 ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX]; 8402 ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX];
8396 r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP_RPTR_OFFSET, 8403 r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP_RPTR_OFFSET,
8397 PACKET3(PACKET3_NOP, 0x3FFF)); 8404 nop);
8398 if (r) 8405 if (r)
8399 return r; 8406 return r;
8400 8407
@@ -8402,7 +8409,7 @@ static int cik_startup(struct radeon_device *rdev)
8402 /* type-2 packets are deprecated on MEC, use type-3 instead */ 8409 /* type-2 packets are deprecated on MEC, use type-3 instead */
8403 ring = &rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX]; 8410 ring = &rdev->ring[CAYMAN_RING_TYPE_CP1_INDEX];
8404 r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP1_RPTR_OFFSET, 8411 r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP1_RPTR_OFFSET,
8405 PACKET3(PACKET3_NOP, 0x3FFF)); 8412 nop);
8406 if (r) 8413 if (r)
8407 return r; 8414 return r;
8408 ring->me = 1; /* first MEC */ 8415 ring->me = 1; /* first MEC */
@@ -8413,7 +8420,7 @@ static int cik_startup(struct radeon_device *rdev)
8413 /* type-2 packets are deprecated on MEC, use type-3 instead */ 8420 /* type-2 packets are deprecated on MEC, use type-3 instead */
8414 ring = &rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX]; 8421 ring = &rdev->ring[CAYMAN_RING_TYPE_CP2_INDEX];
8415 r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP2_RPTR_OFFSET, 8422 r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP2_RPTR_OFFSET,
8416 PACKET3(PACKET3_NOP, 0x3FFF)); 8423 nop);
8417 if (r) 8424 if (r)
8418 return r; 8425 return r;
8419 /* dGPU only have 1 MEC */ 8426 /* dGPU only have 1 MEC */