Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfd316d5 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/cgs: add sys info query for pcie gen and link width



Needed by powerplay to properly handle pcie dpm switching.

Reviewed-by: default avatarJammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d0dd7f0c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -754,6 +754,12 @@ static int amdgpu_cgs_query_system_info(void *cgs_device,
	case CGS_SYSTEM_INFO_ADAPTER_BDF_ID:
		sys_info->value = adev->pdev->devfn | (adev->pdev->bus->number << 8);
		break;
	case CGS_SYSTEM_INFO_PCIE_GEN_INFO:
		sys_info->value = adev->pm.pcie_gen_mask;
		break;
	case CGS_SYSTEM_INFO_PCIE_MLW:
		sys_info->value = adev->pm.pcie_mlw_mask;
		break;
	default:
		return -ENODEV;
	}
+2 −0
Original line number Diff line number Diff line
@@ -107,6 +107,8 @@ enum cgs_ucode_id {

enum cgs_system_info_id {
	CGS_SYSTEM_INFO_ADAPTER_BDF_ID = 1,
	CGS_SYSTEM_INFO_PCIE_GEN_INFO,
	CGS_SYSTEM_INFO_PCIE_MLW,
	CGS_SYSTEM_INFO_ID_MAXIMUM,
};