diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1044-drm-amdgpu_vm-fix-boolean-expressions.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1044-drm-amdgpu_vm-fix-boolean-expressions.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1044-drm-amdgpu_vm-fix-boolean-expressions.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1044-drm-amdgpu_vm-fix-boolean-expressions.patch new file mode 100644 index 00000000..bdca855c --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1044-drm-amdgpu_vm-fix-boolean-expressions.patch @@ -0,0 +1,43 @@ +From b7f399398343b297afad9a32d14cacd3f12a2839 Mon Sep 17 00:00:00 2001 +From: "Gustavo A. R. Silva" <gustavo@embeddedor.com> +Date: Thu, 3 Jan 2019 14:01:46 -0600 +Subject: [PATCH 1044/2940] drm/amdgpu_vm: fix boolean expressions + +Fix boolean expressions by using logical AND operator '&&' +instead of bitwise operator '&'. + +This issue was detected with the help of Coccinelle. + +Fixes: 9a4b7d4c769e ("drm/amdgpu: Add vm context module param") +Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> +Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +index 12dd9db52da9..29127438510f 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +@@ -3021,7 +3021,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, + } + DRM_DEBUG_DRIVER("VM update mode is %s\n", + vm->use_cpu_for_update ? "CPU" : "SDMA"); +- WARN_ONCE((vm->use_cpu_for_update & !amdgpu_gmc_vram_full_visible(&adev->gmc)), ++ WARN_ONCE((vm->use_cpu_for_update && !amdgpu_gmc_vram_full_visible(&adev->gmc)), + "CPU update of VM recommended only for large BAR system\n"); + vm->last_update = NULL; + +@@ -3139,7 +3139,7 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm) + vm->pte_support_ats = pte_support_ats; + DRM_DEBUG_DRIVER("VM update mode is %s\n", + vm->use_cpu_for_update ? "CPU" : "SDMA"); +- WARN_ONCE((vm->use_cpu_for_update & !amdgpu_gmc_vram_full_visible(&adev->gmc)), ++ WARN_ONCE((vm->use_cpu_for_update && !amdgpu_gmc_vram_full_visible(&adev->gmc)), + "CPU update of VM recommended only for large BAR system\n"); + + if (vm->pasid) { +-- +2.17.1 + |