mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
amd-drm-fixes-7.2-2026-07-09:
amdgpu: - PSP 15.0.9 update - SMU 15.0.9 update - VCN 5.3 fix - VI ASPM fix - Userq fix - lifetime fix for amdgpu_vm_get_task_info_pasid() - Gfx10 fix - SMU 14 fix amdkfd: - CRIU bounds checking fixes - secondary context id fix - Event bounds checking fix -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCalAPMQAKCRC93/aFa7yZ 2Mk4AQCTkEdtVFpvH2HU2ajYhmmYxDbg5MIEWkoao1dmwfLJMQEA9fyWL1dkPo4P mmxt3GI5wcnSKjUhJmymLegpYiXBOws= =1yWq -----END PGP SIGNATURE----- Merge tag 'amd-drm-fixes-7.2-2026-07-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-7.2-2026-07-09: amdgpu: - PSP 15.0.9 update - SMU 15.0.9 update - VCN 5.3 fix - VI ASPM fix - Userq fix - lifetime fix for amdgpu_vm_get_task_info_pasid() - Gfx10 fix - SMU 14 fix amdkfd: - CRIU bounds checking fixes - secondary context id fix - Event bounds checking fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patch.msgid.link/20260709212303.15913-1-alexander.deucher@amd.com
This commit is contained in:
commit
ff17ec871d
|
|
@ -1333,7 +1333,8 @@ static bool amdgpu_device_aspm_support_quirk(struct amdgpu_device *adev)
|
|||
* It's unclear if this is a platform-specific or GPU-specific issue.
|
||||
* Disable ASPM on SI for the time being.
|
||||
*/
|
||||
if (adev->family == AMDGPU_FAMILY_SI)
|
||||
if (adev->family == AMDGPU_FAMILY_SI ||
|
||||
(!(adev->pm.pp_feature & PP_PCIE_DPM_MASK) && adev->family == AMDGPU_FAMILY_VI))
|
||||
return true;
|
||||
|
||||
#if IS_ENABLED(CONFIG_X86)
|
||||
|
|
|
|||
|
|
@ -2304,6 +2304,7 @@ static int amdgpu_discovery_set_psp_ip_blocks(struct amdgpu_device *adev)
|
|||
amdgpu_device_ip_block_add(adev, &psp_v14_0_ip_block);
|
||||
break;
|
||||
case IP_VERSION(15, 0, 0):
|
||||
case IP_VERSION(15, 0, 9):
|
||||
amdgpu_device_ip_block_add(adev, &psp_v15_0_ip_block);
|
||||
break;
|
||||
case IP_VERSION(15, 0, 8):
|
||||
|
|
@ -2375,6 +2376,7 @@ static int amdgpu_discovery_set_smu_ip_blocks(struct amdgpu_device *adev)
|
|||
case IP_VERSION(15, 0, 0):
|
||||
case IP_VERSION(15, 0, 5):
|
||||
case IP_VERSION(15, 0, 8):
|
||||
case IP_VERSION(15, 0, 9):
|
||||
amdgpu_device_ip_block_add(adev, &smu_v15_0_ip_block);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ static int psp_early_init(struct amdgpu_ip_block *ip_block)
|
|||
psp->boot_time_tmr = false;
|
||||
break;
|
||||
case IP_VERSION(15, 0, 0):
|
||||
case IP_VERSION(15, 0, 9):
|
||||
psp_v15_0_0_set_psp_funcs(psp);
|
||||
psp->boot_time_tmr = false;
|
||||
break;
|
||||
|
|
@ -3475,7 +3476,9 @@ static int psp_load_non_psp_fw(struct psp_context *psp)
|
|||
amdgpu_ip_version(adev, MP0_HWIP, 0) ==
|
||||
IP_VERSION(15, 0, 0) ||
|
||||
amdgpu_ip_version(adev, MP0_HWIP, 0) ==
|
||||
IP_VERSION(15, 0, 8)) &&
|
||||
IP_VERSION(15, 0, 8) ||
|
||||
amdgpu_ip_version(adev, MP0_HWIP, 0) ==
|
||||
IP_VERSION(15, 0, 9)) &&
|
||||
(ucode->ucode_id == AMDGPU_UCODE_ID_SDMA1 ||
|
||||
ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2 ||
|
||||
ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3))
|
||||
|
|
|
|||
|
|
@ -523,6 +523,15 @@ amdgpu_userq_destroy(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_usermode_que
|
|||
amdgpu_userq_cleanup(queue);
|
||||
mutex_unlock(&uq_mgr->userq_mutex);
|
||||
|
||||
/*
|
||||
* A failed unmap means MES could not remove the hung queue and is now
|
||||
* unresponsive. Recover the GPU here so the wedged MES does not fail
|
||||
* the next, unrelated queue submission and trigger a reset attributed
|
||||
* to an innocent workload.
|
||||
*/
|
||||
if (r)
|
||||
queue_work(adev->reset_domain->wq, &uq_mgr->reset_work);
|
||||
|
||||
cancel_delayed_work_sync(&queue->hang_detect_work);
|
||||
uq_funcs->mqd_destroy(queue);
|
||||
queue->userq_mgr = NULL;
|
||||
|
|
|
|||
|
|
@ -2460,19 +2460,6 @@ static void amdgpu_vm_destroy_task_info(struct kref *kref)
|
|||
kfree(ti);
|
||||
}
|
||||
|
||||
static inline struct amdgpu_vm *
|
||||
amdgpu_vm_get_vm_from_pasid(struct amdgpu_device *adev, u32 pasid)
|
||||
{
|
||||
struct amdgpu_vm *vm;
|
||||
unsigned long flags;
|
||||
|
||||
xa_lock_irqsave(&adev->vm_manager.pasids, flags);
|
||||
vm = xa_load(&adev->vm_manager.pasids, pasid);
|
||||
xa_unlock_irqrestore(&adev->vm_manager.pasids, flags);
|
||||
|
||||
return vm;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_vm_put_task_info - reference down the vm task_info ptr
|
||||
*
|
||||
|
|
@ -2519,8 +2506,16 @@ amdgpu_vm_get_task_info_vm(struct amdgpu_vm *vm)
|
|||
struct amdgpu_task_info *
|
||||
amdgpu_vm_get_task_info_pasid(struct amdgpu_device *adev, u32 pasid)
|
||||
{
|
||||
return amdgpu_vm_get_task_info_vm(
|
||||
amdgpu_vm_get_vm_from_pasid(adev, pasid));
|
||||
struct amdgpu_task_info *ti;
|
||||
struct amdgpu_vm *vm;
|
||||
unsigned long flags;
|
||||
|
||||
xa_lock_irqsave(&adev->vm_manager.pasids, flags);
|
||||
vm = xa_load(&adev->vm_manager.pasids, pasid);
|
||||
ti = amdgpu_vm_get_task_info_vm(vm);
|
||||
xa_unlock_irqrestore(&adev->vm_manager.pasids, flags);
|
||||
|
||||
return ti;
|
||||
}
|
||||
|
||||
static int amdgpu_vm_create_task_info(struct amdgpu_vm *vm)
|
||||
|
|
|
|||
|
|
@ -5350,6 +5350,15 @@ static void gfx_v10_0_constants_init(struct amdgpu_device *adev)
|
|||
gfx_v10_0_get_tcc_info(adev);
|
||||
adev->gfx.config.pa_sc_tile_steering_override =
|
||||
gfx_v10_0_init_pa_sc_tile_steering_override(adev);
|
||||
/* Program DB_RING_CONTROL for multiple GFX pipes
|
||||
* Default power up value is 1.
|
||||
* Possible values:
|
||||
* 0 - split occlusion counters between gfx pipes
|
||||
* 1 - all occlusion counters to pipe 0
|
||||
* 2 - all occlusion counters to pipe 1
|
||||
*/
|
||||
WREG32_FIELD15(GC, 0, DB_RING_CONTROL, COUNTER_CONTROL,
|
||||
(adev->gfx.me.num_pipe_per_me > 1) ? 0 : 1);
|
||||
|
||||
/* XXX SH_MEM regs */
|
||||
/* where to put LDS, scratch, GPUVM in FSA64 space */
|
||||
|
|
|
|||
|
|
@ -406,6 +406,7 @@ soc21_asic_reset_method(struct amdgpu_device *adev)
|
|||
case IP_VERSION(14, 0, 4):
|
||||
case IP_VERSION(14, 0, 5):
|
||||
case IP_VERSION(15, 0, 0):
|
||||
case IP_VERSION(15, 0, 9):
|
||||
return AMD_RESET_METHOD_MODE2;
|
||||
default:
|
||||
if (amdgpu_dpm_is_baco_supported(adev))
|
||||
|
|
@ -861,7 +862,6 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
|
|||
AMD_CG_SUPPORT_BIF_LS;
|
||||
adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
|
||||
AMD_PG_SUPPORT_VCN |
|
||||
AMD_PG_SUPPORT_JPEG_DPG |
|
||||
AMD_PG_SUPPORT_JPEG |
|
||||
AMD_PG_SUPPORT_GFX_PG;
|
||||
adev->external_rev_id = adev->rev_id + 0xF;
|
||||
|
|
@ -889,7 +889,6 @@ static int soc21_common_early_init(struct amdgpu_ip_block *ip_block)
|
|||
AMD_CG_SUPPORT_BIF_LS;
|
||||
adev->pg_flags = AMD_PG_SUPPORT_VCN_DPG |
|
||||
AMD_PG_SUPPORT_VCN |
|
||||
AMD_PG_SUPPORT_JPEG_DPG |
|
||||
AMD_PG_SUPPORT_JPEG |
|
||||
AMD_PG_SUPPORT_GFX_PG;
|
||||
adev->external_rev_id = adev->rev_id + 0x40;
|
||||
|
|
|
|||
|
|
@ -3818,6 +3818,12 @@ bool kfd_dqm_is_queue_in_process(struct device_queue_manager *dqm,
|
|||
dqm_unlock(dqm);
|
||||
return r;
|
||||
}
|
||||
|
||||
size_t mqd_size_from_queue_type(struct device_queue_manager *dqm, enum kfd_queue_type type)
|
||||
{
|
||||
return dqm->mqd_mgrs[get_mqd_type_from_queue_type(type)]->mqd_size;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
|
||||
static void seq_reg_dump(struct seq_file *m,
|
||||
|
|
|
|||
|
|
@ -333,6 +333,8 @@ int debug_refresh_runlist(struct device_queue_manager *dqm);
|
|||
bool kfd_dqm_is_queue_in_process(struct device_queue_manager *dqm,
|
||||
struct qcm_process_device *qpd,
|
||||
int doorbell_off, u32 *queue_format);
|
||||
size_t mqd_size_from_queue_type(struct device_queue_manager *dqm,
|
||||
enum kfd_queue_type type);
|
||||
|
||||
static inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ static int allocate_event_notification_slot(struct kfd_process *p,
|
|||
}
|
||||
|
||||
if (restore_id) {
|
||||
if (*restore_id >= KFD_SIGNAL_EVENT_LIMIT)
|
||||
return -EINVAL;
|
||||
|
||||
id = idr_alloc(&p->event_idr, ev, *restore_id, *restore_id + 1,
|
||||
GFP_KERNEL);
|
||||
} else {
|
||||
|
|
@ -204,7 +207,7 @@ static int create_signal_event(struct file *devkfd, struct kfd_process *p,
|
|||
|
||||
ret = allocate_event_notification_slot(p, ev, restore_id);
|
||||
if (ret) {
|
||||
pr_warn("Signal event wasn't created because out of kernel memory\n");
|
||||
pr_warn("Failed to create signal event notification slot\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -440,7 +440,8 @@ enum kfd_queue_type {
|
|||
KFD_QUEUE_TYPE_SDMA,
|
||||
KFD_QUEUE_TYPE_HIQ,
|
||||
KFD_QUEUE_TYPE_SDMA_XGMI,
|
||||
KFD_QUEUE_TYPE_SDMA_BY_ENG_ID
|
||||
KFD_QUEUE_TYPE_SDMA_BY_ENG_ID,
|
||||
KFD_QUEUE_TYPE_MAX,
|
||||
};
|
||||
|
||||
enum kfd_queue_format {
|
||||
|
|
|
|||
|
|
@ -910,7 +910,7 @@ static void kfd_process_free_id(struct kfd_process *process)
|
|||
{
|
||||
struct kfd_process *primary_process;
|
||||
|
||||
if (process->context_id != KFD_CONTEXT_ID_PRIMARY)
|
||||
if (process->context_id == KFD_CONTEXT_ID_PRIMARY)
|
||||
return;
|
||||
|
||||
primary_process = kfd_lookup_process_by_mm(process->lead_thread->mm);
|
||||
|
|
|
|||
|
|
@ -265,6 +265,11 @@ static int init_user_queue(struct process_queue_manager *pqm,
|
|||
(*q)->process = pqm->process;
|
||||
|
||||
if (dev->kfd->shared_resources.enable_mes) {
|
||||
if (!q_properties->wptr_bo) {
|
||||
pr_debug("Queue initialization with shared MES requires queue buffers to be initialized\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
retval = amdgpu_amdkfd_alloc_kernel_mem(dev->adev,
|
||||
AMDGPU_MES_GANG_CTX_SIZE,
|
||||
AMDGPU_GEM_DOMAIN_GTT,
|
||||
|
|
@ -1003,6 +1008,23 @@ int kfd_criu_restore_queue(struct kfd_process *p,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
pdd = kfd_process_device_data_by_id(p, q_data->gpu_id);
|
||||
if (!pdd) {
|
||||
pr_err("Failed to get pdd\n");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (q_data->type >= KFD_QUEUE_TYPE_MAX) {
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (q_data->mqd_size != mqd_size_from_queue_type(pdd->dev->dqm, q_data->type)) {
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
*priv_data_offset += sizeof(*q_data);
|
||||
q_extra_data_size = (uint64_t)q_data->ctl_stack_size + q_data->mqd_size;
|
||||
|
||||
|
|
@ -1025,13 +1047,6 @@ int kfd_criu_restore_queue(struct kfd_process *p,
|
|||
|
||||
*priv_data_offset += q_extra_data_size;
|
||||
|
||||
pdd = kfd_process_device_data_by_id(p, q_data->gpu_id);
|
||||
if (!pdd) {
|
||||
pr_err("Failed to get pdd\n");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* data stored in this order:
|
||||
* mqd[xcc0], mqd[xcc1],..., ctl_stack[xcc0], ctl_stack[xcc1]...
|
||||
|
|
@ -1042,18 +1057,10 @@ int kfd_criu_restore_queue(struct kfd_process *p,
|
|||
memset(&qp, 0, sizeof(qp));
|
||||
set_queue_properties_from_criu(&qp, q_data, NUM_XCC(pdd->dev->adev->gfx.xcc_mask));
|
||||
|
||||
ret = kfd_queue_acquire_buffers(pdd, &qp);
|
||||
if (ret) {
|
||||
pr_debug("failed to acquire user queue buffers for CRIU\n");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
print_queue_properties(&qp);
|
||||
|
||||
ret = pqm_create_queue(&p->pqm, pdd->dev, &qp, &queue_id, q_data, mqd, ctl_stack, NULL);
|
||||
if (ret) {
|
||||
kfd_queue_unref_bo_vas(pdd, &qp);
|
||||
kfd_queue_release_buffers(pdd, &qp);
|
||||
pr_err("Failed to create new queue err:%d\n", ret);
|
||||
goto exit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -802,6 +802,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
|
|||
break;
|
||||
case IP_VERSION(15, 0, 0):
|
||||
case IP_VERSION(15, 0, 5):
|
||||
case IP_VERSION(15, 0, 9):
|
||||
smu_v15_0_0_set_ppt_funcs(smu);
|
||||
break;
|
||||
case IP_VERSION(15, 0, 8):
|
||||
|
|
|
|||
|
|
@ -1621,19 +1621,23 @@ static int smu_v14_0_2_get_power_limit(struct smu_context *smu,
|
|||
table_context->power_play_table;
|
||||
PPTable_t *pptable = table_context->driver_pptable;
|
||||
CustomSkuTable_t *skutable = &pptable->CustomSkuTable;
|
||||
int16_t od_percent_upper = 0, od_percent_lower = 0;
|
||||
uint32_t pp_limit = smu->adev->pm.ac_power ?
|
||||
skutable->SocketPowerLimitAc[PPT_THROTTLER_PPT0] :
|
||||
skutable->SocketPowerLimitDc[PPT_THROTTLER_PPT0];
|
||||
uint32_t msg_limit = pptable->SkuTable.MsgLimits.Power[PPT_THROTTLER_PPT0][POWER_SOURCE_AC];
|
||||
uint32_t power_limit;
|
||||
uint32_t min_limit = min_t(uint32_t, pp_limit, msg_limit);
|
||||
uint32_t max_limit = max_t(uint32_t, pp_limit, msg_limit);
|
||||
int16_t od_percent_upper = 0, od_percent_lower = 0;
|
||||
int ret;
|
||||
|
||||
if (smu_v14_0_get_current_power_limit(smu, &power_limit))
|
||||
power_limit = smu->adev->pm.ac_power ?
|
||||
skutable->SocketPowerLimitAc[PPT_THROTTLER_PPT0] :
|
||||
skutable->SocketPowerLimitDc[PPT_THROTTLER_PPT0];
|
||||
if (current_power_limit) {
|
||||
ret = smu_v14_0_get_current_power_limit(smu, current_power_limit);
|
||||
if (ret)
|
||||
*current_power_limit = pp_limit;
|
||||
}
|
||||
|
||||
if (current_power_limit)
|
||||
*current_power_limit = power_limit;
|
||||
if (default_power_limit)
|
||||
*default_power_limit = power_limit;
|
||||
*default_power_limit = pp_limit;
|
||||
|
||||
if (powerplay_table) {
|
||||
if (smu->od_enabled &&
|
||||
|
|
@ -1647,15 +1651,15 @@ static int smu_v14_0_2_get_power_limit(struct smu_context *smu,
|
|||
}
|
||||
|
||||
dev_dbg(smu->adev->dev, "od percent upper:%d, od percent lower:%d (default power: %d)\n",
|
||||
od_percent_upper, od_percent_lower, power_limit);
|
||||
od_percent_upper, od_percent_lower, pp_limit);
|
||||
|
||||
if (max_power_limit) {
|
||||
*max_power_limit = msg_limit * (100 + od_percent_upper);
|
||||
*max_power_limit = max_limit * (100 + od_percent_upper);
|
||||
*max_power_limit /= 100;
|
||||
}
|
||||
|
||||
if (min_power_limit) {
|
||||
*min_power_limit = power_limit * (100 + od_percent_lower);
|
||||
*min_power_limit = min_limit * (100 + od_percent_lower);
|
||||
*min_power_limit /= 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -664,6 +664,7 @@ int smu_v15_0_gfx_off_control(struct smu_context *smu, bool enable)
|
|||
|
||||
switch (amdgpu_ip_version(adev, MP1_HWIP, 0)) {
|
||||
case IP_VERSION(15, 0, 0):
|
||||
case IP_VERSION(15, 0, 9):
|
||||
if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
|
||||
return 0;
|
||||
if (enable)
|
||||
|
|
|
|||
|
|
@ -1177,7 +1177,8 @@ static int smu_v15_0_common_get_dpm_profile_freq(struct smu_context *smu,
|
|||
smu_v15_0_common_get_dpm_ultimate_freq(smu, SMU_SOCCLK, NULL, &clk_limit);
|
||||
break;
|
||||
case SMU_FCLK:
|
||||
if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 0))
|
||||
if (amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 0) ||
|
||||
amdgpu_ip_version(smu->adev, MP1_HWIP, 0) == IP_VERSION(15, 0, 9))
|
||||
smu_v15_0_common_get_dpm_ultimate_freq(smu, SMU_FCLK, NULL, &clk_limit);
|
||||
else
|
||||
clk_limit = SMU_15_0_UMD_PSTATE_FCLK;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user