[PATCH] drm/amd: Exclude dGPUs in eGPU enclosures from DPM quirks
Alex Deucher
alexdeucher at gmail.com
Mon Nov 6 21:40:07 UTC 2023
On Mon, Nov 6, 2023 at 3:07 PM Mario Limonciello
<mario.limonciello at amd.com> wrote:
>
> DPM should be enabled on dGPUs that are used in eGPU enclosures
> regardless of the host support.
Are you sure? Seems like this would be dependent on whether the eGPU
bridge supports dynamic switching or not.
Alex
>
> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index e2199d8fd30e..29d5820e912b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1466,11 +1466,15 @@ bool amdgpu_device_seamless_boot_supported(struct amdgpu_device *adev)
> * https://edc.intel.com/content/www/us/en/design/products/platforms/details/raptor-lake-s/13th-generation-core-processors-datasheet-volume-1-of-2/005/pci-express-support/
> * https://gitlab.freedesktop.org/drm/amd/-/issues/2663
> */
> -static bool amdgpu_device_pcie_dynamic_switching_supported(void)
> +static bool amdgpu_device_pcie_dynamic_switching_supported(struct amdgpu_device *adev)
> {
> #if IS_ENABLED(CONFIG_X86)
> struct cpuinfo_x86 *c = &cpu_data(0);
>
> + /* don't worry about external dGPUs */
> + if (dev_is_removable(adev->dev))
> + return true;
> +
> if (c->x86_vendor == X86_VENDOR_INTEL)
> return false;
> #endif
> @@ -2310,7 +2314,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
> adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
> if (amdgpu_sriov_vf(adev) && adev->asic_type == CHIP_SIENNA_CICHLID)
> adev->pm.pp_feature &= ~PP_OVERDRIVE_MASK;
> - if (!amdgpu_device_pcie_dynamic_switching_supported())
> + if (!amdgpu_device_pcie_dynamic_switching_supported(adev))
> adev->pm.pp_feature &= ~PP_PCIE_DPM_MASK;
>
> total = true;
> --
> 2.34.1
>
More information about the amd-gfx
mailing list