Skip to contentSkip to conversation

drm/amdgpu/sriov:now must reinit psp

PATCH In review Monk Liu 3 participants 10 messages Oct 18, 2017 – Oct 20, 2017 7 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Monk Liu

author
#0 lore raw

PATCH 1/3 drm/amdgpu/sriov:now must reinit psp

otherwise after VF FLR the KIQ cannot work

Change-Id Icb18e794b5e4dccfd70c811c138c7102df874203
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 0a0ebc0..8354af6 100644
@@ -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,
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1508320755-12780-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/3 drm/amdgpu:fix vf_error_put

it should not work on non-SR-IOV case

Change-Id Icf34f88a0642e4b04c857a07b72df3bb772075d6
---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -4
index 8354af6..c43f8d4 100644
@@ -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");
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c +6 -1
index 746b813..7f70979 100644
@@ -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;
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1508320755-12780-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org

#4 lore raw

Re: [PATCH 2/3] drm/amdgpu:fix vf_error_put

Quoted 14 lines · Monk Liu

it should not work on non-SR-IOV case

Change-Id Icf34f88a0642e4b04c857a07b72df3bb772075d6
---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 8354af6..c43f8d4 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev) · line 2054

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -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

Quoted 56 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -4
 }
 
 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");
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c +6 -2
index 746b813..7f70979 100644
@@ -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

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): CADnq5_MNyCvJhY80r5jSv_JycO-terQDinSMeu5A68syiUCS3w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

author
#6 lore raw

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

-----Original Message-----
From: Alex Deucher [mailto:[email protected]]
Sent: 2017年10月19日 10:58
To: Liu, Monk <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH 2/3] drm/amdgpu:fix vf_error_put

Quoted 15 lines · Monk Liu

it should not work on non-SR-IOV case

Change-Id Icf34f88a0642e4b04c857a07b72df3bb772075d6
---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 8354af6..c43f8d4 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev) · line 2055

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -0
@@ -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

Quoted 59 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
 }
 
 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);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -2
@@ -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

drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c +7 -1
@@ -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

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BLUPR12MB04492064E0C0E91AEB4DACC184430-7LeqcoF/[email protected]

Acked-by Alex Deucher
#8 lore raw

RE: [PATCH 2/3] drm/amdgpu:fix vf_error_put

Quoted 11 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] 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:

Alex

Quoted 110 lines

-----Original Message-----
From: Alex Deucher [mailto:[email protected]]
Sent: 2017年10月19日 10:58
To: Liu, Monk <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH 2/3] drm/amdgpu:fix vf_error_put

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 15 lines · Monk Liu

it should not work on non-SR-IOV case

Change-Id Icf34f88a0642e4b04c857a07b72df3bb772075d6
---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 8354af6..c43f8d4 100644
@@ -2049,6 +2049,9 @@ static void

amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -0
                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

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static void

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
 }
 
 bool amdgpu_device_asic_has_dc_support(enum amd_asic_type

asic_type)

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -2260,7 +2263,6 @@ int amdgpu_device_init(struct amdgpu_device

*adev,

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev,

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
        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);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
                        r = -EINVAL;
                        goto failed;
                }
@@ -2268,7 +2270,6 @@ int amdgpu_device_init(struct amdgpu_device

*adev,

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_init(struct amdgpu_device *adev,

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
                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);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_gpu_reset(struct amdgpu_device

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
                        goto failed;
                }
        } else {
@@ -3096,7 +3097,6 @@ int amdgpu_gpu_reset(struct amdgpu_device

*adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_gpu_reset(struct amdgpu_device *adev)

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
                }
        } else {
                dev_err(adev->dev, "asic resume failed (%d).\n", r);
-               amdgpu_vf_error_put(adev,

AMDGIM_ERROR_VF_ASIC_RESUME_FAIL, 0, r);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_gpu_reset(struct amdgpu_device

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
                for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
                        if (adev->rings[i] && adev->rings[i]->sched.thread) {
 

kthread_unpark(adev->rings[i]->sched.thread);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
@@ -3114,7 +3114,6 @@ int amdgpu_gpu_reset(struct amdgpu_device

*adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_gpu_reset(struct amdgpu_device *adev)

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
        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);

drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c void amdgpu_vf_error_put(struct amdgpu_device

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
        }
        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

drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c +0 -0
@@ -31,7 +31,12 @@ void amdgpu_vf_error_put(struct amdgpu_device

*adev,

drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c void amdgpu_vf_error_put(struct amdgpu_device · line 33

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c +0 -1
                         uint64_t error_data)  {
        int index;
-       uint16_t error_code =

AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF,
sub_error_code);

drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c void amdgpu_vf_error_put(struct amdgpu_device *adev,

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c +6 -0
+       uint16_t error_code;
+
+       if (!amdgpu_sriov_vf(adev))
+               return;
+
+       error_code =

AMDGIM_ERROR_CODE(AMDGIM_ERROR_CATEGORY_VF,

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vf_error.c +1 -0
+ 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

Quoted 8 lines
Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

author
#9 lore raw

PATCH 3/3 drm/amdgpu:fix wb_clear

In reply to a message not in the archive
Change-Id I6d50cc769ee29bf13524c83105d5004b0a2d85e3
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -2
index c43f8d4..1d65117 100644
@@ -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);
 }
 
 /**
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#10 lore raw
In reply to a message not in the archive

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 <[email protected]>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: [email protected]
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
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 0a0ebc0..8354af6 100644
@@ -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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BLUPR12MB0449CD19152E8028C929046C844D0-7LeqcoF/[email protected]

author
#12 lore raw

If no one review I’ll submit it soon

From: amd-gfx [mailto:[email protected]] On Behalf Of Liu, Monk
Sent: 2017年10月18日 18:11
To: [email protected]; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>
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 <[email protected]<mailto:[email protected]>> on behalf of Monk Liu <[email protected]<mailto:[email protected]>>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: [email protected]<mailto:[email protected]>
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
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 0a0ebc0..8354af6 100644
@@ -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 [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BLUPR12MB0449FA5C8FBFD57B503572CB84430-7LeqcoF/[email protected]

#14 lore raw

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: [email protected]
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: [email protected]<mailto:[email protected]>; Deucher, Alexander <[email protected]<mailto:[email protected]>>; Koenig, Christian <[email protected]<mailto:[email protected]>>
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:[email protected]>> on behalf of Monk Liu <[email protected]<mailto:[email protected]>>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: [email protected]<mailto:[email protected]>
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
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 0a0ebc0..8354af6 100644
@@ -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 [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB16528DBE63824A591EC35C5FF7430-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author
#16 lore raw

Thanks,

already addressed accordingly

From: Deucher, Alexander
Sent: 2017年10月20日 10:56
To: Liu, Monk <[email protected]>; [email protected]
Subject: RE: [PATCH 1/3] drm/amdgpu/sriov:now must reinit psp

I followed up on all of these.

Alex

From: amd-gfx [mailto:[email protected]] On Behalf Of Liu, Monk
Sent: Thursday, October 19, 2017 10:50 PM
To: [email protected]<mailto:[email protected]>
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:[email protected]] On Behalf Of Liu, Monk
Sent: 2017年10月18日 18:11
To: [email protected]<mailto:[email protected]>; Deucher, Alexander <[email protected]<mailto:[email protected]>>; Koenig, Christian <[email protected]<mailto:[email protected]>>
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 <[email protected]<mailto:[email protected]>> on behalf of Monk Liu <[email protected]<mailto:[email protected]>>
Sent: Wednesday, October 18, 2017 5:59:13 PM
To: [email protected]<mailto:[email protected]>
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
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 0a0ebc0..8354af6 100644
@@ -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 [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx