diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2022-09-24 18:14:12 -0700 | 
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2022-09-24 18:14:12 -0700 | 
| commit | b3bbcc5d1da1b654091dad15980b3d58fdae0fc6 (patch) | |
| tree | 77795fbece4fc61a659ed97c70d798ca81f35bb8 /drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | |
| parent | 17d9c15c9b9e7fb285f7ac5367dfb5f00ff575e3 (diff) | |
| parent | 67feaba413ec68daf4124e9870878899b4ed9a0e (diff) | |
Merge branch 'for-6.0/dax' into libnvdimm-fixes
Pick up another "Soft Reservation" fix for v6.0-final on top of some
straggling nvdimm fixes that missed v5.19.
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 28 | 
1 files changed, 19 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index 47f0344205ed..95d34590cad1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c @@ -194,6 +194,7 @@ static int hw_id_map[MAX_HWIP] = {  	[UMC_HWIP]	= UMC_HWID,  	[XGMI_HWIP]	= XGMI_HWID,  	[DCI_HWIP]	= DCI_HWID, +	[PCIE_HWIP]	= PCIE_HWID,  };  static int amdgpu_discovery_read_binary_from_vram(struct amdgpu_device *adev, uint8_t *binary) @@ -1435,6 +1436,11 @@ static int amdgpu_discovery_get_vcn_info(struct amdgpu_device *adev)  		return -EINVAL;  	} +	/* num_vcn_inst is currently limited to AMDGPU_MAX_VCN_INSTANCES +	 * which is smaller than VCN_INFO_TABLE_MAX_NUM_INSTANCES +	 * but that may change in the future with new GPUs so keep this +	 * check for defensive purposes. +	 */  	if (adev->vcn.num_vcn_inst > VCN_INFO_TABLE_MAX_NUM_INSTANCES) {  		dev_err(adev->dev, "invalid vcn instances\n");  		return -EINVAL; @@ -1450,6 +1456,9 @@ static int amdgpu_discovery_get_vcn_info(struct amdgpu_device *adev)  	switch (le16_to_cpu(vcn_info->v1.header.version_major)) {  	case 1: +		/* num_vcn_inst is currently limited to AMDGPU_MAX_VCN_INSTANCES +		 * so this won't overflow. +		 */  		for (v = 0; v < adev->vcn.num_vcn_inst; v++) {  			adev->vcn.vcn_codec_disable_mask[v] =  				le32_to_cpu(vcn_info->v1.instance_info[v].fuse_data.all_bits); @@ -1621,12 +1630,14 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)  	case IP_VERSION(13, 0, 1):  	case IP_VERSION(13, 0, 2):  	case IP_VERSION(13, 0, 3): -	case IP_VERSION(13, 0, 4):  	case IP_VERSION(13, 0, 5):  	case IP_VERSION(13, 0, 7):  	case IP_VERSION(13, 0, 8):  		amdgpu_device_ip_block_add(adev, &psp_v13_0_ip_block);  		break; +	case IP_VERSION(13, 0, 4): +		amdgpu_device_ip_block_add(adev, &psp_v13_0_4_ip_block); +		break;  	default:  		dev_err(adev->dev,  			"Failed to add psp ip block(MP0_HWIP:0x%x)\n", @@ -1707,8 +1718,11 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)  		case IP_VERSION(3, 0, 1):  		case IP_VERSION(3, 1, 2):  		case IP_VERSION(3, 1, 3): +		case IP_VERSION(3, 1, 4):  		case IP_VERSION(3, 1, 5):  		case IP_VERSION(3, 1, 6): +		case IP_VERSION(3, 2, 0): +		case IP_VERSION(3, 2, 1):  			amdgpu_device_ip_block_add(adev, &dm_ip_block);  			break;  		default: @@ -1886,6 +1900,7 @@ static int amdgpu_discovery_set_mm_ip_blocks(struct amdgpu_device *adev)  			amdgpu_device_ip_block_add(adev, &vcn_v3_0_ip_block);  			break;  		case IP_VERSION(4, 0, 0): +		case IP_VERSION(4, 0, 2):  		case IP_VERSION(4, 0, 4):  			amdgpu_device_ip_block_add(adev, &vcn_v4_0_ip_block);  			amdgpu_device_ip_block_add(adev, &jpeg_v4_0_ip_block); @@ -2194,12 +2209,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)  		break;  	case IP_VERSION(7, 4, 0):  	case IP_VERSION(7, 4, 1): -		adev->nbio.funcs = &nbio_v7_4_funcs; -		adev->nbio.hdp_flush_reg = &nbio_v7_4_hdp_flush_reg; -		break;  	case IP_VERSION(7, 4, 4):  		adev->nbio.funcs = &nbio_v7_4_funcs; -		adev->nbio.hdp_flush_reg = &nbio_v7_4_hdp_flush_reg_ald; +		adev->nbio.hdp_flush_reg = &nbio_v7_4_hdp_flush_reg;  		break;  	case IP_VERSION(7, 2, 0):  	case IP_VERSION(7, 2, 1): @@ -2213,15 +2225,12 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)  	case IP_VERSION(2, 3, 0):  	case IP_VERSION(2, 3, 1):  	case IP_VERSION(2, 3, 2): -		adev->nbio.funcs = &nbio_v2_3_funcs; -		adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg; -		break;  	case IP_VERSION(3, 3, 0):  	case IP_VERSION(3, 3, 1):  	case IP_VERSION(3, 3, 2):  	case IP_VERSION(3, 3, 3):  		adev->nbio.funcs = &nbio_v2_3_funcs; -		adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg_sc; +		adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg;  		break;  	case IP_VERSION(4, 3, 0):  	case IP_VERSION(4, 3, 1): @@ -2321,6 +2330,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)  	switch (adev->ip_versions[LSDMA_HWIP][0]) {  	case IP_VERSION(6, 0, 0): +	case IP_VERSION(6, 0, 1):  	case IP_VERSION(6, 0, 2):  		adev->lsdma.funcs = &lsdma_v6_0_funcs;  		break;  | 
