mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: unit: update 'Targets' for test_nvgpu_sgt_basic_apis
* This patch adds a missing 'Targets' field (nvgpu_sgt_get_length()) in the SWUTS of common.mm nvgpu_sgt unit. * Added nvgpu_sgt_get_length() api validation sequence in test_nvgpu_sgt_basic_apis(). JIRA NVGPU-5932 Change-Id: Id079b2ec012e6a7cc4973ff47ac19c877e21bf87 Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2466697 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Dinesh T <dt@nvidia.com> Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
e7226ccb1b
commit
f3ee39505c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -94,6 +94,11 @@ int test_nvgpu_sgt_basic_apis(struct unit_module *m, struct gk20a *g,
|
||||
ret = UNIT_FAIL;
|
||||
}
|
||||
|
||||
if (nvgpu_sgt_get_length(sgt, sgt->sgl) != SZ_1M) {
|
||||
unit_err(m, "%s: nvgpu_sgt_get_length incorrect\n", __func__);
|
||||
ret = UNIT_FAIL;
|
||||
}
|
||||
|
||||
p->mm_sgt_is_iommuable = false;
|
||||
if (nvgpu_sgt_iommuable(g, sgt) != p->mm_sgt_is_iommuable) {
|
||||
unit_err(m, "%s: nvgpu_sgt_iommuable wrong, expected %s\n",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-2021, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -41,7 +41,8 @@ struct unit_module;
|
||||
*
|
||||
* Targets: nvgpu_mem_posix_create_from_list, nvgpu_sgt_create_from_mem,
|
||||
* nvgpu_sgt_get_phys, nvgpu_sgt_get_dma, nvgpu_sgt_iommuable,
|
||||
* nvgpu_sgt_get_gpu_addr, nvgpu_sgt_get_ipa, nvgpu_sgt_ipa_to_pa
|
||||
* nvgpu_sgt_get_gpu_addr, nvgpu_sgt_get_ipa, nvgpu_sgt_get_length,
|
||||
* nvgpu_sgt_ipa_to_pa
|
||||
*
|
||||
* Input: None
|
||||
*
|
||||
@@ -55,6 +56,8 @@ struct unit_module;
|
||||
* set to the VA set in the nvgpu_mem.
|
||||
* - Test nvgpu_sgt_get_dma by passing in the sgl from sgt above, and verify
|
||||
* correct DMA address is returned.
|
||||
* - Test nvgpu_sgt_get_length by passing in the sgl from sgt above, and verify
|
||||
* correct sgl length is returned.
|
||||
* - Test nvgpu_sgt_iommuable.
|
||||
* - Call nvgpu_sgt_iommuable() and verify returned value maches what is set
|
||||
* posix struct member mm_sgt_is_iommuable.
|
||||
@@ -162,4 +165,4 @@ int test_nvgpu_sgt_alignment_non_iommu(struct unit_module *m,
|
||||
int test_nvgpu_sgt_alignment_with_iommu(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
|
||||
#endif /* UNIT_NVGPU_SGT_H */
|
||||
#endif /* UNIT_NVGPU_SGT_H */
|
||||
|
||||
Reference in New Issue
Block a user