UPSTREAM: drm/amdgpu: validate the parameters of bo mapping operations more clearly

Verify the parameters of
amdgpu_vm_bo_(map/replace_map/clearing_mappings) in one common place.

Fixes: dc54d3d1744d ("drm/amdgpu: implement AMDGPU_VA_OP_CLEAR v2")
Cc: stable@vger.kernel.org
Reported-by: Vlad Stolyarov <hexed@google.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 6fef2d4c00b5b8561ad68dd2b68173f5c6af1e75)

BUG=b:334941747
TEST=None

Signed-off-by: Rob Clark <robdclark@chromium.org>
Change-Id: I9b6883bb701e276d6b93c22e9dff6ba40591484e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5478119
Reviewed-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
1 file changed