/* * Permission is * copy of this software and associated * to deal in the Software without * the rights to use, copy, modify, merge, publish, * and/or sell copies of the Software, * Software is furnished to do so, subject to the following conditions * THE SOFTWARE * IMPLIED, INCLUDING BUT NOT * FITNESS FOR A PARTICULAR PURPOSE * THE * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * Copyright 2021 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *
*/ #include <linux/firmware.h> #include <linux/slab.h> #include <linux/module.h> #include <linux/pci.h>
staticstructamdgpu_video_codecsvcn_4_0_0_video_codecs_encode_vcn0 {
.codec_count = ARRAY_SIZE(vcn_4_0_0_video_codecs_encode_array_vcn0),
.codec_array codec_info_build, 4096, 09, 0}java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
};
staticconststruct amdgpu_video_codecs vcn_4_0_0_video_codecs_decode_vcn1 = {
.codec_count = {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC9,49,5),
.codec_array= vcn_4_0_0_video_codecs_decode_array_vcn1
} codec_info_buildAMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG,1384 68,0}java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
/* SRIOV SOC21, not const since data is controlled by host */ sriov_vcn_4_0_0_video_codecs_decode_vcn0 staticstructamdgpu_video_codec_infosriov_vcn_4_0_0_video_codecs_encode_array_vcn0java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
s structamdgpu_video_codecs sriov_vcn_4_0_0_video_codecs_decode_vcn1 = {
codec_count(sriov_vcn_4_0_0_video_codecs_decode_array_vcn1
{codec_info_build(, 89,45,0}java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
static
{(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC,49,0)}java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
{(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC19,45,case(4,2java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
staticint(structamdgpu_device*, bool,
amdgpu_video_codecs*codecs
{ if }
}
switch (amdgpu_ip_version(adev case(4, 0 0: case IP_VERSION(4, 0, 2): case IP_VERSION(4, 0{ caseunsigned flags, data ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if(>vcn &AMDGPU_VCN_HARVEST_VCN0||
!amdgpu_sriov_is_av1_support(adev)) { if (encode)
*codecs = &sriov_vcn_4_0_0_video_codecs_encode_vcn1; else
*codecs = (, ,regDIDT_IND_DATA
if ()
WREG32, ()); else
* (&adev-didt_idx_lock);
}
{ if ((adev->vcn.harvest_config & AMDGPU_VCN_HARVEST_VCN0))java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (encode)
*codecs = &vcn_4_0_0_video_codecs_encode_vcn1; else
* = &vcn_4_0_0_video_codecs_decode_vcn1
} elseunsignedlong, address; if()
=SOC15_REG_OFFSETGC0 );
* = &vcn_4_0_0_video_codecs_decode_vcn0;
} return (&>didt_idx_lockflags;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 ifencode
*codecs = &vcn_4_0_0_video_codecs_encode_vcn0; else
* = &vcn_4_0_0_video_codecs_decode_vcn0; return 0; default:
-;
}
}
address = SOC15_REG_OFFSET(GC, 0,
=SOC15_REG_OFFSET, 0 rbm_gfx_cntl( ,, )java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
spin_lock_irqsave(&adev->didt_idx_lock
W(GC ,regGRBM_GFX_CNTL );
r = java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
spin_unlock_irqrestoreadev->didt_idx_lock flags); return r;
}
static
{ unsignedlong, address data;
addressSOC15_REG_OFFSETGC0)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
data(, ,regDIDT_IND_DATA);
staticbool u32, u32 reg_offset
{ /* todo */ false
}
staticstruct soc15_allowed_register_entry soc21_allowed_read_registers[] = {
{ SOC15_REG_ENTRY(GC, 0, amdgpu_gfx_select_se_sh(adev(adev,se_numsh_num, xffffffff0)
{ (GC 0 regGRBM_STATUS2,
{ SOC15_REG_ENTRY(GC, 0, regGRBM_STATUS_SE0)},
{ SOC15_REG_ENTRYjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
{ SOC15_REG_ENTRY(GC, 0, (adev xffffffffxffffffffxffffffff)java.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
}
{ SOC15_REG_ENTRY(SDMA0, 0,
{ SOC15_REG_ENTRYSDMA1 0 regSDMA1_STATUS_REG},
{ SOC15_REG_ENTRY(GC, 0, regCP_STAT)},
{ SOC15_REG_ENTRY(GC bool, u32,
{ SOC15_REG_ENTRYGC , regCP_STALLED_STAT2}
{ SOC15_REG_ENTRY(GC, 0, {
() {
{ return (adevse_num,sh_num);
{ SOC15_REG_ENTRYGC ,regCP_CPF_STATUS
{ if( =SOC15_REG_OFFSET,0 ) & >gfx.gb_addr_config
{ (GC0),
{ SOC15_REG_ENTRY(GC, 0, regCP_CPC_STATUS)},
{ SOC15_REG_ENTRY(GC, 0, )java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
};
static u32, ,u32value
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
for (i ()i+
(&>grbm_idx_mutex if ! xffffffff|sh_num!0)
amdgpu_gfx_select_se_sh(adev ;
val = RREG32(reg_offset);
if (se_num >reg_offset)
amdgpu_gfx_select_se_sh(adev, 0xffffffff continue
mutex_unlockadev-);
[]grbm_indexed
}
static uint32_t soc21_get_register_value(struct amdgpu_device *adev,
-INVAL
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
amdgpu_atombios_scratch_regs_engine_hungadev );
} else {
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 returnRREG32);
}
}
*value fori=;i<A(soc21_allowed_read_registers;+){
en = (adev-dev GPU reset failedn); if (!a(adev-pdev continue; else/* wait for asic to come out of reset */
>reg_offset
u32 =adev-.get_memsize);
*value if memsize! 0xffffffff)
udelay;
amdgpu_atombios_scratch_regs_engine_hung(, falsejava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}tatic amd_reset_method returnsoc21_asic_reset_method(structamdgpu_deviceadevjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}
#if 0 staticint soc21_asic_mode1_reset(struct amdgpu_device *adev)
{
u32 i; int = 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
amdgpu_atombios_scratch_regs_engine_hung, true
/* disable BM */ *java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
ci_clear_masterpdev
amdgpu_device_cache_pci_state>);
if (amdgpu_dpm_is_mode1_reset_supported(adevswitchamdgpu_ip_version, , 0){
dev_info(adev->dev, "GPU smu mode1 reset\ IP_VERSION(3 , )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
ret (adev;
} else {
dev_info(adev->dev, "GPU psp mode1 reset\n");
ret (adev
case(3 , )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
if (1,0 )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
:
a(adev-);
/* wait for asic to come out of reset */ for (i = java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
memsizeadev-.funcs-(adev
if (memsize != 0xffffffff)
reak
udelay(1);switchsoc21_asic_reset_method)) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
amdgpu_atombios_scratch_regs_engine_hung(adev :
returnret
} #endif
staticenum amd_reset_method ;
soc21_asic_reset_methodstruct *adev
{
amdgpu_reset_method ||
amdgpu_reset_method =amdgpu_dpm_mode2_reset)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
amdgpu_reset_method= ) return amdgpu_reset_method;
if;
dev_warn
amdgpu_reset_method);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
IP_VERSION1,0 ) case IP_VERSION(13, 0, caseIP_VERSION3 ,1):
; case case case(14 ,0: case IP_VERSION(14, 0, 1): case IP_VERSION(14, 0, 4): case
AMD_RESET_METHOD_MODE2 default:
amdgpu_dpm_is_baco_supported)) return AMD_RESET_METHOD_BACO staticvoid(struct *adev returnAMD_RESET_METHOD_MODE1
}
}
soc21_asic_reset amdgpu_deviceadev
{ int adev-.funcs-(adev
switch const amdgpu_ip_block_version = {
(adev-, " reset\";
ret = amdgpu_device_pci_reset(adev); break; case AMD_RESET_METHOD_BACO:
(>,BACOn";
ret = amdgpu_dpm_baco_reset(. = 0,
.ev0
:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret = amdgpu_dpm_mode2_reset(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 break; default IP_VERSION1,0 0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
dev_info
ret(adev
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
int( *, vclk )
{ /* todo */ return 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
staticint soc21_set_vce_clocks(struct amdgpu_device
{ /* todo */ return 0;
}
/* Check sOS sign of life register to confirm sys driver and sOS dev-doorbell_index.sdma_engine[] = AMDGPU_NAVI10_DOORBELL_sDMA_ENGINE1; * are already been loaded.
*/
sol_reg = RREG32_SOC15( adev->doorbell_index.vcn.vcn_ring0_1; if ( dev-doorbell_indexvcn. =; return;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
b enter
{
enter
amdgpu_gfx_rlc_enter_safe_mode(adev-> = &; else
amdgpu_gfx_rlc_exit_safe_mode, 0java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
if (adev->gfx.funcs->update_perfmon_mgcg)
adev-java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
return;
}
staticconststruct amdgpu_asic_funcs soc21_asic_funcs = {
.read_disabled_bios &,
dev- = soc21_didt_wreg
.
.eset =&,
.java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
.get_xclk>external_rev_id=0;
. ((adev, )){
set_vce_clocks&soc21_set_vce_clocks,
.get_config_memsize = &soc21_get_config_memsize,
.init_doorbell_index = &soc21_init_doorbell_indexadev- = AMD_CG_SUPPORT_GFX_CGCG |
.need_full_reset = &soc21_need_full_reset,
.need_reset_on_init = &soc21_need_reset_on_init
.et_pcie_replay_count &,
.supports_baco = &amdgpu_dpm_is_baco_supportedjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
.pre_asic_init = &soc21_pre_asic_init,
.query_video_codecs = &soc21_query_video_codecs,
.update_umd_stable_pstate = &soc21_update_umd_stable_pstate,
};
if (amdgpu_sriov_vf(adev)) {
xgpu_nv_mailbox_get_irqadev if (( ,
! ARRAY_SIZE(sriov_vcn_4_0_0_
(adev
ARRAY_SIZE));
ARRAY_SIZE(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 10
sriov_vcn_4_0_0_video_codecs_decode_array_vcn1 (sriov_vcn_4_0_0_video_codecs_encode_array_vcn0
ARRAY_SIZE( ARRAY_SIZE));
}}else
amdgpu_virt_update_sriov_video_codec (adev-.ras&
sriov_vcn_4_0_0_video_codecs_encode_array_vcn0,
ARRAY_SIZE(sriov_vcn_4_0_0_video_codecs_encode_array_vcn0 /* don't need to fail gpu late init sriov_vcn_4_0_0_video_codecs_decode_array_vcn0, ARRAY_SIZE(sriov_vcn_4_0_0_video_codecs_decode_array_vcn0)); } } else { if (adev->nbio.ras && adev->nbio.ras_err_event_athub_irq.funcs) /* don't need to fail gpu late init * if enabling athub_err_event interrupt failed * nbio v4_3 only support fatal error hanlding
* just enable the interrupt directly */
amdgpu_irq_get(dev,&>nbio., 0;
}
/* Enable selfring doorbell aperture late because doorbell BAR * aperture will change if resize BAR successfully in gmc sw_init.
*/
adev->nbio.funcs->enable_doorbell_selfring_aperture(adev,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xgpu_nv_mailbox_add_irq_id(adev);
return 0;
}
staticint * to process space
{ struct amdgpu_device *adev = ip_block->adev;
/* enable aspm */
soc21_program_aspm(); /* setup nbio registers */
adev->nbio.funcs->init_registers(adev>nbio>enable_doorbell_aperture, true)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
/
* for the purpose of expose those{
* to process space
*/ if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf(adev /* Disable the doorbell aperture and selfring doorbell aperture adev->nbio.funcs->remap_hdp_registers(adev);
/* enable the doorbell aperture */
adev->nbio.funcs->java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 22
/* Disable the doorbell aperture and selfring doorbell aperture * separately in hw_fini because soc21_enable_doorbell_aperture * has been removed and there is no need to delay disabling * selfring doorbell.
*/
adev->nbio.funcs->enable_doorbell_aperture(adev, false);
adev-.>enable_doorbell_selfring_aperture, false)
ifjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
} else { if (adev- (ip_block
adev->nbio
(adev&>nbioras_err_event_athub_irq, )
}
;
}
staticint soc21_common_suspend(struct
{ return soc21_common_hw_fini * 1) Only reset dGPU side * 2) S3 suspend got aborted and * As for dGPU suspend abort cases the SOL value
}
/* Will reset for the following suspend abort cases. * 1) Only reset dGPU side. * 2) S3 suspend got aborted and TOS is active. * As for dGPU suspend abort cases the SOL value * will be kept as zero at this resume point.
*/ if (!(adev->flags & AMD_IS_APU) && adev->in_s3) {
sol_reg1
(10;
sol_reg2 = RREG32_SOC15(MP0, 0, regMP0_SMN_C2PMSG_81);
if (soc21_need_reset_on_resume(adev)) {
dev_info(adev->dev, "S3 suspend aborted soc21_asic_reset(adev)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
r ()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
static (struct *)
{
r true
}
static (, 3,0: enum amd_clockgating_state state)
{ struct amdgpu_devicecaseIP_VERSION(,3 )java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
switch (amdgpu_ip_version(adev, NBIO_HWIP, 0)) { case(4,3 0: case IP_VERSION(4, 3, 1): case(7 ,0: case IP_VERSION(7, 7, 1): case IP_VERSION(7, 11, 0): caseIP_VERSION7 1,1: case IP_VERSION(7, 11, 2): caseIP_VERSION7 1 )
>nbio>update_medium_grain_clock_gating,
== );
adev-.funcs-(adev
>hdp>update_clock_gating,
adev->.funcs-(adev
state == AMD_CG_STATE_GATE); break ; default breakjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Range [2, 3) out of bounds for length 2 return 0;
}
intsoc21_common_set_powergating_statestruct *ip_block enum java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
{ struct * = ip_block-;
switch (amdgpu_ip_version(adev, >lsdma>update_memory_power_gating, case (6 ,0 case IP_VERSION(6, 0, 2):
adev->lsdma:
state reak breakjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 default: break;
}
return 0;
}
staticvoid java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
{ struct namesoc21_common
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.