amd-drm-fixes-6.9-2024-05-10:
amdgpu: - DCN 3.5 fix - MST DSC fixes - S0i3 fix - S4 fix - HDP MMIO mapping fix - Fix a regression in visible vram handling amdkfd: - Spatial partition fix -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZj5UXQAKCRC93/aFa7yZ 2E0TAQDg59wnf7Hw6FR3BkYTtIvPGaFXFY6ckpaNtqO2p1KHjgD+KoTo3+TCgWH1 iHLF8WMpnN6ZbovK+bbrSQEAzT8yFwA= =i9XW -----END PGP SIGNATURE----- Merge tag 'amd-drm-fixes-6.9-2024-05-10' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.9-2024-05-10: amdgpu: - DCN 3.5 fix - MST DSC fixes - S0i3 fix - S4 fix - HDP MMIO mapping fix - Fix a regression in visible vram handling amdkfd: - Spatial partition fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240510171110.1394940-1-alexander.deucher@amd.com
This commit is contained in:
commit
06fbf84f46
@ -427,7 +427,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev,
|
||||
|
||||
amdgpu_res_first(res, 0, res->size, &cursor);
|
||||
while (cursor.remaining) {
|
||||
if ((cursor.start + cursor.size) >= adev->gmc.visible_vram_size)
|
||||
if ((cursor.start + cursor.size) > adev->gmc.visible_vram_size)
|
||||
return false;
|
||||
amdgpu_res_next(&cursor, cursor.size);
|
||||
}
|
||||
|
@ -1139,7 +1139,7 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep,
|
||||
goto err_unlock;
|
||||
}
|
||||
offset = dev->adev->rmmio_remap.bus_addr;
|
||||
if (!offset) {
|
||||
if (!offset || (PAGE_SIZE > 4096)) {
|
||||
err = -ENOMEM;
|
||||
goto err_unlock;
|
||||
}
|
||||
@ -2307,7 +2307,7 @@ static int criu_restore_memory_of_gpu(struct kfd_process_device *pdd,
|
||||
return -EINVAL;
|
||||
}
|
||||
offset = pdd->dev->adev->rmmio_remap.bus_addr;
|
||||
if (!offset) {
|
||||
if (!offset || (PAGE_SIZE > 4096)) {
|
||||
pr_err("amdgpu_amdkfd_get_mmio_remap_phys_addr failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
@ -3349,6 +3349,9 @@ static int kfd_mmio_mmap(struct kfd_node *dev, struct kfd_process *process,
|
||||
if (vma->vm_end - vma->vm_start != PAGE_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
if (PAGE_SIZE > 4096)
|
||||
return -EINVAL;
|
||||
|
||||
address = dev->adev->rmmio_remap.bus_addr;
|
||||
|
||||
vm_flags_set(vma, VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_NORESERVE |
|
||||
|
@ -1997,9 +1997,8 @@ int kfd_topology_add_device(struct kfd_node *gpu)
|
||||
HSA_CAP_ASIC_REVISION_MASK);
|
||||
|
||||
dev->node_props.location_id = pci_dev_id(gpu->adev->pdev);
|
||||
/* On multi-partition nodes, node id = location_id[31:28] */
|
||||
if (gpu->kfd->num_nodes > 1)
|
||||
dev->node_props.location_id |= (dev->gpu->node_id << 28);
|
||||
if (KFD_GC_VERSION(dev->gpu->kfd) == IP_VERSION(9, 4, 3))
|
||||
dev->node_props.location_id |= dev->gpu->node_id;
|
||||
|
||||
dev->node_props.domain = pci_domain_nr(gpu->adev->pdev->bus);
|
||||
dev->node_props.max_engine_clk_fcompute =
|
||||
|
@ -1219,8 +1219,10 @@ static bool is_dsc_need_re_compute(
|
||||
if (dc_link->type != dc_connection_mst_branch)
|
||||
return false;
|
||||
|
||||
if (!(dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT ||
|
||||
dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_PASSTHROUGH_SUPPORT))
|
||||
/* add a check for older MST DSC with no virtual DPCDs */
|
||||
if (needs_dsc_aux_workaround(dc_link) &&
|
||||
(!(dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT ||
|
||||
dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_PASSTHROUGH_SUPPORT)))
|
||||
return false;
|
||||
|
||||
for (i = 0; i < MAX_PIPES; i++)
|
||||
@ -1240,7 +1242,15 @@ static bool is_dsc_need_re_compute(
|
||||
continue;
|
||||
|
||||
aconnector = (struct amdgpu_dm_connector *) stream->dm_stream_context;
|
||||
if (!aconnector)
|
||||
if (!aconnector || !aconnector->dsc_aux)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* check if cached virtual MST DSC caps are available and DSC is supported
|
||||
* as per specifications in their Virtual DPCD registers.
|
||||
*/
|
||||
if (!(aconnector->dc_sink->dsc_caps.dsc_dec_caps.is_dsc_supported ||
|
||||
aconnector->dc_link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_PASSTHROUGH_SUPPORT))
|
||||
continue;
|
||||
|
||||
stream_on_link[new_stream_on_link_num] = aconnector;
|
||||
|
@ -195,9 +195,9 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = {
|
||||
.dcn_downspread_percent = 0.5,
|
||||
.gpuvm_min_page_size_bytes = 4096,
|
||||
.hostvm_min_page_size_bytes = 4096,
|
||||
.do_urgent_latency_adjustment = 0,
|
||||
.do_urgent_latency_adjustment = 1,
|
||||
.urgent_latency_adjustment_fabric_clock_component_us = 0,
|
||||
.urgent_latency_adjustment_fabric_clock_reference_mhz = 0,
|
||||
.urgent_latency_adjustment_fabric_clock_reference_mhz = 3000,
|
||||
};
|
||||
|
||||
void dcn35_build_wm_range_table_fpu(struct clk_mgr *clk_mgr)
|
||||
|
@ -638,22 +638,43 @@ void dcn35_power_down_on_boot(struct dc *dc)
|
||||
|
||||
bool dcn35_apply_idle_power_optimizations(struct dc *dc, bool enable)
|
||||
{
|
||||
struct dc_link *edp_links[MAX_NUM_EDP];
|
||||
int i, edp_num;
|
||||
if (dc->debug.dmcub_emulation)
|
||||
return true;
|
||||
|
||||
if (enable) {
|
||||
dc_get_edp_links(dc, edp_links, &edp_num);
|
||||
if (edp_num == 0 || edp_num > 1)
|
||||
return false;
|
||||
uint32_t num_active_edp = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dc->current_state->stream_count; ++i) {
|
||||
struct dc_stream_state *stream = dc->current_state->streams[i];
|
||||
struct dc_link *link = stream->link;
|
||||
bool is_psr = link && !link->panel_config.psr.disable_psr &&
|
||||
(link->psr_settings.psr_version == DC_PSR_VERSION_1 ||
|
||||
link->psr_settings.psr_version == DC_PSR_VERSION_SU_1);
|
||||
bool is_replay = link && link->replay_settings.replay_feature_enabled;
|
||||
|
||||
if (!stream->dpms_off && !dc_is_embedded_signal(stream->signal))
|
||||
/* Ignore streams that disabled. */
|
||||
if (stream->dpms_off)
|
||||
continue;
|
||||
|
||||
/* Active external displays block idle optimizations. */
|
||||
if (!dc_is_embedded_signal(stream->signal))
|
||||
return false;
|
||||
|
||||
/* If not PWRSEQ0 can't enter idle optimizations */
|
||||
if (link && link->link_index != 0)
|
||||
return false;
|
||||
|
||||
/* Check for panel power features required for idle optimizations. */
|
||||
if (!is_psr && !is_replay)
|
||||
return false;
|
||||
|
||||
num_active_edp += 1;
|
||||
}
|
||||
|
||||
/* If more than one active eDP then disallow. */
|
||||
if (num_active_edp > 1)
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: review other cases when idle optimization is allowed
|
||||
|
@ -226,7 +226,7 @@ static int smu_v13_0_4_system_features_control(struct smu_context *smu, bool en)
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
int ret = 0;
|
||||
|
||||
if (!en && !adev->in_s0ix) {
|
||||
if (!en && adev->in_s4) {
|
||||
/* Adds a GFX reset as workaround just before sending the
|
||||
* MP1_UNLOAD message to prevent GC/RLC/PMFW from entering
|
||||
* an invalid state.
|
||||
|
Loading…
x
Reference in New Issue
Block a user