drm/amd/amdgpu: Clean up gfx_v8_0_mqd_init()
authorTom St Denis <tom.stdenis@amd.com>
Tue, 4 Apr 2017 13:48:32 +0000 (09:48 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Apr 2017 17:26:49 +0000 (13:26 -0400)
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>
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

index fcd441c20e4929f371e335aaa42e33fd43ddb62f..14a6fbdf429ba5c898f70c2aa4e2c53caac782ea 100644 (file)
@@ -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;