mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge tag 'amd-drm-fixes-6.6-2023-09-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-fixes-6.6-2023-09-06: amdgpu: - Display replay fixes - Fixes for headless boards - Fix documentation breakage - RAS fixes - Handle newer IP discovery tables - SMU 13.0.6 fixes - SR-IOV fixes - Display vstartup fixes - NBIO 7.9 fixes - Display scaling mode fixes - Debugfs power reporting fix - GC 9.4.3 fixes - Dirty framebuffer fixes for fbcon - eDP fixes - DCN 3.1.5 fix - Display ODM fixes - GPU core dump fix - Re-enable zops property now that IGT test is fixed - Fix possible UAF in CS code - Cursor degamma fix amdkfd: - HMM fixes - Interrupt masking fix - GFX11 MQD fixes Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230907033049.7811-1-alexander.deucher@amd.com
This commit is contained in:
@@ -11,19 +11,19 @@ via sysfs
|
||||
product_name
|
||||
------------
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
|
||||
:doc: product_name
|
||||
|
||||
product_number
|
||||
--------------
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
:doc: product_name
|
||||
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
|
||||
:doc: product_number
|
||||
|
||||
serial_number
|
||||
-------------
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
|
||||
.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
|
||||
:doc: serial_number
|
||||
|
||||
unique_id
|
||||
|
||||
@@ -442,9 +442,7 @@ void amdgpu_amdkfd_get_local_mem_info(struct amdgpu_device *adev,
|
||||
mem_info->local_mem_size_public,
|
||||
mem_info->local_mem_size_private);
|
||||
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
mem_info->mem_clk_max = adev->clock.default_mclk / 100;
|
||||
else if (adev->pm.dpm_enabled) {
|
||||
if (adev->pm.dpm_enabled) {
|
||||
if (amdgpu_emu_mode == 1)
|
||||
mem_info->mem_clk_max = 0;
|
||||
else
|
||||
@@ -463,9 +461,7 @@ uint64_t amdgpu_amdkfd_get_gpu_clock_counter(struct amdgpu_device *adev)
|
||||
uint32_t amdgpu_amdkfd_get_max_engine_clock_in_mhz(struct amdgpu_device *adev)
|
||||
{
|
||||
/* the sclk is in quantas of 10kHz */
|
||||
if (amdgpu_sriov_vf(adev))
|
||||
return adev->clock.default_sclk / 100;
|
||||
else if (adev->pm.dpm_enabled)
|
||||
if (adev->pm.dpm_enabled)
|
||||
return amdgpu_dpm_get_sclk(adev, false) / 100;
|
||||
else
|
||||
return 100;
|
||||
|
||||
@@ -217,6 +217,7 @@ union umc_info {
|
||||
struct atom_umc_info_v3_1 v31;
|
||||
struct atom_umc_info_v3_2 v32;
|
||||
struct atom_umc_info_v3_3 v33;
|
||||
struct atom_umc_info_v4_0 v40;
|
||||
};
|
||||
|
||||
union vram_info {
|
||||
@@ -508,9 +509,8 @@ bool amdgpu_atomfirmware_mem_ecc_supported(struct amdgpu_device *adev)
|
||||
|
||||
if (amdgpu_atom_parse_data_header(mode_info->atom_context,
|
||||
index, &size, &frev, &crev, &data_offset)) {
|
||||
umc_info = (union umc_info *)(mode_info->atom_context->bios + data_offset);
|
||||
if (frev == 3) {
|
||||
umc_info = (union umc_info *)
|
||||
(mode_info->atom_context->bios + data_offset);
|
||||
switch (crev) {
|
||||
case 1:
|
||||
umc_config = le32_to_cpu(umc_info->v31.umc_config);
|
||||
@@ -533,6 +533,20 @@ bool amdgpu_atomfirmware_mem_ecc_supported(struct amdgpu_device *adev)
|
||||
/* unsupported crev */
|
||||
return false;
|
||||
}
|
||||
} else if (frev == 4) {
|
||||
switch (crev) {
|
||||
case 0:
|
||||
umc_config1 = le32_to_cpu(umc_info->v40.umc_config1);
|
||||
ecc_default_enabled =
|
||||
(umc_config1 & UMC_CONFIG1__ENABLE_ECC_CAPABLE) ? true : false;
|
||||
break;
|
||||
default:
|
||||
/* unsupported crev */
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
/* unsupported frev */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,6 @@ static int amdgpu_cs_p1_user_fence(struct amdgpu_cs_parser *p,
|
||||
{
|
||||
struct drm_gem_object *gobj;
|
||||
unsigned long size;
|
||||
int r;
|
||||
|
||||
gobj = drm_gem_object_lookup(p->filp, data->handle);
|
||||
if (gobj == NULL)
|
||||
@@ -137,23 +136,14 @@ static int amdgpu_cs_p1_user_fence(struct amdgpu_cs_parser *p,
|
||||
drm_gem_object_put(gobj);
|
||||
|
||||
size = amdgpu_bo_size(p->uf_bo);
|
||||
if (size != PAGE_SIZE || (data->offset + 8) > size) {
|
||||
r = -EINVAL;
|
||||
goto error_unref;
|
||||
}
|
||||
if (size != PAGE_SIZE || data->offset > (size - 8))
|
||||
return -EINVAL;
|
||||
|
||||
if (amdgpu_ttm_tt_get_usermm(p->uf_bo->tbo.ttm)) {
|
||||
r = -EINVAL;
|
||||
goto error_unref;
|
||||
}
|
||||
if (amdgpu_ttm_tt_get_usermm(p->uf_bo->tbo.ttm))
|
||||
return -EINVAL;
|
||||
|
||||
*offset = data->offset;
|
||||
|
||||
return 0;
|
||||
|
||||
error_unref:
|
||||
amdgpu_bo_unref(&p->uf_bo);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int amdgpu_cs_p1_bo_handles(struct amdgpu_cs_parser *p,
|
||||
|
||||
@@ -885,13 +885,20 @@ static void amdgpu_block_invalid_wreg(struct amdgpu_device *adev,
|
||||
*/
|
||||
static int amdgpu_device_asic_init(struct amdgpu_device *adev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
amdgpu_asic_pre_asic_init(adev);
|
||||
|
||||
if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3) ||
|
||||
adev->ip_versions[GC_HWIP][0] >= IP_VERSION(11, 0, 0))
|
||||
return amdgpu_atomfirmware_asic_init(adev, true);
|
||||
else
|
||||
adev->ip_versions[GC_HWIP][0] >= IP_VERSION(11, 0, 0)) {
|
||||
amdgpu_psp_wait_for_bootloader(adev);
|
||||
ret = amdgpu_atomfirmware_asic_init(adev, true);
|
||||
return ret;
|
||||
} else {
|
||||
return amdgpu_atom_asic_init(adev->mode_info.atom_context);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4694,9 +4701,12 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev)
|
||||
}
|
||||
|
||||
if (ret)
|
||||
dev_err(adev->dev, "GPU mode1 reset failed\n");
|
||||
goto mode1_reset_failed;
|
||||
|
||||
amdgpu_device_load_pci_state(adev->pdev);
|
||||
ret = amdgpu_psp_wait_for_bootloader(adev);
|
||||
if (ret)
|
||||
goto mode1_reset_failed;
|
||||
|
||||
/* wait for asic to come out of reset */
|
||||
for (i = 0; i < adev->usec_timeout; i++) {
|
||||
@@ -4707,7 +4717,17 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev)
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
if (i >= adev->usec_timeout) {
|
||||
ret = -ETIMEDOUT;
|
||||
goto mode1_reset_failed;
|
||||
}
|
||||
|
||||
amdgpu_atombios_scratch_regs_engine_hung(adev, false);
|
||||
|
||||
return 0;
|
||||
|
||||
mode1_reset_failed:
|
||||
dev_err(adev->dev, "GPU mode1 reset failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4849,7 +4869,7 @@ static void amdgpu_reset_capture_coredumpm(struct amdgpu_device *adev)
|
||||
struct drm_device *dev = adev_to_drm(adev);
|
||||
|
||||
ktime_get_ts64(&adev->reset_time);
|
||||
dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL,
|
||||
dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_NOWAIT,
|
||||
amdgpu_devcoredump_read, amdgpu_devcoredump_free);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1390,6 +1390,7 @@ union gc_info {
|
||||
struct gc_info_v1_1 v1_1;
|
||||
struct gc_info_v1_2 v1_2;
|
||||
struct gc_info_v2_0 v2;
|
||||
struct gc_info_v2_1 v2_1;
|
||||
};
|
||||
|
||||
static int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev)
|
||||
@@ -1465,6 +1466,15 @@ static int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev)
|
||||
adev->gfx.config.num_sc_per_sh = le32_to_cpu(gc_info->v2.gc_num_sc_per_se) /
|
||||
le32_to_cpu(gc_info->v2.gc_num_sh_per_se);
|
||||
adev->gfx.config.num_packer_per_sc = le32_to_cpu(gc_info->v2.gc_num_packer_per_sc);
|
||||
if (gc_info->v2.header.version_minor == 1) {
|
||||
adev->gfx.config.gc_num_tcp_per_sa = le32_to_cpu(gc_info->v2_1.gc_num_tcp_per_sh);
|
||||
adev->gfx.config.gc_tcp_size_per_cu = le32_to_cpu(gc_info->v2_1.gc_tcp_size_per_cu);
|
||||
adev->gfx.config.gc_num_sdp_interface = le32_to_cpu(gc_info->v2_1.gc_num_sdp_interface); /* per XCD */
|
||||
adev->gfx.config.gc_num_cu_per_sqc = le32_to_cpu(gc_info->v2_1.gc_num_cu_per_sqc);
|
||||
adev->gfx.config.gc_l1_instruction_cache_size_per_sqc = le32_to_cpu(gc_info->v2_1.gc_instruction_cache_size_per_sqc);
|
||||
adev->gfx.config.gc_l1_data_cache_size_per_sqc = le32_to_cpu(gc_info->v2_1.gc_scalar_data_cache_size_per_sqc);
|
||||
adev->gfx.config.gc_tcc_size = le32_to_cpu(gc_info->v2_1.gc_tcc_size); /* per XCD */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
dev_err(adev->dev,
|
||||
@@ -1478,6 +1488,7 @@ static int amdgpu_discovery_get_gfx_info(struct amdgpu_device *adev)
|
||||
|
||||
union mall_info {
|
||||
struct mall_info_v1_0 v1;
|
||||
struct mall_info_v2_0 v2;
|
||||
};
|
||||
|
||||
static int amdgpu_discovery_get_mall_info(struct amdgpu_device *adev)
|
||||
@@ -1518,6 +1529,10 @@ static int amdgpu_discovery_get_mall_info(struct amdgpu_device *adev)
|
||||
adev->gmc.mall_size = mall_size;
|
||||
adev->gmc.m_half_use = half_use;
|
||||
break;
|
||||
case 2:
|
||||
mall_size_per_umc = le32_to_cpu(mall_info->v2.mall_size_per_umc);
|
||||
adev->gmc.mall_size = mall_size_per_umc * adev->gmc.num_umc;
|
||||
break;
|
||||
default:
|
||||
dev_err(adev->dev,
|
||||
"Unhandled MALL info table %d.%d\n",
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <drm/drm_crtc_helper.h>
|
||||
#include <drm/drm_damage_helper.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_edid.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_gem_framebuffer_helper.h>
|
||||
@@ -532,11 +534,29 @@ bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector,
|
||||
return true;
|
||||
}
|
||||
|
||||
static int amdgpu_dirtyfb(struct drm_framebuffer *fb, struct drm_file *file,
|
||||
unsigned int flags, unsigned int color,
|
||||
struct drm_clip_rect *clips, unsigned int num_clips)
|
||||
{
|
||||
|
||||
if (file)
|
||||
return -ENOSYS;
|
||||
|
||||
return drm_atomic_helper_dirtyfb(fb, file, flags, color, clips,
|
||||
num_clips);
|
||||
}
|
||||
|
||||
static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
|
||||
.destroy = drm_gem_fb_destroy,
|
||||
.create_handle = drm_gem_fb_create_handle,
|
||||
};
|
||||
|
||||
static const struct drm_framebuffer_funcs amdgpu_fb_funcs_atomic = {
|
||||
.destroy = drm_gem_fb_destroy,
|
||||
.create_handle = drm_gem_fb_create_handle,
|
||||
.dirty = amdgpu_dirtyfb
|
||||
};
|
||||
|
||||
uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
|
||||
uint64_t bo_flags)
|
||||
{
|
||||
@@ -1139,7 +1159,11 @@ static int amdgpu_display_gem_fb_verify_and_init(struct drm_device *dev,
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs);
|
||||
if (drm_drv_uses_atomic_modeset(dev))
|
||||
ret = drm_framebuffer_init(dev, &rfb->base,
|
||||
&amdgpu_fb_funcs_atomic);
|
||||
else
|
||||
ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs);
|
||||
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
@@ -241,6 +241,9 @@ struct amdgpu_gfx_config {
|
||||
uint32_t gc_gl1c_per_sa;
|
||||
uint32_t gc_gl1c_size_per_instance;
|
||||
uint32_t gc_gl2c_per_gpu;
|
||||
uint32_t gc_tcp_size_per_cu;
|
||||
uint32_t gc_num_cu_per_sqc;
|
||||
uint32_t gc_tcc_size;
|
||||
};
|
||||
|
||||
struct amdgpu_cu_info {
|
||||
|
||||
@@ -2078,6 +2078,17 @@ int psp_securedisplay_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
|
||||
}
|
||||
/* SECUREDISPLAY end */
|
||||
|
||||
int amdgpu_psp_wait_for_bootloader(struct amdgpu_device *adev)
|
||||
{
|
||||
struct psp_context *psp = &adev->psp;
|
||||
int ret = 0;
|
||||
|
||||
if (!amdgpu_sriov_vf(adev) && psp->funcs && psp->funcs->wait_for_bootloader != NULL)
|
||||
ret = psp->funcs->wait_for_bootloader(psp);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int psp_hw_start(struct psp_context *psp)
|
||||
{
|
||||
struct amdgpu_device *adev = psp->adev;
|
||||
|
||||
@@ -109,6 +109,7 @@ enum psp_reg_prog_id {
|
||||
|
||||
struct psp_funcs {
|
||||
int (*init_microcode)(struct psp_context *psp);
|
||||
int (*wait_for_bootloader)(struct psp_context *psp);
|
||||
int (*bootloader_load_kdb)(struct psp_context *psp);
|
||||
int (*bootloader_load_spl)(struct psp_context *psp);
|
||||
int (*bootloader_load_sysdrv)(struct psp_context *psp);
|
||||
@@ -533,4 +534,6 @@ int psp_spatial_partition(struct psp_context *psp, int mode);
|
||||
|
||||
int is_psp_fw_valid(struct psp_bin_desc bin);
|
||||
|
||||
int amdgpu_psp_wait_for_bootloader(struct amdgpu_device *adev);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -764,7 +764,7 @@ int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
|
||||
{
|
||||
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
|
||||
union ta_ras_cmd_input *info;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
if (!con)
|
||||
return -EINVAL;
|
||||
@@ -773,7 +773,7 @@ int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
|
||||
if (enable &&
|
||||
head->block != AMDGPU_RAS_BLOCK__GFX &&
|
||||
!amdgpu_ras_is_feature_allowed(adev, head))
|
||||
goto out;
|
||||
return 0;
|
||||
|
||||
/* Only enable gfx ras feature from host side */
|
||||
if (head->block == AMDGPU_RAS_BLOCK__GFX &&
|
||||
@@ -801,16 +801,16 @@ int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
|
||||
enable ? "enable":"disable",
|
||||
get_ras_block_str(head),
|
||||
amdgpu_ras_is_poison_mode_supported(adev), ret);
|
||||
goto out;
|
||||
return ret;
|
||||
}
|
||||
|
||||
kfree(info);
|
||||
}
|
||||
|
||||
/* setup the obj */
|
||||
__amdgpu_ras_feature_enable(adev, head, enable);
|
||||
out:
|
||||
if (head->block == AMDGPU_RAS_BLOCK__GFX)
|
||||
kfree(info);
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Only used in device probe stage and called only once. */
|
||||
@@ -2399,6 +2399,7 @@ static bool amdgpu_ras_asic_supported(struct amdgpu_device *adev)
|
||||
if (amdgpu_sriov_vf(adev)) {
|
||||
switch (adev->ip_versions[MP0_HWIP][0]) {
|
||||
case IP_VERSION(13, 0, 2):
|
||||
case IP_VERSION(13, 0, 6):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -158,9 +158,10 @@ static bool __is_ras_eeprom_supported(struct amdgpu_device *adev)
|
||||
case IP_VERSION(11, 0, 7): /* Sienna cichlid */
|
||||
case IP_VERSION(13, 0, 0):
|
||||
case IP_VERSION(13, 0, 2): /* Aldebaran */
|
||||
case IP_VERSION(13, 0, 6):
|
||||
case IP_VERSION(13, 0, 10):
|
||||
return true;
|
||||
case IP_VERSION(13, 0, 6):
|
||||
return (adev->gmc.is_app_apu) ? false : true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -203,6 +203,9 @@ static void gfx_v9_4_3_init_golden_registers(struct amdgpu_device *adev)
|
||||
if (adev->rev_id == 0) {
|
||||
WREG32_FIELD15_PREREG(GC, dev_inst, TCP_UTCL1_CNTL1,
|
||||
REDUCE_FIFO_DEPTH_BY_2, 2);
|
||||
} else {
|
||||
WREG32_FIELD15_PREREG(GC, dev_inst, TCP_UTCL1_CNTL2,
|
||||
SPARE, 0x1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -860,11 +863,15 @@ static int gfx_v9_4_3_sw_init(void *handle)
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = amdgpu_gfx_sysfs_init(adev);
|
||||
r = amdgpu_gfx_ras_sw_init(adev);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
return amdgpu_gfx_ras_sw_init(adev);
|
||||
|
||||
if (!amdgpu_sriov_vf(adev))
|
||||
r = amdgpu_gfx_sysfs_init(adev);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static int gfx_v9_4_3_sw_fini(void *handle)
|
||||
@@ -885,7 +892,8 @@ static int gfx_v9_4_3_sw_fini(void *handle)
|
||||
gfx_v9_4_3_mec_fini(adev);
|
||||
amdgpu_bo_unref(&adev->gfx.rlc.clear_state_obj);
|
||||
gfx_v9_4_3_free_microcode(adev);
|
||||
amdgpu_gfx_sysfs_fini(adev);
|
||||
if (!amdgpu_sriov_vf(adev))
|
||||
amdgpu_gfx_sysfs_fini(adev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2219,15 +2227,6 @@ static void gfx_v9_4_3_xcc_update_sram_fgcg(struct amdgpu_device *adev,
|
||||
WREG32_SOC15(GC, GET_INST(GC, xcc_id),
|
||||
regRLC_CGTT_MGCG_OVERRIDE, data);
|
||||
|
||||
def = data = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regRLC_CLK_CNTL);
|
||||
|
||||
if (enable)
|
||||
data &= ~RLC_CLK_CNTL__RLC_SRAM_CLK_GATER_OVERRIDE_MASK;
|
||||
else
|
||||
data |= RLC_CLK_CNTL__RLC_SRAM_CLK_GATER_OVERRIDE_MASK;
|
||||
|
||||
if (def != data)
|
||||
WREG32_SOC15(GC, GET_INST(GC, xcc_id), regRLC_CLK_CNTL, data);
|
||||
}
|
||||
|
||||
static void gfx_v9_4_3_xcc_update_repeater_fgcg(struct amdgpu_device *adev,
|
||||
@@ -4048,7 +4047,8 @@ static void gfx_v9_4_3_inst_enable_watchdog_timer(struct amdgpu_device *adev,
|
||||
uint32_t i;
|
||||
uint32_t data;
|
||||
|
||||
data = REG_SET_FIELD(0, SQ_TIMEOUT_CONFIG, TIMEOUT_FATAL_DISABLE,
|
||||
data = RREG32_SOC15(GC, GET_INST(GC, 0), regSQ_TIMEOUT_CONFIG);
|
||||
data = REG_SET_FIELD(data, SQ_TIMEOUT_CONFIG, TIMEOUT_FATAL_DISABLE,
|
||||
amdgpu_watchdog_timer.timeout_fatal_disable ? 1 : 0);
|
||||
|
||||
if (amdgpu_watchdog_timer.timeout_fatal_disable &&
|
||||
|
||||
@@ -360,8 +360,10 @@ static int jpeg_v4_0_3_hw_fini(void *handle)
|
||||
|
||||
cancel_delayed_work_sync(&adev->jpeg.idle_work);
|
||||
|
||||
if (adev->jpeg.cur_state != AMD_PG_STATE_GATE)
|
||||
ret = jpeg_v4_0_3_set_powergating_state(adev, AMD_PG_STATE_GATE);
|
||||
if (!amdgpu_sriov_vf(adev)) {
|
||||
if (adev->jpeg.cur_state != AMD_PG_STATE_GATE)
|
||||
ret = jpeg_v4_0_3_set_powergating_state(adev, AMD_PG_STATE_GATE);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -437,6 +437,24 @@ static void nbio_v7_9_init_registers(struct amdgpu_device *adev)
|
||||
XCC_DOORBELL_FENCE__SHUB_SLV_MODE_MASK);
|
||||
|
||||
}
|
||||
|
||||
if (!amdgpu_sriov_vf(adev)) {
|
||||
u32 baco_cntl;
|
||||
for_each_inst(i, adev->aid_mask) {
|
||||
baco_cntl = RREG32_SOC15(NBIO, i, regBIF_BX0_BACO_CNTL);
|
||||
if (baco_cntl & (BIF_BX0_BACO_CNTL__BACO_DUMMY_EN_MASK |
|
||||
BIF_BX0_BACO_CNTL__BACO_EN_MASK)) {
|
||||
baco_cntl &= ~(
|
||||
BIF_BX0_BACO_CNTL__BACO_DUMMY_EN_MASK |
|
||||
BIF_BX0_BACO_CNTL__BACO_EN_MASK);
|
||||
dev_dbg(adev->dev,
|
||||
"Unsetting baco dummy mode %x",
|
||||
baco_cntl);
|
||||
WREG32_SOC15(NBIO, i, regBIF_BX0_BACO_CNTL,
|
||||
baco_cntl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static u64 nbio_v7_9_get_pcie_replay_count(struct amdgpu_device *adev)
|
||||
|
||||
@@ -133,12 +133,32 @@ static bool psp_v13_0_is_sos_alive(struct psp_context *psp)
|
||||
return sol_reg != 0x0;
|
||||
}
|
||||
|
||||
static int psp_v13_0_wait_for_vmbx_ready(struct psp_context *psp)
|
||||
{
|
||||
struct amdgpu_device *adev = psp->adev;
|
||||
int retry_loop, ret;
|
||||
|
||||
for (retry_loop = 0; retry_loop < 70; retry_loop++) {
|
||||
/* Wait for bootloader to signify that is
|
||||
ready having bit 31 of C2PMSG_33 set to 1 */
|
||||
ret = psp_wait_for(
|
||||
psp, SOC15_REG_OFFSET(MP0, 0, regMP0_SMN_C2PMSG_33),
|
||||
0x80000000, 0xffffffff, false);
|
||||
|
||||
if (ret == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
dev_warn(adev->dev, "Bootloader wait timed out");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int psp_v13_0_wait_for_bootloader(struct psp_context *psp)
|
||||
{
|
||||
struct amdgpu_device *adev = psp->adev;
|
||||
|
||||
int ret;
|
||||
int retry_loop;
|
||||
int retry_loop, ret;
|
||||
|
||||
/* Wait for bootloader to signify that it is ready having bit 31 of
|
||||
* C2PMSG_35 set to 1. All other bits are expected to be cleared.
|
||||
@@ -157,6 +177,19 @@ static int psp_v13_0_wait_for_bootloader(struct psp_context *psp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int psp_v13_0_wait_for_bootloader_steady_state(struct psp_context *psp)
|
||||
{
|
||||
struct amdgpu_device *adev = psp->adev;
|
||||
|
||||
if (adev->ip_versions[MP0_HWIP][0] == IP_VERSION(13, 0, 6)) {
|
||||
psp_v13_0_wait_for_vmbx_ready(psp);
|
||||
|
||||
return psp_v13_0_wait_for_bootloader(psp);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int psp_v13_0_bootloader_load_component(struct psp_context *psp,
|
||||
struct psp_bin_desc *bin_desc,
|
||||
enum psp_bootloader_cmd bl_cmd)
|
||||
@@ -714,6 +747,7 @@ static int psp_v13_0_fatal_error_recovery_quirk(struct psp_context *psp)
|
||||
|
||||
static const struct psp_funcs psp_v13_0_funcs = {
|
||||
.init_microcode = psp_v13_0_init_microcode,
|
||||
.wait_for_bootloader = psp_v13_0_wait_for_bootloader_steady_state,
|
||||
.bootloader_load_kdb = psp_v13_0_bootloader_load_kdb,
|
||||
.bootloader_load_spl = psp_v13_0_bootloader_load_spl,
|
||||
.bootloader_load_sysdrv = psp_v13_0_bootloader_load_sysdrv,
|
||||
|
||||
@@ -559,8 +559,10 @@ soc15_asic_reset_method(struct amdgpu_device *adev)
|
||||
*/
|
||||
if (amdgpu_gpu_recovery == 4 || amdgpu_gpu_recovery == 5)
|
||||
return AMD_RESET_METHOD_MODE2;
|
||||
else if (!(adev->flags & AMD_IS_APU))
|
||||
return AMD_RESET_METHOD_MODE1;
|
||||
else
|
||||
return AMD_RESET_METHOD_NONE;
|
||||
return AMD_RESET_METHOD_MODE2;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ static void event_interrupt_wq_v9(struct kfd_node *dev,
|
||||
default:
|
||||
break;
|
||||
}
|
||||
kfd_signal_event_interrupt(pasid, context_id0 & 0xffffff, 24);
|
||||
kfd_signal_event_interrupt(pasid, sq_int_data, 24);
|
||||
} else if (source_id == SOC15_INTSRC_CP_BAD_OPCODE) {
|
||||
kfd_set_dbg_ev_from_interrupt(dev, pasid,
|
||||
KFD_DEBUG_DOORBELL_ID(context_id0),
|
||||
|
||||
@@ -457,6 +457,7 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type,
|
||||
mqd->is_occupied = kfd_is_occupied_cp;
|
||||
mqd->mqd_size = sizeof(struct v11_compute_mqd);
|
||||
mqd->get_wave_state = get_wave_state;
|
||||
mqd->mqd_stride = kfd_mqd_stride;
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
mqd->debugfs_show_mqd = debugfs_show_mqd;
|
||||
#endif
|
||||
@@ -472,6 +473,7 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type,
|
||||
mqd->destroy_mqd = destroy_hiq_mqd;
|
||||
mqd->is_occupied = kfd_is_occupied_cp;
|
||||
mqd->mqd_size = sizeof(struct v11_compute_mqd);
|
||||
mqd->mqd_stride = kfd_mqd_stride;
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
mqd->debugfs_show_mqd = debugfs_show_mqd;
|
||||
#endif
|
||||
@@ -501,6 +503,7 @@ struct mqd_manager *mqd_manager_init_v11(enum KFD_MQD_TYPE type,
|
||||
mqd->destroy_mqd = kfd_destroy_mqd_sdma;
|
||||
mqd->is_occupied = kfd_is_occupied_sdma;
|
||||
mqd->mqd_size = sizeof(struct v11_sdma_mqd);
|
||||
mqd->mqd_stride = kfd_mqd_stride;
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
mqd->debugfs_show_mqd = debugfs_show_mqd_sdma;
|
||||
#endif
|
||||
|
||||
@@ -1686,6 +1686,8 @@ static int svm_range_validate_and_map(struct mm_struct *mm,
|
||||
WRITE_ONCE(p->svms.faulting_task, NULL);
|
||||
if (r) {
|
||||
pr_debug("failed %d to get svm range pages\n", r);
|
||||
if (r == -EBUSY)
|
||||
r = -EAGAIN;
|
||||
goto unreserve_out;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user