AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "StDenis, Tom" <Tom.StDenis-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/amd/amdgpu: remove vram_page_split kernel option
Date: Tue, 4 Jun 2019 15:59:15 +0200	[thread overview]
Message-ID: <10ad3c78-9539-d135-d38f-bcbb3e6e5ca1@gmail.com> (raw)
In-Reply-To: <20190604134905.9172-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>

Am 04.06.19 um 15:49 schrieb StDenis, Tom:
> This option is no longer needed.  The default code paths
> are now the only option.

NAK, we still need the functionality. It just doesn't needs to be 
configurable, but rather use the CPU defaults.

Christian.

>
> Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu.h          | 1 -
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c   | 7 -------
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c      | 8 --------
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 +------
>   4 files changed, 1 insertion(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 19a00282e34c..e54f31865f60 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -142,7 +142,6 @@ extern uint amdgpu_sdma_phase_quantum;
>   extern char *amdgpu_disable_cu;
>   extern char *amdgpu_virtual_display;
>   extern uint amdgpu_pp_feature_mask;
> -extern int amdgpu_vram_page_split;
>   extern int amdgpu_ngg;
>   extern int amdgpu_prim_buf_per_se;
>   extern int amdgpu_pos_buf_per_se;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index d00fd5dd307a..ef7d99ebe92d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -973,13 +973,6 @@ static int amdgpu_device_check_arguments(struct amdgpu_device *adev)
>   
>   	amdgpu_device_check_block_size(adev);
>   
> -	if (amdgpu_vram_page_split != -1 && (amdgpu_vram_page_split < 16 ||
> -	    !is_power_of_2(amdgpu_vram_page_split))) {
> -		dev_warn(adev->dev, "invalid VRAM page split (%d)\n",
> -			 amdgpu_vram_page_split);
> -		amdgpu_vram_page_split = 1024;
> -	}
> -
>   	ret = amdgpu_device_get_job_timeout_settings(adev);
>   	if (ret) {
>   		dev_err(adev->dev, "invalid lockup_timeout parameter syntax\n");
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 1f38d6fc1fe3..ef22a2a25448 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -108,7 +108,6 @@ int amdgpu_vm_fragment_size = -1;
>   int amdgpu_vm_block_size = -1;
>   int amdgpu_vm_fault_stop = 0;
>   int amdgpu_vm_debug = 0;
> -int amdgpu_vram_page_split = 512;
>   int amdgpu_vm_update_mode = -1;
>   int amdgpu_exp_hw_support = 0;
>   int amdgpu_dc = -1;
> @@ -342,13 +341,6 @@ module_param_named(vm_debug, amdgpu_vm_debug, int, 0644);
>   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");
>   module_param_named(vm_update_mode, amdgpu_vm_update_mode, int, 0444);
>   
> -/**
> - * DOC: vram_page_split (int)
> - * Override the number of pages after we split VRAM allocations (default 512, -1 = disable). The default is 512.
> - */
> -MODULE_PARM_DESC(vram_page_split, "Number of pages after we split VRAM allocations (default 512, -1 = disable)");
> -module_param_named(vram_page_split, amdgpu_vram_page_split, int, 0444);
> -
>   /**
>    * DOC: exp_hw_support (int)
>    * Enable experimental hw support (1 = enable). The default is 0 (disabled).
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> index ec9ea3fdbb4a..4f77a6056a3b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> @@ -284,14 +284,9 @@ static int amdgpu_vram_mgr_new(struct ttm_mem_type_manager *man,
>   	if (!lpfn)
>   		lpfn = man->size;
>   
> -	if (place->flags & TTM_PL_FLAG_CONTIGUOUS ||
> -	    amdgpu_vram_page_split == -1) {
> +	if (place->flags & TTM_PL_FLAG_CONTIGUOUS) {
>   		pages_per_node = ~0ul;
>   		num_nodes = 1;
> -	} else {
> -		pages_per_node = max((uint32_t)amdgpu_vram_page_split,
> -				     mem->page_alignment);
> -		num_nodes = DIV_ROUND_UP(mem->num_pages, pages_per_node);
>   	}
>   
>   	nodes = kvmalloc_array(num_nodes, sizeof(*nodes),

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2019-06-04 13:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 13:49 [PATCH] drm/amd/amdgpu: remove vram_page_split kernel option StDenis, Tom
     [not found] ` <20190604134905.9172-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2019-06-04 13:59   ` Christian König [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10ad3c78-9539-d135-d38f-bcbb3e6e5ca1@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Tom.StDenis-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox