diff options
author | Edward O'Callaghan <funfunctor@folklore1984.net> | 2016-07-11 20:17:53 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-29 14:36:48 -0400 |
commit | 004e29ccf034ea1fb08e77b76106891bb88fae6f (patch) | |
tree | 4d1101e968575e819c94c465ff2c3f09a9f2ea55 /drivers/gpu/drm/amd/amdgpu | |
parent | ed5121a3d8fdd8992a82a3815642fc46108300fc (diff) |
drivers/amdgpu: Use canonical form in branch predicates
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-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')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c index 99ca75baa47d..2b6afe123f3d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | |||
@@ -352,22 +352,22 @@ bool amdgpu_get_bios(struct amdgpu_device *adev) | |||
352 | uint16_t tmp, bios_header_start; | 352 | uint16_t tmp, bios_header_start; |
353 | 353 | ||
354 | r = amdgpu_atrm_get_bios(adev); | 354 | r = amdgpu_atrm_get_bios(adev); |
355 | if (r == false) | 355 | if (!r) |
356 | r = amdgpu_acpi_vfct_bios(adev); | 356 | r = amdgpu_acpi_vfct_bios(adev); |
357 | if (r == false) | 357 | if (!r) |
358 | r = igp_read_bios_from_vram(adev); | 358 | r = igp_read_bios_from_vram(adev); |
359 | if (r == false) | 359 | if (!r) |
360 | r = amdgpu_read_bios(adev); | 360 | r = amdgpu_read_bios(adev); |
361 | if (r == false) { | 361 | if (!r) { |
362 | r = amdgpu_read_bios_from_rom(adev); | 362 | r = amdgpu_read_bios_from_rom(adev); |
363 | } | 363 | } |
364 | if (r == false) { | 364 | if (!r) { |
365 | r = amdgpu_read_disabled_bios(adev); | 365 | r = amdgpu_read_disabled_bios(adev); |
366 | } | 366 | } |
367 | if (r == false) { | 367 | if (!r) { |
368 | r = amdgpu_read_platform_bios(adev); | 368 | r = amdgpu_read_platform_bios(adev); |
369 | } | 369 | } |
370 | if (r == false || adev->bios == NULL) { | 370 | if (!r || adev->bios == NULL) { |
371 | DRM_ERROR("Unable to locate a BIOS ROM\n"); | 371 | DRM_ERROR("Unable to locate a BIOS ROM\n"); |
372 | adev->bios = NULL; | 372 | adev->bios = NULL; |
373 | return false; | 373 | return false; |
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c index 573bc973d692..42a59fc60b2a 100644 --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c | |||
@@ -3034,7 +3034,7 @@ static int ci_populate_single_memory_level(struct amdgpu_device *adev, | |||
3034 | 3034 | ||
3035 | if (pi->mclk_stutter_mode_threshold && | 3035 | if (pi->mclk_stutter_mode_threshold && |
3036 | (memory_clock <= pi->mclk_stutter_mode_threshold) && | 3036 | (memory_clock <= pi->mclk_stutter_mode_threshold) && |
3037 | (pi->uvd_enabled == false) && | 3037 | (!pi->uvd_enabled) && |
3038 | (RREG32(mmDPG_PIPE_STUTTER_CONTROL) & DPG_PIPE_STUTTER_CONTROL__STUTTER_ENABLE_MASK) && | 3038 | (RREG32(mmDPG_PIPE_STUTTER_CONTROL) & DPG_PIPE_STUTTER_CONTROL__STUTTER_ENABLE_MASK) && |
3039 | (adev->pm.dpm.new_active_crtc_count <= 2)) | 3039 | (adev->pm.dpm.new_active_crtc_count <= 2)) |
3040 | memory_level->StutterEnable = true; | 3040 | memory_level->StutterEnable = true; |
diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c index a7de4d18ac94..4efc901f658c 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik.c +++ b/drivers/gpu/drm/amd/amdgpu/cik.c | |||
@@ -879,7 +879,7 @@ static void cik_vga_set_state(struct amdgpu_device *adev, bool state) | |||
879 | uint32_t tmp; | 879 | uint32_t tmp; |
880 | 880 | ||
881 | tmp = RREG32(mmCONFIG_CNTL); | 881 | tmp = RREG32(mmCONFIG_CNTL); |
882 | if (state == false) | 882 | if (!state) |
883 | tmp |= CONFIG_CNTL__VGA_DIS_MASK; | 883 | tmp |= CONFIG_CNTL__VGA_DIS_MASK; |
884 | else | 884 | else |
885 | tmp &= ~CONFIG_CNTL__VGA_DIS_MASK; | 885 | tmp &= ~CONFIG_CNTL__VGA_DIS_MASK; |
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index 6507a7ee75e4..c1eedc466526 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |||
@@ -354,7 +354,7 @@ static void cik_sdma_enable(struct amdgpu_device *adev, bool enable) | |||
354 | u32 me_cntl; | 354 | u32 me_cntl; |
355 | int i; | 355 | int i; |
356 | 356 | ||
357 | if (enable == false) { | 357 | if (!enable) { |
358 | cik_sdma_gfx_stop(adev); | 358 | cik_sdma_gfx_stop(adev); |
359 | cik_sdma_rlc_stop(adev); | 359 | cik_sdma_rlc_stop(adev); |
360 | } | 360 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c index 0111d153411b..9d43c6ca37e6 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | |||
@@ -393,7 +393,7 @@ static void sdma_v2_4_enable(struct amdgpu_device *adev, bool enable) | |||
393 | u32 f32_cntl; | 393 | u32 f32_cntl; |
394 | int i; | 394 | int i; |
395 | 395 | ||
396 | if (enable == false) { | 396 | if (!enable) { |
397 | sdma_v2_4_gfx_stop(adev); | 397 | sdma_v2_4_gfx_stop(adev); |
398 | sdma_v2_4_rlc_stop(adev); | 398 | sdma_v2_4_rlc_stop(adev); |
399 | } | 399 | } |
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c index 2b8ce5808a14..4debd0dc47d8 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | |||
@@ -604,7 +604,7 @@ static void sdma_v3_0_enable(struct amdgpu_device *adev, bool enable) | |||
604 | u32 f32_cntl; | 604 | u32 f32_cntl; |
605 | int i; | 605 | int i; |
606 | 606 | ||
607 | if (enable == false) { | 607 | if (!enable) { |
608 | sdma_v3_0_gfx_stop(adev); | 608 | sdma_v3_0_gfx_stop(adev); |
609 | sdma_v3_0_rlc_stop(adev); | 609 | sdma_v3_0_rlc_stop(adev); |
610 | } | 610 | } |