Hi Guchun, Ok, will make it to static function. >-----Original Message----- >From: Chen, Guchun <Guchun.Chen@xxxxxxx> >Sent: Tuesday, March 30, 2021 1:38 PM >To: Deng, Emily <Emily.Deng@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx >Cc: Deng, Emily <Emily.Deng@xxxxxxx> >Subject: RE: [PATCH 3/6] drm/amdgpu: Restore msix after FLR > >[AMD Public Use] > >amdgpu_irq_restore_msix should be one static function? > >Regards, >Guchun > >-----Original Message----- >From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Emily >Deng >Sent: Tuesday, March 30, 2021 12:42 PM >To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx >Cc: Deng, Emily <Emily.Deng@xxxxxxx> >Subject: [PATCH 3/6] drm/amdgpu: Restore msix after FLR > >From: "Emily.Deng" <Emily.Deng@xxxxxxx> > >After FLR, the msix will be cleared, so need to re-enable it. > >v2: >Change name with amdgpu_irq prefix, remove #ifdef. > >Signed-off-by: Emily.Deng <Emily.Deng@xxxxxxx> >--- > drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c >b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c >index 03412543427a..8936589bd7f9 100644 >--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c >+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c >@@ -277,6 +277,17 @@ static bool amdgpu_msi_ok(struct amdgpu_device >*adev) > return true; > } > >+void amdgpu_irq_restore_msix(struct amdgpu_device *adev) { >+ u16 ctrl; >+ >+ pci_read_config_word(adev->pdev, adev->pdev->msix_cap + >PCI_MSIX_FLAGS, &ctrl); >+ ctrl &= ~PCI_MSIX_FLAGS_ENABLE; >+ pci_write_config_word(adev->pdev, adev->pdev->msix_cap + >PCI_MSIX_FLAGS, ctrl); >+ ctrl |= PCI_MSIX_FLAGS_ENABLE; >+ pci_write_config_word(adev->pdev, adev->pdev->msix_cap + >+PCI_MSIX_FLAGS, ctrl); } >+ > /** > * amdgpu_irq_init - initialize interrupt handling > * >@@ -558,6 +569,7 @@ void amdgpu_irq_gpu_reset_resume_helper(struct >amdgpu_device *adev) { > int i, j, k; > >+ amdgpu_irq_restore_msix(adev); > for (i = 0; i < AMDGPU_IRQ_CLIENTID_MAX; ++i) { > if (!adev->irq.client[i].sources) > continue; >-- >2.25.1 > >_______________________________________________ >amd-gfx mailing list >amd-gfx@xxxxxxxxxxxxxxxxxxxxx >https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr >eedesktop.org%2Fmailman%2Flistinfo%2Famd- >gfx&data=04%7C01%7Cguchun.chen%40amd.com%7C6aff296c96104aef >176208d8f3362acf%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6 >37526761267513989%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD >AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=B >G4P%2FbJmn8PiLR%2BxTys8cVWK6924LWftjTXjKqrgnkg%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx