drm/amdgpu/psp: add new psp interface for vcn updating sram
Subsystems (2)
PATCH 296/459 drm/amdgpu/psp: add new psp interface for vcn updating sram
From: Jack Xiao <[email protected]>
PSP leverages the existing fw loading function for vcn updating sram.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 13 +++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 3 +++ 2 files changed, 16 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +13 -0
@@ -1214,6 +1214,19 @@ int psp_rlc_autoload_start(struct psp_context *psp)return ret; } +int psp_update_vcn_sram (struct amdgpu_device *adev,int inst_idx, +uint64_t cmd_gpu_addr,int cmd_size) +{ +struct amdgpu_firmware_info ucode = {0 }; + + ucode.ucode_id = inst_idx ?AMDGPU_UCODE_ID_VCN1_RAM : +AMDGPU_UCODE_ID_VCN0_RAM ; + ucode.mc_addr = cmd_gpu_addr; + ucode.ucode_size = cmd_size; + +return psp_execute_np_fw_load (&adev->psp, &ucode); +} +static bool psp_check_fw_loading_status (struct amdgpu_device *adev,enum AMDGPU_UCODE_ID ucode_type) {
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +3 -0
@@ -260,6 +260,9 @@ extern int psp_wait_for(struct psp_context *psp, uint32_t reg_index,extern const struct amdgpu_ip_block_version psp_v10_0_ip_block;int psp_gpu_reset (struct amdgpu_device *adev); +int psp_update_vcn_sram (struct amdgpu_device *adev,int inst_idx, +uint64_t cmd_gpu_addr,int cmd_size); +int psp_xgmi_invoke (struct psp_context *psp,uint32_t ta_cmd_id);int psp_ras_invoke (struct psp_context *psp,uint32_t ta_cmd_id);
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190617194520.18449-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 297/459 drm/amd/powerplay: update smu11_driver_if_navi10.h
From: Jack Xiao <[email protected]>
update the smu11_driver_if_navi10.h since navi10 smu fw update to 42.23
--- .../powerplay/inc/smu11_driver_if_navi10.h | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_navi10.h +14 -10
@@ -26,7 +26,7 @@// *** IMPORTANT *** // SMU TEAM: Always increment the interface version if // any structure is changed in this file -#define SMU11_DRIVER_IF_VERSION 0x2F +#define SMU11_DRIVER_IF_VERSION 0x32#define PPTABLE_NV10_SMU_VERSION 8
@@ -114,7 +114,7 @@#define FEATURE_MMHUB_PG_BIT 40#define FEATURE_ATHUB_PG_BIT 41 -#define FEATURE_SPARE_42_BIT 42 +#define FEATURE_APCC_DFLL_BIT 42#define FEATURE_SPARE_43_BIT 43#define FEATURE_SPARE_44_BIT 44#define FEATURE_SPARE_45_BIT 45
@@ -490,23 +490,26 @@ typedef struct {uint16_t FanTargetTemperature;uint16_t MemoryTemperatureLimit; -uint16_t Reserved2; +uint16_t MemoryTemperatureLimit1;uint16_t TGP ; -uint16_t Reserved3; +uint16_t CardPower;uint32_t DieTemperatureRegisterOffset; -uint32_t Reserved4; +uint32_t Reserved2; -uint32_t Reserved5; +uint32_t Reserved3;uint32_t Status;uint16_t DieTemperature;uint16_t MemoryTemperature; -uint32_t MmHubPadding[8 ];// SMU internal use +uint16_t SelectedCardPower; +uint16_t Reserved4; + +uint32_t BoardLevelEnergyAccumulator; } OutOfBandMonitor_t; typedef struct {
@@ -794,8 +797,8 @@ typedef struct {uint16_t BoardPadding;// Mvdd Svi2 Div Ratio Setting -uint32_t MvddRatio;// This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16) - +uint32_t MvddRatio;// This is used for MVDD Vid workaround. It has 16 fractional bits (Q16.16) +uint32_t BoardReserved[9 ];// Padding for MMHUB - do not modify this
@@ -865,7 +868,8 @@ typedef struct {uint32_t ThrottlerStatus ;uint8_t LinkDpmLevel; -uint8_t Padding[3 ]; +uint8_t Padding8_2; +uint16_t CurrFanSpeed;// Padding - ignore uint32_t MmHubPadding[8 ];// SMU internal use
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 298/459 drm/amd/powerplay: disable fw dstate when gfxoff is enabled
In reply to a message not in the archiveFrom: Jack Xiao <[email protected]>
SMU FW has bug that it would cause hung when both fw dstate and gfxoff are enabled at the same time.
--- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/navi10_ppt.c +4 -1
@@ -336,9 +336,12 @@ navi10_get_allowed_feature_mask(struct smu_context *smu, | FEATURE_MASK(FEATURE_FW_DSTATE_BIT) |FEATURE_MASK (FEATURE_ACDC_BIT ); -if (adev->pm.pp_feature &PP_GFXOFF_MASK ) +if (adev->pm.pp_feature &PP_GFXOFF_MASK ) { *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_GFX_SS_BIT ) |FEATURE_MASK (FEATURE_GFXOFF_BIT ); +/* TODO: remove it once fw fix the bug */ + *(uint64_t *)feature_mask &= ~FEATURE_MASK (FEATURE_FW_DSTATE_BIT ); + }if (smu->adev->pg_flags &AMD_PG_SUPPORT_VCN ) *(uint64_t *)feature_mask |=FEATURE_MASK (FEATURE_VCN_PG_BIT );
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 299/459 drm/amdgpu/VCN: add buffer for indirect SRAM usage
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
This will be used later for indirect SRAM mode
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 16 ++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 6 ++++++ 2 files changed, 22 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +16 -0
@@ -137,6 +137,16 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)return r; } +if (adev->vcn.indirect_sram) { + r =amdgpu_bo_create_kernel (adev,64 *2 *4 ,PAGE_SIZE , +AMDGPU_GEM_DOMAIN_VRAM , &adev->vcn.dpg_sram_bo, + &adev->vcn.dpg_sram_gpu_addr, &adev->vcn.dpg_sram_cpu_addr); +if (r) { +dev_err (adev->dev,"(%d) failed to allocate DPG bo\n" , r); +return r; + } + } +return 0 ; }
@@ -146,6 +156,12 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)kvfree (adev->vcn.saved_bo); +if (adev->vcn.indirect_sram) { +amdgpu_bo_free_kernel (&adev->vcn.dpg_sram_bo, + &adev->vcn.dpg_sram_gpu_addr, + (void **)&adev->vcn.dpg_sram_cpu_addr); + } +amdgpu_bo_free_kernel (&adev->vcn.vcpu_bo, &adev->vcn.gpu_addr, (void **)&adev->vcn.cpu_addr);
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +6 -0
@@ -164,6 +164,12 @@ struct amdgpu_vcn {struct amdgpu_vcn_reg internal, external;int (*pause_dpg_mode)(struct amdgpu_device *adev,struct dpg_pause_state *new_state); + +bool indirect_sram; +struct amdgpu_bo *dpg_sram_bo; +void *dpg_sram_cpu_addr; +uint64_t dpg_sram_gpu_addr; +uint32_t *dpg_sram_curr_addr; };int amdgpu_vcn_sw_init (struct amdgpu_device *adev);
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx