From: Pierre-Eric Pelloux-Prayer <pierre-eric@damsy.net>
To: "Lazar, Lijo" <Lijo.Lazar@amd.com>,
"Pelloux-Prayer,
Pierre-Eric" <Pierre-eric.Pelloux-prayer@amd.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Koenig, Christian" <Christian.Koenig@amd.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 2/2] drm/amdgpu: delay ttm buffer func enablement on xgmi
Date: Wed, 17 Jun 2026 15:45:38 +0200 [thread overview]
Message-ID: <de08e4f5-dad1-441c-9397-48f7991f41ec@damsy.net> (raw)
In-Reply-To: <SA0PR12MB7091079B864676A8379E6B7997E52@SA0PR12MB7091.namprd12.prod.outlook.com>
Le 16/06/2026 à 16:41, Lazar, Lijo a écrit :
> Public
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Pierre-Eric Pelloux-Prayer
> Sent: Tuesday, June 16, 2026 6:21 PM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; David Airlie <airlied@gmail.com>; Simona Vetter <simona@ffwll.ch>; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux-prayer@amd.com>
> Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org
> Subject: [PATCH v1 2/2] drm/amdgpu: delay ttm buffer func enablement on xgmi
>
> When amdgpu_init_minimal_xgmi is used, SDMA engines init is delayed so amdgpu_ttm_enable_buffer_funcs must be called later.
>
> Without this, the check for num_buffer_funcs_scheds will fail and using ttm buffer funcs later will fail.
>
> Fixes: 3a5da695c8d1 ("drm/amdgpu: only use working sdma schedulers for ttm")
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
> drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 ++
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 57e10afb4714..2e8954fa5c40 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2479,7 +2479,8 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
> if (r)
> goto init_failed;
>
> - amdgpu_ttm_enable_buffer_funcs(adev);
> + if (amdgpu_ip_member_of_hwini(adev, AMD_IP_BLOCK_TYPE_SDMA))
> + amdgpu_ttm_enable_buffer_funcs(adev);
>
> /* Don't init kfd if whole hive need to be reset during init */
> if (adev->init_lvl->level != AMDGPU_INIT_LEVEL_MINIMAL_XGMI) { diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> index faac80a8a6eb..c0dca209335e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
> @@ -1663,6 +1663,8 @@ static void amdgpu_xgmi_reset_on_init_work(struct work_struct *work)
> if (r && r != -EHWPOISON)
> dev_err(tmp_adev->dev,
> "error during bad page data initialization");
> +
> + amdgpu_ttm_enable_buffer_funcs(tmp_adev);
>
> <lijo> This gets enabled in the resume path after xgmi reset. It is not needed here.
Good point. I've modified the patch in v2.
Thanks,
Pierre-Eric
>
> Thanks,
> Lijo
>
> }
> }
>
> --
> 2.43.0
next prev parent reply other threads:[~2026-06-17 13:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 12:50 [PATCH v1 1/2] drm/amdgpu: don't disable ttm buffer funcs on reset Pierre-Eric Pelloux-Prayer
2026-06-16 12:50 ` [PATCH v1 2/2] drm/amdgpu: delay ttm buffer func enablement on xgmi Pierre-Eric Pelloux-Prayer
2026-06-16 12:54 ` Christian König
2026-06-16 13:42 ` Alex Deucher
2026-06-16 14:41 ` Lazar, Lijo
2026-06-17 13:45 ` Pierre-Eric Pelloux-Prayer [this message]
2026-06-16 12:54 ` [PATCH v1 1/2] drm/amdgpu: don't disable ttm buffer funcs on reset Christian König
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=de08e4f5-dad1-441c-9397-48f7991f41ec@damsy.net \
--to=pierre-eric@damsy.net \
--cc=Alexander.Deucher@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=Lijo.Lazar@amd.com \
--cc=Pierre-eric.Pelloux-prayer@amd.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®