<div dir="ltr">ping?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 4, 2019 at 1:15 PM StDenis, Tom <<a href="mailto:Tom.StDenis@amd.com">Tom.StDenis@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This option is no longer needed. The default code paths<br>
are now the only option.<br>
<br>
v2: Add HPAGE support and a default for non contiguous maps<br>
<br>
Signed-off-by: Tom St Denis <<a href="mailto:tom.stdenis@amd.com" target="_blank">tom.stdenis@amd.com</a>><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 -<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 -------<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 --------<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 14 +++++++++-----<br>
4 files changed, 9 insertions(+), 21 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
index 19a00282e34c..e54f31865f60 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
@@ -142,7 +142,6 @@ extern uint amdgpu_sdma_phase_quantum;<br>
extern char *amdgpu_disable_cu;<br>
extern char *amdgpu_virtual_display;<br>
extern uint amdgpu_pp_feature_mask;<br>
-extern int amdgpu_vram_page_split;<br>
extern int amdgpu_ngg;<br>
extern int amdgpu_prim_buf_per_se;<br>
extern int amdgpu_pos_buf_per_se;<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index d00fd5dd307a..ef7d99ebe92d 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -973,13 +973,6 @@ static int amdgpu_device_check_arguments(struct amdgpu_device *adev)<br>
<br>
amdgpu_device_check_block_size(adev);<br>
<br>
- if (amdgpu_vram_page_split != -1 && (amdgpu_vram_page_split < 16 ||<br>
- !is_power_of_2(amdgpu_vram_page_split))) {<br>
- dev_warn(adev->dev, "invalid VRAM page split (%d)\n",<br>
- amdgpu_vram_page_split);<br>
- amdgpu_vram_page_split = 1024;<br>
- }<br>
-<br>
ret = amdgpu_device_get_job_timeout_settings(adev);<br>
if (ret) {<br>
dev_err(adev->dev, "invalid lockup_timeout parameter syntax\n");<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
index 1f38d6fc1fe3..ef22a2a25448 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c<br>
@@ -108,7 +108,6 @@ int amdgpu_vm_fragment_size = -1;<br>
int amdgpu_vm_block_size = -1;<br>
int amdgpu_vm_fault_stop = 0;<br>
int amdgpu_vm_debug = 0;<br>
-int amdgpu_vram_page_split = 512;<br>
int amdgpu_vm_update_mode = -1;<br>
int amdgpu_exp_hw_support = 0;<br>
int amdgpu_dc = -1;<br>
@@ -342,13 +341,6 @@ module_param_named(vm_debug, amdgpu_vm_debug, int, 0644);<br>
MODULE_PARM_DESC(vm_update_mode, "VM update using CPU (0 = never (default except for large BAR(LB)), 1 = Graphics only, 2 = Compute only (default for LB), 3 = Both");<br>
module_param_named(vm_update_mode, amdgpu_vm_update_mode, int, 0444);<br>
<br>
-/**<br>
- * DOC: vram_page_split (int)<br>
- * Override the number of pages after we split VRAM allocations (default 512, -1 = disable). The default is 512.<br>
- */<br>
-MODULE_PARM_DESC(vram_page_split, "Number of pages after we split VRAM allocations (default 512, -1 = disable)");<br>
-module_param_named(vram_page_split, amdgpu_vram_page_split, int, 0444);<br>
-<br>
/**<br>
* DOC: exp_hw_support (int)<br>
* Enable experimental hw support (1 = enable). The default is 0 (disabled).<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c<br>
index ec9ea3fdbb4a..0bc01e25a0b4 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c<br>
@@ -284,17 +284,21 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man,<br>
if (!lpfn)<br>
lpfn = man->size;<br>
<br>
- if (place->flags & TTM_PL_FLAG_CONTIGUOUS ||<br>
- amdgpu_vram_page_split == -1) {<br>
+ if (place->flags & TTM_PL_FLAG_CONTIGUOUS) {<br>
pages_per_node = ~0ul;<br>
num_nodes = 1;<br>
} else {<br>
- pages_per_node = max((uint32_t)amdgpu_vram_page_split,<br>
- mem->page_alignment);<br>
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE<br>
+ pages_per_node = HPAGE_PMD_NR;<br>
+#else<br>
+ /* default to 512MB */<br>
+ pages_per_node = (512UL << (20UL - PAGE_SHIFT));<br>
+#endif<br>
+ pages_per_node = max((uint32_t)pages_per_node, mem->page_alignment);<br>
num_nodes = DIV_ROUND_UP(mem->num_pages, pages_per_node);<br>
}<br>
<br>
- nodes = kvmalloc_array(num_nodes, sizeof(*nodes),<br>
+ nodes = kvmalloc_array((uint32_t)num_nodes, sizeof(*nodes),<br>
GFP_KERNEL | __GFP_ZERO);<br>
if (!nodes)<br>
return -ENOMEM;<br>
-- <br>
2.21.0<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></blockquote></div>