Skip to content

Commit b1118df

Browse files
Asad Kamalalexdeucher
authored andcommitted
drm/amd/pm: Limit jpeg rings as per max for jpeg_v_4_0_3
Since pmfw supports for smuv13_0_6 is limited to 8 jpeg rings per instance, which is the max for jpeg_v_4_0_3. Limit it to same to avoid out of bound access. Fixes: 568199a ("drm/amd/pm: Limit to 8 jpeg rings per instance") Signed-off-by: Asad Kamal <[email protected]> Reviewed-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a6d9d19 commit b1118df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2644,7 +2644,7 @@ static ssize_t smu_v13_0_6_get_gpu_metrics(struct smu_context *smu, void **table
26442644

26452645
per_inst = smu_v13_0_6_cap_supported(smu, SMU_CAP(PER_INST_METRICS));
26462646

2647-
num_jpeg_rings = max_t(u8, adev->jpeg.num_jpeg_rings, 8);
2647+
num_jpeg_rings = AMDGPU_MAX_JPEG_RINGS_4_0_3;
26482648
for_each_xcp(adev->xcp_mgr, xcp, i) {
26492649
amdgpu_xcp_get_inst_details(xcp, AMDGPU_XCP_VCN, &inst_mask);
26502650
idx = 0;

0 commit comments

Comments
 (0)