Commit 009e9a15 authored by Jonathan Kim's avatar Jonathan Kim Committed by Alex Deucher

drm/amdkfd: navi2x requires extended engines to map and unmap sdma queues

SDMA 5.2.x queues are required to be mapped and unmapped from the extended
engines.
Signed-off-by: default avatarJonathan Kim <jonathan.kim@amd.com>
Reviewed-by: default avatarFelix Kuehling <felix.kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d2cb0b21
...@@ -179,6 +179,11 @@ static int pm_set_resources_v9(struct packet_manager *pm, uint32_t *buffer, ...@@ -179,6 +179,11 @@ static int pm_set_resources_v9(struct packet_manager *pm, uint32_t *buffer,
return 0; return 0;
} }
static inline bool pm_use_ext_eng(struct kfd_dev *dev)
{
return dev->adev->ip_versions[SDMA0_HWIP][0] >= IP_VERSION(5, 2, 0);
}
static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer, static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer,
struct queue *q, bool is_static) struct queue *q, bool is_static)
{ {
...@@ -215,7 +220,7 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer, ...@@ -215,7 +220,7 @@ static int pm_map_queues_v9(struct packet_manager *pm, uint32_t *buffer,
case KFD_QUEUE_TYPE_SDMA: case KFD_QUEUE_TYPE_SDMA:
case KFD_QUEUE_TYPE_SDMA_XGMI: case KFD_QUEUE_TYPE_SDMA_XGMI:
use_static = false; /* no static queues under SDMA */ use_static = false; /* no static queues under SDMA */
if (q->properties.sdma_engine_id < 2) if (q->properties.sdma_engine_id < 2 && !pm_use_ext_eng(q->device))
packet->bitfields2.engine_sel = q->properties.sdma_engine_id + packet->bitfields2.engine_sel = q->properties.sdma_engine_id +
engine_sel__mes_map_queues__sdma0_vi; engine_sel__mes_map_queues__sdma0_vi;
else { else {
...@@ -258,8 +263,10 @@ static int pm_unmap_queues_v9(struct packet_manager *pm, uint32_t *buffer, ...@@ -258,8 +263,10 @@ static int pm_unmap_queues_v9(struct packet_manager *pm, uint32_t *buffer,
packet->header.u32All = pm_build_pm4_header(IT_UNMAP_QUEUES, packet->header.u32All = pm_build_pm4_header(IT_UNMAP_QUEUES,
sizeof(struct pm4_mes_unmap_queues)); sizeof(struct pm4_mes_unmap_queues));
packet->bitfields2.extended_engine_sel = packet->bitfields2.extended_engine_sel = pm_use_ext_eng(pm->dqm->dev) ?
extended_engine_sel__mes_map_queues__sdma0_to_7_sel :
extended_engine_sel__mes_unmap_queues__legacy_engine_sel; extended_engine_sel__mes_unmap_queues__legacy_engine_sel;
packet->bitfields2.engine_sel = packet->bitfields2.engine_sel =
engine_sel__mes_unmap_queues__compute; engine_sel__mes_unmap_queues__compute;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment