mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
drm fixes for 6.0-rc3
gem: - Fixes handle release leak nouveau: - fix fencing when moving BO vc4: - HDMI fixes amdgpu: - GFX 11.0 fixes - PSP XGMI handling fixes - GFX9 fix for compute-only IPs - Drop duplicated function call - Fix warning due to missing header - NBIO 7.7 fixes - DCN 3.1.4 fixes - SDMA 6.0 fixes - SMU 13.0 fixes - Arcturus GPUVM page table fix - MMHUB 1.0 fix amdkfd: - GC 10.3.7 fix radeon: - Delayed work flush fix -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmMIS4AACgkQDHTzWXnE hr5b9w//Xt2ON0naNE3RDS3a9oJLBboAUv2yr6uoolrJi1fE4H8tcHMvSnluUi+p n+S2lgCDs4bdH4ddxrG1UOgOesW3BxxFem+mJnHUok9VF/lcRUNP8hy9i52tWEZb IMAiemEY+hR4BPe9HQMRuT2v0W7nm+wgWCCFQ9D3SVZuaGZwFid65WVKqfZg17B9 m0l962kkbA2+A87yA5mXE8oOtG0xJIRLC2eWEv+phEWqto1VfjzRIP4N4clTKps0 q4vU8W25+PzoGNJ/PMH/2WPatzQFEbbkrzn9HPXsHU+VELktodWRwZ09uHyU+qQ+ B5TTl/KT3h4IYrIRZxtAq00SEbNKDz64KGade4o6JMTHgtQDtTbVxsHYgI4csjQb m2U4FVtCQL/GhLNpDVymMdZR1iz7cDPDoCMFm+At/lLG4S3sbLvH/sSSGhAzxmvz E7f3M0iihmYlx2N8QxuBVWsv+5WaudpzWHKzJvbzyPXUzVDI8I89lDwbNoo41DtN PTJwYjRc0ebLXvGyYkpKrV4AovfD7p5Bcypuhj8SUbKGr+3vm9ch4GFjPiAYQfUz MN9rRcRD9d0768G1RDsjz+SReandzBaHUj1Z5NwiM5I03ZIXVq3CWXdAojRF2pK2 k2/JHTCZ4cGyDmHk9Q13J3gpVB1Syj2n42rlk3p+oql/+SNKHq0= =XLUf -----END PGP SIGNATURE----- Merge tag 'drm-fixes-2022-08-26-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Weekly fixes, lots of amdgpu fixes mostly for IP blocks introduced in 6.0-rc1, otherwise vc4, nouveau fixes. gem: - Fix handle release leak nouveau: - Fix fencing when moving BO vc4: - HDMI fixes amdgpu: - GFX 11.0 fixes - PSP XGMI handling fixes - GFX9 fix for compute-only IPs - Drop duplicated function call - Fix warning due to missing header - NBIO 7.7 fixes - DCN 3.1.4 fixes - SDMA 6.0 fixes - SMU 13.0 fixes - Arcturus GPUVM page table fix - MMHUB 1.0 fix amdkfd: - GC 10.3.7 fix radeon: - Delayed work flush fix" * tag 'drm-fixes-2022-08-26-1' of git://anongit.freedesktop.org/drm/drm: (21 commits) drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly drm/amdgpu: add MGCG perfmon setting for gfx11 drm/amdkfd: Fix isa version for the GC 10.3.7 drm/amdgpu: Fix page table setup on Arcturus drm/amd/pm: update SMU 13.0.0 driver_if header drm/amdgpu: add sdma instance check for gfx11 CGCG drm/amd/display: enable PCON support for dcn314 drm/amdgpu: enable NBIO IP v7.7.0 Clock Gating drm/amdgpu: add NBIO IP v7.7.0 Clock Gating support drm/amdgpu: add TX_POWER_CTRL_1 macro definitions for NBIO IP v7.7.0 nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf drm/radeon: add a force flush to delay work when radeon drm/amd/display: Include missing header drm/amdgpu: Remove the additional kfd pre reset call for sriov drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup. drm/amdgpu: fix hive reference leak when adding xgmi device drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini drm/amdgpu: enable GFXOFF allow control for GC IP v11.0.1 drm/gem: Fix GEM handle release errors drm/vc4: hdmi: Rework power up ...
This commit is contained in:
commit
78effb4a9b
24 changed files with 208 additions and 84 deletions
|
@ -2456,12 +2456,14 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
|
|||
if (!hive->reset_domain ||
|
||||
!amdgpu_reset_get_reset_domain(hive->reset_domain)) {
|
||||
r = -ENOENT;
|
||||
amdgpu_put_xgmi_hive(hive);
|
||||
goto init_failed;
|
||||
}
|
||||
|
||||
/* Drop the early temporary reset domain we created for device */
|
||||
amdgpu_reset_put_reset_domain(adev->reset_domain);
|
||||
adev->reset_domain = hive->reset_domain;
|
||||
amdgpu_put_xgmi_hive(hive);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4413,8 +4415,6 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
|
|||
retry:
|
||||
amdgpu_amdkfd_pre_reset(adev);
|
||||
|
||||
amdgpu_amdkfd_pre_reset(adev);
|
||||
|
||||
if (from_hypervisor)
|
||||
r = amdgpu_virt_request_full_gpu(adev, true);
|
||||
else
|
||||
|
|
|
@ -2641,6 +2641,9 @@ static int psp_hw_fini(void *handle)
|
|||
psp_rap_terminate(psp);
|
||||
psp_dtm_terminate(psp);
|
||||
psp_hdcp_terminate(psp);
|
||||
|
||||
if (adev->gmc.xgmi.num_physical_nodes > 1)
|
||||
psp_xgmi_terminate(psp);
|
||||
}
|
||||
|
||||
psp_asd_terminate(psp);
|
||||
|
|
|
@ -742,7 +742,7 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev)
|
|||
amdgpu_put_xgmi_hive(hive);
|
||||
}
|
||||
|
||||
return psp_xgmi_terminate(&adev->psp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int amdgpu_xgmi_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block)
|
||||
|
|
|
@ -131,6 +131,8 @@ static void gfx_v11_0_ring_invalidate_tlbs(struct amdgpu_ring *ring,
|
|||
bool all_hub, uint8_t dst_sel);
|
||||
static void gfx_v11_0_set_safe_mode(struct amdgpu_device *adev);
|
||||
static void gfx_v11_0_unset_safe_mode(struct amdgpu_device *adev);
|
||||
static void gfx_v11_0_update_perf_clk(struct amdgpu_device *adev,
|
||||
bool enable);
|
||||
|
||||
static void gfx11_kiq_set_resources(struct amdgpu_ring *kiq_ring, uint64_t queue_mask)
|
||||
{
|
||||
|
@ -1139,6 +1141,7 @@ static const struct amdgpu_gfx_funcs gfx_v11_0_gfx_funcs = {
|
|||
.read_wave_vgprs = &gfx_v11_0_read_wave_vgprs,
|
||||
.select_me_pipe_q = &gfx_v11_0_select_me_pipe_q,
|
||||
.init_spm_golden = &gfx_v11_0_init_spm_golden_registers,
|
||||
.update_perfmon_mgcg = &gfx_v11_0_update_perf_clk,
|
||||
};
|
||||
|
||||
static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)
|
||||
|
@ -5182,9 +5185,12 @@ static void gfx_v11_0_update_coarse_grain_clock_gating(struct amdgpu_device *ade
|
|||
data = REG_SET_FIELD(data, SDMA0_RLC_CGCG_CTRL, CGCG_INT_ENABLE, 1);
|
||||
WREG32_SOC15(GC, 0, regSDMA0_RLC_CGCG_CTRL, data);
|
||||
|
||||
data = RREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL);
|
||||
data = REG_SET_FIELD(data, SDMA1_RLC_CGCG_CTRL, CGCG_INT_ENABLE, 1);
|
||||
WREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL, data);
|
||||
/* Some ASICs only have one SDMA instance, not need to configure SDMA1 */
|
||||
if (adev->sdma.num_instances > 1) {
|
||||
data = RREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL);
|
||||
data = REG_SET_FIELD(data, SDMA1_RLC_CGCG_CTRL, CGCG_INT_ENABLE, 1);
|
||||
WREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL, data);
|
||||
}
|
||||
} else {
|
||||
/* Program RLC_CGCG_CGLS_CTRL */
|
||||
def = data = RREG32_SOC15(GC, 0, regRLC_CGCG_CGLS_CTRL);
|
||||
|
@ -5213,9 +5219,12 @@ static void gfx_v11_0_update_coarse_grain_clock_gating(struct amdgpu_device *ade
|
|||
data &= ~SDMA0_RLC_CGCG_CTRL__CGCG_INT_ENABLE_MASK;
|
||||
WREG32_SOC15(GC, 0, regSDMA0_RLC_CGCG_CTRL, data);
|
||||
|
||||
data = RREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL);
|
||||
data &= ~SDMA1_RLC_CGCG_CTRL__CGCG_INT_ENABLE_MASK;
|
||||
WREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL, data);
|
||||
/* Some ASICs only have one SDMA instance, not need to configure SDMA1 */
|
||||
if (adev->sdma.num_instances > 1) {
|
||||
data = RREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL);
|
||||
data &= ~SDMA1_RLC_CGCG_CTRL__CGCG_INT_ENABLE_MASK;
|
||||
WREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5328,8 +5337,7 @@ static int gfx_v11_0_set_powergating_state(void *handle,
|
|||
break;
|
||||
case IP_VERSION(11, 0, 1):
|
||||
gfx_v11_cntl_pg(adev, enable);
|
||||
/* TODO: Enable this when GFXOFF is ready */
|
||||
// amdgpu_gfx_off_ctrl(adev, enable);
|
||||
amdgpu_gfx_off_ctrl(adev, enable);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -2587,7 +2587,8 @@ static void gfx_v9_0_constants_init(struct amdgpu_device *adev)
|
|||
|
||||
gfx_v9_0_tiling_mode_table_init(adev);
|
||||
|
||||
gfx_v9_0_setup_rb(adev);
|
||||
if (adev->gfx.num_gfx_rings)
|
||||
gfx_v9_0_setup_rb(adev);
|
||||
gfx_v9_0_get_cu_info(adev, &adev->gfx.cu_info);
|
||||
adev->gfx.config.db_debug2 = RREG32_SOC15(GC, 0, mmDB_DEBUG2);
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ static void mmhub_v1_0_init_cache_regs(struct amdgpu_device *adev)
|
|||
tmp = REG_SET_FIELD(tmp, VM_L2_CNTL2, INVALIDATE_L2_CACHE, 1);
|
||||
WREG32_SOC15(MMHUB, 0, mmVM_L2_CNTL2, tmp);
|
||||
|
||||
tmp = mmVM_L2_CNTL3_DEFAULT;
|
||||
if (adev->gmc.translate_further) {
|
||||
tmp = REG_SET_FIELD(tmp, VM_L2_CNTL3, BANK_SELECT, 12);
|
||||
tmp = REG_SET_FIELD(tmp, VM_L2_CNTL3,
|
||||
|
|
|
@ -295,9 +295,17 @@ static void mmhub_v9_4_disable_identity_aperture(struct amdgpu_device *adev,
|
|||
static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid)
|
||||
{
|
||||
struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_MMHUB_0];
|
||||
unsigned int num_level, block_size;
|
||||
uint32_t tmp;
|
||||
int i;
|
||||
|
||||
num_level = adev->vm_manager.num_level;
|
||||
block_size = adev->vm_manager.block_size;
|
||||
if (adev->gmc.translate_further)
|
||||
num_level -= 1;
|
||||
else
|
||||
block_size -= 9;
|
||||
|
||||
for (i = 0; i <= 14; i++) {
|
||||
tmp = RREG32_SOC15_OFFSET(MMHUB, 0, mmVML2VC0_VM_CONTEXT1_CNTL,
|
||||
hubid * MMHUB_INSTANCE_REGISTER_OFFSET + i);
|
||||
|
@ -305,7 +313,7 @@ static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid)
|
|||
ENABLE_CONTEXT, 1);
|
||||
tmp = REG_SET_FIELD(tmp, VML2VC0_VM_CONTEXT1_CNTL,
|
||||
PAGE_TABLE_DEPTH,
|
||||
adev->vm_manager.num_level);
|
||||
num_level);
|
||||
tmp = REG_SET_FIELD(tmp, VML2VC0_VM_CONTEXT1_CNTL,
|
||||
RANGE_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
|
||||
tmp = REG_SET_FIELD(tmp, VML2VC0_VM_CONTEXT1_CNTL,
|
||||
|
@ -323,7 +331,7 @@ static void mmhub_v9_4_setup_vmid_config(struct amdgpu_device *adev, int hubid)
|
|||
EXECUTE_PROTECTION_FAULT_ENABLE_DEFAULT, 1);
|
||||
tmp = REG_SET_FIELD(tmp, VML2VC0_VM_CONTEXT1_CNTL,
|
||||
PAGE_TABLE_BLOCK_SIZE,
|
||||
adev->vm_manager.block_size - 9);
|
||||
block_size);
|
||||
/* Send no-retry XNACK on fault to suppress VM fault storm. */
|
||||
tmp = REG_SET_FIELD(tmp, VML2VC0_VM_CONTEXT1_CNTL,
|
||||
RETRY_PERMISSION_OR_INVALID_PAGE_FAULT,
|
||||
|
|
|
@ -247,6 +247,81 @@ static void nbio_v7_7_init_registers(struct amdgpu_device *adev)
|
|||
|
||||
}
|
||||
|
||||
static void nbio_v7_7_update_medium_grain_clock_gating(struct amdgpu_device *adev,
|
||||
bool enable)
|
||||
{
|
||||
uint32_t def, data;
|
||||
|
||||
if (enable && !(adev->cg_flags & AMD_CG_SUPPORT_BIF_MGCG))
|
||||
return;
|
||||
|
||||
def = data = RREG32_SOC15(NBIO, 0, regBIF0_CPM_CONTROL);
|
||||
if (enable) {
|
||||
data |= (BIF0_CPM_CONTROL__LCLK_DYN_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_DYN_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_LCNT_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_REGS_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_PRBS_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__REFCLK_REGS_GATE_ENABLE_MASK);
|
||||
} else {
|
||||
data &= ~(BIF0_CPM_CONTROL__LCLK_DYN_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_DYN_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_LCNT_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_REGS_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__TXCLK_PRBS_GATE_ENABLE_MASK |
|
||||
BIF0_CPM_CONTROL__REFCLK_REGS_GATE_ENABLE_MASK);
|
||||
}
|
||||
|
||||
if (def != data)
|
||||
WREG32_SOC15(NBIO, 0, regBIF0_CPM_CONTROL, data);
|
||||
}
|
||||
|
||||
static void nbio_v7_7_update_medium_grain_light_sleep(struct amdgpu_device *adev,
|
||||
bool enable)
|
||||
{
|
||||
uint32_t def, data;
|
||||
|
||||
if (enable && !(adev->cg_flags & AMD_CG_SUPPORT_BIF_LS))
|
||||
return;
|
||||
|
||||
def = data = RREG32_SOC15(NBIO, 0, regBIF0_PCIE_CNTL2);
|
||||
if (enable)
|
||||
data |= BIF0_PCIE_CNTL2__SLV_MEM_LS_EN_MASK;
|
||||
else
|
||||
data &= ~BIF0_PCIE_CNTL2__SLV_MEM_LS_EN_MASK;
|
||||
|
||||
if (def != data)
|
||||
WREG32_SOC15(NBIO, 0, regBIF0_PCIE_CNTL2, data);
|
||||
|
||||
def = data = RREG32_SOC15(NBIO, 0, regBIF0_PCIE_TX_POWER_CTRL_1);
|
||||
if (enable) {
|
||||
data |= (BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_LS_EN_MASK |
|
||||
BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_LS_EN_MASK);
|
||||
} else {
|
||||
data &= ~(BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_LS_EN_MASK |
|
||||
BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_LS_EN_MASK);
|
||||
}
|
||||
|
||||
if (def != data)
|
||||
WREG32_SOC15(NBIO, 0, regBIF0_PCIE_TX_POWER_CTRL_1, data);
|
||||
}
|
||||
|
||||
static void nbio_v7_7_get_clockgating_state(struct amdgpu_device *adev,
|
||||
u64 *flags)
|
||||
{
|
||||
uint32_t data;
|
||||
|
||||
/* AMD_CG_SUPPORT_BIF_MGCG */
|
||||
data = RREG32_SOC15(NBIO, 0, regBIF0_CPM_CONTROL);
|
||||
if (data & BIF0_CPM_CONTROL__LCLK_DYN_GATE_ENABLE_MASK)
|
||||
*flags |= AMD_CG_SUPPORT_BIF_MGCG;
|
||||
|
||||
/* AMD_CG_SUPPORT_BIF_LS */
|
||||
data = RREG32_SOC15(NBIO, 0, regBIF0_PCIE_CNTL2);
|
||||
if (data & BIF0_PCIE_CNTL2__SLV_MEM_LS_EN_MASK)
|
||||
*flags |= AMD_CG_SUPPORT_BIF_LS;
|
||||
}
|
||||
|
||||
const struct amdgpu_nbio_funcs nbio_v7_7_funcs = {
|
||||
.get_hdp_flush_req_offset = nbio_v7_7_get_hdp_flush_req_offset,
|
||||
.get_hdp_flush_done_offset = nbio_v7_7_get_hdp_flush_done_offset,
|
||||
|
@ -262,6 +337,9 @@ const struct amdgpu_nbio_funcs nbio_v7_7_funcs = {
|
|||
.enable_doorbell_aperture = nbio_v7_7_enable_doorbell_aperture,
|
||||
.enable_doorbell_selfring_aperture = nbio_v7_7_enable_doorbell_selfring_aperture,
|
||||
.ih_doorbell_range = nbio_v7_7_ih_doorbell_range,
|
||||
.update_medium_grain_clock_gating = nbio_v7_7_update_medium_grain_clock_gating,
|
||||
.update_medium_grain_light_sleep = nbio_v7_7_update_medium_grain_light_sleep,
|
||||
.get_clockgating_state = nbio_v7_7_get_clockgating_state,
|
||||
.ih_control = nbio_v7_7_ih_control,
|
||||
.init_registers = nbio_v7_7_init_registers,
|
||||
};
|
||||
|
|
|
@ -494,6 +494,20 @@ static void soc21_pre_asic_init(struct amdgpu_device *adev)
|
|||
{
|
||||
}
|
||||
|
||||
static int soc21_update_umd_stable_pstate(struct amdgpu_device *adev,
|
||||
bool enter)
|
||||
{
|
||||
if (enter)
|
||||
amdgpu_gfx_rlc_enter_safe_mode(adev);
|
||||
else
|
||||
amdgpu_gfx_rlc_exit_safe_mode(adev);
|
||||
|
||||
if (adev->gfx.funcs->update_perfmon_mgcg)
|
||||
adev->gfx.funcs->update_perfmon_mgcg(adev, !enter);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct amdgpu_asic_funcs soc21_asic_funcs =
|
||||
{
|
||||
.read_disabled_bios = &soc21_read_disabled_bios,
|
||||
|
@ -513,6 +527,7 @@ static const struct amdgpu_asic_funcs soc21_asic_funcs =
|
|||
.supports_baco = &amdgpu_dpm_is_baco_supported,
|
||||
.pre_asic_init = &soc21_pre_asic_init,
|
||||
.query_video_codecs = &soc21_query_video_codecs,
|
||||
.update_umd_stable_pstate = &soc21_update_umd_stable_pstate,
|
||||
};
|
||||
|
||||
static int soc21_common_early_init(void *handle)
|
||||
|
@ -603,6 +618,8 @@ static int soc21_common_early_init(void *handle)
|
|||
AMD_CG_SUPPORT_ATHUB_MGCG |
|
||||
AMD_CG_SUPPORT_ATHUB_LS |
|
||||
AMD_CG_SUPPORT_IH_CG |
|
||||
AMD_CG_SUPPORT_BIF_MGCG |
|
||||
AMD_CG_SUPPORT_BIF_LS |
|
||||
AMD_CG_SUPPORT_VCN_MGCG |
|
||||
AMD_CG_SUPPORT_JPEG_MGCG;
|
||||
adev->pg_flags =
|
||||
|
@ -702,6 +719,7 @@ static int soc21_common_set_clockgating_state(void *handle,
|
|||
switch (adev->ip_versions[NBIO_HWIP][0]) {
|
||||
case IP_VERSION(4, 3, 0):
|
||||
case IP_VERSION(4, 3, 1):
|
||||
case IP_VERSION(7, 7, 0):
|
||||
adev->nbio.funcs->update_medium_grain_clock_gating(adev,
|
||||
state == AMD_CG_STATE_GATE);
|
||||
adev->nbio.funcs->update_medium_grain_light_sleep(adev,
|
||||
|
@ -709,10 +727,6 @@ static int soc21_common_set_clockgating_state(void *handle,
|
|||
adev->hdp.funcs->update_clock_gating(adev,
|
||||
state == AMD_CG_STATE_GATE);
|
||||
break;
|
||||
case IP_VERSION(7, 7, 0):
|
||||
adev->hdp.funcs->update_clock_gating(adev,
|
||||
state == AMD_CG_STATE_GATE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -382,12 +382,8 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf)
|
|||
f2g = &gfx_v10_3_kfd2kgd;
|
||||
break;
|
||||
case IP_VERSION(10, 3, 6):
|
||||
gfx_target_version = 100306;
|
||||
if (!vf)
|
||||
f2g = &gfx_v10_3_kfd2kgd;
|
||||
break;
|
||||
case IP_VERSION(10, 3, 7):
|
||||
gfx_target_version = 100307;
|
||||
gfx_target_version = 100306;
|
||||
if (!vf)
|
||||
f2g = &gfx_v10_3_kfd2kgd;
|
||||
break;
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "dal_asic_id.h"
|
||||
#include "amdgpu_display.h"
|
||||
#include "amdgpu_dm_trace.h"
|
||||
#include "amdgpu_dm_plane.h"
|
||||
#include "gc/gc_11_0_0_offset.h"
|
||||
#include "gc/gc_11_0_0_sh_mask.h"
|
||||
|
||||
|
@ -149,12 +150,12 @@ static void add_modifier(uint64_t **mods, uint64_t *size, uint64_t *cap, uint64_
|
|||
*size += 1;
|
||||
}
|
||||
|
||||
bool modifier_has_dcc(uint64_t modifier)
|
||||
static bool modifier_has_dcc(uint64_t modifier)
|
||||
{
|
||||
return IS_AMD_FMT_MOD(modifier) && AMD_FMT_MOD_GET(DCC, modifier);
|
||||
}
|
||||
|
||||
unsigned modifier_gfx9_swizzle_mode(uint64_t modifier)
|
||||
static unsigned modifier_gfx9_swizzle_mode(uint64_t modifier)
|
||||
{
|
||||
if (modifier == DRM_FORMAT_MOD_LINEAR)
|
||||
return 0;
|
||||
|
|
|
@ -36,17 +36,9 @@ int fill_dc_scaling_info(struct amdgpu_device *adev,
|
|||
const struct drm_plane_state *state,
|
||||
struct dc_scaling_info *scaling_info);
|
||||
|
||||
void get_min_max_dc_plane_scaling(struct drm_device *dev,
|
||||
struct drm_framebuffer *fb,
|
||||
int *min_downscale, int *max_upscale);
|
||||
|
||||
int dm_plane_helper_check_state(struct drm_plane_state *state,
|
||||
struct drm_crtc_state *new_crtc_state);
|
||||
|
||||
bool modifier_has_dcc(uint64_t modifier);
|
||||
|
||||
unsigned int modifier_gfx9_swizzle_mode(uint64_t modifier);
|
||||
|
||||
int fill_plane_buffer_attributes(struct amdgpu_device *adev,
|
||||
const struct amdgpu_framebuffer *afb,
|
||||
const enum surface_pixel_format format,
|
||||
|
|
|
@ -1750,6 +1750,7 @@ static bool dcn314_resource_construct(
|
|||
dc->caps.post_blend_color_processing = true;
|
||||
dc->caps.force_dp_tps4_for_cp2520 = true;
|
||||
dc->caps.dp_hpo = true;
|
||||
dc->caps.dp_hdmi21_pcon_support = true;
|
||||
dc->caps.edp_dsc_support = true;
|
||||
dc->caps.extended_aux_timeout_support = true;
|
||||
dc->caps.dmcub_support = true;
|
||||
|
|
|
@ -15243,6 +15243,8 @@
|
|||
#define regBIF0_PCIE_TX_TRACKING_ADDR_HI_BASE_IDX 5
|
||||
#define regBIF0_PCIE_TX_TRACKING_CTRL_STATUS 0x420186
|
||||
#define regBIF0_PCIE_TX_TRACKING_CTRL_STATUS_BASE_IDX 5
|
||||
#define regBIF0_PCIE_TX_POWER_CTRL_1 0x420187
|
||||
#define regBIF0_PCIE_TX_POWER_CTRL_1_BASE_IDX 5
|
||||
#define regBIF0_PCIE_TX_CTRL_4 0x42018b
|
||||
#define regBIF0_PCIE_TX_CTRL_4_BASE_IDX 5
|
||||
#define regBIF0_PCIE_TX_STATUS 0x420194
|
||||
|
|
|
@ -85627,6 +85627,19 @@
|
|||
#define BIF0_PCIE_TX_TRACKING_CTRL_STATUS__TX_TRACKING_PORT_MASK 0x0000000EL
|
||||
#define BIF0_PCIE_TX_TRACKING_CTRL_STATUS__TX_TRACKING_UNIT_ID_MASK 0x00007F00L
|
||||
#define BIF0_PCIE_TX_TRACKING_CTRL_STATUS__TX_TRACKING_STATUS_VALID_MASK 0x00008000L
|
||||
//BIF0_PCIE_TX_POWER_CTRL_1
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_LS_EN__SHIFT 0x0
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_DS_EN__SHIFT 0x1
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_SD_EN__SHIFT 0x2
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_LS_EN__SHIFT 0x3
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_DS_EN__SHIFT 0x4
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_SD_EN__SHIFT 0x5
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_LS_EN_MASK 0x00000001L
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_DS_EN_MASK 0x00000002L
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__MST_MEM_SD_EN_MASK 0x00000004L
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_LS_EN_MASK 0x00000008L
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_DS_EN_MASK 0x00000010L
|
||||
#define BIF0_PCIE_TX_POWER_CTRL_1__REPLAY_MEM_SD_EN_MASK 0x00000020L
|
||||
//BIF0_PCIE_TX_CTRL_4
|
||||
#define BIF0_PCIE_TX_CTRL_4__TX_PORT_ACCESS_TIMER_SKEW__SHIFT 0x0
|
||||
#define BIF0_PCIE_TX_CTRL_4__TX_PORT_ACCESS_TIMER_SKEW_MASK 0x0000000FL
|
||||
|
|
|
@ -24,12 +24,8 @@
|
|||
#ifndef SMU13_DRIVER_IF_V13_0_0_H
|
||||
#define SMU13_DRIVER_IF_V13_0_0_H
|
||||
|
||||
// *** IMPORTANT ***
|
||||
// PMFW TEAM: Always increment the interface version on any change to this file
|
||||
#define SMU13_DRIVER_IF_VERSION 0x23
|
||||
|
||||
//Increment this version if SkuTable_t or BoardTable_t change
|
||||
#define PPTABLE_VERSION 0x1D
|
||||
#define PPTABLE_VERSION 0x22
|
||||
|
||||
#define NUM_GFXCLK_DPM_LEVELS 16
|
||||
#define NUM_SOCCLK_DPM_LEVELS 8
|
||||
|
@ -1193,8 +1189,17 @@ typedef struct {
|
|||
// SECTION: Advanced Options
|
||||
uint32_t DebugOverrides;
|
||||
|
||||
// Section: Total Board Power idle vs active coefficients
|
||||
uint8_t TotalBoardPowerSupport;
|
||||
uint8_t TotalBoardPowerPadding[3];
|
||||
|
||||
int16_t TotalIdleBoardPowerM;
|
||||
int16_t TotalIdleBoardPowerB;
|
||||
int16_t TotalBoardPowerM;
|
||||
int16_t TotalBoardPowerB;
|
||||
|
||||
// SECTION: Sku Reserved
|
||||
uint32_t Spare[64];
|
||||
uint32_t Spare[61];
|
||||
|
||||
// Padding for MMHUB - do not modify this
|
||||
uint32_t MmHubPadding[8];
|
||||
|
@ -1259,7 +1264,8 @@ typedef struct {
|
|||
// SECTION: Clock Spread Spectrum
|
||||
|
||||
// UCLK Spread Spectrum
|
||||
uint16_t UclkSpreadPadding;
|
||||
uint8_t UclkTrainingModeSpreadPercent;
|
||||
uint8_t UclkSpreadPadding;
|
||||
uint16_t UclkSpreadFreq; // kHz
|
||||
|
||||
// UCLK Spread Spectrum
|
||||
|
@ -1272,11 +1278,7 @@ typedef struct {
|
|||
|
||||
// Section: Memory Config
|
||||
uint8_t DramWidth; // Width of interface to the channel for each DRAM module. See DRAM_BIT_WIDTH_TYPE_e
|
||||
uint8_t PaddingMem1[3];
|
||||
|
||||
// Section: Total Board Power
|
||||
uint16_t TotalBoardPower; //Only needed for TCP Estimated case, where TCP = TGP+Total Board Power
|
||||
uint16_t BoardPowerPadding;
|
||||
uint8_t PaddingMem1[7];
|
||||
|
||||
// SECTION: UMC feature flags
|
||||
uint8_t HsrEnabled;
|
||||
|
@ -1375,8 +1377,11 @@ typedef struct {
|
|||
uint16_t Vcn1ActivityPercentage ;
|
||||
|
||||
uint32_t EnergyAccumulator;
|
||||
uint16_t AverageSocketPower ;
|
||||
uint16_t AverageSocketPower;
|
||||
uint16_t AverageTotalBoardPower;
|
||||
|
||||
uint16_t AvgTemperature[TEMP_COUNT];
|
||||
uint16_t TempPadding;
|
||||
|
||||
uint8_t PcieRate ;
|
||||
uint8_t PcieWidth ;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define SMU13_DRIVER_IF_VERSION_ALDE 0x08
|
||||
#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_4 0x05
|
||||
#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_5 0x04
|
||||
#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0 0x2C
|
||||
#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_0 0x2E
|
||||
#define SMU13_DRIVER_IF_VERSION_SMU_V13_0_7 0x2C
|
||||
|
||||
#define SMU13_MODE1_RESET_WAIT_TIME_IN_MS 500 //500ms
|
||||
|
|
|
@ -168,21 +168,6 @@ void drm_gem_private_object_init(struct drm_device *dev,
|
|||
}
|
||||
EXPORT_SYMBOL(drm_gem_private_object_init);
|
||||
|
||||
static void
|
||||
drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp)
|
||||
{
|
||||
/*
|
||||
* Note: obj->dma_buf can't disappear as long as we still hold a
|
||||
* handle reference in obj->handle_count.
|
||||
*/
|
||||
mutex_lock(&filp->prime.lock);
|
||||
if (obj->dma_buf) {
|
||||
drm_prime_remove_buf_handle_locked(&filp->prime,
|
||||
obj->dma_buf);
|
||||
}
|
||||
mutex_unlock(&filp->prime.lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* drm_gem_object_handle_free - release resources bound to userspace handles
|
||||
* @obj: GEM object to clean up.
|
||||
|
@ -253,7 +238,7 @@ drm_gem_object_release_handle(int id, void *ptr, void *data)
|
|||
if (obj->funcs->close)
|
||||
obj->funcs->close(obj, file_priv);
|
||||
|
||||
drm_gem_remove_prime_handles(obj, file_priv);
|
||||
drm_prime_remove_buf_handle(&file_priv->prime, id);
|
||||
drm_vma_node_revoke(&obj->vma_node, file_priv);
|
||||
|
||||
drm_gem_object_handle_put_unlocked(obj);
|
||||
|
|
|
@ -74,8 +74,8 @@ int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
|
|||
|
||||
void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv);
|
||||
void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv);
|
||||
void drm_prime_remove_buf_handle_locked(struct drm_prime_file_private *prime_fpriv,
|
||||
struct dma_buf *dma_buf);
|
||||
void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv,
|
||||
uint32_t handle);
|
||||
|
||||
/* drm_drv.c */
|
||||
struct drm_minor *drm_minor_acquire(unsigned int minor_id);
|
||||
|
|
|
@ -190,29 +190,33 @@ static int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpri
|
|||
return -ENOENT;
|
||||
}
|
||||
|
||||
void drm_prime_remove_buf_handle_locked(struct drm_prime_file_private *prime_fpriv,
|
||||
struct dma_buf *dma_buf)
|
||||
void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv,
|
||||
uint32_t handle)
|
||||
{
|
||||
struct rb_node *rb;
|
||||
|
||||
rb = prime_fpriv->dmabufs.rb_node;
|
||||
mutex_lock(&prime_fpriv->lock);
|
||||
|
||||
rb = prime_fpriv->handles.rb_node;
|
||||
while (rb) {
|
||||
struct drm_prime_member *member;
|
||||
|
||||
member = rb_entry(rb, struct drm_prime_member, dmabuf_rb);
|
||||
if (member->dma_buf == dma_buf) {
|
||||
member = rb_entry(rb, struct drm_prime_member, handle_rb);
|
||||
if (member->handle == handle) {
|
||||
rb_erase(&member->handle_rb, &prime_fpriv->handles);
|
||||
rb_erase(&member->dmabuf_rb, &prime_fpriv->dmabufs);
|
||||
|
||||
dma_buf_put(dma_buf);
|
||||
dma_buf_put(member->dma_buf);
|
||||
kfree(member);
|
||||
return;
|
||||
} else if (member->dma_buf < dma_buf) {
|
||||
break;
|
||||
} else if (member->handle < handle) {
|
||||
rb = rb->rb_right;
|
||||
} else {
|
||||
rb = rb->rb_left;
|
||||
}
|
||||
}
|
||||
|
||||
mutex_unlock(&prime_fpriv->lock);
|
||||
}
|
||||
|
||||
void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv)
|
||||
|
|
|
@ -820,6 +820,15 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict,
|
|||
if (ret == 0) {
|
||||
ret = nouveau_fence_new(chan, false, &fence);
|
||||
if (ret == 0) {
|
||||
/* TODO: figure out a better solution here
|
||||
*
|
||||
* wait on the fence here explicitly as going through
|
||||
* ttm_bo_move_accel_cleanup somehow doesn't seem to do it.
|
||||
*
|
||||
* Without this the operation can timeout and we'll fallback to a
|
||||
* software copy, which might take several minutes to finish.
|
||||
*/
|
||||
nouveau_fence_wait(fence, false, false);
|
||||
ret = ttm_bo_move_accel_cleanup(bo,
|
||||
&fence->base,
|
||||
evict, false,
|
||||
|
|
|
@ -1605,6 +1605,9 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
|
|||
if (r) {
|
||||
/* delay GPU reset to resume */
|
||||
radeon_fence_driver_force_completion(rdev, i);
|
||||
} else {
|
||||
/* finish executing delayed work */
|
||||
flush_delayed_work(&rdev->fence_drv[i].lockup_work);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ config DRM_VC4
|
|||
depends on DRM
|
||||
depends on SND && SND_SOC
|
||||
depends on COMMON_CLK
|
||||
depends on PM
|
||||
select DRM_DISPLAY_HDMI_HELPER
|
||||
select DRM_DISPLAY_HELPER
|
||||
select DRM_KMS_HELPER
|
||||
|
|
|
@ -2855,7 +2855,7 @@ static int vc5_hdmi_init_resources(struct vc4_hdmi *vc4_hdmi)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused vc4_hdmi_runtime_suspend(struct device *dev)
|
||||
static int vc4_hdmi_runtime_suspend(struct device *dev)
|
||||
{
|
||||
struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
|
||||
|
||||
|
@ -2972,18 +2972,16 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
|
|||
vc4_hdmi->disable_4kp60 = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to have the device powered up at this point to call
|
||||
* our reset hook and for the CEC init.
|
||||
*/
|
||||
ret = vc4_hdmi_runtime_resume(dev);
|
||||
if (ret)
|
||||
goto err_put_ddc;
|
||||
|
||||
pm_runtime_get_noresume(dev);
|
||||
pm_runtime_set_active(dev);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
/*
|
||||
* We need to have the device powered up at this point to call
|
||||
* our reset hook and for the CEC init.
|
||||
*/
|
||||
ret = pm_runtime_resume_and_get(dev);
|
||||
if (ret)
|
||||
goto err_disable_runtime_pm;
|
||||
|
||||
if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
|
||||
of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&
|
||||
HDMI_READ(HDMI_VID_CTL) & VC4_HD_VID_CTL_ENABLE) {
|
||||
|
@ -3028,6 +3026,7 @@ err_destroy_conn:
|
|||
err_destroy_encoder:
|
||||
drm_encoder_cleanup(encoder);
|
||||
pm_runtime_put_sync(dev);
|
||||
err_disable_runtime_pm:
|
||||
pm_runtime_disable(dev);
|
||||
err_put_ddc:
|
||||
put_device(&vc4_hdmi->ddc->dev);
|
||||
|
|
Loading…
Add table
Reference in a new issue