From: Monk Liu <Monk.Liu@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Monk Liu <Monk.Liu@amd.com>
Subject: [PATCH 1/4] drm/amdgpu: don't try to reserve training bo for sriov
Date: Tue, 24 Mar 2020 18:58:50 +0800 [thread overview]
Message-ID: <1585047533-10966-1-git-send-email-Monk.Liu@amd.com> (raw)
1) SRIOV guest KMD doesn't care training buffer
2) if we resered training buffer that will overlap with IP discovery
reservation because training buffer is at vram_size - 0x8000 and
IP discovery is at ()vram_size - 0x10000 => vram_size -1)
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 665db23..54cfa3a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1859,9 +1859,10 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
*The reserved vram for memory training must be pinned to the specified
*place on the VRAM, so reserve it early.
*/
- r = amdgpu_ttm_training_reserve_vram_init(adev);
- if (r)
- return r;
+ if (!amdgpu_sriov_vf(adev))
+ r = amdgpu_ttm_training_reserve_vram_init(adev);
+ if (r)
+ return r;
/* allocate memory as required for VGA
* This is used for VGA emulation and pre-OS scanout buffers to
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2020-03-24 10:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 10:58 Monk Liu [this message]
2020-03-24 10:58 ` [PATCH 2/4] drm/amdgpu: purge ip_discovery headers Monk Liu
2020-03-24 10:58 ` [PATCH 3/4] drm/amdgpu: amends feature bits for MM bandwidth mgr Monk Liu
2020-03-24 10:58 ` [PATCH 4/4] drm/amdgpu: cleanup all virtualization detection routine Monk Liu
2020-03-24 15:36 ` Alex Deucher
2020-03-25 3:12 ` Deng, Emily
2020-03-25 8:28 ` [PATCH 1/4] drm/amdgpu: don't try to reserve training bo for sriov 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=1585047533-10966-1-git-send-email-Monk.Liu@amd.com \
--to=monk.liu@amd.com \
--cc=amd-gfx@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).