diff options
| author | Dave Airlie <airlied@redhat.com> | 2024-03-22 10:33:27 +1000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2024-03-22 10:34:12 +1000 | 
| commit | cafd86cbdc607eadc28a008cddacd78f0894c628 (patch) | |
| tree | 55ea185623c92bb527c8e69d1c9938575bbe7da1 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
| parent | 921074ab8e07346f8be4c7002ad12a1bd8dccb46 (diff) | |
| parent | bc55c344b06f7e6f99eb92d393ff0a84c1532514 (diff) | |
Merge tag 'amd-drm-fixes-6.9-2024-03-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-fixes-6.9-2024-03-21:
amdgpu:
- Freesync fixes
- UAF IOCTL fixes
- Fix mmhub client ID mapping
- IH 7.0 fix
- DML2 fixes
- VCN 4.0.6 fix
- GART bind fix
- GPU reset fix
- SR-IOV fix
- OD table handling fixes
- Fix TA handling on boards without display hardware
- DML1 fix
- ABM fix
- eDP panel fix
- DPPCLK fix
- HDCP fix
- Revert incorrect error case handling in ioremap
- VPE fix
- HDMI fixes
- SDMA 4.4.2 fix
- Other misc fixes
amdkfd:
- Fix duplicate BO handling in process restore
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240321220514.1418288-1-alexander.deucher@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 3c2b1413058b..94b310fdb719 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -1830,6 +1830,10 @@ static int psp_hdcp_initialize(struct psp_context *psp)  	if (amdgpu_sriov_vf(psp->adev))  		return 0; +	/* bypass hdcp initialization if dmu is harvested */ +	if (!amdgpu_device_has_display_hardware(psp->adev)) +		return 0; +  	if (!psp->hdcp_context.context.bin_desc.size_bytes ||  	    !psp->hdcp_context.context.bin_desc.start_addr) {  		dev_info(psp->adev->dev, "HDCP: optional hdcp ta ucode is not available\n"); @@ -1862,6 +1866,9 @@ int psp_hdcp_invoke(struct psp_context *psp, uint32_t ta_cmd_id)  	if (amdgpu_sriov_vf(psp->adev))  		return 0; +	if (!psp->hdcp_context.context.initialized) +		return 0; +  	return psp_ta_invoke(psp, ta_cmd_id, &psp->hdcp_context.context);  } @@ -1897,6 +1904,10 @@ static int psp_dtm_initialize(struct psp_context *psp)  	if (amdgpu_sriov_vf(psp->adev))  		return 0; +	/* bypass dtm initialization if dmu is harvested */ +	if (!amdgpu_device_has_display_hardware(psp->adev)) +		return 0; +  	if (!psp->dtm_context.context.bin_desc.size_bytes ||  	    !psp->dtm_context.context.bin_desc.start_addr) {  		dev_info(psp->adev->dev, "DTM: optional dtm ta ucode is not available\n"); @@ -1929,6 +1940,9 @@ int psp_dtm_invoke(struct psp_context *psp, uint32_t ta_cmd_id)  	if (amdgpu_sriov_vf(psp->adev))  		return 0; +	if (!psp->dtm_context.context.initialized) +		return 0; +  	return psp_ta_invoke(psp, ta_cmd_id, &psp->dtm_context.context);  } @@ -2063,6 +2077,10 @@ static int psp_securedisplay_initialize(struct psp_context *psp)  	if (amdgpu_sriov_vf(psp->adev))  		return 0; +	/* bypass securedisplay initialization if dmu is harvested */ +	if (!amdgpu_device_has_display_hardware(psp->adev)) +		return 0; +  	if (!psp->securedisplay_context.context.bin_desc.size_bytes ||  	    !psp->securedisplay_context.context.bin_desc.start_addr) {  		dev_info(psp->adev->dev, "SECUREDISPLAY: securedisplay ta ucode is not available\n");  | 
