mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-14 17:55:42 +08:00
drm/amdkfd: add reset parameter for unmap queues
So we can set reset mode for unmap operation, no functional change. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f4409ee846
commit
f6b80c04aa
@ -47,7 +47,7 @@ static int execute_queues_cpsch(struct device_queue_manager *dqm,
|
||||
uint32_t filter_param);
|
||||
static int unmap_queues_cpsch(struct device_queue_manager *dqm,
|
||||
enum kfd_unmap_queues_filter filter,
|
||||
uint32_t filter_param);
|
||||
uint32_t filter_param, bool reset);
|
||||
|
||||
static int map_queues_cpsch(struct device_queue_manager *dqm);
|
||||
|
||||
@ -570,7 +570,7 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q,
|
||||
/* Make sure the queue is unmapped before updating the MQD */
|
||||
if (dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) {
|
||||
retval = unmap_queues_cpsch(dqm,
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0);
|
||||
KFD_UNMAP_QUEUES_FILTER_DYNAMIC_QUEUES, 0, false);
|
||||
if (retval) {
|
||||
pr_err("unmap queue failed\n");
|
||||
goto out_unlock;
|
||||
@ -1223,7 +1223,7 @@ static int stop_cpsch(struct device_queue_manager *dqm)
|
||||
}
|
||||
|
||||
if (!dqm->is_hws_hang)
|
||||
unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0);
|
||||
unmap_queues_cpsch(dqm, KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES, 0, false);
|
||||
hanging = dqm->is_hws_hang || dqm->is_resetting;
|
||||
dqm->sched_running = false;
|
||||
|
||||
@ -1419,7 +1419,7 @@ static int map_queues_cpsch(struct device_queue_manager *dqm)
|
||||
/* dqm->lock mutex has to be locked before calling this function */
|
||||
static int unmap_queues_cpsch(struct device_queue_manager *dqm,
|
||||
enum kfd_unmap_queues_filter filter,
|
||||
uint32_t filter_param)
|
||||
uint32_t filter_param, bool reset)
|
||||
{
|
||||
int retval = 0;
|
||||
struct mqd_manager *mqd_mgr;
|
||||
@ -1432,7 +1432,7 @@ static int unmap_queues_cpsch(struct device_queue_manager *dqm,
|
||||
return retval;
|
||||
|
||||
retval = pm_send_unmap_queue(&dqm->packet_mgr, KFD_QUEUE_TYPE_COMPUTE,
|
||||
filter, filter_param, false, 0);
|
||||
filter, filter_param, reset, 0);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
@ -1485,7 +1485,7 @@ static int execute_queues_cpsch(struct device_queue_manager *dqm,
|
||||
|
||||
if (dqm->is_hws_hang)
|
||||
return -EIO;
|
||||
retval = unmap_queues_cpsch(dqm, filter, filter_param);
|
||||
retval = unmap_queues_cpsch(dqm, filter, filter_param, false);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user