Add Renoir APU support
Subsystems (2)
cover Add Renoir APU support
This patch set provides initial support for a new APU, renoir.
Aaron Liu (9):
drm/amdgpu: fix no interrupt issue for renoir emu drm/amdgpu: enable dce virtual ip module for Renoir drm/amdgpu: add asic funcs for renoir drm/amdgpu: set rlc funcs for renoir drm/amdgpu: add psp_v12_0 for renoir (v2) drm/amdgpu: enable clock gating for renoir drm/amdgpu: enable power gating for renoir drm/amdgpu: update lbpw for renoir drm/amdgpu: set fw default loading by psp for renoir
Alex Deucher (1):
drm/amdgpu: flag renoir as experimental for now
Huang Rui (14):
drm/amdgpu: add renoir header files (v2)
drm/amdgpu: add renoir asic_type enum
drm/amdgpu: add renoir support for gpu_info and ip block setting drm/amdgpu: add soc15 common ip block support for renoir drm/amdgpu: add gmc v9 supports for renoir drm/amdgpu: set fw load type for renoir
drm/amdgpu: add gfx support for renoir
drm/amdgpu: add sdma support for renoir
drm/amdgpu: set ip blocks for renoir
drm/amdgpu: add renoir pci id
drm/amdgpu: add gfx golden settings for renoir (v2) drm/amdgpu: add sdma golden settings for renoir drm/amdgpu: use direct loading on renoir vcn for the moment drm/amdgpu: skip mec2 jump table loading for renoir
Leo Liu (3):
drm/amdgpu: enable Renoir VCN firmware loading drm/amdgpu: enable Doorbell support for Renoir (v2) drm/amdgpu: add VCN2.0 to Renoir IP blocks
drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 17 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 17 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 56 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 + drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 21 + drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 565 ++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v12_0.h | 30 + drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 23 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 21 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 9 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 4 + .../include/asic_reg/mp/mp_12_0_0_offset.h | 336 +++++++ .../include/asic_reg/mp/mp_12_0_0_sh_mask.h | 866 ++++++++++++++++++ include/drm/amd_asic_type.h | 1 + 21 files changed, 1982 insertions(+), 12 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_12_0_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_12_0_0_sh_mask.h
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): 20190809155302.4733-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/27 drm/amdgpu: add renoir asic_type enum
From: Huang Rui <[email protected]>
This patch adds renoir to amd_asic_type enum and amdgpu_asic_name[].
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + include/drm/amd_asic_type.h | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
@@ -101,6 +101,7 @@ static const char *amdgpu_asic_name[] = {"VEGA20" ,"RAVEN" ,"ARCTURUS" , +"RENOIR" ,"NAVI10" ,"NAVI14" , "NAVI12",
include/drm/amd_asic_type.h +1 -0
@@ -50,6 +50,7 @@ enum amd_asic_type {CHIP_VEGA20 ,CHIP_RAVEN ,CHIP_ARCTURUS , +CHIP_RENOIR ,CHIP_NAVI10 ,CHIP_NAVI14 , CHIP_NAVI12,
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/27 drm/amdgpu: add renoir support for gpu_info and ip block setting
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
This patch adds renoir support for gpu_info firmware and ip block setting.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -1
@@ -70,6 +70,7 @@ MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin");MODULE_FIRMWARE ("amdgpu/picasso_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/raven2_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/arcturus_gpu_info.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/navi10_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/navi14_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/navi12_gpu_info.bin" );
@@ -1460,6 +1461,9 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)case CHIP_ARCTURUS : chip_name ="arcturus" ;break ; +case CHIP_RENOIR : + chip_name ="renoir" ; +break ;case CHIP_NAVI10 : chip_name ="navi10" ;break ;
@@ -1612,7 +1616,9 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)case CHIP_VEGA20 :case CHIP_RAVEN :case CHIP_ARCTURUS : -if (adev->asic_type ==CHIP_RAVEN ) +case CHIP_RENOIR : +if (adev->asic_type ==CHIP_RAVEN || + adev->asic_type ==CHIP_RENOIR ) adev->family =AMDGPU_FAMILY_RV ;else adev->family =AMDGPU_FAMILY_AI ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/27 drm/amdgpu: add soc15 common ip block support for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
This patch adds common ip support for renoir.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +6 -0
@@ -636,6 +636,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)case CHIP_VEGA10 :case CHIP_VEGA12 :case CHIP_RAVEN : +case CHIP_RENOIR :vega10_reg_base_init (adev);break ;case CHIP_VEGA20 :
@@ -1122,6 +1123,11 @@ static int soc15_common_early_init(void *handle) adev->pg_flags =0 ; adev->external_rev_id = adev->rev_id +0x32 ;break ; +case CHIP_RENOIR : + adev->cg_flags =0 ; + adev->pg_flags =0 ; + adev->external_rev_id = adev->rev_id +0x91 ; +break ;default :/* FIXME: not supported yet */ return -EINVAL ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/27 drm/amdgpu: add gmc v9 supports for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add gfx memory controller support for renoir.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +7 -0
@@ -686,6 +686,7 @@ static bool gmc_v9_0_keep_stolen_memory(struct amdgpu_device *adev)case CHIP_VEGA10 :case CHIP_RAVEN :case CHIP_ARCTURUS : +case CHIP_RENOIR :return true;case CHIP_VEGA12 :case CHIP_VEGA20 :
@@ -955,6 +956,7 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->gmc.gart_size =512ULL <<20 ;break ;case CHIP_RAVEN :/* DCE SG support */ +case CHIP_RENOIR : adev->gmc.gart_size =1024ULL <<20 ;break ; }
@@ -1005,6 +1007,7 @@ static unsigned gmc_v9_0_get_vbios_fb_size(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_RAVEN : +case CHIP_RENOIR : viewport =RREG32_SOC15 (DCE ,0 , mmHUBP0_DCSURF_PRI_VIEWPORT_DIMENSION); size = (REG_GET_FIELD(viewport, HUBP0_DCSURF_PRI_VIEWPORT_DIMENSION, PRI_VIEWPORT_HEIGHT) *
@@ -1061,8 +1064,10 @@ static int gmc_v9_0_sw_init(void *handle)case CHIP_VEGA10 :case CHIP_VEGA12 :case CHIP_VEGA20 : +case CHIP_RENOIR : adev->num_vmhubs =2 ; +/* * To fulfill 4-level page support, * vm size is 256TB (48bit), maximum size of Vega10,
@@ -1223,6 +1228,7 @@ static void gmc_v9_0_init_golden_registers(struct amdgpu_device *adev)case CHIP_VEGA12 :break ;case CHIP_RAVEN : +/* TODO for renoir */ soc15_program_register_sequence (adev, golden_settings_athub_1_0_0,ARRAY_SIZE (golden_settings_athub_1_0_0));
@@ -1257,6 +1263,7 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_RAVEN : +/* TODO for renoir */ mmhub_v1_0_update_power_gating (adev, true);break ;default :
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/27 drm/amdgpu: set fw load type for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
This patch sets fw load type as direct for renoir for the moment. Will switch to psp when psp is ready.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +1 -0
@@ -368,6 +368,7 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)else return AMDGPU_FW_LOAD_PSP ;case CHIP_ARCTURUS : +case CHIP_RENOIR :return AMDGPU_FW_LOAD_DIRECT ;default :DRM_ERROR ("Unknown firmware load type\n" );
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/27 drm/amdgpu: add gfx support for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add Renoir checks to gfx9 code.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +24 -2
@@ -104,6 +104,13 @@ MODULE_FIRMWARE("amdgpu/arcturus_mec.bin");MODULE_FIRMWARE ("amdgpu/arcturus_mec2.bin" );MODULE_FIRMWARE ("amdgpu/arcturus_rlc.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_ce.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_pfp.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_me.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_mec.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_mec2.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_rlc.bin" ); +#define mmTCP_CHAN_STEER_0_ARCT 0x0b03#define mmTCP_CHAN_STEER_0_ARCT_BASE_IDX 0#define mmTCP_CHAN_STEER_1_ARCT 0x0b04
@@ -1339,6 +1346,9 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev)case CHIP_ARCTURUS : chip_name ="arcturus" ;break ; +case CHIP_RENOIR : + chip_name ="renoir" ; +break ;default :BUG (); }
@@ -1598,7 +1608,7 @@ static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)return r; } -if (adev->asic_type ==CHIP_RAVEN ) { +if (adev->asic_type ==CHIP_RAVEN || adev->asic_type ==CHIP_RENOIR ) {/* TODO: double check the cp_table_size for RV */ adev->gfx.rlc.cp_table_size =ALIGN (96 *5 *4 ,2048 ) + (64 *1024 );/* JT + GDS */ r =amdgpu_gfx_rlc_init_cpt (adev);
@@ -1859,6 +1869,16 @@ static int gfx_v9_0_gpu_early_init(struct amdgpu_device *adev) gb_addr_config &= ~0xf3e777ff ; gb_addr_config |=0x22014042 ;break ; +case CHIP_RENOIR : + adev->gfx.config.max_hw_contexts =8 ; + adev->gfx.config.sc_prim_fifo_size_frontend =0x20 ; + adev->gfx.config.sc_prim_fifo_size_backend =0x100 ; + adev->gfx.config.sc_hiz_tile_fifo_size =0x80 ; + adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; + gb_addr_config =RREG32_SOC15 (GC ,0 , mmGB_ADDR_CONFIG); + gb_addr_config &= ~0xf3e777ff ; + gb_addr_config |=0x22010042 ; +break ;default :BUG ();break ;
@@ -2136,6 +2156,7 @@ static int gfx_v9_0_sw_init(void *handle)case CHIP_VEGA20 :case CHIP_RAVEN :case CHIP_ARCTURUS : +case CHIP_RENOIR : adev->gfx.mec.num_mec =2 ;break ;default :
@@ -2293,7 +2314,7 @@ static int gfx_v9_0_sw_fini(void *handle)gfx_v9_0_mec_fini (adev);gfx_v9_0_ngg_fini (adev);amdgpu_bo_unref (&adev->gfx.rlc.clear_state_obj); -if (adev->asic_type ==CHIP_RAVEN ) { +if (adev->asic_type ==CHIP_RAVEN || adev->asic_type ==CHIP_RENOIR ) {amdgpu_bo_free_kernel (&adev->gfx.rlc.cp_table_obj, &adev->gfx.rlc.cp_table_gpu_addr, (void **)&adev->gfx.rlc.cp_table_ptr);
@@ -2963,6 +2984,7 @@ static int gfx_v9_0_rlc_resume(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_RAVEN : +case CHIP_RENOIR :if (amdgpu_lbpw ==0 )gfx_v9_0_enable_lbpw (adev, false);else
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/27 drm/amdgpu: add sdma support for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add renoir checks to appropriate places.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +5 -1
@@ -65,6 +65,7 @@ MODULE_FIRMWARE("amdgpu/raven_sdma.bin");MODULE_FIRMWARE ("amdgpu/picasso_sdma.bin" );MODULE_FIRMWARE ("amdgpu/raven2_sdma.bin" );MODULE_FIRMWARE ("amdgpu/arcturus_sdma.bin" ); +MODULE_FIRMWARE ("amdgpu/renoir_sdma.bin" );#define SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK 0x000000F8L#define SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK 0xFC000000L
@@ -449,6 +450,9 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev)case CHIP_ARCTURUS : chip_name ="arcturus" ;break ; +case CHIP_RENOIR : + chip_name ="renoir" ; +break ;default :BUG (); }
@@ -1637,7 +1641,7 @@ static int sdma_v4_0_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;int r; -if (adev->asic_type ==CHIP_RAVEN ) +if (adev->asic_type ==CHIP_RAVEN || adev->asic_type ==CHIP_RENOIR ) adev->sdma.num_instances =1 ;else if (adev->asic_type ==CHIP_ARCTURUS ) adev->sdma.num_instances =8 ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/27 drm/amdgpu: set ip blocks for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Enable ip blocks for renoir.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +7 -0
@@ -743,6 +743,13 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &smu_v11_0_ip_block);amdgpu_device_ip_block_add (adev, &vcn_v2_5_ip_block);break ; +case CHIP_RENOIR : +amdgpu_device_ip_block_add (adev, &vega10_common_ip_block); +amdgpu_device_ip_block_add (adev, &gmc_v9_0_ip_block); +amdgpu_device_ip_block_add (adev, &vega10_ih_ip_block); +amdgpu_device_ip_block_add (adev, &gfx_v9_0_ip_block); +amdgpu_device_ip_block_add (adev, &sdma_v4_0_ip_block); +break ;default :return -EINVAL ; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/27 drm/amdgpu: add renoir pci id
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add Renoir PCI id support.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -0
@@ -1010,6 +1010,9 @@ static const struct pci_device_id pciidlist[] = {/* Navi14 */ {0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14}, +/* Renoir */ + {0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU}, + {0, 0, 0} };
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/27 drm/amdgpu: fix no interrupt issue for renoir emu
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
In renoir's ih model, there's a change in mmIH_CHICKEN register, that limits IH to use physical address directly. Those chicken bits need to be programmed first.
--- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vega10_ih.c +1 -1
@@ -245,7 +245,7 @@ static int vega10_ih_irq_init(struct amdgpu_device *adev)WREG32_SOC15 (OSSSYS ,0 , mmIH_RB_CNTL, ih_rb_cntl); } -if (adev->asic_type ==CHIP_ARCTURUS && +if ((adev->asic_type ==CHIP_ARCTURUS || adev->asic_type ==CHIP_RENOIR ) && adev->firmware.load_type ==AMDGPU_FW_LOAD_DIRECT ) {if (adev->irq.ih.use_bus_addr) { ih_chicken =RREG32_SOC15 (OSSSYS ,0 , mmIH_CHICKEN);
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/27 drm/amdgpu: enable dce virtual ip module for Renoir
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1 -0
@@ -456,6 +456,7 @@ static int dce_virtual_hw_init(void *handle)case CHIP_VEGA12 :case CHIP_VEGA20 :case CHIP_ARCTURUS : +case CHIP_RENOIR :case CHIP_NAVI10 :case CHIP_NAVI14 :case CHIP_NAVI12 :
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -0
@@ -749,6 +749,8 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vega10_ih_ip_block);amdgpu_device_ip_block_add (adev, &gfx_v9_0_ip_block);amdgpu_device_ip_block_add (adev, &sdma_v4_0_ip_block); +if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev)) +amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/27 drm/amdgpu: add asic funcs for renoir
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
add asic funcs for renoir, init soc15_asic_funcs
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -0
@@ -1133,6 +1133,7 @@ static int soc15_common_early_init(void *handle) adev->external_rev_id = adev->rev_id +0x32 ;break ;case CHIP_RENOIR : + adev->asic_funcs = &soc15_asic_funcs; adev->cg_flags =0 ; adev->pg_flags =0 ; adev->external_rev_id = adev->rev_id +0x91 ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/27 drm/amdgpu: set rlc funcs for renoir
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
add gfx_v9_0_rlc_funcs for renoir
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
@@ -6294,6 +6294,7 @@ static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev)case CHIP_VEGA20 :case CHIP_RAVEN :case CHIP_ARCTURUS : +case CHIP_RENOIR : adev->gfx.rlc.funcs = &gfx_v9_0_rlc_funcs;break ;default :
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/27 drm/amdgpu: add psp_v12_0 for renoir (v2)
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
1. Add psp ip block
2. Use direct loading type by default and it can also config psp loading type.
3. Bypass sos fw loading and xgmi&ras interface
v2: drop TA loading
--- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 7 +- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 565 ++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v12_0.h | 30 ++ drivers/gpu/drm/amd/amdgpu/soc15.c | 2 + 7 files changed, 619 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
@@ -100,7 +100,8 @@ amdgpu-y += \ amdgpu_psp.o \ psp_v3_1.o \ psp_v10_0.o \ - psp_v11_0.o + psp_v11_0.o \ + psp_v12_0.o # add SMC block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +13 -0
@@ -32,6 +32,7 @@#include "psp_v3_1.h" #include "psp_v10_0.h" #include "psp_v11_0.h" +#include "psp_v12_0.h" static void psp_set_funcs (struct amdgpu_device *adev);
@@ -63,6 +64,9 @@ static int psp_early_init(void *handle)psp_v11_0_set_psp_funcs (psp); psp->autoload_supported = true;break ; +case CHIP_RENOIR : +psp_v12_0_set_psp_funcs (psp); +break ;default :return -EINVAL ; }
@@ -1358,3 +1362,12 @@ const struct amdgpu_ip_block_version psp_v11_0_ip_block = .rev = 0, .funcs = &psp_ip_funcs, }; + +const struct amdgpu_ip_block_version psp_v12_0_ip_block = +{ + .type =AMD_IP_BLOCK_TYPE_PSP , + .major =12 , + .minor =0 , + .rev =0 , + .funcs = &psp_ip_funcs, +};
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +1 -0
@@ -270,6 +270,7 @@ extern int psp_wait_for(struct psp_context *psp, uint32_t reg_index, uint32_t field_val, uint32_t mask, bool check_changed);extern const struct amdgpu_ip_block_version psp_v10_0_ip_block; +extern const struct amdgpu_ip_block_version psp_v12_0_ip_block;int psp_gpu_reset (struct amdgpu_device *adev); int psp_update_vcn_sram(struct amdgpu_device *adev, int inst_idx,
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +6 -1
@@ -368,8 +368,13 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)else return AMDGPU_FW_LOAD_PSP ;case CHIP_ARCTURUS : -case CHIP_RENOIR :return AMDGPU_FW_LOAD_DIRECT ; +case CHIP_RENOIR : +if (load_type ==AMDGPU_FW_LOAD_PSP ) +return AMDGPU_FW_LOAD_PSP ; +else +return AMDGPU_FW_LOAD_DIRECT ; +default :DRM_ERROR ("Unknown firmware load type\n" ); }
drivers/gpu/drm/amd/amdgpu/psp_v12_0.c new file +565 -0
565 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/psp_v12_0.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright 2019 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. +* +*/ +#ifndef __PSP_V12_0_H__ +#define __PSP_V12_0_H__ + +#include "amdgpu_psp.h" + +void psp_v12_0_set_psp_funcs (struct psp_context *psp); + +#endif
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -0
@@ -747,6 +747,8 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vega10_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v9_0_ip_block);amdgpu_device_ip_block_add (adev, &vega10_ih_ip_block); +if (likely (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP )) +amdgpu_device_ip_block_add (adev, &psp_v12_0_ip_block);amdgpu_device_ip_block_add (adev, &gfx_v9_0_ip_block);amdgpu_device_ip_block_add (adev, &sdma_v4_0_ip_block);if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/27 drm/amdgpu: add gfx golden settings for renoir (v2)
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
This patch adds gfx golden settings for renoir real asic.
v2: update settings (Alex)
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +26 -0
@@ -32,6 +32,7 @@#include "gc/gc_9_0_offset.h" #include "gc/gc_9_0_sh_mask.h" +#include "vega10_enum.h" #include "hdp/hdp_4_0_offset.h"
@@ -56,6 +57,9 @@#define PWR_MISC_CNTL_STATUS__PWR_GFX_RLC_CGPG_EN_MASK 0x00000001L#define PWR_MISC_CNTL_STATUS__PWR_GFXOFF_STATUS_MASK 0x00000006L +#define mmGCEA_PROBE_MAP 0x070c +#define mmGCEA_PROBE_MAP_BASE_IDX 0 +MODULE_FIRMWARE ("amdgpu/vega10_ce.bin" );MODULE_FIRMWARE ("amdgpu/vega10_pfp.bin" );MODULE_FIRMWARE ("amdgpu/vega10_me.bin" );
@@ -614,6 +618,23 @@ static const struct soc15_reg_golden golden_settings_gc_9_1_rv2[] = SOC15_REG_GOLDEN_VALUE(GC, 0, mmWD_UTCL1_CNTL, 0x3f8fffff, 0x08000080), }; +static const struct soc15_reg_golden golden_settings_gc_9_1_rn[] = +{ +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmWD_UTCL1_CNTL,0x3f8fffff ,0x08000080 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmCB_HW_CONTROL,0xfffdf3cf ,0x00014104 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmCB_HW_CONTROL_2,0xff7fffff ,0x0a000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmDB_DEBUG2,0xf00fffff ,0x00000400 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGB_ADDR_CONFIG,0xf3e777ff ,0x22010042 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGB_ADDR_CONFIG_READ,0xf3e777ff ,0x22010042 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmPA_SC_ENHANCE,0x3fffffff ,0x00000001 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmPA_SC_ENHANCE_1,0xffffffff ,0x04040000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmPA_SC_LINE_STIPPLE_STATE,0x0000ff0f ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmTA_CNTL_AUX,0xfffffeef ,0x010b0000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmTCP_CHAN_STEER_HI,0xffffffff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmTCP_CHAN_STEER_LO,0xffffffff ,0x00003120 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGCEA_PROBE_MAP,0xffffffff ,0x0000cccc ), +}; +static const struct soc15_reg_golden golden_settings_gc_9_x_common[] = {SOC15_REG_GOLDEN_VALUE (GC ,0 , mmCP_SD_CNTL,0xffffffff ,0x000001ff ),
@@ -758,6 +779,11 @@ static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev) golden_settings_gc_9_1_rv1, ARRAY_SIZE(golden_settings_gc_9_1_rv1));break ; +case CHIP_RENOIR : +soc15_program_register_sequence (adev, + golden_settings_gc_9_1_rn, +ARRAY_SIZE (golden_settings_gc_9_1_rn)); +break ;default :break ; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/27 drm/amdgpu: add sdma golden settings for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
This patch adds sdma golden settings for renoir asic.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +17 -0
@@ -241,6 +241,18 @@ static const struct soc15_reg_golden golden_settings_sdma_arct[] = SOC15_REG_GOLDEN_VALUE(SDMA7, 0, mmSDMA7_GB_ADDR_CONFIG_READ, 0x0000773f, 0x00004002) }; +static const struct soc15_reg_golden golden_settings_sdma_4_3[] = { +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_CHICKEN_BITS,0xfe931f07 ,0x02831f07 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_CLK_CTRL,0xffffffff ,0x3f000100 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_GB_ADDR_CONFIG,0x0018773f ,0x00003002 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_GB_ADDR_CONFIG_READ,0x0018773f ,0x00003002 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_GFX_RB_WPTR_POLL_CNTL,0xfffffff7 ,0x00403000 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_POWER_CNTL,0x003fff07 ,0x40000051 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_RLC0_RB_WPTR_POLL_CNTL,0xfffffff7 ,0x00403000 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_RLC1_RB_WPTR_POLL_CNTL,0xfffffff7 ,0x00403000 ), +SOC15_REG_GOLDEN_VALUE (SDMA0 ,0 , mmSDMA0_UTCL1_PAGE,0x000003ff ,0x000003c0 ), +}; +static u32 sdma_v4_0_get_reg_offset (struct amdgpu_device *adev,u32 instance,u32 offset) {
@@ -365,6 +377,11 @@ static void sdma_v4_0_init_golden_registers(struct amdgpu_device *adev) golden_settings_sdma_rv1, ARRAY_SIZE(golden_settings_sdma_rv1));break ; +case CHIP_RENOIR : +soc15_program_register_sequence (adev, + golden_settings_sdma_4_3, +ARRAY_SIZE (golden_settings_sdma_4_3)); +break ;default :break ; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/27 drm/amdgpu: enable Renoir VCN firmware loading
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
By adding new Renoir VCN firmware
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +8 -0
@@ -46,6 +46,7 @@#define FIRMWARE_PICASSO "amdgpu/picasso_vcn.bin"#define FIRMWARE_RAVEN2 "amdgpu/raven2_vcn.bin"#define FIRMWARE_ARCTURUS "amdgpu/arcturus_vcn.bin" +#define FIRMWARE_RENOIR "amdgpu/renoir_vcn.bin"#define FIRMWARE_NAVI10 "amdgpu/navi10_vcn.bin"#define FIRMWARE_NAVI14 "amdgpu/navi14_vcn.bin"#define FIRMWARE_NAVI12 "amdgpu/navi12_vcn.bin"
@@ -54,6 +55,7 @@ MODULE_FIRMWARE(FIRMWARE_RAVEN);MODULE_FIRMWARE (FIRMWARE_PICASSO );MODULE_FIRMWARE (FIRMWARE_RAVEN2 );MODULE_FIRMWARE (FIRMWARE_ARCTURUS ); +MODULE_FIRMWARE (FIRMWARE_RENOIR );MODULE_FIRMWARE (FIRMWARE_NAVI10 );MODULE_FIRMWARE (FIRMWARE_NAVI14 );MODULE_FIRMWARE (FIRMWARE_NAVI12 );
@@ -82,6 +84,12 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)case CHIP_ARCTURUS : fw_name =FIRMWARE_ARCTURUS ;break ; +case CHIP_RENOIR : + fw_name =FIRMWARE_RENOIR ; +if ((adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) && + (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG )) + adev->vcn.indirect_sram = true; +break ;case CHIP_NAVI10 : fw_name =FIRMWARE_NAVI10 ; if ((adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) &&
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/27 drm/amdgpu: enable Doorbell support for Renoir (v2)
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Add VCN range aperture to NBIO 7.0
v2: rebase (Alex)
--- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 4 ++++ 2 files changed, 25 insertions(+)
drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c +21 -0
@@ -91,6 +91,26 @@ static void nbio_v7_0_sdma_doorbell_range(struct amdgpu_device *adev, int instanWREG32 (reg, doorbell_range); } +static void nbio_v7_0_vcn_doorbell_range (struct amdgpu_device *adev,bool use_doorbell, +int doorbell_index,int instance) +{ +u32 reg =SOC15_REG_OFFSET (NBIO ,0 , mmBIF_MMSCH0_DOORBELL_RANGE); + +u32 doorbell_range =RREG32 (reg); + +if (use_doorbell) { + doorbell_range =REG_SET_FIELD (doorbell_range, +BIF_MMSCH0_DOORBELL_RANGE ,OFFSET , + doorbell_index); + doorbell_range =REG_SET_FIELD (doorbell_range, +BIF_MMSCH0_DOORBELL_RANGE ,SIZE ,8 ); + }else + doorbell_range =REG_SET_FIELD (doorbell_range, +BIF_MMSCH0_DOORBELL_RANGE ,SIZE ,0 ); + +WREG32 (reg, doorbell_range); +} +static void nbio_v7_0_enable_doorbell_aperture (struct amdgpu_device *adev,bool enable) {
@@ -282,6 +302,7 @@ const struct amdgpu_nbio_funcs nbio_v7_0_funcs = { .hdp_flush = nbio_v7_0_hdp_flush, .get_memsize = nbio_v7_0_get_memsize, .sdma_doorbell_range = nbio_v7_0_sdma_doorbell_range, + .vcn_doorbell_range = nbio_v7_0_vcn_doorbell_range, .enable_doorbell_aperture = nbio_v7_0_enable_doorbell_aperture, .enable_doorbell_selfring_aperture = nbio_v7_0_enable_doorbell_selfring_aperture, .ih_doorbell_range = nbio_v7_0_ih_doorbell_range,
drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c +4 -0
@@ -81,6 +81,10 @@ void vega10_doorbell_index_init(struct amdgpu_device *adev) adev->doorbell_index.uvd_vce.vce_ring2_3 =AMDGPU_DOORBELL64_VCE_RING2_3 ; adev->doorbell_index.uvd_vce.vce_ring4_5 =AMDGPU_DOORBELL64_VCE_RING4_5 ; adev->doorbell_index.uvd_vce.vce_ring6_7 =AMDGPU_DOORBELL64_VCE_RING6_7 ; + adev->doorbell_index.vcn.vcn_ring0_1 =AMDGPU_DOORBELL64_VCN0_1 ; + adev->doorbell_index.vcn.vcn_ring2_3 =AMDGPU_DOORBELL64_VCN2_3 ; + adev->doorbell_index.vcn.vcn_ring4_5 =AMDGPU_DOORBELL64_VCN4_5 ; + adev->doorbell_index.vcn.vcn_ring6_7 =AMDGPU_DOORBELL64_VCN6_7 ; adev->doorbell_index.first_non_cp =AMDGPU_DOORBELL64_FIRST_NON_CP ; adev->doorbell_index.last_non_cp =AMDGPU_DOORBELL64_LAST_NON_CP ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/27 drm/amdgpu: add VCN2.0 to Renoir IP blocks
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Thus enable VCN2.0 for Renoir
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -0
@@ -62,6 +62,7 @@#include "uvd_v7_0.h" #include "vce_v4_0.h" #include "vcn_v1_0.h" +#include "vcn_v2_0.h" #include "vcn_v2_5.h" #include "dce_virtual.h" #include "mxgpu_ai.h"
@@ -753,6 +754,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &sdma_v4_0_ip_block);if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block); +amdgpu_device_ip_block_add (adev, &vcn_v2_0_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/27 drm/amdgpu: enable clock gating for renoir
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
enable gfx&common clock gating for renoir
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
@@ -4849,6 +4849,7 @@ static int gfx_v9_0_set_clockgating_state(void *handle,case CHIP_VEGA12 :case CHIP_VEGA20 :case CHIP_RAVEN : +case CHIP_RENOIR :gfx_v9_0_update_gfx_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false);break ;
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -0
@@ -1394,6 +1394,7 @@ static int soc15_common_set_clockgating_state(void *handle, state == AMD_CG_STATE_GATE ? true : false);break ;case CHIP_RAVEN : +case CHIP_RENOIR : adev->nbio_funcs->update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false); adev->nbio_funcs->update_medium_grain_light_sleep(adev,
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/27 drm/amdgpu: enable power gating for renoir
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
enable gfx power gating for renoir
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
@@ -4795,6 +4795,7 @@ static int gfx_v9_0_set_powergating_state(void *handle,switch (adev->asic_type) {case CHIP_RAVEN : +case CHIP_RENOIR :if (!enable) {amdgpu_gfx_off_ctrl (adev, false);cancel_delayed_work_sync (&adev->gfx.gfx_off_delay_work);
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 23/27 drm/amdgpu: update lbpw for renoir
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
enable gfx_v9_0_init_lbpw for renoir
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +1 -0
@@ -1644,6 +1644,7 @@ static int gfx_v9_0_rlc_init(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_RAVEN : +case CHIP_RENOIR :gfx_v9_0_init_lbpw (adev);break ;case CHIP_VEGA20 :
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 24/27 drm/amdgpu: set fw default loading by psp for renoir
In reply to a message not in the archiveFrom: Aaron Liu <[email protected]>
By default, set amdgpu ucode type to AMDGPU_FW_LOAD_PSP.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +1 -5
@@ -360,6 +360,7 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)case CHIP_RAVEN :case CHIP_VEGA12 :case CHIP_VEGA20 : +case CHIP_RENOIR :case CHIP_NAVI10 :case CHIP_NAVI14 :case CHIP_NAVI12 :
@@ -369,11 +370,6 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)return AMDGPU_FW_LOAD_PSP ;case CHIP_ARCTURUS :return AMDGPU_FW_LOAD_DIRECT ; -case CHIP_RENOIR : -if (load_type ==AMDGPU_FW_LOAD_PSP ) -return AMDGPU_FW_LOAD_PSP ; -else -return AMDGPU_FW_LOAD_DIRECT ;default :DRM_ERROR ("Unknown firmware load type\n" );
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/27 drm/amdgpu: use direct loading on renoir vcn for the moment
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
PSP has issue for renoir, that will cause VCN fw failed to be loaded. So use direct loading for the moment till the issue is addressed.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 9 ++++++--- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -3
@@ -99,7 +99,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)case CHIP_NAVI14 : fw_name =FIRMWARE_NAVI14 ;if ((adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) && - (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG )) + (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG ) && + adev->asic_type !=CHIP_RENOIR )/* to be removed while vcn psp loading works */ adev->vcn.indirect_sram = true;break ;case CHIP_NAVI12 :
@@ -159,7 +160,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) } bo_size =AMDGPU_VCN_STACK_SIZE +AMDGPU_VCN_CONTEXT_SIZE ; -if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP || + adev->asic_type ==CHIP_RENOIR ) bo_size +=AMDGPU_GPU_PAGE_ALIGN (le32_to_cpu (hdr->ucode_size_bytes) +8 );for (i =0 ; i < adev->vcn.num_vcn_inst; i++) {
@@ -270,7 +272,8 @@ int amdgpu_vcn_resume(struct amdgpu_device *adev)unsigned offset; hdr = (const struct common_firmware_header *)adev->vcn.fw->data; -if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) { +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP || + adev->asic_type ==CHIP_RENOIR ) { offset =le32_to_cpu (hdr->ucode_array_offset_bytes);memcpy_toio (adev->vcn.inst[i].cpu_addr, adev->vcn.fw->data + offset,le32_to_cpu (hdr->ucode_size_bytes));
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +6 -3
@@ -142,7 +142,8 @@ static int vcn_v2_0_sw_init(void *handle)if (r)return r; -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP && + adev->asic_type !=CHIP_RENOIR ) {const struct common_firmware_header *hdr; hdr = (const struct common_firmware_header *)adev->vcn.fw->data; adev->firmware.ucode[AMDGPU_UCODE_ID_VCN ].ucode_id =AMDGPU_UCODE_ID_VCN ;
@@ -366,7 +367,8 @@ static void vcn_v2_0_mc_resume(struct amdgpu_device *adev)uint32_t offset;/* cache window 0: fw */ -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP && + adev->asic_type !=CHIP_RENOIR ) {WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW, (adev->firmware.ucode[AMDGPU_UCODE_ID_VCN ].tmr_mc_addr_lo)); WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,
@@ -411,7 +413,8 @@ static void vcn_v2_0_mc_resume_dpg_mode(struct amdgpu_device *adev, bool indirecuint32_t offset;/* cache window 0: fw */ -if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP && + adev->asic_type !=CHIP_RENOIR ) {if (!indirect) { WREG32_SOC15_DPG_MODE_2_0(SOC15_DPG_MODE_OFFSET_2_0( UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW),
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 26/27 drm/amdgpu: skip mec2 jump table loading for renoir
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Renoir need not load mec2 jump table with psp.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -0
@@ -1023,6 +1023,10 @@ static int psp_np_fw_load(struct psp_context *psp) ucode->ucode_id == AMDGPU_UCODE_ID_CP_MEC2_JT))/* skip mec JT when autoload is enabled */ continue ; +/* Renoir only needs to load mec jump table one time */ +if (adev->asic_type ==CHIP_RENOIR && + ucode->ucode_id ==AMDGPU_UCODE_ID_CP_MEC2_JT ) +continue ; ret =psp_execute_np_fw_load (psp, ucode);if (ret)
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 27/27 drm/amdgpu: flag renoir as experimental for now
In reply to a message not in the archiveThe current code won't likely work on production hw when it ships so leave it as experimental until it's ready.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -1
@@ -1011,7 +1011,7 @@ static const struct pci_device_id pciidlist[] = { {0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},/* Renoir */ - {0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU}, + {0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU|AMD_EXP_HW_SUPPORT}, {0, 0, 0} };
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): 20190809155302.4733-27-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Huang, Ray
Reviewed-by Huang RuiRE: [PATCH 27/27] drm/amdgpu: flag renoir as experimental for now
Quoted 8 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, August 09, 2019 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 27/27] drm/amdgpu: flag renoir as experimental for now
Quoted 4 lines
The current code won't likely work on production hw when it ships so leave it as experimental until it's ready.
Signed-off-by Alex Deucher <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2
-2@@ -1011,7 +1011,7 @@ static const struct pci_device_id pciidlist[] = { {0x1002, 0x7340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_NAVI14},/* Renoir */ - {0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RENOIR|AMD_IS_APU}, + {0x1002, 0x1636, PCI_ANY_ID, PCI_ANY_ID, 0, 0, +CHIP_RENOIR|AMD_IS_APU|AMD_EXP_HW_SUPPORT}, {0, 0, 0} }; --2.20.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Series are Acked-by: Huang Rui <[email protected]>
Quoted 75 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, August 09, 2019 11:53 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH 00/27] Add Renoir APU supportThis patch set provides initial support for a new APU, renoir.
Aaron Liu (9):
drm/amdgpu: fix no interrupt issue for renoir emu drm/amdgpu: enable dce virtual ip module for Renoir drm/amdgpu: add asic funcs for renoir drm/amdgpu: set rlc funcs for renoir drm/amdgpu: addpsp_v12_0for renoir (v2) drm/amdgpu: enable clock gating for renoir drm/amdgpu: enable power gating for renoir drm/amdgpu: update lbpw for renoir drm/amdgpu: set fw default loading by psp for renoirAlex Deucher (1):
drm/amdgpu: flag renoir as experimental for nowHuang Rui (14):
drm/amdgpu: add renoir header files (v2)
drm/amdgpu: add renoirasic_typeenum
drm/amdgpu: add renoir support forgpu_infoand ip block setting drm/amdgpu: add soc15 common ip block support for renoir drm/amdgpu: add gmc v9 supports for renoir drm/amdgpu: set fw load type for renoir
drm/amdgpu: add gfx support for renoir
drm/amdgpu: add sdma support for renoir
drm/amdgpu: set ip blocks for renoir
drm/amdgpu: add renoir pci id
drm/amdgpu: add gfx golden settings for renoir (v2) drm/amdgpu: add sdma golden settings for renoir drm/amdgpu: use direct loading on renoir vcn for the moment drm/amdgpu: skip mec2 jump table loading for renoirLeo Liu (3):
drm/amdgpu: enable Renoir VCN firmware loading drm/amdgpu: enable Doorbell support for Renoir (v2) drm/amdgpu: add VCN2.0 to Renoir IP blocksdrivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 17 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 17 +- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 56 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 7 + drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 21 + drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 565 ++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v12_0.h | 30 + drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 23 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 21 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 9 +- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 4 + .../include/asic_reg/mp/mp_12_0_0_offset.h | 336 +++++++ .../include/asic_reg/mp/mp_12_0_0_sh_mask.h | 866 ++++++++++++++++++ include/drm/amd_asic_type.h | 1 + 21 files changed, 1982 insertions(+), 12 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v12_0.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mp/mp_12_0_0_offset.h create mode 100644
drivers/gpu/drm/amd/include/asic_reg/mp/mp_12_0_0_sh_mask.h
Quoted 7 lines
--
2.20.1_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx