Re: [QUESTION] sh_mem_bases: amdkfd vs amdgpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 2022-05-17 um 20:32 schrieb robert.dazi@xxxxxxxxx:
Hi,

There is an interesting feature divergence between amdgpu and amdkfd concerning the shared/private apertures. I restricted my analysis to gfx9, it may differ with other gfx.

In amdgpu, the pair of aperture start addresses is defined the following way (in gmc_v9_0.c):

* shared_aperture_start = 0x2000000000000000ULL
* private_aperture_start = 0x1000000000000000ULL

In amdkfd, the pair is reversed (cf kfd_flat_memory.c and kfd_device_queue_manager_v9.c):

* lds_base (ie shared_aperture_start) = (0x1UL) << 48
* scratch_base (ie private_aperture_start) = (0x2UL) << 48

It's more than just reversed. If I counted 0s correctly, the aperture start addresses in gmc_v9_0.c expressed the same way would be

shared_aperture_start = 0x2ULL << 60;
private_aperture_start = 0x1ULL << 60;



Is there any reason why those two definitions diverge ?

I don't think there is any deliberate reason for them to diverge. But there is also no reason for them to be the same. The sh_mem_bases register is per-VMID, which means these settings can be different for every address space. The address spaces for graphics and compute are defined independently of each other, and there was no reason to coordinate these settings.

Regards,
  Felix



Thanks,

RD



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux