Commit 866bd5ee authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-5.5-2020-01-01' of...

Merge tag 'amd-drm-fixes-5.5-2020-01-01' of git://people.freedesktop.org/~agd5f/linux

 into drm-fixes

amd-drm-fixes-5.5-2020-01-01:

amdgpu:
- ATPX regression fix
- SMU metrics table locking fixes
- gfxoff fix for raven
- RLC firmware loading stability fix

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200101151307.5242-1-alexander.deucher@amd.com
parents e7cbcb16 969e1152
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -613,7 +613,17 @@ static bool amdgpu_atpx_detect(void)
	bool d3_supported = false;
	struct pci_dev *parent_pdev;

	while ((pdev = pci_get_class(PCI_BASE_CLASS_DISPLAY << 16, pdev)) != NULL) {
	while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
		vga_count++;

		has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);

		parent_pdev = pci_upstream_bridge(pdev);
		d3_supported |= parent_pdev && parent_pdev->bridge_d3;
		amdgpu_atpx_get_quirks(pdev);
	}

	while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
		vga_count++;

		has_atpx |= (amdgpu_atpx_pci_probe_handle(pdev) == true);
+1 −1
Original line number Diff line number Diff line
@@ -1488,7 +1488,7 @@ out:

		/* Start rlc autoload after psp recieved all the gfx firmware */
		if (psp->autoload_supported && ucode->ucode_id == (amdgpu_sriov_vf(adev) ?
		    AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM)) {
		    AMDGPU_UCODE_ID_CP_MEC2 : AMDGPU_UCODE_ID_RLC_G)) {
			ret = psp_rlc_autoload(psp);
			if (ret) {
				DRM_ERROR("Failed to start rlc autoload\n");
+1 −1
Original line number Diff line number Diff line
@@ -292,10 +292,10 @@ enum AMDGPU_UCODE_ID {
	AMDGPU_UCODE_ID_CP_MEC2_JT,
	AMDGPU_UCODE_ID_CP_MES,
	AMDGPU_UCODE_ID_CP_MES_DATA,
	AMDGPU_UCODE_ID_RLC_G,
	AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL,
	AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM,
	AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM,
	AMDGPU_UCODE_ID_RLC_G,
	AMDGPU_UCODE_ID_STORAGE,
	AMDGPU_UCODE_ID_SMC,
	AMDGPU_UCODE_ID_UVD,
+4 −11
Original line number Diff line number Diff line
@@ -1052,17 +1052,10 @@ static void gfx_v9_0_check_if_need_gfxoff(struct amdgpu_device *adev)
	case CHIP_VEGA20:
		break;
	case CHIP_RAVEN:
		/* Disable GFXOFF on original raven.  There are combinations
		 * of sbios and platforms that are not stable.
		 */
		if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8))
			adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
		else if (!(adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
			 &&((adev->gfx.rlc_fw_version != 106 &&
			     adev->gfx.rlc_fw_version < 531) ||
			    (adev->gfx.rlc_fw_version == 53815) ||
			    (adev->gfx.rlc_feature_version < 1) ||
			    !adev->gfx.rlc.is_rlc_v2_1))
		if (!(adev->rev_id >= 0x8 ||
		      adev->pdev->device == 0x15d8) &&
		    (adev->pm.fw_version < 0x41e2b || /* not raven1 fresh */
		     !adev->gfx.rlc.is_rlc_v2_1)) /* without rlc save restore ucodes */
			adev->pm.pp_feature &= ~PP_GFXOFF_MASK;

		if (adev->pm.pp_feature & PP_GFXOFF_MASK)
+1 −0
Original line number Diff line number Diff line
@@ -866,6 +866,7 @@ static int smu_sw_init(void *handle)
	smu->smu_baco.platform_support = false;

	mutex_init(&smu->sensor_lock);
	mutex_init(&smu->metrics_lock);

	smu->watermarks_bitmap = 0;
	smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
Loading