Skip to content

Commit 728b3d0

Browse files
Zhigang Luoalexdeucher
authored andcommitted
Revert "drm/amdgpu: add CAP fw loading"
This reverts commit 29e2501. Signed-off-by: Zhigang Luo <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 02be064 commit 728b3d0

File tree

5 files changed

+2
-38
lines changed

5 files changed

+2
-38
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ static int psp_sw_fini(void *handle)
159159
adev->psp.sos_fw = NULL;
160160
release_firmware(adev->psp.asd_fw);
161161
adev->psp.asd_fw = NULL;
162-
if (adev->psp.cap_fw) {
163-
release_firmware(adev->psp.cap_fw);
164-
adev->psp.cap_fw = NULL;
165-
}
166162
if (adev->psp.ta_fw) {
167163
release_firmware(adev->psp.ta_fw);
168164
adev->psp.ta_fw = NULL;
@@ -250,7 +246,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
250246
DRM_WARN("psp command (0x%X) failed and response status is (0x%X)\n",
251247
psp->cmd_buf_mem->cmd_id,
252248
psp->cmd_buf_mem->resp.status);
253-
if ((ucode->ucode_id == AMDGPU_UCODE_ID_CAP) || !timeout) {
249+
if (!timeout) {
254250
mutex_unlock(&psp->mutex);
255251
return -EINVAL;
256252
}
@@ -1192,9 +1188,6 @@ static int psp_get_fw_type(struct amdgpu_firmware_info *ucode,
11921188
enum psp_gfx_fw_type *type)
11931189
{
11941190
switch (ucode->ucode_id) {
1195-
case AMDGPU_UCODE_ID_CAP:
1196-
*type = GFX_FW_TYPE_CAP;
1197-
break;
11981191
case AMDGPU_UCODE_ID_SDMA0:
11991192
*type = GFX_FW_TYPE_SDMA0;
12001193
break;

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,6 @@ struct psp_context
252252
uint32_t asd_ucode_size;
253253
uint8_t *asd_start_addr;
254254

255-
/* cap firmware */
256-
const struct firmware *cap_fw;
257-
258255
/* fence buffer */
259256
struct amdgpu_bo *fence_buf_bo;
260257
uint64_t fence_buf_mc_addr;

drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ union amdgpu_firmware_header {
283283
* fw loading support
284284
*/
285285
enum AMDGPU_UCODE_ID {
286-
AMDGPU_UCODE_ID_CAP = 0, /* CAP must be the 1st fw to be loaded */
287-
AMDGPU_UCODE_ID_SDMA0,
286+
AMDGPU_UCODE_ID_SDMA0 = 0,
288287
AMDGPU_UCODE_ID_SDMA1,
289288
AMDGPU_UCODE_ID_SDMA2,
290289
AMDGPU_UCODE_ID_SDMA3,

drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ enum psp_gfx_fw_type {
246246
GFX_FW_TYPE_SDMA6 = 56, /* SDMA6 MI */
247247
GFX_FW_TYPE_SDMA7 = 57, /* SDMA7 MI */
248248
GFX_FW_TYPE_VCN1 = 58, /* VCN1 MI */
249-
GFX_FW_TYPE_CAP = 62, /* CAP_FW VG */
250249
GFX_FW_TYPE_MAX
251250
};
252251

drivers/gpu/drm/amd/amdgpu/psp_v3_1.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
MODULE_FIRMWARE("amdgpu/vega10_sos.bin");
4646
MODULE_FIRMWARE("amdgpu/vega10_asd.bin");
47-
MODULE_FIRMWARE("amdgpu/vega10_cap.bin");
4847
MODULE_FIRMWARE("amdgpu/vega12_sos.bin");
4948
MODULE_FIRMWARE("amdgpu/vega12_asd.bin");
5049

@@ -64,7 +63,6 @@ static int psp_v3_1_init_microcode(struct psp_context *psp)
6463
char fw_name[30];
6564
int err = 0;
6665
const struct psp_firmware_header_v1_0 *hdr;
67-
struct amdgpu_firmware_info *info = NULL;
6866

6967
DRM_DEBUG("\n");
7068

@@ -114,26 +112,6 @@ static int psp_v3_1_init_microcode(struct psp_context *psp)
114112
adev->psp.asd_start_addr = (uint8_t *)hdr +
115113
le32_to_cpu(hdr->header.ucode_array_offset_bytes);
116114

117-
if (amdgpu_sriov_vf(adev) && adev->asic_type == CHIP_VEGA10) {
118-
snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_cap.bin",
119-
chip_name);
120-
err = request_firmware(&adev->psp.cap_fw, fw_name, adev->dev);
121-
if (err)
122-
goto out;
123-
124-
err = amdgpu_ucode_validate(adev->psp.cap_fw);
125-
if (err)
126-
goto out;
127-
128-
info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CAP];
129-
info->ucode_id = AMDGPU_UCODE_ID_CAP;
130-
info->fw = adev->psp.cap_fw;
131-
hdr = (const struct psp_firmware_header_v1_0 *)
132-
adev->psp.cap_fw->data;
133-
adev->firmware.fw_size += ALIGN(
134-
le32_to_cpu(hdr->header.ucode_size_bytes), PAGE_SIZE);
135-
}
136-
137115
return 0;
138116
out:
139117
if (err) {
@@ -144,8 +122,6 @@ static int psp_v3_1_init_microcode(struct psp_context *psp)
144122
adev->psp.sos_fw = NULL;
145123
release_firmware(adev->psp.asd_fw);
146124
adev->psp.asd_fw = NULL;
147-
release_firmware(adev->psp.cap_fw);
148-
adev->psp.cap_fw = NULL;
149125
}
150126

151127
return err;

0 commit comments

Comments
 (0)