<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p style="font-family:Calibri;font-size:10pt;color:#008000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div dir="auto">Should we just check the amdgpu runpm param value?</div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div><br>
</div>
<div dir="auto">Thanks,</div>
<div dir="auto">Lijo</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> Wednesday, February 19, 2025 9:45:28 PM<br>
<b>To:</b> Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: disable BAR resize on Dell G5 SE</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Wed, Feb 19, 2025 at 10:42 AM Lazar, Lijo <lijo.lazar@amd.com> wrote:<br>
><br>
><br>
><br>
> On 2/19/2025 8:02 PM, Alex Deucher wrote:<br>
> > On Tue, Feb 18, 2025 at 11:05 AM Lazar, Lijo <lijo.lazar@amd.com> wrote:<br>
> >><br>
> >><br>
> >><br>
> >> On 2/18/2025 8:38 PM, Alex Deucher wrote:<br>
> >>> There was a quirk added to add a workaround for a Sapphire<br>
> >>> RX 5600 XT Pulse that didn't allow BAR resizing.  However,<br>
> >>> the quirk casused a regression on Dell laptops using those<br>
> >>> chips, rather than narrowing the scope of the resizing<br>
> >>> quirk, add a quirk to prevent amdgpu from resizing the BAR<br>
> >>> on those Dell platforms.<br>
> >>><br>
> >>> Closes: <a href="https://gitlab.freedesktop.org/drm/amd/-/issues/1707">https://gitlab.freedesktop.org/drm/amd/-/issues/1707</a><br>
> >>> Fixes: 907830b0fc9e ("PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse")<br>
> >>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
> >><br>
> >> As per the issue thread, issue happens when dGPU resumes from runpm. If<br>
> >> so, can't we disable runpm as the workaround (IMO, the current patch<br>
> >> also is a workaround)?<br>
> ><br>
> > This seems like a better workaround than disabling runtime pm.<br>
> > Leaving the dGPU powered up all the time seems worse than limiting the<br>
> > BAR size on this platform.<br>
> ><br>
><br>
> Probably, it's better to note down that as well in the description.<br>
> Also, check if the device has runpm enabled. If a user prefers<br>
> performance, say runpm disabled through driver option, then no need to<br>
> apply this.<br>
<br>
I can update the commit message, but the runtime pm method gets set<br>
much later in the init sequence so we don't know what it is or if it<br>
is enabled when we resize the BAR.<br>
<br>
Alex<br>
<br>
><br>
> Thanks,<br>
> Lijo<br>
><br>
> > Alex<br>
> ><br>
> >><br>
> >> Thanks,<br>
> >> Lijo<br>
> >><br>
> >>> ---<br>
> >>>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++<br>
> >>>  1 file changed, 6 insertions(+)<br>
> >>><br>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> >>> index 512e642477a7e..56fd874a22de8 100644<br>
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
> >>> @@ -1662,6 +1662,12 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)<br>
> >>>       if (amdgpu_sriov_vf(adev))<br>
> >>>               return 0;<br>
> >>><br>
> >>> +     /* skip resizing on Dell G5 SE platforms */<br>
> >>> +     if (adev->pdev->vendor == PCI_VENDOR_ID_ATI &&<br>
> >>> +         adev->pdev->device == 0x731f &&<br>
> >>> +         adev->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL)<br>
> >>> +             return 0;<br>
> >>> +<br>
> >>>       /* PCI_EXT_CAP_ID_VNDR extended capability is located at 0x100 */<br>
> >>>       if (!pci_find_ext_capability(adev->pdev, PCI_EXT_CAP_ID_VNDR))<br>
> >>>               DRM_WARN("System can't access extended configuration space, please check!!\n");<br>
> >><br>
><br>
</div>
</span></font></div>
</div>
</body>
</html>