* [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
@ 2017-10-18 9:59 Monk Liu
[not found] ` <1508320755-12780-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Monk Liu @ 2017-10-18 9:59 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu
otherwise after VF FLR the KIQ cannot work
Change-Id: Icb18e794b5e4dccfd70c811c138c7102df874203
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0a0ebc0..8354af6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1956,6 +1956,7 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
static enum amd_ip_block_type ip_order[] = {
AMD_IP_BLOCK_TYPE_SMC,
+ AMD_IP_BLOCK_TYPE_PSP,
AMD_IP_BLOCK_TYPE_DCE,
AMD_IP_BLOCK_TYPE_GFX,
AMD_IP_BLOCK_TYPE_SDMA,
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] drm/amdgpu:fix vf_error_put
[not found] ` <1508320755-12780-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2017-10-18 9:59 ` Monk Liu
[not found] ` <1508320755-12780-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-18 9:59 ` [PATCH 3/3] drm/amdgpu:fix wb_clear Monk Liu
2017-10-18 10:11 ` [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp Liu, Monk
2 siblings, 1 reply; 10+ messages in thread
From: Monk Liu @ 2017-10-18 9:59 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu
it should not work on non-SR-IOV case
Change-Id: Icf34f88a0642e4b04c857a07b72df3bb772075d6
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++----
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c | 7 ++++++-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 8354af6..c43f8d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2049,6 +2049,9 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
if (amdgpu_atombios_has_gpu_virtualization_table(adev))
adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
}
+
+ if (!(adev->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS))
+ amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
}
bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
@@ -2260,7 +2263,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
if (amdgpu_vpost_needed(adev)) {
if (!adev->bios) {
dev_err(adev->dev, "no vBIOS found\n");
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
r = -EINVAL;
goto failed;
}
@@ -2268,7 +2270,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
r = amdgpu_atom_asic_init(adev->mode_info.atom_context);
if (r) {
dev_err(adev->dev, "gpu post error!\n");
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_POST_ERROR, 0, 0);
goto failed;
}
} else {
@@ -3096,7 +3097,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
}
} else {
dev_err(adev->dev, "asic resume failed (%d).\n", r);
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ASIC_RESUME_FAIL, 0, r);
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
if (adev->rings[i] && adev->rings[i]->sched.thread) {
kthread_unpark(adev->rings[i]->sched.thread);
@@ -3114,7 +3114,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
if (r) {
/* bad news, how to tell it to userspace ? */
dev_info(adev->dev, "GPU reset failed\n");
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r);
}
else {
dev_info(adev->dev, "GPU reset successed!\n");
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
index 746b813..7f70979 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
@@ -31,7 +31,12 @@ void amdgpu_vf_error_put(struct amdgpu_device *adev,
uint64_t error_data)
{
int index;
- uint16_t error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF, sub_error_code);
+ uint16_t error_code;
+
+ if (!amdgpu_sriov_vf(adev))
+ return;
+
+ error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF, sub_error_code);
mutex_lock(&adev->virt.vf_errors.lock);
index = adev->virt.vf_errors.write_count % AMDGPU_VF_ERROR_ENTRY_SIZE;
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] drm/amdgpu:fix wb_clear
[not found] ` <1508320755-12780-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-18 9:59 ` [PATCH 2/3] drm/amdgpu:fix vf_error_put Monk Liu
@ 2017-10-18 9:59 ` Monk Liu
2017-10-18 10:11 ` [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp Liu, Monk
2 siblings, 0 replies; 10+ messages in thread
From: Monk Liu @ 2017-10-18 9:59 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu
Change-Id: I6d50cc769ee29bf13524c83105d5004b0a2d85e3
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c43f8d4..1d65117 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -551,7 +551,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)
if (offset < adev->wb.num_wb) {
__set_bit(offset, adev->wb.used);
- *wb = offset * 8; /* convert to dw offset */
+ *wb = offset << 3; /* convert to dw offset */
return 0;
} else {
return -EINVAL;
@@ -569,7 +569,7 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)
void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb)
{
if (wb < adev->wb.num_wb)
- __clear_bit(wb, adev->wb.used);
+ __clear_bit(wb >> 3, adev->wb.used);
}
/**
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
[not found] ` <1508320755-12780-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-18 9:59 ` [PATCH 2/3] drm/amdgpu:fix vf_error_put Monk Liu
2017-10-18 9:59 ` [PATCH 3/3] drm/amdgpu:fix wb_clear Monk Liu
@ 2017-10-18 10:11 ` Liu, Monk
[not found] ` <BLUPR12MB0449CD19152E8028C929046C844D0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2 siblings, 1 reply; 10+ messages in thread
From: Liu, Monk @ 2017-10-18 10:11 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Deucher, Alexander,
Koenig, Christian
[-- Attachment #1.1: Type: text/plain, Size: 1601 bytes --]
can you help review those three patches ?
1/3 now must reinit psp
2/3 fix vf_error_put
3/3 fix wb_clear
the first two are only SRIOV affected, at least some one give me an ACK-by
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Liu, Monk
Subject: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
otherwise after VF FLR the KIQ cannot work
Change-Id: Icb18e794b5e4dccfd70c811c138c7102df874203
Signed-off-by: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0a0ebc0..8354af6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1956,6 +1956,7 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
static enum amd_ip_block_type ip_order[] = {
AMD_IP_BLOCK_TYPE_SMC,
+ AMD_IP_BLOCK_TYPE_PSP,
AMD_IP_BLOCK_TYPE_DCE,
AMD_IP_BLOCK_TYPE_GFX,
AMD_IP_BLOCK_TYPE_SDMA,
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #1.2: Type: text/html, Size: 3248 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] drm/amdgpu:fix vf_error_put
[not found] ` <1508320755-12780-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2017-10-19 2:58 ` Alex Deucher
[not found] ` <CADnq5_MNyCvJhY80r5jSv_JycO-terQDinSMeu5A68syiUCS3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Alex Deucher @ 2017-10-19 2:58 UTC (permalink / raw)
To: Monk Liu; +Cc: amd-gfx list
On Wed, Oct 18, 2017 at 5:59 AM, Monk Liu <Monk.Liu@amd.com> wrote:
> it should not work on non-SR-IOV case
>
> Change-Id: Icf34f88a0642e4b04c857a07b72df3bb772075d6
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++----
> drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c | 7 ++++++-
> 2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 8354af6..c43f8d4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2049,6 +2049,9 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
> if (amdgpu_atombios_has_gpu_virtualization_table(adev))
> adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
> }
> +
> + if (!(adev->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS))
> + amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
Shouldn't this be protected with amdgpu_sriov_vf()? Other than that,
looks good to me.
Alex
> }
>
> bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
> @@ -2260,7 +2263,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> if (amdgpu_vpost_needed(adev)) {
> if (!adev->bios) {
> dev_err(adev->dev, "no vBIOS found\n");
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
> r = -EINVAL;
> goto failed;
> }
> @@ -2268,7 +2270,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> r = amdgpu_atom_asic_init(adev->mode_info.atom_context);
> if (r) {
> dev_err(adev->dev, "gpu post error!\n");
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_POST_ERROR, 0, 0);
> goto failed;
> }
> } else {
> @@ -3096,7 +3097,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
> }
> } else {
> dev_err(adev->dev, "asic resume failed (%d).\n", r);
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ASIC_RESUME_FAIL, 0, r);
> for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
> if (adev->rings[i] && adev->rings[i]->sched.thread) {
> kthread_unpark(adev->rings[i]->sched.thread);
> @@ -3114,7 +3114,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
> if (r) {
> /* bad news, how to tell it to userspace ? */
> dev_info(adev->dev, "GPU reset failed\n");
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r);
> }
> else {
> dev_info(adev->dev, "GPU reset successed!\n");
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> index 746b813..7f70979 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> @@ -31,7 +31,12 @@ void amdgpu_vf_error_put(struct amdgpu_device *adev,
> uint64_t error_data)
> {
> int index;
> - uint16_t error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF, sub_error_code);
> + uint16_t error_code;
> +
> + if (!amdgpu_sriov_vf(adev))
> + return;
> +
> + error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF, sub_error_code);
>
> mutex_lock(&adev->virt.vf_errors.lock);
> index = adev->virt.vf_errors.write_count % AMDGPU_VF_ERROR_ENTRY_SIZE;
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
[not found] ` <BLUPR12MB0449CD19152E8028C929046C844D0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-10-20 2:49 ` Liu, Monk
[not found] ` <BLUPR12MB0449FA5C8FBFD57B503572CB84430-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Liu, Monk @ 2017-10-20 2:49 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 2003 bytes --]
If no one review I’ll submit it soon
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Liu, Monk
Sent: 2017年10月18日 18:11
To: amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>
Subject: Re: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
can you help review those three patches ?
1/3 now must reinit psp
2/3 fix vf_error_put
3/3 fix wb_clear
the first two are only SRIOV affected, at least some one give me an ACK-by
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> on behalf of Monk Liu <Monk.Liu@amd.com<mailto:Monk.Liu@amd.com>>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
Cc: Liu, Monk
Subject: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
otherwise after VF FLR the KIQ cannot work
Change-Id: Icb18e794b5e4dccfd70c811c138c7102df874203
Signed-off-by: Monk Liu <Monk.Liu@amd.com<mailto:Monk.Liu@amd.com>>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0a0ebc0..8354af6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1956,6 +1956,7 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
static enum amd_ip_block_type ip_order[] = {
AMD_IP_BLOCK_TYPE_SMC,
+ AMD_IP_BLOCK_TYPE_PSP,
AMD_IP_BLOCK_TYPE_DCE,
AMD_IP_BLOCK_TYPE_GFX,
AMD_IP_BLOCK_TYPE_SDMA,
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #1.2: Type: text/html, Size: 7316 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH 2/3] drm/amdgpu:fix vf_error_put
[not found] ` <CADnq5_MNyCvJhY80r5jSv_JycO-terQDinSMeu5A68syiUCS3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-10-20 2:51 ` Liu, Monk
[not found] ` <BLUPR12MB04492064E0C0E91AEB4DACC184430-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Liu, Monk @ 2017-10-20 2:51 UTC (permalink / raw)
To: Alex Deucher; +Cc: amd-gfx list
”amdgpu_vf_error_put“ now is already changed to protected by SRIOV_VF(), so the whole logic is okay
-----Original Message-----
From: Alex Deucher [mailto:alexdeucher@gmail.com]
Sent: 2017年10月19日 10:58
To: Liu, Monk <Monk.Liu@amd.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/3] drm/amdgpu:fix vf_error_put
On Wed, Oct 18, 2017 at 5:59 AM, Monk Liu <Monk.Liu@amd.com> wrote:
> it should not work on non-SR-IOV case
>
> Change-Id: Icf34f88a0642e4b04c857a07b72df3bb772075d6
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++----
> drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c | 7 ++++++-
> 2 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 8354af6..c43f8d4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2049,6 +2049,9 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
> if (amdgpu_atombios_has_gpu_virtualization_table(adev))
> adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
> }
> +
> + if (!(adev->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS))
> + amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0,
> + 0);
Shouldn't this be protected with amdgpu_sriov_vf()? Other than that, looks good to me.
Alex
> }
>
> bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
> @@ -2260,7 +2263,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> if (amdgpu_vpost_needed(adev)) {
> if (!adev->bios) {
> dev_err(adev->dev, "no vBIOS found\n");
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
> r = -EINVAL;
> goto failed;
> }
> @@ -2268,7 +2270,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> r = amdgpu_atom_asic_init(adev->mode_info.atom_context);
> if (r) {
> dev_err(adev->dev, "gpu post error!\n");
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_POST_ERROR, 0, 0);
> goto failed;
> }
> } else {
> @@ -3096,7 +3097,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
> }
> } else {
> dev_err(adev->dev, "asic resume failed (%d).\n", r);
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ASIC_RESUME_FAIL, 0, r);
> for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
> if (adev->rings[i] && adev->rings[i]->sched.thread) {
>
> kthread_unpark(adev->rings[i]->sched.thread);
> @@ -3114,7 +3114,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
> if (r) {
> /* bad news, how to tell it to userspace ? */
> dev_info(adev->dev, "GPU reset failed\n");
> - amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r);
> }
> else {
> dev_info(adev->dev, "GPU reset successed!\n"); diff
> --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> index 746b813..7f70979 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> @@ -31,7 +31,12 @@ void amdgpu_vf_error_put(struct amdgpu_device *adev,
> uint64_t error_data) {
> int index;
> - uint16_t error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF, sub_error_code);
> + uint16_t error_code;
> +
> + if (!amdgpu_sriov_vf(adev))
> + return;
> +
> + error_code = AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF,
> + sub_error_code);
>
> mutex_lock(&adev->virt.vf_errors.lock);
> index = adev->virt.vf_errors.write_count %
> AMDGPU_VF_ERROR_ENTRY_SIZE;
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 2/3] drm/amdgpu:fix vf_error_put
[not found] ` <BLUPR12MB04492064E0C0E91AEB4DACC184430-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-10-20 2:55 ` Deucher, Alexander
0 siblings, 0 replies; 10+ messages in thread
From: Deucher, Alexander @ 2017-10-20 2:55 UTC (permalink / raw)
To: Liu, Monk, Alex Deucher; +Cc: amd-gfx list
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Liu, Monk
> Sent: Thursday, October 19, 2017 10:51 PM
> To: Alex Deucher
> Cc: amd-gfx list
> Subject: RE: [PATCH 2/3] drm/amdgpu:fix vf_error_put
>
> ”amdgpu_vf_error_put“ now is already changed to protected by
> SRIOV_VF(), so the whole logic is okay
>
Well, you removed all the other calls to error_put in the patch so it seems like we should protect this as well for consistency. Either way:
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Alex
>
> -----Original Message-----
> From: Alex Deucher [mailto:alexdeucher@gmail.com]
> Sent: 2017年10月19日 10:58
> To: Liu, Monk <Monk.Liu@amd.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
> Subject: Re: [PATCH 2/3] drm/amdgpu:fix vf_error_put
>
> On Wed, Oct 18, 2017 at 5:59 AM, Monk Liu <Monk.Liu@amd.com> wrote:
> > it should not work on non-SR-IOV case
> >
> > Change-Id: Icf34f88a0642e4b04c857a07b72df3bb772075d6
> > Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++----
> > drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c | 7 ++++++-
> > 2 files changed, 9 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 8354af6..c43f8d4 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -2049,6 +2049,9 @@ static void
> amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
> > if (amdgpu_atombios_has_gpu_virtualization_table(adev))
> > adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
> > }
> > +
> > + if (!(adev->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS))
> > + amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0,
> > + 0);
>
> Shouldn't this be protected with amdgpu_sriov_vf()? Other than that, looks
> good to me.
>
> Alex
>
> > }
> >
> > bool amdgpu_device_asic_has_dc_support(enum amd_asic_type
> asic_type)
> > @@ -2260,7 +2263,6 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
> > if (amdgpu_vpost_needed(adev)) {
> > if (!adev->bios) {
> > dev_err(adev->dev, "no vBIOS found\n");
> > - amdgpu_vf_error_put(adev,
> AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
> > r = -EINVAL;
> > goto failed;
> > }
> > @@ -2268,7 +2270,6 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
> > r = amdgpu_atom_asic_init(adev->mode_info.atom_context);
> > if (r) {
> > dev_err(adev->dev, "gpu post error!\n");
> > - amdgpu_vf_error_put(adev,
> AMDGIM_ERROR_VF_GPU_POST_ERROR, 0, 0);
> > goto failed;
> > }
> > } else {
> > @@ -3096,7 +3097,6 @@ int amdgpu_gpu_reset(struct amdgpu_device
> *adev)
> > }
> > } else {
> > dev_err(adev->dev, "asic resume failed (%d).\n", r);
> > - amdgpu_vf_error_put(adev,
> AMDGIM_ERROR_VF_ASIC_RESUME_FAIL, 0, r);
> > for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
> > if (adev->rings[i] && adev->rings[i]->sched.thread) {
> >
> > kthread_unpark(adev->rings[i]->sched.thread);
> > @@ -3114,7 +3114,6 @@ int amdgpu_gpu_reset(struct amdgpu_device
> *adev)
> > if (r) {
> > /* bad news, how to tell it to userspace ? */
> > dev_info(adev->dev, "GPU reset failed\n");
> > - amdgpu_vf_error_put(adev,
> AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r);
> > }
> > else {
> > dev_info(adev->dev, "GPU reset successed!\n"); diff
> > --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> > index 746b813..7f70979 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c
> > @@ -31,7 +31,12 @@ void amdgpu_vf_error_put(struct amdgpu_device
> *adev,
> > uint64_t error_data) {
> > int index;
> > - uint16_t error_code =
> AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF,
> sub_error_code);
> > + uint16_t error_code;
> > +
> > + if (!amdgpu_sriov_vf(adev))
> > + return;
> > +
> > + error_code =
> AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF,
> > + sub_error_code);
> >
> > mutex_lock(&adev->virt.vf_errors.lock);
> > index = adev->virt.vf_errors.write_count %
> > AMDGPU_VF_ERROR_ENTRY_SIZE;
> > --
> > 2.7.4
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
[not found] ` <BLUPR12MB0449FA5C8FBFD57B503572CB84430-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-10-20 2:56 ` Deucher, Alexander
[not found] ` <BN6PR12MB16528DBE63824A591EC35C5FF7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 10+ messages in thread
From: Deucher, Alexander @ 2017-10-20 2:56 UTC (permalink / raw)
To: Liu, Monk, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 2830 bytes --]
I followed up on all of these.
Alex
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Liu, Monk
Sent: Thursday, October 19, 2017 10:50 PM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: RE: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
If no one review I’ll submit it soon
From: amd-gfx [mailto:amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org] On Behalf Of Liu, Monk
Sent: 2017年10月18日 18:11
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>; Deucher, Alexander <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org<mailto:Alexander.Deucher-urvtwAKJhsc@public.gmane.orgm>>; Koenig, Christian <Christian.Koenig-5C7GfCeVMHo@public.gmane.org<mailto:Christian.Koenig@amd.com>>
Subject: Re: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
can you help review those three patches ?
1/3 now must reinit psp
2/3 fix vf_error_put
3/3 fix wb_clear
the first two are only SRIOV affected, at least some one give me an ACK-by
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> on behalf of Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org<mailto:Monk.Liu-5C7GfCeVMHo@public.gmane.org>>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: Liu, Monk
Subject: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
otherwise after VF FLR the KIQ cannot work
Change-Id: Icb18e794b5e4dccfd70c811c138c7102df874203
Signed-off-by: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org<mailto:Monk.Liu-5C7GfCeVMHo@public.gmane.org>>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0a0ebc0..8354af6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1956,6 +1956,7 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
static enum amd_ip_block_type ip_order[] = {
AMD_IP_BLOCK_TYPE_SMC,
+ AMD_IP_BLOCK_TYPE_PSP,
AMD_IP_BLOCK_TYPE_DCE,
AMD_IP_BLOCK_TYPE_GFX,
AMD_IP_BLOCK_TYPE_SDMA,
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org<mailto:amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #1.2: Type: text/html, Size: 9212 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
* RE: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
[not found] ` <BN6PR12MB16528DBE63824A591EC35C5FF7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-10-20 3:16 ` Liu, Monk
0 siblings, 0 replies; 10+ messages in thread
From: Liu, Monk @ 2017-10-20 3:16 UTC (permalink / raw)
To: Deucher, Alexander, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 2644 bytes --]
Thanks,
already addressed accordingly
From: Deucher, Alexander
Sent: 2017年10月20日 10:56
To: Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org
Subject: RE: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
I followed up on all of these.
Alex
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Liu, Monk
Sent: Thursday, October 19, 2017 10:50 PM
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
Subject: RE: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
If no one review I’ll submit it soon
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Liu, Monk
Sent: 2017年10月18日 18:11
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com<mailto:Alexander.Deucher@amd.com>>; Koenig, Christian <Christian.Koenig@amd.com<mailto:Christian.Koenig@amd.com>>
Subject: Re: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
can you help review those three patches ?
1/3 now must reinit psp
2/3 fix vf_error_put
3/3 fix wb_clear
the first two are only SRIOV affected, at least some one give me an ACK-by
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org<mailto:amd-gfx-bounces@lists.freedesktop.org>> on behalf of Monk Liu <Monk.Liu@amd.com<mailto:Monk.Liu@amd.com>>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
Cc: Liu, Monk
Subject: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp
otherwise after VF FLR the KIQ cannot work
Change-Id: Icb18e794b5e4dccfd70c811c138c7102df874203
Signed-off-by: Monk Liu <Monk.Liu@amd.com<mailto:Monk.Liu@amd.com>>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 0a0ebc0..8354af6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1956,6 +1956,7 @@ static int amdgpu_sriov_reinit_late(struct amdgpu_device *adev)
static enum amd_ip_block_type ip_order[] = {
AMD_IP_BLOCK_TYPE_SMC,
+ AMD_IP_BLOCK_TYPE_PSP,
AMD_IP_BLOCK_TYPE_DCE,
AMD_IP_BLOCK_TYPE_GFX,
AMD_IP_BLOCK_TYPE_SDMA,
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[-- Attachment #1.2: Type: text/html, Size: 11677 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2017-10-20 3:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 9:59 [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp Monk Liu
[not found] ` <1508320755-12780-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-18 9:59 ` [PATCH 2/3] drm/amdgpu:fix vf_error_put Monk Liu
[not found] ` <1508320755-12780-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-19 2:58 ` Alex Deucher
[not found] ` <CADnq5_MNyCvJhY80r5jSv_JycO-terQDinSMeu5A68syiUCS3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-20 2:51 ` Liu, Monk
[not found] ` <BLUPR12MB04492064E0C0E91AEB4DACC184430-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-20 2:55 ` Deucher, Alexander
2017-10-18 9:59 ` [PATCH 3/3] drm/amdgpu:fix wb_clear Monk Liu
2017-10-18 10:11 ` [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp Liu, Monk
[not found] ` <BLUPR12MB0449CD19152E8028C929046C844D0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-20 2:49 ` Liu, Monk
[not found] ` <BLUPR12MB0449FA5C8FBFD57B503572CB84430-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-20 2:56 ` Deucher, Alexander
[not found] ` <BN6PR12MB16528DBE63824A591EC35C5FF7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-20 3:16 ` Liu, Monk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.