lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3a94c221-1594-4522-a6e9-9368d1c91bc3@amd.com>
Date: Mon, 17 Nov 2025 10:54:05 +0100
From: Christian König <christian.koenig@....com>
To: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>,
 Alex Deucher <alexander.deucher@....com>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 16/20] drm/amdgpu: give ttm entities access to all the
 sdma scheds

On 11/13/25 17:05, Pierre-Eric Pelloux-Prayer wrote:
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>

This patch needs some more text in the commit message, but apart from that Reviewed-by: Christian König <christian.koenig@....com>

Regards,
Christian.

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 11fec0fa4c11..94d0ff34593f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -2191,8 +2191,8 @@ u32 amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
>  	u32 num_clear_entities, num_move_entities;
>  	u32 windows, w;
>  
> -	num_clear_entities = adev->sdma.num_instances;
> -	num_move_entities = MIN(adev->sdma.num_instances, TTM_NUM_MOVE_FENCES);
> +	num_clear_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
> +	num_move_entities = MIN(adev->mman.num_buffer_funcs_scheds, TTM_NUM_MOVE_FENCES);
>  	windows = adev->gmc.is_app_apu ? 0 : (2 * num_move_entities + num_clear_entities);
>  
>  	if (!adev->mman.initialized || amdgpu_in_reset(adev) ||
> @@ -2200,11 +2200,8 @@ u32 amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
>  		return windows;
>  
>  	if (enable) {
> -		struct drm_gpu_scheduler *sched;
> -
> -		sched = adev->mman.buffer_funcs_scheds[0];
>  		r = drm_sched_entity_init(&adev->mman.default_entity.base,
> -					  DRM_SCHED_PRIORITY_KERNEL, &sched,
> +					  DRM_SCHED_PRIORITY_KERNEL, adev->mman.buffer_funcs_scheds,
>  					  1, NULL);
>  		if (r) {
>  			dev_err(adev->dev, "Failed setting up entity (%d)\n",
> @@ -2216,8 +2213,9 @@ u32 amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
>  		atomic_set(&adev->mman.next_move_entity, 0);
>  		for (i = 0; i < num_move_entities; i++) {
>  			r = drm_sched_entity_init(&adev->mman.move_entities[i].base,
> -						  DRM_SCHED_PRIORITY_NORMAL, &sched,
> -						  1, NULL);
> +						  DRM_SCHED_PRIORITY_NORMAL,
> +						  adev->mman.buffer_funcs_scheds,
> +						  adev->mman.num_buffer_funcs_scheds, NULL);
>  			if (r) {
>  				dev_err(adev->dev,
>  					"Failed setting up TTM BO move entities (%d)\n",
> @@ -2239,8 +2237,9 @@ u32 amdgpu_ttm_set_buffer_funcs_status(struct amdgpu_device *adev, bool enable)
>  
>  		for (i = 0; i < num_clear_entities; i++) {
>  			r = drm_sched_entity_init(&adev->mman.clear_entities[i].base,
> -						  DRM_SCHED_PRIORITY_NORMAL, &sched,
> -						  1, NULL);
> +						  DRM_SCHED_PRIORITY_NORMAL,
> +						  adev->mman.buffer_funcs_scheds,
> +						  adev->mman.num_buffer_funcs_scheds, NULL);
>  			if (r) {
>  				for (j = 0; j < num_move_entities; j++)
>  					drm_sched_entity_destroy(


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ