On Tue, May 25, 2021 at 6:30 AM Peng Ju Zhou <PengJu.Zhou@xxxxxxx> 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@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > 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@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx