summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorTom St Denis2017-04-04 15:48:32 +0200
committerAlex Deucher2017-04-06 19:26:49 +0200
commitbb215962f626f6367f5ff93d4764d417f046e014 (patch)
tree45c079c321b5a32cba12569f11f7b41484045ff4 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parentdrm/amd/amdgpu: de-numberify HQD_ACTIVE check. (diff)
downloadkernel-qcow2-linux-bb215962f626f6367f5ff93d4764d417f046e014.tar.gz
kernel-qcow2-linux-bb215962f626f6367f5ff93d4764d417f046e014.tar.xz
kernel-qcow2-linux-bb215962f626f6367f5ff93d4764d417f046e014.zip
drm/amd/amdgpu: Clean up gfx_v8_0_mqd_init()
Clean up a toggle with ?:. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index fcd441c20e49..14a6fbdf429b 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4722,14 +4722,10 @@ static int gfx_v8_0_mqd_init(struct amdgpu_ring *ring)
mqd->cp_hqd_eop_control = tmp;
/* enable doorbell? */
- tmp = RREG32(mmCP_HQD_PQ_DOORBELL_CONTROL);
-
- if (ring->use_doorbell)
- tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
- DOORBELL_EN, 1);
- else
- tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
- DOORBELL_EN, 0);
+ tmp = REG_SET_FIELD(RREG32(mmCP_HQD_PQ_DOORBELL_CONTROL),
+ CP_HQD_PQ_DOORBELL_CONTROL,
+ DOORBELL_EN,
+ ring->use_doorbell ? 1 : 0);
mqd->cp_hqd_pq_doorbell_control = tmp;