From: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au> To: Alex Deucher <alexdeucher@gmail.com> Cc: LKML <linux-kernel@vger.kernel.org>, "Alex Deucher" <alexander.deucher@amd.com>, "Christian König" <christian.koenig@amd.com>, "amd-gfx list" <amd-gfx@lists.freedesktop.org> Subject: Re: [PATCH 1/1] amdgpu: use MMIO to init atombios if device is Thunderbolt / USB4 attached Date: Tue, 16 Mar 2021 11:01:23 +0800 [thread overview] Message-ID: <PSXP216MB043819E5E33ECCDBBAB490BC806B9@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM> (raw) In-Reply-To: <CADnq5_Mqc3H07BtJbaGpt8XGnpXgaZvxDsS_e0cnZ++kWdQR-g@mail.gmail.com> On Mon, Mar 15, 2021 at 11:05:21AM -0400, Alex Deucher wrote: > On Mon, Mar 15, 2021 at 4:04 AM Nicholas Johnson > <nicholas.johnson-opensource@outlook.com.au> wrote: > > > > When using some Thunderbolt hosts using BIOS-assisted PCI enumeration > > with IO BAR assigned, we get an atombios timeout, such as: > > > > [drm:atom_op_jump [amdgpu]] *ERROR* atombios stuck in loop for more than 20secs aborting > > [drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing B456 (len 304, WS 4, PS 0) @ 0xB51B > > [drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing B104 (len 183, WS 0, PS 8) @ 0xB17E > > amdgpu 0000:08:00.0: amdgpu: gpu post error! > > amdgpu 0000:08:00.0: amdgpu: Fatal error during GPU init > > amdgpu: probe of 0000:08:00.0 failed with error -22 > > > > A workaround is to use MMIO to access ATOMBIOS when device is > > Thunderbolt / USB4 attached. > > Missing your signed-off-by. Also, we can just remove the legacy IO > callbacks altogether. They are leftover from radeon and not required > at all on amdgpu. Sorry, it's been a while; I forgot "-s". And I like your patch much better. I look forward to the day when all new PCIe devices only have 64-bit MMIO_PREF BARs. Thanks for looking at this! If you are still doing work on surprise removal / driver unloading for Thunderbolt, then I am happy to do testing for you. Removal of DRM devices in Linux is the main sore point for me, and I would love to see it through. Regards, Nicholas Johnson > > Alex > > > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > > index 86add0f4e..5d16ec10d 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > > @@ -1999,11 +1999,15 @@ int amdgpu_atombios_init(struct amdgpu_device *adev) > > atom_card_info->reg_read = cail_reg_read; > > atom_card_info->reg_write = cail_reg_write; > > /* needed for iio ops */ > > - if (adev->rio_mem) { > > + if (adev->rio_mem && !pci_is_thunderbolt_attached(adev->pdev)) { > > atom_card_info->ioreg_read = cail_ioreg_read; > > atom_card_info->ioreg_write = cail_ioreg_write; > > } else { > > - DRM_DEBUG("PCI I/O BAR is not found. Using MMIO to access ATOM BIOS\n"); > > + if (pci_is_thunderbolt_attached(adev->pdev)) > > + DRM_DEBUG("Device is attached via Thunderbolt / USB4. Using MMIO to access ATOM BIOS\n"); > > + else > > + DRM_DEBUG("PCI I/O BAR is not found. Using MMIO to access ATOM BIOS\n"); > > + > > atom_card_info->ioreg_read = cail_reg_read; > > atom_card_info->ioreg_write = cail_reg_write; > > } > > -- > > 2.30.2 > > > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au> To: Alex Deucher <alexdeucher@gmail.com> Cc: "Alex Deucher" <alexander.deucher@amd.com>, LKML <linux-kernel@vger.kernel.org>, "amd-gfx list" <amd-gfx@lists.freedesktop.org>, "Christian König" <christian.koenig@amd.com> Subject: Re: [PATCH 1/1] amdgpu: use MMIO to init atombios if device is Thunderbolt / USB4 attached Date: Tue, 16 Mar 2021 11:01:23 +0800 [thread overview] Message-ID: <PSXP216MB043819E5E33ECCDBBAB490BC806B9@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM> (raw) In-Reply-To: <CADnq5_Mqc3H07BtJbaGpt8XGnpXgaZvxDsS_e0cnZ++kWdQR-g@mail.gmail.com> On Mon, Mar 15, 2021 at 11:05:21AM -0400, Alex Deucher wrote: > On Mon, Mar 15, 2021 at 4:04 AM Nicholas Johnson > <nicholas.johnson-opensource@outlook.com.au> wrote: > > > > When using some Thunderbolt hosts using BIOS-assisted PCI enumeration > > with IO BAR assigned, we get an atombios timeout, such as: > > > > [drm:atom_op_jump [amdgpu]] *ERROR* atombios stuck in loop for more than 20secs aborting > > [drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing B456 (len 304, WS 4, PS 0) @ 0xB51B > > [drm:amdgpu_atom_execute_table_locked [amdgpu]] *ERROR* atombios stuck executing B104 (len 183, WS 0, PS 8) @ 0xB17E > > amdgpu 0000:08:00.0: amdgpu: gpu post error! > > amdgpu 0000:08:00.0: amdgpu: Fatal error during GPU init > > amdgpu: probe of 0000:08:00.0 failed with error -22 > > > > A workaround is to use MMIO to access ATOMBIOS when device is > > Thunderbolt / USB4 attached. > > Missing your signed-off-by. Also, we can just remove the legacy IO > callbacks altogether. They are leftover from radeon and not required > at all on amdgpu. Sorry, it's been a while; I forgot "-s". And I like your patch much better. I look forward to the day when all new PCIe devices only have 64-bit MMIO_PREF BARs. Thanks for looking at this! If you are still doing work on surprise removal / driver unloading for Thunderbolt, then I am happy to do testing for you. Removal of DRM devices in Linux is the main sore point for me, and I would love to see it through. Regards, Nicholas Johnson > > Alex > > > > --- > > drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > > index 86add0f4e..5d16ec10d 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > > @@ -1999,11 +1999,15 @@ int amdgpu_atombios_init(struct amdgpu_device *adev) > > atom_card_info->reg_read = cail_reg_read; > > atom_card_info->reg_write = cail_reg_write; > > /* needed for iio ops */ > > - if (adev->rio_mem) { > > + if (adev->rio_mem && !pci_is_thunderbolt_attached(adev->pdev)) { > > atom_card_info->ioreg_read = cail_ioreg_read; > > atom_card_info->ioreg_write = cail_ioreg_write; > > } else { > > - DRM_DEBUG("PCI I/O BAR is not found. Using MMIO to access ATOM BIOS\n"); > > + if (pci_is_thunderbolt_attached(adev->pdev)) > > + DRM_DEBUG("Device is attached via Thunderbolt / USB4. Using MMIO to access ATOM BIOS\n"); > > + else > > + DRM_DEBUG("PCI I/O BAR is not found. Using MMIO to access ATOM BIOS\n"); > > + > > atom_card_info->ioreg_read = cail_reg_read; > > atom_card_info->ioreg_write = cail_reg_write; > > } > > -- > > 2.30.2 > > > > _______________________________________________ > > 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
next prev parent reply other threads:[~2021-03-16 3:02 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-14 6:08 [PATCH 1/1] amdgpu: use MMIO to init atombios if device is Thunderbolt / USB4 attached Nicholas Johnson 2021-03-14 6:08 ` Nicholas Johnson 2021-03-15 15:05 ` Alex Deucher 2021-03-15 15:05 ` Alex Deucher 2021-03-16 3:01 ` Nicholas Johnson [this message] 2021-03-16 3:01 ` Nicholas Johnson 2021-03-16 14:36 ` Andrey Grodzovsky 2021-03-16 14:36 ` Andrey Grodzovsky
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=PSXP216MB043819E5E33ECCDBBAB490BC806B9@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM \ --to=nicholas.johnson-opensource@outlook.com.au \ --cc=alexander.deucher@amd.com \ --cc=alexdeucher@gmail.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=christian.koenig@amd.com \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.