Skip to content

Commit

Permalink
drm/radeon: Assign VMID to PASID for IH in non-HWS mode
Browse files Browse the repository at this point in the history
This patch fixes a bug in kgd_set_pasid_vmid_mapping(), where the function
only updated the ATC registers (IOMMU) with the new VMID <--> PASID mapping,
but didn't update the IH (Interrupt) registers.

The bug only occurs when using non-HWS mode. In HWS mode, the CP automatically
does the VMID <--> PASID mapping.

Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Ben Goz authored and Oded Gabbay committed Dec 17, 2014
1 parent 4c18442 commit fec77bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/radeon/cikd.h
Original file line number Diff line number Diff line change
Expand Up @@ -2156,4 +2156,6 @@
#define ATC_VM_APERTURE1_HIGH_ADDR 0x330Cu
#define ATC_VM_APERTURE1_LOW_ADDR 0x3304u

#define IH_VMID_0_LUT 0x3D40u

#endif
4 changes: 4 additions & 0 deletions drivers/gpu/drm/radeon/radeon_kfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,10 @@ static int kgd_set_pasid_vmid_mapping(struct kgd_dev *kgd, unsigned int pasid,
cpu_relax();
write_register(kgd, ATC_VMID_PASID_MAPPING_UPDATE_STATUS, 1U << vmid);

/* Mapping vmid to pasid also for IH block */
write_register(kgd, IH_VMID_0_LUT + vmid * sizeof(uint32_t),
pasid_mapping);

return 0;
}

Expand Down

0 comments on commit fec77bb

Please sign in to comment.