Add support for Dimgrey Cavefish
Subsystems (5)
cover Add support for Dimgrey Cavefish
This series adds initial support for Dimgrey Cavefish.
Bhawanpreet Lakha (2):
drm/amd/display: Add support for DCN302 (v2) drm/amd/display: Add DCN302 support in amdgpu_dm (v2)
Chengming Gui (2):
drm/amdkfd: Support dimgrey_cavefish KFD (v2) drm/amdkfd: Add kfd2kgd_funcs for dimgrey_cavefish kfd support
James Zhu (6):
drm/amdgpu/vcn: add firmware support for dimgrey_cavefish drm/amdgpu/vcn: enable VCN DPG mode for dimgrey_cavefish drm/amdgpu: enable VCN3.0 PG and CG for dimgrey_cavefish drm/amdgpu: enable jpeg3.0 PG and CG for dimgrey_cavefish drm/amdgpu: enable vcn3.0 for dimgrey_cavefis drm/amdgpu: enable jpeg3.0 for dimgrey_cavefish
Tao Zhou (40):
drm/amdgpu: add dimgrey_cavefish asic type
drm/amdgpu: add dimgrey_cavefish gpu info firmware drm/amdgpu: set fw load type for dimgrey_cavefish drm/amdgpu: set asic family and ip blocks for dimgrey_cavefish drm/amdgpu: add support for dimgrey_cavefish firmware drm/amdgpu: add gmc support for dimgrey_cavefish drm/amdgpu: add gfx clock gating support for dimgrey_cavefish drm/amdgpu: add common support for dimgrey_cavefish drm/amdgpu: initialize IP offset for dimgrey_cavefish drm/amdgpu: add mmhub support for dimgrey_cavefish drm/amdgpu: add common ip block for dimgrey_cavefish drm/amdgpu: add gmc ip block for dimgrey_cavefish drm/amdgpu: add ih ip block for dimgrey_cavefish drm/amdgpu: add gfx ip block for dimgrey_cavefish drm/amdgpu: add sdma ip block for dimgrey_cavefish drm/amdgpu: configure dimgrey_cavefish gfx according to gfx 10.3's
definition
drm/amdgpu: add virtual display support for dimgrey_cavefish drm/amdgpu: force pa_sc_tile_steering_override to 0 for
dimgrey_cavefish
drm/amdgpu: add gmc cg support for dimgrey_cavefish drm/amdgpu/swsmu: increase size for smu fw_name string drm/amdgpu/swsmu: add smu support for dimgrey_cavefish(v2) drm/amdgpu: increase size of psp fw_name string(v2) drm/amdgpu: add psp support for dimgrey_cavefish(v2) drm/amdgpu: skip reroute ih for some ASICs
drm/amdgpu: support cp_fw_write_wait for dimgrey_cavefish drm/amdgpu: add gc golden setting for dimgrey_cavefish drm/amdgpu: enable front door loading for dimgrey_cavefish drm/amdgpu: support athub cg setting for dimgrey_cavefish drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish drm/amdgpu: enable GFX clock gating for dimgrey_cavefish drm/amdgpu: enable mc CG and LS for dimgrey_cavefish drm/amdgpu: enable athub/mmhub PG for dimgrey_cavefish drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish(v2) drm/amdgpu: add psp and smu block for dimgrey_cavefish drm/amdgpu: enable hdp CG and LS for dimgrey_cavefish drm/amdgpu: enable ih CG for dimgrey_cavefish drm/amdgpu: remove gpu_info fw support for dimgrey_cavefish drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 + drivers/gpu/drm/amd/amdgpu/athub_v2_1.c | 1 + .../amd/amdgpu/dimgrey_cavefish_reg_init.c | 54 + drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 68 + drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 12 +- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 6 + drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/nv.c | 38 + drivers/gpu/drm/amd/amdgpu/nv.h | 1 + drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 19 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 11 +- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 21 + .../drm/amd/amdkfd/kfd_device_queue_manager.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 + .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 1 + drivers/gpu/drm/amd/display/Kconfig | 7 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 25 +- drivers/gpu/drm/amd/display/dc/Makefile | 5 + .../display/dc/bios/command_table_helper2.c | 5 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 6 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 13 + .../drm/amd/display/dc/dce/dce_clock_source.h | 20 + .../gpu/drm/amd/display/dc/dce/dce_hwseq.h | 134 ++ .../gpu/drm/amd/display/dc/dcn302/Makefile | 17 + .../drm/amd/display/dc/dcn302/dcn302_dccg.h | 41 + .../drm/amd/display/dc/dcn302/dcn302_hwseq.c | 233 +++ .../drm/amd/display/dc/dcn302/dcn302_hwseq.h | 35 + .../drm/amd/display/dc/dcn302/dcn302_init.c | 39 + .../drm/amd/display/dc/dcn302/dcn302_init.h | 33 + .../amd/display/dc/dcn302/dcn302_resource.c | 1619 +++++++++++++++++ .../amd/display/dc/dcn302/dcn302_resource.h | 33 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 3 + .../drm/amd/display/dc/gpio/hw_translate.c | 3 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + .../dc/irq/dcn302/irq_service_dcn302.c | 344 ++++ .../dc/irq/dcn302/irq_service_dcn302.h | 33 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 3 + drivers/gpu/drm/amd/display/dmub/src/Makefile | 3 + .../drm/amd/display/dmub/src/dmub_dcn302.c | 55 + .../drm/amd/display/dmub/src/dmub_dcn302.h | 37 + .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 14 + .../gpu/drm/amd/display/include/dal_asic_id.h | 6 +- .../gpu/drm/amd/display/include/dal_types.h | 3 + .../amd/include/dimgrey_cavefish_ip_offset.h | 1049 +++++++++++ drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 1 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + .../gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 19 +- include/drm/amd_asic_type.h | 1 + 56 files changed, 4089 insertions(+), 20 deletions(-) create mode 100755 drivers/gpu/drm/amd/amdgpu/dimgrey_cavefish_reg_init.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_dccg.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_init.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_init.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.h create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn302.c create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn302.h create mode 100644 drivers/gpu/drm/amd/include/dimgrey_cavefish_ip_offset.h
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/50 drm/amdgpu: add dimgrey_cavefish asic type
From: Tao Zhou <[email protected]>
Add chip type for dimgrey_cavefish.
--- 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
@@ -116,6 +116,7 @@ const char *amdgpu_asic_name[] = {"SIENNA_CICHLID" ,"NAVY_FLOUNDER" ,"VANGOGH" , +"DIMGREY_CAVEFISH" , "LAST", };
include/drm/amd_asic_type.h +1 -0
@@ -57,6 +57,7 @@ enum amd_asic_type {CHIP_SIENNA_CICHLID ,/* 28 */ CHIP_NAVY_FLOUNDER ,/* 29 */ CHIP_VANGOGH ,/* 30 */ +CHIP_DIMGREY_CAVEFISH ,/* 31 */ CHIP_LAST, };
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/50 drm/amdgpu: add dimgrey_cavefish gpu info firmware
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Load gpu info firmware for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -0
@@ -81,6 +81,7 @@ MODULE_FIRMWARE("amdgpu/navi10_gpu_info.bin");MODULE_FIRMWARE ("amdgpu/navi14_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/navi12_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/vangogh_gpu_info.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_gpu_info.bin" );#define AMDGPU_RESUME_MS 2000
@@ -1818,6 +1819,9 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)case CHIP_VANGOGH : chip_name ="vangogh" ;break ; +case CHIP_DIMGREY_CAVEFISH : + chip_name ="dimgrey_cavefish" ; +break ; }snprintf (fw_name,sizeof (fw_name),"amdgpu/%s_gpu_info.bin" , chip_name);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/50 drm/amdgpu: set fw load type for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Use direct load for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +2 -0
@@ -396,6 +396,8 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)return AMDGPU_FW_LOAD_DIRECT ; else return AMDGPU_FW_LOAD_PSP; +case CHIP_DIMGREY_CAVEFISH : +return AMDGPU_FW_LOAD_DIRECT ;default :DRM_ERROR ("Unknown firmware load type\n" ); }
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/50 drm/amdgpu: set asic family and ip blocks for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Same as navi series.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
@@ -1996,6 +1996,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)case CHIP_NAVI12 :case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH :case CHIP_VANGOGH :if (adev->asic_type ==CHIP_VANGOGH ) adev->family =AMDGPU_FAMILY_VGH ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/50 drm/amdgpu: add support for dimgrey_cavefish firmware
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Add support for dimgrey_cavefish cp/rlc firmware.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +10 -0
@@ -176,6 +176,13 @@ MODULE_FIRMWARE("amdgpu/vangogh_mec.bin");MODULE_FIRMWARE ("amdgpu/vangogh_mec2.bin" );MODULE_FIRMWARE ("amdgpu/vangogh_rlc.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_ce.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_pfp.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_me.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_mec.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_mec2.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_rlc.bin" ); +static const struct soc15_reg_golden golden_settings_gc_10_1[] = {SOC15_REG_GOLDEN_VALUE (GC ,0 , mmCB_HW_CONTROL_4,0xffffffff ,0x00400014 ),
@@ -3715,6 +3722,9 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev)case CHIP_VANGOGH : chip_name ="vangogh" ;break ; +case CHIP_DIMGREY_CAVEFISH : + chip_name ="dimgrey_cavefish" ; +break ;default :BUG (); }
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/50 drm/amdgpu: add gmc support for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Same as navy_flounder.
--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +3 -0
@@ -763,6 +763,7 @@ static int gmc_v10_0_mc_init(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :default : adev->gmc.gart_size =512ULL <<20 ;break ;
@@ -829,6 +830,7 @@ static int gmc_v10_0_sw_init(void *handle)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : adev->num_vmhubs =2 ;/* * To fulfill 4-level page support,
@@ -943,6 +945,7 @@ static void gmc_v10_0_init_golden_registers(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :break ;default :break ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/50 drm/amdgpu: add gfx clock gating support for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Set gfx clock gating for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
@@ -7686,6 +7686,7 @@ static int gfx_v10_0_set_clockgating_state(void *handle,case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :gfx_v10_0_update_gfx_clock_gating (adev, state ==AMD_CG_STATE_GATE );break ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/50 drm/amdgpu: add common support for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Add external id and set clock gating for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +6 -0
@@ -891,6 +891,11 @@ static int nv_common_early_init(void *handle) adev->pg_flags =AMD_PG_SUPPORT_GFX_PG ; adev->external_rev_id = adev->rev_id +0x01 ;break ; +case CHIP_DIMGREY_CAVEFISH : + adev->cg_flags =0 ; + adev->pg_flags =0 ; + adev->external_rev_id = adev->rev_id +0x3c ; +break ;default :/* FIXME: not supported yet */ return -EINVAL ;
@@ -1118,6 +1123,7 @@ static int nv_common_set_clockgating_state(void *handle,case CHIP_NAVI12 :case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH : adev->nbio.funcs->update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ); adev->nbio.funcs->update_medium_grain_light_sleep(adev,
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/50 drm/amdgpu: initialize IP offset for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Add ip offset definition for dimgrey_cavefish and initialize it.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- .../amd/amdgpu/dimgrey_cavefish_reg_init.c | 54 + drivers/gpu/drm/amd/amdgpu/nv.c | 3 + drivers/gpu/drm/amd/amdgpu/nv.h | 1 + .../amd/include/dimgrey_cavefish_ip_offset.h | 1049 +++++++++++++++++ 5 files changed, 1108 insertions(+), 1 deletion(-) create mode 100755 drivers/gpu/drm/amd/amdgpu/dimgrey_cavefish_reg_init.c create mode 100644 drivers/gpu/drm/amd/include/dimgrey_cavefish_ip_offset.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
@@ -70,7 +70,7 @@ amdgpu-y += \ vi.o mxgpu_vi.o nbio_v6_1.o soc15.o emu_soc.o mxgpu_ai.o nbio_v7_0.o vega10_reg_init.o \ vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o navi10_reg_init.o navi14_reg_init.o \ arct_reg_init.o navi12_reg_init.o mxgpu_nv.o sienna_cichlid_reg_init.o vangogh_reg_init.o \ - nbio_v7_2.o + nbio_v7_2.o dimgrey_cavefish_reg_init.o # add DF block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/dimgrey_cavefish_reg_init.c new file +54 -0
54 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/nv.c +3 -0
@@ -482,6 +482,9 @@ static int nv_reg_base_init(struct amdgpu_device *adev)case CHIP_VANGOGH :vangogh_reg_base_init (adev);break ; +case CHIP_DIMGREY_CAVEFISH : +dimgrey_cavefish_reg_base_init (adev); +break ;default :return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/nv.h +1 -0
@@ -35,4 +35,5 @@ int navi14_reg_base_init(struct amdgpu_device *adev);int navi12_reg_base_init (struct amdgpu_device *adev);int sienna_cichlid_reg_base_init (struct amdgpu_device *adev);void vangogh_reg_base_init (struct amdgpu_device *adev); +int dimgrey_cavefish_reg_base_init (struct amdgpu_device *adev);#endif
drivers/gpu/drm/amd/include/dimgrey_cavefish_ip_offset.h new file +1049 -0
1,049 lines not on this page · raw message
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/50 drm/amdgpu: add mmhub support for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Same as navy_flounder.
--- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +5 -0
@@ -543,6 +543,7 @@ static void mmhub_v2_0_update_medium_grain_clock_gating(struct amdgpu_device *adswitch (adev->asic_type) {case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH : def = data =RREG32_SOC15 (MMHUB ,0 , mmMM_ATC_L2_MISC_CG_Sienna_Cichlid); def1 = data1 =RREG32_SOC15 (MMHUB ,0 , mmDAGB0_CNTL_MISC2_Sienna_Cichlid);break ;
@@ -576,6 +577,7 @@ static void mmhub_v2_0_update_medium_grain_clock_gating(struct amdgpu_device *adswitch (adev->asic_type) {case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH :if (def != data)WREG32_SOC15 (MMHUB ,0 , mmMM_ATC_L2_MISC_CG_Sienna_Cichlid, data);if (def1 != data1)
@@ -598,6 +600,7 @@ static void mmhub_v2_0_update_medium_grain_light_sleep(struct amdgpu_device *adeswitch (adev->asic_type) {case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH : def = data =RREG32_SOC15 (MMHUB ,0 , mmMM_ATC_L2_MISC_CG_Sienna_Cichlid);break ;default :
@@ -614,6 +617,7 @@ static void mmhub_v2_0_update_medium_grain_light_sleep(struct amdgpu_device *adeswitch (adev->asic_type) {case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH :WREG32_SOC15 (MMHUB ,0 , mmMM_ATC_L2_MISC_CG_Sienna_Cichlid, data);break ;default :
@@ -657,6 +661,7 @@ static void mmhub_v2_0_get_clockgating(struct amdgpu_device *adev, u32 *flags)switch (adev->asic_type) {case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH : data =RREG32_SOC15 (MMHUB ,0 , mmMM_ATC_L2_MISC_CG_Sienna_Cichlid); data1 =RREG32_SOC15 (MMHUB ,0 , mmDAGB0_CNTL_MISC2_Sienna_Cichlid);break ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/50 drm/amdgpu: add common ip block for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Same as navy_flounder.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -0
@@ -626,6 +626,9 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &vcn_v3_0_ip_block);amdgpu_device_ip_block_add (adev, &jpeg_v3_0_ip_block);break ; +case CHIP_DIMGREY_CAVEFISH : +amdgpu_device_ip_block_add (adev, &nv_common_ip_block); +break ;default :return -EINVAL ; }
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/50 drm/amdgpu: add gmc ip block for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Enable gmc block for dimgrey_cavefish, same as sienna_cichlid.
--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/nv.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +1 -0
@@ -648,6 +648,7 @@ static void gmc_v10_0_set_gfxhub_funcs(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : adev->gfxhub.funcs = &gfxhub_v2_1_funcs;break ;default :
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -628,6 +628,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)break ;case CHIP_DIMGREY_CAVEFISH :amdgpu_device_ip_block_add (adev, &nv_common_ip_block); +amdgpu_device_ip_block_add (adev, &gmc_v10_0_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/50 drm/amdgpu: add ih ip block for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Enable ih block for dimgrey_cavefish, same as navy_flounder.
--- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/nv.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/navi10_ih.c +1 -0
@@ -315,6 +315,7 @@ static int navi10_ih_irq_init(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : ih_chicken =RREG32_SOC15 (OSSSYS ,0 , mmIH_CHICKEN_Sienna_Cichlid); ih_chicken =REG_SET_FIELD (ih_chicken,IH_CHICKEN ,MC_SPACE_GPA_ENABLE ,1 );
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -629,6 +629,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)case CHIP_DIMGREY_CAVEFISH :amdgpu_device_ip_block_add (adev, &nv_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v10_0_ip_block); +amdgpu_device_ip_block_add (adev, &navi10_ih_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/50 drm/amdgpu: add gfx ip block for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Enable gfx block for dimgrey_cavefish, same as navy_flounder.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/nv.c | 1 + 2 files changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +4 -0
@@ -4260,6 +4260,7 @@ static void gfx_v10_0_gpu_early_init(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : 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 ;
@@ -4384,6 +4385,7 @@ static int gfx_v10_0_sw_init(void *handle)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : adev->gfx.me.num_me =1 ; adev->gfx.me.num_pipe_per_me =1 ; adev->gfx.me.num_queue_per_pipe =1 ;
@@ -7263,6 +7265,7 @@ static int gfx_v10_0_early_init(void *handle)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : adev->gfx.num_gfx_rings = GFX10_NUM_GFX_RINGS_Sienna_Cichlid;break ;default :
@@ -8790,6 +8793,7 @@ static void gfx_v10_0_set_rlc_funcs(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : adev->gfx.rlc.funcs = &gfx_v10_0_rlc_funcs;break ;case CHIP_NAVI12 :
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -630,6 +630,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &nv_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v10_0_ip_block);amdgpu_device_ip_block_add (adev, &navi10_ih_ip_block); +amdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/50 drm/amdgpu: add sdma ip block for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Enable sdma block for dimgrey_cavefish, same as sienna_cichlid.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -631,6 +631,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &gmc_v10_0_ip_block);amdgpu_device_ip_block_add (adev, &navi10_ih_ip_block);amdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block); +amdgpu_device_ip_block_add (adev, &sdma_v5_2_ip_block);break ;default :return -EINVAL ;
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +9 -2
@@ -46,6 +46,7 @@MODULE_FIRMWARE ("amdgpu/sienna_cichlid_sdma.bin" );MODULE_FIRMWARE ("amdgpu/navy_flounder_sdma.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_sdma.bin" );MODULE_FIRMWARE ("amdgpu/vangogh_sdma.bin" );
@@ -90,6 +91,7 @@ static void sdma_v5_2_init_golden_registers(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :break ;default :break ;
@@ -166,6 +168,9 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)case CHIP_VANGOGH : chip_name ="vangogh" ;break ; +case CHIP_DIMGREY_CAVEFISH : + chip_name ="dimgrey_cavefish" ; +break ;default :BUG (); }
@@ -181,8 +186,8 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev) goto out;for (i =1 ; i < adev->sdma.num_instances; i++) { -if (adev->asic_type ==CHIP_SIENNA_CICHLID || - adev->asic_type ==CHIP_NAVY_FLOUNDER ) { +if (adev->asic_type >=CHIP_SIENNA_CICHLID && + adev->asic_type <=CHIP_DIMGREY_CAVEFISH ) {memcpy ((void *)&adev->sdma.instance[i], (void *)&adev->sdma.instance[0 ],sizeof (struct amdgpu_sdma_instance ));
@@ -1175,6 +1180,7 @@ static int sdma_v5_2_early_init(void *handle) adev->sdma.num_instances =4 ;break ;case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH : adev->sdma.num_instances =2 ;break ;case CHIP_VANGOGH :
@@ -1577,6 +1583,7 @@ static int sdma_v5_2_set_clockgating_state(void *handle,case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :sdma_v5_2_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false); sdma_v5_2_update_medium_grain_light_sleep(adev,
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/50 drm/amdgpu: configure dimgrey_cavefish gfx according to gfx 10.3's definition
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
The gfx version of dimgrey_cavefish is 10.3, identical to sienna_cichlid, follow the way of sienna_cichlid.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +9 -0
@@ -5880,6 +5880,7 @@ static void gfx_v10_0_cp_gfx_set_doorbell(struct amdgpu_device *adev,case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : tmp =REG_SET_FIELD (0 ,CP_RB_DOORBELL_RANGE_LOWER , DOORBELL_RANGE_LOWER_Sienna_Cichlid, ring->doorbell_index);WREG32_SOC15 (GC ,0 , mmCP_RB_DOORBELL_RANGE_LOWER, tmp);
@@ -6014,6 +6015,7 @@ static void gfx_v10_0_cp_compute_enable(struct amdgpu_device *adev, bool enable)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :WREG32_SOC15 (GC ,0 , mmCP_MEC_CNTL_Sienna_Cichlid,0 );break ;default :
@@ -6025,6 +6027,7 @@ static void gfx_v10_0_cp_compute_enable(struct amdgpu_device *adev, bool enable)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :WREG32_SOC15 (GC ,0 , mmCP_MEC_CNTL_Sienna_Cichlid, (CP_MEC_CNTL__MEC_ME1_HALT_MASK |CP_MEC_CNTL__MEC_ME2_HALT_MASK ));
@@ -6120,6 +6123,7 @@ static void gfx_v10_0_kiq_setting(struct amdgpu_ring *ring)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : tmp =RREG32_SOC15 (GC ,0 , mmRLC_CP_SCHEDULERS_Sienna_Cichlid); tmp &=0xffffff00 ; tmp |= (ring->me <<5 ) | (ring->pipe <<3 ) | (ring->queue);
@@ -6828,6 +6832,7 @@ static bool gfx_v10_0_check_grbm_cam_remapping(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH : data =RREG32_SOC15 (GC ,0 , mmVGT_ESGS_RING_SIZE_Sienna_Cichlid);WREG32_SOC15 (GC ,0 , mmVGT_ESGS_RING_SIZE_Sienna_Cichlid,0 );WREG32_SOC15 (GC ,0 , mmVGT_ESGS_RING_SIZE_UMD, pattern);
@@ -6870,6 +6875,7 @@ static void gfx_v10_0_setup_grbm_cam_remapping(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :/* mmVGT_TF_RING_SIZE_UMD -> mmVGT_TF_RING_SIZE */ data = (SOC15_REG_OFFSET (GC ,0 , mmVGT_TF_RING_SIZE_UMD) << GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
@@ -7165,6 +7171,7 @@ static int gfx_v10_0_soft_reset(void *handle)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :if (REG_GET_FIELD (tmp,GRBM_STATUS2 , RLC_BUSY_Sienna_Cichlid)) grbm_soft_reset = REG_SET_FIELD(grbm_soft_reset, GRBM_SOFT_RESET,
@@ -7320,6 +7327,7 @@ static void gfx_v10_0_set_safe_mode(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :WREG32_SOC15 (GC ,0 , mmRLC_SAFE_MODE_Sienna_Cichlid, data);/* wait for RLC_SAFE_MODE */
@@ -7353,6 +7361,7 @@ static void gfx_v10_0_unset_safe_mode(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :WREG32_SOC15 (GC ,0 , mmRLC_SAFE_MODE_Sienna_Cichlid, data);break ;default :
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/50 drm/amdgpu: add virtual display support for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Add virtual ip block for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +2 -0
@@ -630,6 +630,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &nv_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v10_0_ip_block);amdgpu_device_ip_block_add (adev, &navi10_ih_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, &gfx_v10_0_ip_block);amdgpu_device_ip_block_add (adev, &sdma_v5_2_ip_block);break ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/50 drm/amdgpu: force pa_sc_tile_steering_override to 0 for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
pa_sc_tile_steering_override is only programmable for gfx10.0/10.1/10.2, the same as sienna_cichlid.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
@@ -4642,6 +4642,7 @@ static u32 gfx_v10_0_init_pa_sc_tile_steering_override(struct amdgpu_device *ade* pa_sc_tile_steering_override should be set to 0 */ if (adev->asic_type ==CHIP_SIENNA_CICHLID || adev->asic_type ==CHIP_NAVY_FLOUNDER || + adev->asic_type ==CHIP_DIMGREY_CAVEFISH || adev->asic_type ==CHIP_VANGOGH )return 0 ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/50 drm/amdgpu/vcn: add firmware support for dimgrey_cavefish
In reply to Alex DeucherFrom: James Zhu <[email protected]>
Add firmware support for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +5 -0
@@ -45,6 +45,7 @@#define FIRMWARE_SIENNA_CICHLID "amdgpu/sienna_cichlid_vcn.bin"#define FIRMWARE_NAVY_FLOUNDER "amdgpu/navy_flounder_vcn.bin"#define FIRMWARE_VANGOGH "amdgpu/vangogh_vcn.bin" +#define FIRMWARE_DIMGREY_CAVEFISH "amdgpu/dimgrey_cavefish_vcn.bin"MODULE_FIRMWARE (FIRMWARE_RAVEN );MODULE_FIRMWARE (FIRMWARE_PICASSO );
@@ -57,6 +58,7 @@ MODULE_FIRMWARE(FIRMWARE_NAVI12);MODULE_FIRMWARE (FIRMWARE_SIENNA_CICHLID );MODULE_FIRMWARE (FIRMWARE_NAVY_FLOUNDER );MODULE_FIRMWARE (FIRMWARE_VANGOGH ); +MODULE_FIRMWARE (FIRMWARE_DIMGREY_CAVEFISH );static void amdgpu_vcn_idle_work_handler (struct work_struct *work);
@@ -127,6 +129,9 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)break ;case CHIP_VANGOGH : fw_name =FIRMWARE_VANGOGH ; +break ; +case CHIP_DIMGREY_CAVEFISH : + fw_name =FIRMWARE_DIMGREY_CAVEFISH ;if ((adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) && (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG )) adev->vcn.indirect_sram = true;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/50 drm/amdgpu/vcn: enable VCN DPG mode for dimgrey_cavefish
In reply to Alex DeucherFrom: James Zhu <[email protected]>
Enable VCN DPG mode for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -1
@@ -905,7 +905,7 @@ static int nv_common_early_init(void *handle)break ;case CHIP_DIMGREY_CAVEFISH : adev->cg_flags =0 ; - adev->pg_flags =0 ; + adev->pg_flags =AMD_PG_SUPPORT_VCN_DPG ; adev->external_rev_id = adev->rev_id +0x3c ;break ;default :
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/50 drm/amdgpu: add gmc cg support for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
The athub version for dimgrey_cavefish is v2.1.
--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 8 ++++---- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +4 -4
@@ -1107,8 +1107,8 @@ static int gmc_v10_0_set_clockgating_state(void *handle,if (r)return r; -if (adev->asic_type ==CHIP_SIENNA_CICHLID || - adev->asic_type ==CHIP_NAVY_FLOUNDER ) +if (adev->asic_type >=CHIP_SIENNA_CICHLID && + adev->asic_type <=CHIP_DIMGREY_CAVEFISH )return athub_v2_1_set_clockgating (adev, state);else return athub_v2_0_set_clockgating (adev, state);
@@ -1120,8 +1120,8 @@ static void gmc_v10_0_get_clockgating_state(void *handle, u32 *flags) adev->mmhub.funcs->get_clockgating (adev, flags); -if (adev->asic_type ==CHIP_SIENNA_CICHLID || - adev->asic_type ==CHIP_NAVY_FLOUNDER ) +if (adev->asic_type >=CHIP_SIENNA_CICHLID && + adev->asic_type <=CHIP_DIMGREY_CAVEFISH )athub_v2_1_get_clockgating (adev, flags);else athub_v2_0_get_clockgating (adev, flags);
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c +1 -0
@@ -639,6 +639,7 @@ static int mmhub_v2_0_set_clockgating(struct amdgpu_device *adev,case CHIP_NAVI12 :case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH :mmhub_v2_0_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ); mmhub_v2_0_update_medium_grain_light_sleep(adev,
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/50 drm/amdgpu/swsmu: increase size for smu fw_name string
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
A longer chip name needs more space.
v2: define macro for the length of smu fw name
--- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h +1 -0
@@ -31,6 +31,7 @@#define SMU_THERMAL_MINIMUM_ALERT_TEMP 0#define SMU_THERMAL_MAXIMUM_ALERT_TEMP 255#define SMU_TEMPERATURE_UNITS_PER_CENTIGRADES 1000 +#define SMU_FW_NAME_LEN 0x24struct smu_hw_power_state {unsigned int magic;
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +1 -1
@@ -84,7 +84,7 @@ int smu_v11_0_init_microcode(struct smu_context *smu) {struct amdgpu_device *adev = smu->adev;const char *chip_name; -char fw_name[30 ]; +char fw_name[SMU_FW_NAME_LEN ];int err =0 ;const struct smc_firmware_header_v1_0 *hdr;const struct common_firmware_header *header;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 23/50 drm/amdgpu/swsmu: add smu support for dimgrey_cavefish(v2)
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Reuse sienna_cichlid pp table for dimgrey_cavefish.
v2: update related comment.
--- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 1 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 17 ++++++++++++++--- 3 files changed, 16 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +1 -0
@@ -33,6 +33,7 @@#define SMU11_DRIVER_IF_VERSION_Sienna_Cichlid 0x39#define SMU11_DRIVER_IF_VERSION_Navy_Flounder 0x5#define SMU11_DRIVER_IF_VERSION_VANGOGH 0x01 +#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x1/* MP Apertures */ #define MP0_Public 0x03800000
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +1 -0
@@ -397,6 +397,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)break ;case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH :sienna_cichlid_set_ppt_funcs (smu);break ;case CHIP_RENOIR :
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c +14 -3
@@ -62,6 +62,7 @@ MODULE_FIRMWARE("amdgpu/navi14_smc.bin");MODULE_FIRMWARE ("amdgpu/navi12_smc.bin" );MODULE_FIRMWARE ("amdgpu/sienna_cichlid_smc.bin" );MODULE_FIRMWARE ("amdgpu/navy_flounder_smc.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_smc.bin" );#define SMU11_VOLTAGE_SCALE 4
@@ -109,6 +110,9 @@ int smu_v11_0_init_microcode(struct smu_context *smu)case CHIP_NAVY_FLOUNDER : chip_name ="navy_flounder" ;break ; +case CHIP_DIMGREY_CAVEFISH : + chip_name ="dimgrey_cavefish" ; +break ;default :dev_err (adev->dev,"Unsupported ASIC type %d\n" , adev->asic_type);return -EINVAL ;
@@ -247,6 +251,9 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)case CHIP_VANGOGH : smu->smc_driver_if_version =SMU11_DRIVER_IF_VERSION_VANGOGH ;break ; +case CHIP_DIMGREY_CAVEFISH : + smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish; +break ;default :dev_err (smu->adev->dev,"smu unsupported asic type:%d.\n" , smu->adev->asic_type); smu->smc_driver_if_version =SMU11_DRIVER_IF_VERSION_INV ;
@@ -330,7 +337,8 @@ int smu_v11_0_setup_pptable(struct smu_context *smu) version_major =le16_to_cpu (hdr->header.header_version_major); version_minor =le16_to_cpu (hdr->header.header_version_minor);if ((version_major ==2 && smu->smu_table.boot_values.pp_table_id >0 ) || - adev->asic_type ==CHIP_NAVY_FLOUNDER ) { + adev->asic_type ==CHIP_NAVY_FLOUNDER || + adev->asic_type ==CHIP_DIMGREY_CAVEFISH ) {dev_info (adev->dev,"use driver provided pptable %d\n" , smu->smu_table.boot_values.pp_table_id);switch (version_minor) {case 0 :
@@ -702,8 +710,11 @@ int smu_v11_0_init_display_count(struct smu_context *smu, uint32_t count) {struct amdgpu_device *adev = smu->adev; -/* Navy_Flounder do not support to change display num currently */ -if (adev->asic_type ==CHIP_NAVY_FLOUNDER ) +/* Navy_Flounder/Dimgrey_Cavefish do not support to change +* display num currently +*/ +if (adev->asic_type >=CHIP_NAVY_FLOUNDER && + adev->asic_type <=CHIP_DIMGREY_CAVEFISH )return 0 ; return smu_cmn_send_smc_msg_with_param(smu,
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 24/50 drm/amdgpu: increase size of psp fw_name string(v2)
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Increase fw_name string size so longer chip name can be stored.
v2: define macro for the length of psp fw name.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 1 + drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -2
@@ -2384,7 +2384,7 @@ int psp_init_asd_microcode(struct psp_context *psp, const char *chip_name) {struct amdgpu_device *adev = psp->adev; -char fw_name[30 ]; +char fw_name[PSP_FW_NAME_LEN ];const struct psp_firmware_header_v1_0 *asd_hdr;int err =0 ;
@@ -2456,7 +2456,7 @@ int psp_init_sos_microcode(struct psp_context *psp, const char *chip_name) {struct amdgpu_device *adev = psp->adev; -char fw_name[30 ]; +char fw_name[PSP_FW_NAME_LEN ];const struct psp_firmware_header_v1_0 *sos_hdr;const struct psp_firmware_header_v1_1 *sos_hdr_v1_1;const struct psp_firmware_header_v1_2 *sos_hdr_v1_2;
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +1 -0
@@ -41,6 +41,7 @@#define PSP_DTM_SHARED_MEM_SIZE 0x4000#define PSP_RAP_SHARED_MEM_SIZE 0x4000#define PSP_SHARED_MEM_SIZE 0x4000 +#define PSP_FW_NAME_LEN 0x24struct psp_context ;struct psp_xgmi_node_info ;
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +1 -1
@@ -79,7 +79,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp) {struct amdgpu_device *adev = psp->adev;const char *chip_name; -char fw_name[30 ]; +char fw_name[PSP_FW_NAME_LEN ];int err =0 ;const struct ta_firmware_header_v1_0 *ta_hdr;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/50 drm/amdgpu: add psp support for dimgrey_cavefish(v2)
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
General psp support for dimgrey_cavefish.
v2: remove the checks for asd load and reroute ih.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 -2
@@ -101,6 +101,7 @@ static int psp_early_init(void *handle)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :psp_v11_0_set_psp_funcs (psp); psp->autoload_supported = true;break ;
@@ -1968,8 +1969,8 @@ static int psp_np_fw_load(struct psp_context *psp)continue ;if (psp->autoload_supported && - (adev->asic_type ==CHIP_SIENNA_CICHLID || - adev->asic_type ==CHIP_NAVY_FLOUNDER ) && + (adev->asic_type >=CHIP_SIENNA_CICHLID && + adev->asic_type <=CHIP_DIMGREY_CAVEFISH ) && (ucode->ucode_id ==AMDGPU_UCODE_ID_SDMA1 || ucode->ucode_id ==AMDGPU_UCODE_ID_SDMA2 || ucode->ucode_id ==AMDGPU_UCODE_ID_SDMA3 ))
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +13 -0
@@ -61,6 +61,8 @@ MODULE_FIRMWARE("amdgpu/navy_flounder_sos.bin");MODULE_FIRMWARE ("amdgpu/navy_flounder_ta.bin" );MODULE_FIRMWARE ("amdgpu/vangogh_asd.bin" );MODULE_FIRMWARE ("amdgpu/vangogh_toc.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_sos.bin" ); +MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_asd.bin" );/* address block */ #define smnMP1_FIRMWARE_FLAGS 0x3010024
@@ -110,6 +112,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)case CHIP_VANGOGH : chip_name ="vangogh" ;break ; +case CHIP_DIMGREY_CAVEFISH : + chip_name ="dimgrey_cavefish" ; +break ;default :BUG (); }
@@ -194,6 +199,14 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)if (err)return err;break ; +case CHIP_DIMGREY_CAVEFISH : + err =psp_init_sos_microcode (psp, chip_name); +if (err) +return err; + err =psp_init_asd_microcode (psp, chip_name); +if (err) +return err; +break ;case CHIP_VANGOGH : err =psp_init_asd_microcode (psp, chip_name);if (err)
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 26/50 drm/amdgpu: skip reroute ih for some ASICs
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Add check before reroute ih setting, it's not supported by some ASICs.
--- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +2 -2
@@ -438,8 +438,8 @@ static int psp_v11_0_ring_init(struct psp_context *psp,struct amdgpu_device *adev = psp->adev;if ((!amdgpu_sriov_vf (adev)) && - (adev->asic_type !=CHIP_SIENNA_CICHLID ) && - (adev->asic_type !=CHIP_NAVY_FLOUNDER )) + !(adev->asic_type >=CHIP_SIENNA_CICHLID && + adev->asic_type <=CHIP_DIMGREY_CAVEFISH ))psp_v11_0_reroute_ih (psp); ring = &psp->km_ring;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 27/50 drm/amdgpu: support cp_fw_write_wait for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Same as sienna_cichlid, dimgrey_cavefish supports WAIT_REG_MEM packet.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +1 -0
@@ -3617,6 +3617,7 @@ static void gfx_v10_0_check_fw_write_wait(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : adev->gfx.cp_fw_write_wait = true;break ;default :
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 28/50 drm/amdgpu: add gc golden setting for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Add gc golden setting for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +42 -0
@@ -3221,6 +3221,43 @@ static const struct soc15_reg_golden golden_settings_gc_10_3_vangogh[] = SOC15_REG_GOLDEN_VALUE(GC, 0, mmVGT_GS_MAX_WAVE_ID, 0x00000fff, 0x000000ff), }; +static const struct soc15_reg_golden golden_settings_gc_10_3_4[] = +{ +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmCGTT_SPI_RA0_CLK_CTRL,0x30000000 ,0x30000100 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmCGTT_SPI_RA1_CLK_CTRL,0x7e000000 ,0x7e000100 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmCPF_GCR_CNTL,0x0007ffff ,0x0000c000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmDB_DEBUG3,0x00000280 ,0x00000280 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmDB_DEBUG4,0x07800000 ,0x00800000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGCR_GENERAL_CNTL,0x00001d00 ,0x00000500 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGE_PC_CNTL,0x003c0000 ,0x00280400 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGL2A_ADDR_MATCH_MASK,0xffffffff ,0xffffffcf ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGL2C_ADDR_MATCH_MASK,0xffffffff ,0xffffffcf ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGL2C_CM_CTRL1,0x40000000 ,0x580f1008 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmGL2C_CTRL3,0x00040000 ,0x00f80988 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmPA_CL_ENHANCE,0x01000000 ,0x01200007 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmPA_SC_BINNER_TIMEOUT_COUNTER,0xffffffff ,0x00000800 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmPA_SC_ENHANCE_2,0x00000800 ,0x00000820 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_CONFIG,0x0000001f ,0x00180070 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER0_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER1_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER10_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER11_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER12_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER13_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER14_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER15_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER2_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER3_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER4_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER5_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER6_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER7_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER8_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmSQ_PERFCOUNTER9_SELECT,0xf0f001ff ,0x00000000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmTA_CNTL_AUX,0x01030000 ,0x01030000 ), +SOC15_REG_GOLDEN_VALUE (GC ,0 , mmUTCL1_CTRL,0x03a00000 ,0x00a00000 ) +}; +#define DEFAULT_SH_MEM_CONFIG \ ((SH_MEM_ADDRESS_MODE_64 << SH_MEM_CONFIG__ADDRESS_MODE__SHIFT) | \ (SH_MEM_ALIGNMENT_MODE_UNALIGNED << SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT) | \
@@ -3433,6 +3470,11 @@ static void gfx_v10_0_init_golden_registers(struct amdgpu_device *adev) golden_settings_gc_10_3_vangogh, (const u32)ARRAY_SIZE(golden_settings_gc_10_3_vangogh));break ; +case CHIP_DIMGREY_CAVEFISH : +soc15_program_register_sequence (adev, + golden_settings_gc_10_3_4, + (const u32 )ARRAY_SIZE (golden_settings_gc_10_3_4)); +break ;default :break ; }
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 29/50 drm/amdkfd: Support dimgrey_cavefish KFD (v2)
In reply to Alex DeucherFrom: Chengming Gui <[email protected]>
Add KFD support for dimgrey cavefish.
v2: rebase (Alex)
--- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 20 +++++++++++++++++++ .../drm/amd/amdkfd/kfd_device_queue_manager.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 1 + .../gpu/drm/amd/amdkfd/kfd_packet_manager.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 1 + 6 files changed, 25 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -0
@@ -681,6 +681,7 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,case CHIP_NAVI14 :case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH : pcache_info = navi10_cache_info; num_of_cache_types =ARRAY_SIZE (navi10_cache_info);break ;
drivers/gpu/drm/amd/amdkfd/kfd_device.c +20 -0
@@ -517,6 +517,25 @@ static const struct kfd_device_info vangogh_device_info = { .num_sdma_queues_per_engine = 2, }; +static const struct kfd_device_info dimgrey_cavefish_device_info = { + .asic_family =CHIP_DIMGREY_CAVEFISH , + .asic_name ="dimgrey_cavefish" , + .max_pasid_bits =16 , + .max_no_of_hqd =24 , + .doorbell_size =8 , + .ih_ring_entry_size =8 *sizeof (uint32_t ), + .event_interrupt_class = &event_interrupt_class_v9, + .num_of_watch_points =4 , + .mqd_size_aligned =MQD_SIZE_ALIGNED , + .needs_iommu_device = false, + .supports_cwsr = true, + .needs_pci_atomics = false, + .num_sdma_engines =2 , + .num_xgmi_sdma_engines =0 , + .num_sdma_queues_per_engine =8 , +}; + +/* For each entry, [0] is regular and [1] is virtualisation device. */ static const struct kfd_device_info *kfd_supported_devices[][2 ] = { #ifdef KFD_SUPPORT_IOMMU_V2
@@ -542,6 +561,7 @@ static const struct kfd_device_info *kfd_supported_devices[][2] = { [CHIP_SIENNA_CICHLID] = {&sienna_cichlid_device_info, &sienna_cichlid_device_info}, [CHIP_NAVY_FLOUNDER] = {&navy_flounder_device_info, &navy_flounder_device_info}, [CHIP_VANGOGH] = {&vangogh_device_info, NULL}, + [CHIP_DIMGREY_CAVEFISH] = {&dimgrey_cavefish_device_info, &dimgrey_cavefish_device_info}, }; static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size,
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +1 -0
@@ -1926,6 +1926,7 @@ struct device_queue_manager *device_queue_manager_init(struct kfd_dev *dev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :device_queue_manager_init_v10_navi10 (&dqm->asic_ops);break ;default :
drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c +1 -0
@@ -418,6 +418,7 @@ int kfd_init_apertures(struct kfd_process *process)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :kfd_init_apertures_v9 (pdd, id);break ;default :
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c +1 -0
@@ -248,6 +248,7 @@ int pm_init(struct packet_manager *pm, struct device_queue_manager *dqm)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : pm->pmf = &kfd_v9_pm_funcs;break ;default :
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +1 -0
@@ -1376,6 +1376,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH : dev->node_props.capability |= ((HSA_CAP_DOORBELL_TYPE_2_0 <<HSA_CAP_DOORBELL_TYPE_TOTALBITS_SHIFT ) &HSA_CAP_DOORBELL_TYPE_TOTALBITS_MASK );
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 30/50 drm/amdkfd: Add kfd2kgd_funcs for dimgrey_cavefish kfd support
In reply to Alex DeucherFrom: Chengming Gui <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +1 -0
@@ -77,6 +77,7 @@ static const struct kfd2kgd_calls *kfd2kgd_funcs[] = { [CHIP_SIENNA_CICHLID] = &gfx_v10_3_kfd2kgd, [CHIP_NAVY_FLOUNDER] = &gfx_v10_3_kfd2kgd, [CHIP_VANGOGH] = &gfx_v10_3_kfd2kgd, + [CHIP_DIMGREY_CAVEFISH] = &gfx_v10_3_kfd2kgd, };#ifdef KFD_SUPPORT_IOMMU_V2
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 31/50 drm/amdgpu: enable VCN3.0 PG and CG for dimgrey_cavefish
In reply to Alex DeucherFrom: James Zhu <[email protected]>
Enable VCN3.0 PG and CG for dimgrey_cavefish
--- drivers/gpu/drm/amd/amdgpu/nv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -2
@@ -904,8 +904,9 @@ static int nv_common_early_init(void *handle) adev->external_rev_id = adev->rev_id +0x01 ;break ;case CHIP_DIMGREY_CAVEFISH : - adev->cg_flags =0 ; - adev->pg_flags =AMD_PG_SUPPORT_VCN_DPG ; + adev->cg_flags =AMD_CG_SUPPORT_VCN_MGCG ; + adev->pg_flags =AMD_PG_SUPPORT_VCN | +AMD_PG_SUPPORT_VCN_DPG ; adev->external_rev_id = adev->rev_id +0x3c ;break ;default :
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 32/50 drm/amdgpu: enable jpeg3.0 PG and CG for dimgrey_cavefish
In reply to Alex DeucherFrom: James Zhu <[email protected]>
Enable JPEG3.0 PG and CG for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +4 -2
@@ -904,9 +904,11 @@ static int nv_common_early_init(void *handle) adev->external_rev_id = adev->rev_id +0x01 ;break ;case CHIP_DIMGREY_CAVEFISH : - adev->cg_flags =AMD_CG_SUPPORT_VCN_MGCG ; + adev->cg_flags =AMD_CG_SUPPORT_VCN_MGCG | +AMD_CG_SUPPORT_JPEG_MGCG ; adev->pg_flags =AMD_PG_SUPPORT_VCN | -AMD_PG_SUPPORT_VCN_DPG ; +AMD_PG_SUPPORT_VCN_DPG | +AMD_PG_SUPPORT_JPEG ; adev->external_rev_id = adev->rev_id +0x3c ;break ;default :
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 33/50 drm/amdgpu: enable front door loading for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Support both back and front door loading for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +1 -2
@@ -392,12 +392,11 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :case CHIP_VANGOGH : +case CHIP_DIMGREY_CAVEFISH :if (!load_type)return AMDGPU_FW_LOAD_DIRECT ;else return AMDGPU_FW_LOAD_PSP ; -case CHIP_DIMGREY_CAVEFISH : -return AMDGPU_FW_LOAD_DIRECT ;default :DRM_ERROR ("Unknown firmware load type\n" ); }
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 34/50 drm/amdgpu: support athub cg setting for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Same as navy_flounder, the athub ip of dimgrey_cavefish is v2.1.
--- drivers/gpu/drm/amd/amdgpu/athub_v2_1.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/athub_v2_1.c +1 -0
@@ -74,6 +74,7 @@ int athub_v2_1_set_clockgating(struct amdgpu_device *adev,switch (adev->asic_type) {case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH :athub_v2_1_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false); athub_v2_1_update_medium_grain_light_sleep(adev,
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 35/50 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Update driver if version according to PMFW with version 0x003B0100.
--- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +1 -1
@@ -33,7 +33,7 @@#define SMU11_DRIVER_IF_VERSION_Sienna_Cichlid 0x39#define SMU11_DRIVER_IF_VERSION_Navy_Flounder 0x5#define SMU11_DRIVER_IF_VERSION_VANGOGH 0x01 -#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x1 +#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x4/* MP Apertures */ #define MP0_Public 0x03800000
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 36/50 drm/amdgpu: enable GFX clock gating for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Enable GFX MGCG, CGCG and 3DCG for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nv.c +4 -1
@@ -904,7 +904,10 @@ static int nv_common_early_init(void *handle) adev->external_rev_id = adev->rev_id +0x01 ;break ;case CHIP_DIMGREY_CAVEFISH : - adev->cg_flags =AMD_CG_SUPPORT_VCN_MGCG | + adev->cg_flags =AMD_CG_SUPPORT_GFX_MGCG | +AMD_CG_SUPPORT_GFX_CGCG | +AMD_CG_SUPPORT_GFX_3D_CGCG | +AMD_CG_SUPPORT_VCN_MGCG |AMD_CG_SUPPORT_JPEG_MGCG ; adev->pg_flags =AMD_PG_SUPPORT_VCN | AMD_PG_SUPPORT_VCN_DPG |
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 37/50 drm/amdgpu: enable mc CG and LS for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Set mc CG and LS flag for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -1
@@ -908,7 +908,9 @@ static int nv_common_early_init(void *handle)AMD_CG_SUPPORT_GFX_CGCG |AMD_CG_SUPPORT_GFX_3D_CGCG |AMD_CG_SUPPORT_VCN_MGCG | -AMD_CG_SUPPORT_JPEG_MGCG ; +AMD_CG_SUPPORT_JPEG_MGCG | +AMD_CG_SUPPORT_MC_MGCG | +AMD_CG_SUPPORT_MC_LS ; adev->pg_flags =AMD_PG_SUPPORT_VCN |AMD_PG_SUPPORT_VCN_DPG |AMD_PG_SUPPORT_JPEG ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 38/50 drm/amdgpu: enable athub/mmhub PG for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Set athub/mmhub PG flag for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -1
@@ -913,7 +913,9 @@ static int nv_common_early_init(void *handle)AMD_CG_SUPPORT_MC_LS ; adev->pg_flags =AMD_PG_SUPPORT_VCN |AMD_PG_SUPPORT_VCN_DPG | -AMD_PG_SUPPORT_JPEG ; +AMD_PG_SUPPORT_JPEG | +AMD_PG_SUPPORT_ATHUB | +AMD_PG_SUPPORT_MMHUB ; adev->external_rev_id = adev->rev_id +0x3c ;break ;default :
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 39/50 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Update driver if version from 0x4 to 0x5 for dimgrey_cavefish, per PMFW 59.02.0.
--- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +1 -1
@@ -33,7 +33,7 @@#define SMU11_DRIVER_IF_VERSION_Sienna_Cichlid 0x39#define SMU11_DRIVER_IF_VERSION_Navy_Flounder 0x5#define SMU11_DRIVER_IF_VERSION_VANGOGH 0x01 -#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x4 +#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x5/* MP Apertures */ #define MP0_Public 0x03800000
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 40/50 drm/amdgpu: enable vcn3.0 for dimgrey_cavefis
In reply to Alex DeucherFrom: James Zhu <[email protected]>
Enable vcn3.0 ip block for dimgrey_cavefis.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -634,6 +634,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block);amdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block);amdgpu_device_ip_block_add (adev, &sdma_v5_2_ip_block); +amdgpu_device_ip_block_add (adev, &vcn_v3_0_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 41/50 drm/amdgpu: enable jpeg3.0 for dimgrey_cavefish
In reply to Alex DeucherFrom: James Zhu <[email protected]>
Enable jpeg3.0 ip block for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
@@ -635,6 +635,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &gfx_v10_0_ip_block);amdgpu_device_ip_block_add (adev, &sdma_v5_2_ip_block);amdgpu_device_ip_block_add (adev, &vcn_v3_0_ip_block); +amdgpu_device_ip_block_add (adev, &jpeg_v3_0_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 42/50 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Update driver if version from 0x5 to 0x6 for dimgrey_cavefish, per PMFW 59.04.0.
--- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +1 -1
@@ -33,7 +33,7 @@#define SMU11_DRIVER_IF_VERSION_Sienna_Cichlid 0x39#define SMU11_DRIVER_IF_VERSION_Navy_Flounder 0x5#define SMU11_DRIVER_IF_VERSION_VANGOGH 0x01 -#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x5 +#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x6/* MP Apertures */ #define MP0_Public 0x03800000
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 43/50 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish(v2)
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Per PMFW 59.5.0.
v2: refine subject and commit message, fix typo
--- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +1 -1
@@ -33,7 +33,7 @@#define SMU11_DRIVER_IF_VERSION_Sienna_Cichlid 0x39#define SMU11_DRIVER_IF_VERSION_Navy_Flounder 0x5#define SMU11_DRIVER_IF_VERSION_VANGOGH 0x01 -#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x6 +#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x7/* MP Apertures */ #define MP0_Public 0x03800000
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 44/50 drm/amdgpu: add psp and smu block for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Add psp and smu block for dimgrey_cavefish with psp firmware load type.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +5 -0
@@ -630,6 +630,11 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &nv_common_ip_block);amdgpu_device_ip_block_add (adev, &gmc_v10_0_ip_block);amdgpu_device_ip_block_add (adev, &navi10_ih_ip_block); +if (likely (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP )) +amdgpu_device_ip_block_add (adev, &psp_v11_0_ip_block); +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP && +is_support_sw_smu (adev)) +amdgpu_device_ip_block_add (adev, &smu_v11_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, &gfx_v10_0_ip_block);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 45/50 drm/amdgpu: enable hdp CG and LS for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Set hdp CG and LS flag for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -1
@@ -917,7 +917,9 @@ static int nv_common_early_init(void *handle)AMD_CG_SUPPORT_VCN_MGCG |AMD_CG_SUPPORT_JPEG_MGCG |AMD_CG_SUPPORT_MC_MGCG | -AMD_CG_SUPPORT_MC_LS ; +AMD_CG_SUPPORT_MC_LS | +AMD_CG_SUPPORT_HDP_MGCG | +AMD_CG_SUPPORT_HDP_LS ; adev->pg_flags =AMD_PG_SUPPORT_VCN |AMD_PG_SUPPORT_VCN_DPG | AMD_PG_SUPPORT_JPEG |
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 46/50 drm/amdgpu: enable ih CG for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Set ih CG flag for dimgrey_cavefish.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/nv.c +2 -1
@@ -919,7 +919,8 @@ static int nv_common_early_init(void *handle)AMD_CG_SUPPORT_MC_MGCG |AMD_CG_SUPPORT_MC_LS |AMD_CG_SUPPORT_HDP_MGCG | -AMD_CG_SUPPORT_HDP_LS ; +AMD_CG_SUPPORT_HDP_LS | +AMD_CG_SUPPORT_IH_CG ; adev->pg_flags =AMD_PG_SUPPORT_VCN |AMD_PG_SUPPORT_VCN_DPG | AMD_PG_SUPPORT_JPEG |
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 47/50 drm/amdgpu: remove gpu_info fw support for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Remove gpu_info fw support for dimgrey_cavefish, gpu info can be got from ip discovery.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -4
@@ -81,7 +81,6 @@ MODULE_FIRMWARE("amdgpu/navi10_gpu_info.bin");MODULE_FIRMWARE ("amdgpu/navi14_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/navi12_gpu_info.bin" );MODULE_FIRMWARE ("amdgpu/vangogh_gpu_info.bin" ); -MODULE_FIRMWARE ("amdgpu/dimgrey_cavefish_gpu_info.bin" );#define AMDGPU_RESUME_MS 2000
@@ -1785,6 +1784,7 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)case CHIP_VEGA20 :case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER : +case CHIP_DIMGREY_CAVEFISH :default :return 0 ;case CHIP_VEGA10 :
@@ -1819,9 +1819,6 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)case CHIP_VANGOGH : chip_name ="vangogh" ;break ; -case CHIP_DIMGREY_CAVEFISH : - chip_name ="dimgrey_cavefish" ; -break ; }snprintf (fw_name,sizeof (fw_name),"amdgpu/%s_gpu_info.bin" , chip_name);
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 48/50 drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish
In reply to Alex DeucherFrom: Tao Zhou <[email protected]>
Per PMFW 59.7.0.
--- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h +1 -1
@@ -33,7 +33,7 @@#define SMU11_DRIVER_IF_VERSION_Sienna_Cichlid 0x39#define SMU11_DRIVER_IF_VERSION_Navy_Flounder 0x5#define SMU11_DRIVER_IF_VERSION_VANGOGH 0x01 -#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x7 +#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x9/* MP Apertures */ #define MP0_Public 0x03800000
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 49/50 drm/amd/display: Add support for DCN302 (v2)
In reply to Alex DeucherFrom: Bhawanpreet Lakha <[email protected]>
- add DCN302 resource, irq service, dmub loader,
- handle DC_VERSION_DCN_3_02
- define DCN302 power gating functions
- handle DCN302 in GPIO files
- define I2C regs
- add CONFIG_DRM_AMD_DC_DCN3_02 guard
v2: rebase fixes (Alex)
--- drivers/gpu/drm/amd/display/Kconfig | 7 + drivers/gpu/drm/amd/display/dc/Makefile | 5 + .../display/dc/bios/command_table_helper2.c | 5 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 6 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 13 + .../drm/amd/display/dc/dce/dce_clock_source.h | 20 + .../gpu/drm/amd/display/dc/dce/dce_hwseq.h | 134 ++ .../gpu/drm/amd/display/dc/dcn302/Makefile | 17 + .../drm/amd/display/dc/dcn302/dcn302_dccg.h | 41 + .../drm/amd/display/dc/dcn302/dcn302_hwseq.c | 233 +++ .../drm/amd/display/dc/dcn302/dcn302_hwseq.h | 35 + .../drm/amd/display/dc/dcn302/dcn302_init.c | 39 + .../drm/amd/display/dc/dcn302/dcn302_init.h | 33 + .../amd/display/dc/dcn302/dcn302_resource.c | 1619 +++++++++++++++++ .../amd/display/dc/dcn302/dcn302_resource.h | 33 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 3 + .../drm/amd/display/dc/gpio/hw_translate.c | 3 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + .../dc/irq/dcn302/irq_service_dcn302.c | 344 ++++ .../dc/irq/dcn302/irq_service_dcn302.h | 33 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 3 + drivers/gpu/drm/amd/display/dmub/src/Makefile | 3 + .../drm/amd/display/dmub/src/dmub_dcn302.c | 55 + .../drm/amd/display/dmub/src/dmub_dcn302.h | 37 + .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 14 + .../gpu/drm/amd/display/include/dal_asic_id.h | 6 +- .../gpu/drm/amd/display/include/dal_types.h | 3 + 27 files changed, 2753 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_dccg.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_init.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_init.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.h create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn302.c create mode 100644 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn302.h
drivers/gpu/drm/amd/display/Kconfig +7 -0
@@ -34,6 +34,13 @@ config DRM_AMD_DC_DCN3_01 Choose this option if you want to have Van Gogh support for display engine +config DRM_AMD_DC_DCN3_02 + bool "DCN 3.02 family" + depends on DRM_AMD_DC_DCN3_0 + help + Choose this option if you want to have + Dimgrey_cavefish support for display engine + config DRM_AMD_DC_HDCP bool "Enable HDCP support in DC" depends on DRM_AMD_DC
drivers/gpu/drm/amd/display/dc/Makefile +5 -0
@@ -40,6 +40,11 @@ ifdef CONFIG_DRM_AMD_DC_DCN3_01 DC_LIBS += dcn301 endif +ifdef CONFIG_DRM_AMD_DC_DCN3_02 +DC_LIBS += dcn302 + +endif + DC_LIBS += dce120 DC_LIBS += dce112
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +5 -0
@@ -82,6 +82,11 @@ bool dal_bios_parser_init_cmd_tbl_helper2(case DCN_VERSION_3_01 : *h =dal_cmd_tbl_helper_dce112_get_table2 ();return true; +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case DCN_VERSION_3_02 : + *h =dal_cmd_tbl_helper_dce112_get_table2 (); +return true;#endif default :/* Unsupported DCE */
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +6 -0
@@ -186,6 +186,12 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *pdcn3_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); break; } +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +if (ASICREV_IS_DIMGREY_CAVEFISH_P (asic_id.hw_internal_rev)) { +dcn3_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); +break ; + } +#endif #endif dcn20_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg);break ;
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +13 -0
@@ -61,6 +61,9 @@#if defined(CONFIG_DRM_AMD_DC_DCN3_01 )#include "../dcn301/dcn301_resource.h" #endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +#include "../dcn302/dcn302_resource.h" +#endif #define DC_LOGGER_INIT (logger)
@@ -131,6 +134,10 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)#if defined(CONFIG_DRM_AMD_DC_DCN3_0 )if (ASICREV_IS_SIENNA_CICHLID_P (asic_id.hw_internal_rev)) dc_version =DCN_VERSION_3_0 ; +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +if (ASICREV_IS_DIMGREY_CAVEFISH_P (asic_id.hw_internal_rev)) + dc_version =DCN_VERSION_3_02 ;#endif break ;
@@ -223,6 +230,12 @@ struct resource_pool *dc_create_resource_pool(struct dc *dc,case DCN_VERSION_3_01 : res_pool =dcn301_create_resource_pool (init_data, dc);break ; +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case DCN_VERSION_3_02 : + res_pool =dcn302_create_resource_pool (init_data, dc); +break ; +#endif default :break ;
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h +20 -0
@@ -125,6 +125,26 @@ SRII(PIXEL_RATE_CNTL, OTG, 3)#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +#define CS_COMMON_REG_LIST_DCN3_02 (index, pllid) \ + SRI(PIXCLK_RESYNC_CNTL, PHYPLL, pllid),\ + SRII(PHASE, DP_DTO, 0),\ + SRII(PHASE, DP_DTO, 1),\ + SRII(PHASE, DP_DTO, 2),\ + SRII(PHASE, DP_DTO, 3),\ + SRII(PHASE, DP_DTO, 4),\ + SRII(MODULO, DP_DTO, 0),\ + SRII(MODULO, DP_DTO, 1),\ + SRII(MODULO, DP_DTO, 2),\ + SRII(MODULO, DP_DTO, 3),\ + SRII(MODULO, DP_DTO, 4),\ + SRII(PIXEL_RATE_CNTL, OTG, 0),\ + SRII(PIXEL_RATE_CNTL, OTG, 1),\ + SRII(PIXEL_RATE_CNTL, OTG, 2),\ + SRII(PIXEL_RATE_CNTL, OTG, 3),\ + SRII(PIXEL_RATE_CNTL, OTG, 4) + +#endif #define CS_COMMON_MASK_SH_LIST_DCN2_0 (mask_sh)\ CS_SF(DP_DTO0_PHASE, DP_DTO0_PHASE, mask_sh),\ CS_SF(DP_DTO0_MODULO, DP_DTO0_MODULO, mask_sh),\
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +134 -0
146 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn302/Makefile new file +17 -0
@@ -0,0 +1,17 @@ +# +# (c) Copyright 2020 Advanced Micro Devices, Inc. All the rights reserved +# +# All rights reserved. This notice is intended as a precaution against +# inadvertent publication and does not imply publication or any waiver +# of confidentiality. The year included in the foregoing notice is the +# year of creation of the work. +# +# Authors: AMD +# +# Makefile for dcn302. + +DCN3_02 = dcn302_init.o dcn302_hwseq.o dcn302_resource.o + +AMD_DAL_DCN3_02 = $(addprefix $(AMDDALPATH)/dc/dcn302/,$(DCN3_02)) + +AMD_DISPLAY_FILES += $(AMD_DAL_DCN3_02)
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_dccg.h new file +41 -0
41 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.c new file +233 -0
233 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright 2020 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. +* +* Authors: AMD +* +*/ + +#ifndef __DC_HWSS_DCN302_H__ +#define __DC_HWSS_DCN302_H__ + +#include "hw_sequencer_private.h" + +void dcn302_dpp_pg_control (struct dce_hwseq *hws,unsigned int dpp_inst,bool power_on); +void dcn302_hubp_pg_control (struct dce_hwseq *hws,unsigned int hubp_inst,bool power_on); +void dcn302_dsc_pg_control (struct dce_hwseq *hws,unsigned int dsc_inst,bool power_on); + +#endif /* __DC_HWSS_DCN302_H__ */
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_init.c new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright 2020 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. +* +* Authors: AMD +* +*/ + +#include "dcn302_hwseq.h" + +#include "dcn30/dcn30_init.h" + +#include "dc.h" + +void dcn302_hw_sequencer_construct (struct dc *dc) +{ +dcn30_hw_sequencer_construct (dc); + + dc->hwseq->funcs.dpp_pg_control = dcn302_dpp_pg_control; + dc->hwseq->funcs.hubp_pg_control = dcn302_hubp_pg_control; + dc->hwseq->funcs.dsc_pg_control = dcn302_dsc_pg_control; +}
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_init.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright 2020 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. +* +* Authors: AMD +* +*/ + +#ifndef __DC_DCN302_INIT_H__ +#define __DC_DCN302_INIT_H__ + +struct dc ; + +void dcn302_hw_sequencer_construct (struct dc *dc); + +#endif /* __DC_DCN302_INIT_H__ */
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.c new file +1619 -0
1,619 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_resource.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright 2020 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. +* +* Authors: AMD +* +*/ + +#ifndef _DCN302_RESOURCE_H_ +#define _DCN302_RESOURCE_H_ + +#include "core_types.h" + +struct resource_pool *dcn302_create_resource_pool (const struct dc_init_data *init_data,struct dc *dc); + +#endif /* _DCN302_RESOURCE_H_ */
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +3 -0
@@ -116,6 +116,9 @@ bool dal_hw_factory_init(case DCN_VERSION_3_0 :#if defined(CONFIG_DRM_AMD_DC_DCN3_01 )case DCN_VERSION_3_01 : +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case DCN_VERSION_3_02 :#endif dal_hw_factory_dcn30_init (factory);return true;
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +3 -0
@@ -111,6 +111,9 @@ bool dal_hw_translate_init(case DCN_VERSION_3_0 :#if defined(CONFIG_DRM_AMD_DC_DCN3_01 )case DCN_VERSION_3_01 : +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case DCN_VERSION_3_02 :#endif dal_hw_translate_dcn30_init (translate);return true;
drivers/gpu/drm/amd/display/dc/irq/Makefile +10 -0
@@ -104,3 +104,13 @@ AMD_DAL_IRQ_DCN3 = $(addprefix $(AMDDALPATH)/dc/irq/dcn30/,$(IRQ_DCN3)) AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCN3) endif +ifdef CONFIG_DRM_AMD_DC_DCN3_02 +############################################################################### +# DCN 3_02 +############################################################################### +IRQ_DCN3_02 = irq_service_dcn302.o + +AMD_DAL_IRQ_DCN3_02 = $(addprefix $(AMDDALPATH)/dc/irq/dcn302/,$(IRQ_DCN3_02)) + +AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCN3_02) +endif
drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.c new file +344 -0
344 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/irq/dcn302/irq_service_dcn302.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright 2020 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. +* +* Authors: AMD +* +*/ + +#ifndef __DAL_IRQ_SERVICE_DCN302_H__ +#define __DAL_IRQ_SERVICE_DCN302_H__ + +#include "../irq_service.h" + +struct irq_service *dal_irq_service_dcn302_create (struct irq_service_init_data *init_data); + +#endif /* __DAL_IRQ_SERVICE_DCN302_H__ */
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +3 -0
@@ -93,6 +93,9 @@ enum dmub_asic {#endif #ifdef CONFIG_DRM_AMD_DC_DCN3_01 DMUB_ASIC_DCN301, +#endif +#ifdef CONFIG_DRM_AMD_DC_DCN3_02 +DMUB_ASIC_DCN302 , #endif DMUB_ASIC_MAX, };
drivers/gpu/drm/amd/display/dmub/src/Makefile +3 -0
@@ -24,6 +24,9 @@ DMUB = dmub_srv.o dmub_reg.o dmub_dcn20.o dmub_dcn21.o ifdef CONFIG_DRM_AMD_DC_DCN3_0 DMUB += dmub_dcn30.o dmub_dcn301.o endif +ifdef CONFIG_DRM_AMD_DC_DCN3_02 +DMUB += dmub_dcn302.o +endif AMD_DAL_DMUB = $(addprefix $(AMDDALPATH)/dmub/src/,$(DMUB))
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn302.c new file +55 -0
55 lines not on this page · raw message
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn302.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* Copyright 2020 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. +* +* Authors: AMD +* +*/ + +#ifndef _DMUB_DCN302_H_ +#define _DMUB_DCN302_H_ + +#include "dmub_dcn20.h" + +/* Registers. */ + +extern const struct dmub_srv_common_regs dmub_srv_dcn302_regs; + +/* Hardware functions. */ + +#endif /* _DMUB_DCN302_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +14 -0
@@ -33,6 +33,9 @@#ifdef CONFIG_DRM_AMD_DC_DCN3_01 #include "dmub_dcn301.h" #endif +#ifdef CONFIG_DRM_AMD_DC_DCN3_02 +#include "dmub_dcn302.h" +#endif #include "os_types.h" /* * Note: the DMUB service is standalone. No additional headers should be
@@ -144,6 +147,9 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)#endif #ifdef CONFIG_DRM_AMD_DC_DCN3_01 case DMUB_ASIC_DCN301 : +#endif +#ifdef CONFIG_DRM_AMD_DC_DCN3_02 +case DMUB_ASIC_DCN302 :#endif dmub->regs = &dmub_srv_dcn20_regs;
@@ -183,6 +189,14 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic) funcs->setup_windows = dmub_dcn30_setup_windows; }#endif +#ifdef CONFIG_DRM_AMD_DC_DCN3_02 +if (asic ==DMUB_ASIC_DCN302 ) { + dmub->regs = &dmub_srv_dcn302_regs; + + funcs->backdoor_load = dmub_dcn30_backdoor_load; + funcs->setup_windows = dmub_dcn30_setup_windows; + } +#endif break ;default :
drivers/gpu/drm/amd/display/include/dal_asic_id.h +5 -1
@@ -195,6 +195,7 @@ enum {NV_NAVI12_P_A0 =10 ,NV_NAVI14_M_A0 =20 ,NV_SIENNA_CICHLID_P_A0 =40 , +NV_DIMGREY_CAVEFISH_P_A0 =60 , NV_UNKNOWN = 0xFF };
@@ -203,7 +204,10 @@ enum {#define ASICREV_IS_NAVI14_M (eChipRev) ((eChipRev >= NV_NAVI14_M_A0) && (eChipRev < NV_UNKNOWN))#define ASICREV_IS_RENOIR (eChipRev) ((eChipRev >= RENOIR_A0) && (eChipRev < RAVEN1_F0))#if defined(CONFIG_DRM_AMD_DC_DCN3_0 ) -#define ASICREV_IS_SIENNA_CICHLID_P (eChipRev) ((eChipRev >= NV_SIENNA_CICHLID_P_A0)) +#define ASICREV_IS_SIENNA_CICHLID_P (eChipRev) ((eChipRev >= NV_SIENNA_CICHLID_P_A0) && (eChipRev < NV_DIMGREY_CAVEFISH_P_A0)) +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +#define ASICREV_IS_DIMGREY_CAVEFISH_P (eChipRev) ((eChipRev >= NV_DIMGREY_CAVEFISH_P_A0) && (eChipRev < NV_UNKNOWN))#endif #if defined(CONFIG_DRM_AMD_DC_DCN3_01 )#define FAMILY_VGH 144
drivers/gpu/drm/amd/display/include/dal_types.h +3 -0
@@ -56,6 +56,9 @@ enum dce_version {#endif #if defined(CONFIG_DRM_AMD_DC_DCN3_01 ) DCN_VERSION_3_01, +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +DCN_VERSION_3_02 , #endifDCN_VERSION_MAX };
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 50/50 drm/amd/display: Add DCN302 support in amdgpu_dm (v2)
In reply to Alex DeucherFrom: Bhawanpreet Lakha <[email protected]>
Handle CAVE_DIMGREY_CAVEFISH in amdgpu_dm
v2: fix rebase typo (Alex)
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +24 -1
@@ -104,6 +104,10 @@ MODULE_FIRMWARE(FIRMWARE_NAVY_FLOUNDER_DMUB);#define FIRMWARE_VANGOGH_DMUB "amdgpu/vangogh_dmcub.bin"MODULE_FIRMWARE (FIRMWARE_VANGOGH_DMUB );#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +#define FIRMWARE_DIMGREY_CAVEFISH_DMUB "amdgpu/dimgrey_cavefish_dmcub.bin" +MODULE_FIRMWARE (FIRMWARE_DIMGREY_CAVEFISH_DMUB ); +#endif #define FIRMWARE_RAVEN_DMCU "amdgpu/raven_dmcu.bin"MODULE_FIRMWARE (FIRMWARE_RAVEN_DMCU );
@@ -1140,6 +1144,9 @@ static int load_dmcu_fw(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case CHIP_DIMGREY_CAVEFISH : +#endif #if defined(CONFIG_DRM_AMD_DC_DCN3_01 )case CHIP_VANGOGH :#endif
@@ -1255,6 +1262,12 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) fw_name_dmub =FIRMWARE_VANGOGH_DMUB ;break ;#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case CHIP_DIMGREY_CAVEFISH : + dmub_asic =DMUB_ASIC_DCN302 ; + fw_name_dmub =FIRMWARE_DIMGREY_CAVEFISH_DMUB ; +break ; +#endif default :/* ASIC doesn't support DMUB. */
@@ -3376,6 +3389,9 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)case CHIP_SIENNA_CICHLID :case CHIP_NAVY_FLOUNDER :#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case CHIP_DIMGREY_CAVEFISH : +#endif #if defined(CONFIG_DRM_AMD_DC_DCN3_01 )case CHIP_VANGOGH :#endif
@@ -3633,6 +3649,9 @@ static int dm_early_init(void *handle)break ;#endif case CHIP_NAVI14 : +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) +case CHIP_DIMGREY_CAVEFISH : +#endif adev->mode_info.num_crtc =5 ; adev->mode_info.num_hpd =5 ; adev->mode_info.num_dig =5 ;
@@ -3952,6 +3971,9 @@ fill_plane_buffer_attributes(struct amdgpu_device *adev, adev->asic_type == CHIP_SIENNA_CICHLID || adev->asic_type == CHIP_NAVY_FLOUNDER ||#endif +#if defined(CONFIG_DRM_AMD_DC_DCN3_02 ) + adev->asic_type == CHIP_DIMGREY_CAVEFISH || +#endif #if defined(CONFIG_DRM_AMD_DC_DCN3_01 ) adev->asic_type == CHIP_VANGOGH ||#endif
@@ -3976,7 +3998,8 @@ fill_plane_buffer_attributes(struct amdgpu_device *adev,#ifdef CONFIG_DRM_AMD_DC_DCN3_0 if (adev->asic_type ==CHIP_SIENNA_CICHLID || - adev->asic_type ==CHIP_NAVY_FLOUNDER ) + adev->asic_type ==CHIP_NAVY_FLOUNDER || + adev->asic_type ==CHIP_DIMGREY_CAVEFISH ) tiling_info->gfx9.num_pkrs = adev->gfx.config.gb_addr_config_fields.num_pkrs;#endif ret = fill_plane_dcc_attributes(adev, afb, format, rotation,
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx