All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Change IP init sequence to support PSP program IH_RB_CNTL on NV12 SRIOV
@ 2021-05-25 10:28 Peng Ju Zhou
  2021-05-25 13:25 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Peng Ju Zhou @ 2021-05-25 10:28 UTC (permalink / raw)
  To: amd-gfx

To enable PSP program IH_RB_CNTL,
the PSP IP should be initialized before IH IP, otherwise,
it will hit psp NULL pointer.

Signed-off-by: Peng Ju Zhou <PengJu.Zhou@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/nv.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 437db0783b64..27ba0408a2aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -849,8 +849,13 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
 	case CHIP_NAVI12:
 		amdgpu_device_ip_block_add(adev, &nv_common_ip_block);
 		amdgpu_device_ip_block_add(adev, &gmc_v10_0_ip_block);
-		amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
-		amdgpu_device_ip_block_add(adev, &psp_v11_0_ip_block);
+		if (!amdgpu_sriov_vf(adev)) {
+			amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
+			amdgpu_device_ip_block_add(adev, &psp_v11_0_ip_block);
+		} else {
+			amdgpu_device_ip_block_add(adev, &psp_v11_0_ip_block);
+			amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
+		}
 		if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP)
 			amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
 		if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu: Change IP init sequence to support PSP program IH_RB_CNTL on NV12 SRIOV
  2021-05-25 10:28 [PATCH] drm/amdgpu: Change IP init sequence to support PSP program IH_RB_CNTL on NV12 SRIOV Peng Ju Zhou
@ 2021-05-25 13:25 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2021-05-25 13:25 UTC (permalink / raw)
  To: Peng Ju Zhou; +Cc: amd-gfx list

On Tue, May 25, 2021 at 6:30 AM Peng Ju Zhou <PengJu.Zhou@amd.com> wrote:
>
> To enable PSP program IH_RB_CNTL,
> the PSP IP should be initialized before IH IP, otherwise,
> it will hit psp NULL pointer.
>
> Signed-off-by: Peng Ju Zhou <PengJu.Zhou@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/nv.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
> index 437db0783b64..27ba0408a2aa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/nv.c
> @@ -849,8 +849,13 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
>         case CHIP_NAVI12:
>                 amdgpu_device_ip_block_add(adev, &nv_common_ip_block);
>                 amdgpu_device_ip_block_add(adev, &gmc_v10_0_ip_block);
> -               amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
> -               amdgpu_device_ip_block_add(adev, &psp_v11_0_ip_block);
> +               if (!amdgpu_sriov_vf(adev)) {
> +                       amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
> +                       amdgpu_device_ip_block_add(adev, &psp_v11_0_ip_block);
> +               } else {
> +                       amdgpu_device_ip_block_add(adev, &psp_v11_0_ip_block);
> +                       amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
> +               }
>                 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP)
>                         amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
>                 if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
> --
> 2.17.1
>
> _______________________________________________
> 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] 2+ messages in thread

end of thread, other threads:[~2021-05-25 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 10:28 [PATCH] drm/amdgpu: Change IP init sequence to support PSP program IH_RB_CNTL on NV12 SRIOV Peng Ju Zhou
2021-05-25 13:25 ` Alex Deucher

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.