mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/amdkfd: add per-vmid-debug map_process_support
In order to support multi-process debugging, HWS PM4 packet MAP_PROCESS requires an extension of 5 DWORDS to support targeting of per-vmid SPI debug control registers as well as watch points per process. Signed-off-by: Jonathan Kim <jonathan.kim@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
1d712be90a
commit
fd6a440ebc
@@ -26,6 +26,7 @@
|
||||
#include "kfd_priv.h"
|
||||
#include "kfd_device_queue_manager.h"
|
||||
#include "kfd_pm4_headers_vi.h"
|
||||
#include "kfd_pm4_headers_aldebaran.h"
|
||||
#include "cwsr_trap_handler.h"
|
||||
#include "kfd_iommu.h"
|
||||
#include "amdgpu_amdkfd.h"
|
||||
@@ -714,7 +715,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
|
||||
struct drm_device *ddev,
|
||||
const struct kgd2kfd_shared_resources *gpu_resources)
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned int size, map_process_packet_size;
|
||||
|
||||
kfd->ddev = ddev;
|
||||
kfd->mec_fw_version = amdgpu_amdkfd_get_fw_version(kfd->kgd,
|
||||
@@ -749,7 +750,11 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
|
||||
* calculate max size of runlist packet.
|
||||
* There can be only 2 packets at once
|
||||
*/
|
||||
size += (KFD_MAX_NUM_OF_PROCESSES * sizeof(struct pm4_mes_map_process) +
|
||||
map_process_packet_size =
|
||||
kfd->device_info->asic_family == CHIP_ALDEBARAN ?
|
||||
sizeof(struct pm4_mes_map_process_aldebaran) :
|
||||
sizeof(struct pm4_mes_map_process);
|
||||
size += (KFD_MAX_NUM_OF_PROCESSES * map_process_packet_size +
|
||||
max_num_of_queues_per_device * sizeof(struct pm4_mes_map_queues)
|
||||
+ sizeof(struct pm4_mes_runlist)) * 2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user