Commit 7d51040a authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-5.16-2021-11-17' of...

Merge tag 'amd-drm-fixes-5.16-2021-11-17' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-fixes

amd-drm-fixes-5.16-2021-11-17:

amdgpu:
- Better debugging info for SMU msgs
- Better error reporting when adding IP blocks
- Fix UVD powergating regression on CZ
- Clock reporting fix for navi1x
- OLED panel backlight fix
- Fix scaling on VGA/DVI for non-DC display code
- Fix GLFCLK handling for RGP on some APUs
- fix potential memory leak

amdkfd:
- GPU reset fix

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211118041638.20831-1-alexander.deucher@amd.com
parents 9d267f08 27dfaedc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -827,6 +827,7 @@ static int amdgpu_connector_vga_get_modes(struct drm_connector *connector)

	amdgpu_connector_get_edid(connector);
	ret = amdgpu_connector_ddc_get_modes(connector);
	amdgpu_get_native_mode(connector);

	return ret;
}
+3 −0
Original line number Diff line number Diff line
@@ -3509,6 +3509,9 @@ int amdgpu_device_init(struct amdgpu_device *adev,
		adev->rmmio_size = pci_resource_len(adev->pdev, 2);
	}

	for (i = 0; i < AMD_IP_BLOCK_TYPE_NUM; i++)
		atomic_set(&adev->pm.pwr_state[i], POWER_STATE_UNKNOWN);

	adev->rmmio = ioremap(adev->rmmio_base, adev->rmmio_size);
	if (adev->rmmio == NULL) {
		return -ENOMEM;
+36 −0
Original line number Diff line number Diff line
@@ -587,6 +587,9 @@ static int amdgpu_discovery_set_common_ip_blocks(struct amdgpu_device *adev)
		amdgpu_device_ip_block_add(adev, &nv_common_ip_block);
		break;
	default:
		dev_err(adev->dev,
			"Failed to add common ip block(GC_HWIP:0x%x)\n",
			adev->ip_versions[GC_HWIP][0]);
		return -EINVAL;
	}
	return 0;
@@ -619,6 +622,9 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)
		amdgpu_device_ip_block_add(adev, &gmc_v10_0_ip_block);
		break;
	default:
		dev_err(adev->dev,
			"Failed to add gmc ip block(GC_HWIP:0x%x)\n",
			adev->ip_versions[GC_HWIP][0]);
		return -EINVAL;
	}
	return 0;
@@ -648,6 +654,9 @@ static int amdgpu_discovery_set_ih_ip_blocks(struct amdgpu_device *adev)
		amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
		break;
	default:
		dev_err(adev->dev,
			"Failed to add ih ip block(OSSSYS_HWIP:0x%x)\n",
			adev->ip_versions[OSSSYS_HWIP][0]);
		return -EINVAL;
	}
	return 0;
@@ -688,6 +697,9 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)
		amdgpu_device_ip_block_add(adev, &psp_v13_0_ip_block);
		break;
	default:
		dev_err(adev->dev,
			"Failed to add psp ip block(MP0_HWIP:0x%x)\n",
			adev->ip_versions[MP0_HWIP][0]);
		return -EINVAL;
	}
	return 0;
@@ -726,6 +738,9 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev)
		amdgpu_device_ip_block_add(adev, &smu_v13_0_ip_block);
		break;
	default:
		dev_err(adev->dev,
			"Failed to add smu ip block(MP1_HWIP:0x%x)\n",
			adev->ip_versions[MP1_HWIP][0]);
		return -EINVAL;
	}
	return 0;
@@ -753,6 +768,9 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
			amdgpu_device_ip_block_add(adev, &dm_ip_block);
			break;
		default:
			dev_err(adev->dev,
				"Failed to add dm ip block(DCE_HWIP:0x%x)\n",
				adev->ip_versions[DCE_HWIP][0]);
			return -EINVAL;
		}
	} else if (adev->ip_versions[DCI_HWIP][0]) {
@@ -763,6 +781,9 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
			amdgpu_device_ip_block_add(adev, &dm_ip_block);
			break;
		default:
			dev_err(adev->dev,
				"Failed to add dm ip block(DCI_HWIP:0x%x)\n",
				adev->ip_versions[DCI_HWIP][0]);
			return -EINVAL;
		}
#endif
@@ -796,6 +817,9 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)
		amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
		break;
	default:
		dev_err(adev->dev,
			"Failed to add gfx ip block(GC_HWIP:0x%x)\n",
			adev->ip_versions[GC_HWIP][0]);
		return -EINVAL;
	}
	return 0;
@@ -829,6 +853,9 @@ static int amdgpu_discovery_set_sdma_ip_blocks(struct amdgpu_device *adev)
		amdgpu_device_ip_block_add(adev, &sdma_v5_2_ip_block);
		break;
	default:
		dev_err(adev->dev,
			"Failed to add sdma ip block(SDMA0_HWIP:0x%x)\n",
			adev->ip_versions[SDMA0_HWIP][0]);
		return -EINVAL;
	}
	return 0;
@@ -845,6 +872,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
				amdgpu_device_ip_block_add(adev, &uvd_v7_0_ip_block);
			break;
		default:
			dev_err(adev->dev,
				"Failed to add uvd v7 ip block(UVD_HWIP:0x%x)\n",
				adev->ip_versions[UVD_HWIP][0]);
			return -EINVAL;
		}
		switch (adev->ip_versions[VCE_HWIP][0]) {
@@ -855,6 +885,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
				amdgpu_device_ip_block_add(adev, &vce_v4_0_ip_block);
			break;
		default:
			dev_err(adev->dev,
				"Failed to add VCE v4 ip block(VCE_HWIP:0x%x)\n",
				adev->ip_versions[VCE_HWIP][0]);
			return -EINVAL;
		}
	} else {
@@ -893,6 +926,9 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)
			amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);
			break;
		default:
			dev_err(adev->dev,
				"Failed to add vcn/jpeg ip block(UVD_HWIP:0x%x)\n",
				adev->ip_versions[UVD_HWIP][0]);
			return -EINVAL;
		}
	}
+1 −0
Original line number Diff line number Diff line
@@ -386,6 +386,7 @@ struct amdgpu_hive_info *amdgpu_get_xgmi_hive(struct amdgpu_device *adev)
			"%s", "xgmi_hive_info");
	if (ret) {
		dev_err(adev->dev, "XGMI: failed initializing kobject for xgmi hive\n");
		kobject_put(&hive->kobj);
		kfree(hive);
		hive = NULL;
		goto pro_end;
+5 −0
Original line number Diff line number Diff line
@@ -1226,6 +1226,11 @@ static int stop_cpsch(struct device_queue_manager *dqm)
	bool hanging;

	dqm_lock(dqm);
	if (!dqm->sched_running) {
		dqm_unlock(dqm);
		return 0;
	}

	if (!dqm->is_hws_hang)
		unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0);
	hanging = dqm->is_hws_hang || dqm->is_resetting;
Loading