From: Pixel Ding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Monk.Liu-5C7GfCeVMHo@public.gmane.org,
Christian.Koenig-5C7GfCeVMHo@public.gmane.org
Cc: Gary.Sun-5C7GfCeVMHo@public.gmane.org,
pding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>,
Bingley.Li-5C7GfCeVMHo@public.gmane.org
Subject: [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post
Date: Tue, 17 Oct 2017 14:37:45 +0800 [thread overview]
Message-ID: <1508222267-18627-2-git-send-email-Pixel.Ding@amd.com> (raw)
In-Reply-To: <1508222267-18627-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
From: pding <Pixel.Ding@amd.com>
The post checking on scratch registers isn't reliable for virtual
function.
Signed-off-by: pding <Pixel.Ding@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 683965b..ab8f0d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -669,7 +669,7 @@ void amdgpu_gart_location(struct amdgpu_device *adev, struct amdgpu_mc *mc)
* or post is needed if hw reset is performed.
* Returns true if need or false if not.
*/
-bool amdgpu_need_post(struct amdgpu_device *adev)
+static bool amdgpu_check_post(struct amdgpu_device *adev)
{
uint32_t reg;
@@ -692,7 +692,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
}
-static bool amdgpu_vpost_needed(struct amdgpu_device *adev)
+bool amdgpu_need_post(struct amdgpu_device *adev)
{
if (amdgpu_sriov_vf(adev))
return false;
@@ -716,7 +716,7 @@ static bool amdgpu_vpost_needed(struct amdgpu_device *adev)
return true;
}
}
- return amdgpu_need_post(adev);
+ return amdgpu_check_post(adev);
}
/**
@@ -2208,7 +2208,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
amdgpu_device_detect_sriov_bios(adev);
/* Post card if necessary */
- if (amdgpu_vpost_needed(adev)) {
+ if (amdgpu_need_post(adev)) {
if (!adev->bios) {
dev_err(adev->dev, "no vBIOS found\n");
amdgpu_vf_error_put(AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
--
2.9.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-10-17 6:37 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 6:37 Make staging driver stable for SRIOV VF (1 v2) Pixel Ding
[not found] ` <1508222267-18627-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 6:37 ` Pixel Ding [this message]
[not found] ` <1508222267-18627-2-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 7:48 ` [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post Liu, Monk
[not found] ` <BLUPR12MB04492724C9C66EF3ABA7C295844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17 7:53 ` Ding, Pixel
[not found] ` <77D84CB4-2676-4DBC-AB49-431923E87EAC-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:00 ` Liu, Monk
[not found] ` <BLUPR12MB0449C0C378B70A73A44579CC844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17 8:06 ` Ding, Pixel
[not found] ` <BA0191B9-16C3-43D8-9816-BF77301CE5D5-5C7GfCeVMHo@public.gmane.org>
2017-10-18 2:13 ` Liu, Monk
2017-10-18 2:25 ` Ding, Pixel
[not found] ` <9035FC71-9AB1-406C-9A0B-8B050E51C7F4-5C7GfCeVMHo@public.gmane.org>
2017-10-18 7:19 ` Ding, Pixel
[not found] ` <83AE16CE-43F8-44E7-AEF6-6FA581134C7A-5C7GfCeVMHo@public.gmane.org>
2017-10-18 7:23 ` Christian König
[not found] ` <b3d8df4b-38f9-2bc2-3340-782069591058-5C7GfCeVMHo@public.gmane.org>
2017-10-18 9:13 ` Liu, Monk
2017-10-18 9:20 ` Ding, Pixel
2017-10-18 14:08 ` Deucher, Alexander
[not found] ` <BN6PR12MB16521D66D545EE9CF038725AF74D0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-19 3:23 ` Ding, Pixel
[not found] ` <5D15F8FE-DDA7-4AC9-AB1B-2B69ED5C410F-5C7GfCeVMHo@public.gmane.org>
2017-10-19 3:32 ` Deucher, Alexander
2017-10-17 6:37 ` [PATCH 2/3] drm/amdgpu: report more amdgpu_fence_info v2 Pixel Ding
[not found] ` <1508222267-18627-3-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 7:03 ` Christian König
2017-10-17 7:49 ` Liu, Monk
[not found] ` <BLUPR12MB0449B223F1C69AE2587EE9F5844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17 7:55 ` Ding, Pixel
[not found] ` <AE86FEF5-92C5-4F1B-B302-5A9289C42CD8-5C7GfCeVMHo@public.gmane.org>
2017-10-17 7:59 ` Liu, Monk
2017-10-17 6:37 ` [PATCH 3/3] drm/amdgpu: busywait KIQ register accessing v2 Pixel Ding
[not found] ` <1508222267-18627-4-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:20 ` Christian König
[not found] ` <7f22595c-ae6d-f859-3ba6-42fe30a24707-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:38 ` Ding, Pixel
[not found] ` <E8EDC6D0-8756-4E09-8C0F-187CE061A470-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:59 ` Christian König
[not found] ` <b6506918-3acf-6480-2f90-6b4bbc09eada-5C7GfCeVMHo@public.gmane.org>
2017-10-17 9:27 ` Ding, Pixel
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=1508222267-18627-2-git-send-email-Pixel.Ding@amd.com \
--to=pixel.ding-5c7gfcevmho@public.gmane.org \
--cc=Bingley.Li-5C7GfCeVMHo@public.gmane.org \
--cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
--cc=Gary.Sun-5C7GfCeVMHo@public.gmane.org \
--cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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