Raven Support
Subsystems (8)
cover Raven Support
This patch set adds support for the new "Raven" APU.
The first 12 patches add support for the new ACP audio hardware on Raven. Patches 11 and 12 are not meant for upstream, they are for early hardware testing. The rest add GPU support. Patches 17-24 are register headers (which are relatively large), so I'm not sending them out.
You can view the whole patch set here:
https://cgit.freedesktop.org/~agd5f/linux/log/?h=raven
Alex Deucher (12):
drm/amdgpu: add gpu_info firmware (v3) drm/amdgpu: parse the gpu_info firmware (v4) drm/amdgpu/gfx9: drop duplicate gfx info init (v3) drm/amdgpu: add register headers for DCN 1.0 drm/amdgpu: add register headers for GC 9.1 drm/amdgpu: add register headers for MMHUB 9.1 drm/amdgpu: add register headers for MP 10.0 drm/amdgpu: add register headers for NBIO 7.0 drm/amdgpu: add register headers for SDMA 4.1 drm/amdgpu: add register headers for THM 10.0 drm/amdgpu: add register headers for VCN 1.0 drm/amdgpu/raven: power up/down VCN via the SMU (v2)
Andrey Grodzovsky (1):
drm/amd: Add DCN ivsrcids (v2)
Chunming Zhou (17):
drm/amdgpu: add RAVEN family id definition
drm/amdgpu: add Raven ip blocks
drm/amdgpu/soc15: add Raven golden setting
drm/amdgpu: add Raven chip id case for ucode
drm/amdgpu: add module firmware for raven
drm/amdgpu: add gc9.1 golden setting (v2) drm/amdgpu/gfx9: add chip name for raven when initializing microcode drm/amdgpu/gfx9: add raven gfx config
drm/amdgpu: add raven case for gmc9 golden setting drm/amdgpu/gmc9: set mc vm fb offset for raven drm/amdgpu/gmc9: change fb offset sequence so that used wider drm/amdgpu: add Raven sdma golden setting and chip id case drm/amdgpu: add nbio7 support
drm/amdgpu: apply nbio7 for Raven (v3) drm/amd/powerplay/rv: power up/down sdma via the SMU drm/amdgpu/powerplay/raven: add smu block and enable powerplay drm/amdgpu: add RAVEN pci id
Harry Wentland (7):
drm/amdgpu/display: Add calcs code for DCN drm/amdgpu/display: Add core dc support for DCN drm/amdgpu/display: Add dml support for DCN drm/amdgpu/display: Add gpio support for DCN drm/amdgpu/display: Add i2c/aux support for DCN drm/amdgpu/display: Add irq support for DCN drm/amdgpu/display: Enable DCN in DC
Hawking Zhang (13):
drm/amd/amdgpu: fill in raven case in soc15 early init drm/amdgpu/gfx9: extend rlc fw setup
drm/amdgpu/gfx9: enable cp interrupt for CGCG/CGLS/MGCG drm/amdgpu: correct gfx9 csb size
drm/amdgpu/gfx9: add rlc bo init/fini
drm/amdgpu/gfx9: rlc save&restore list programming drm/amdgpu: init gfx power gating on raven drm/amdgpu/gfx9: enable/disable sck slowdown thru rlc-smu handshake drm/amdgpu/gfx9: add enable/disable funcs for cp power gating drm/amdgpu/gfx9: allow updating sck slowdown and cp pg state drm/amdgpu/gfx9: allow updating gfx cgpg state drm/amdgpu/gfx9: allow updating gfx mgpg state drm/amdgpu: enable dcn1.0 dc support on raven
Huang Rui (17):
drm/amdgpu/soc15: add clock gating functions for raven drm/amdgpu: enable soc15 clock gating flags for raven drm/amdgpu: add gfx clock gating for raven
drm/amdgpu: add raven clock gating and light sleep for mmhub drm/amdgpu: enable MC MGCG and LS for raven drm/amdgpu: reuse sdma v4 MGCG and LS function for raven drm/amdgpu: enable sdma v4 MGCG and LS for raven drm/amdgpu: init sdma power gating for raven drm/amdgpu/sdma4: add dynamic power gating for raven drm/amdgpu: enable sdma power gating for raven drm/amdgpu: add nbio MGCG for raven
drm/amdgpu: add psp v10 function callback for raven drm/amdgpu: add psp v10 ip block
drm/amdgpu: register the psp v10 function pointers at psp sw_init drm/amdgpu/soc15: add psp ip block
drm/amdgpu/vcn: add sw clock gating
drm/amdgpu: enable sw clock gating for vcn
Leo Liu (32):
drm/amdgpu: add initial vcn support and decode tests drm/amdgpu: add encode tests for vcn
drm/amdgpu: add vcn ip block functions (v2)
drm/amdgpu: add vcn decode ring support
drm/amdgpu: add vcn decode ring type and functions drm/amdgpu: add vcn irq functions
drm/amdgpu: add vcn ip block and type
drm/amdgpu: move amdgpu_vcn structure to vcn header drm/amdgpu: re-group the functions in amdgpu_vcn.c drm/amdgpu: move vcn ring test to amdgpu_vcn.c drm/amdgpu: expose vcn RB command
drm/amdgpu: add a ring func for vcn start command drm/amdgpu: implement vcn start RB command
drm/amdgpu: implement insert end ring function for vcn decode drm/amdgpu/vcn: implement ib tests with new message buffer interface uapi/drm: add AMDGPU_HW_IP_VCN_DEC for decode CS uapi/drm: add AMDGPU_HW_IP_VCN_ENC for encode CS drm/amdgpu: add AMDGPU_HW_IP_VCN_DEC to info query drm/amdgpu: get cs support of AMDGPU_HW_IP_VCN_DEC drm/amdgpu: Disable uvd and vce free handles for raven drm/amdgpu: implement new vcn cache window programming drm/amdgpu: add vcn ip block to soc15
drm/amdgpu: change vcn dec rb command specific for decode drm/amdgpu: add vcn enc rings
drm/amdgpu: add vcn enc ring type and functions drm/amdgpu: add vcn enc irq support
drm/amdgpu: enable vcn encode ring tests
drm/amdgpu: add vcn enc ib test
drm/amdgpu: add AMDGPU_HW_IP_VCN_ENC to info query drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC drm/amdgpu: add vcn firmware header offset
drm/amdgpu: update vcn decode create msg
Maruthi Srinivas Bayyavarapu (12):
ASoC: AMD: add ACP 3.x IP register header
ASoC: AMD: add ACP3.0 PCI driver
ASoC: AMD: create ACP3x PCM platform device
ASoC: AMD: add ACP3x PCM platform driver
ASoC: AMD: handle ACP3x i2s watermark interrupt
ASoC: AMD: add ACP3x PCM driver DMA ops
ASoC: AMD: add ACP3x i2s ops
ASoC: AMD: add ACP3x TDM mode support
ASoC: AMD: Add ACP3x runtime pm ops
ASoC: AMD: Add ACP3x system resume pm op
ASoC: AMD: enable ACP3x drivers build
ASoC: AMD: create/add dummy codec and machine devices/drivers
Rex Zhu (5):
drm/amdgpu/powerplay: add header file for smu10. (v2) drm/amdgpu: add raven related define in pptable.h. drm/amd/powerplay: add ppt_v3 define drm/amd/powerplay: add raven support in smumgr. (v2) drm/amd/powerplay: add raven support in hwmgr. (v2)
Vijendar Mukunda (1):
soc/amd/raven: Disabling TDM mode flag
drivers/gpu/drm/amd/amdgpu/Makefile | 10 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 16 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 12 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 111 +- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 23 +- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 16 + drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 5 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 30 + drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 25 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 654 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 77 + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 793 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 5 + drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 25 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 50 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 220 + drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h | 49 + drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 309 + drivers/gpu/drm/amd/amdgpu/psp_v10_0.h | 41 + drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 128 +- drivers/gpu/drm/amd/amdgpu/soc15.c | 103 +- drivers/gpu/drm/amd/amdgpu/soc15.h | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1190 + drivers/gpu/drm/amd/amdgpu/vcn_v1_0.h | 29 + drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 10 +- drivers/gpu/drm/amd/display/Kconfig | 7 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 167 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_types.c | 3 +- drivers/gpu/drm/amd/display/dc/Makefile | 5 + .../amd/display/dc/bios/command_table_helper2.c | 5 + drivers/gpu/drm/amd/display/dc/calcs/Makefile | 8 + .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c | 3629 + .../gpu/drm/amd/display/dc/calcs/dcn_calc_auto.h | 37 + .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.c | 104 + .../gpu/drm/amd/display/dc/calcs/dcn_calc_math.h | 40 + drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c | 1366 + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 19 + drivers/gpu/drm/amd/display/dc/dc.h | 18 + drivers/gpu/drm/amd/display/dc/dce/dce_abm.h | 49 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.c | 31 + .../gpu/drm/amd/display/dc/dce/dce_clock_source.h | 21 + drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c | 15 + drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h | 9 + drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 245 + drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h | 21 + drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 15 + .../gpu/drm/amd/display/dc/dce/dce_link_encoder.h | 16 +- .../drm/amd/display/dc/dce/dce_stream_encoder.c | 264 + .../drm/amd/display/dc/dce/dce_stream_encoder.h | 69 + .../amd/display/dc/dce110/dce110_hw_sequencer.c | 29 + drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 10 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 1866 + .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h | 38 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c | 883 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h | 549 + .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c | 1102 + .../gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h | 553 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 376 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h | 135 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c | 801 + drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h | 622 + .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1475 + .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.h | 47 + .../amd/display/dc/dcn10/dcn10_timing_generator.c | 1202 + .../amd/display/dc/dcn10/dcn10_timing_generator.h | 335 + .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.c | 1057 + .../gpu/drm/amd/display/dc/dcn10/dcn10_transform.h | 416 + drivers/gpu/drm/amd/display/dc/dm_services.h | 4 + drivers/gpu/drm/amd/display/dc/dm_services_types.h | 1 + drivers/gpu/drm/amd/display/dc/dml/Makefile | 22 + drivers/gpu/drm/amd/display/dc/dml/dc_features.h | 557 + .../drm/amd/display/dc/dml/display_mode_enums.h | 111 + .../gpu/drm/amd/display/dc/dml/display_mode_lib.c | 147 + .../gpu/drm/amd/display/dc/dml/display_mode_lib.h | 52 + .../drm/amd/display/dc/dml/display_mode_structs.h | 429 + .../drm/amd/display/dc/dml/display_mode_support.c | 2326 + .../drm/amd/display/dc/dml/display_mode_support.h | 199 + .../drm/amd/display/dc/dml/display_pipe_clocks.c | 367 + .../drm/amd/display/dc/dml/display_pipe_clocks.h | 41 + .../drm/amd/display/dc/dml/display_rq_dlg_calc.c | 2254 + .../drm/amd/display/dc/dml/display_rq_dlg_calc.h | 139 + .../amd/display/dc/dml/display_rq_dlg_helpers.c | 320 + .../amd/display/dc/dml/display_rq_dlg_helpers.h | 66 + .../gpu/drm/amd/display/dc/dml/display_watermark.c | 1281 + .../gpu/drm/amd/display/dc/dml/display_watermark.h | 98 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.c | 148 + .../gpu/drm/amd/display/dc/dml/dml_common_defs.h | 51 + .../gpu/drm/amd/display/dc/dml/soc_bounding_box.c | 73 + .../gpu/drm/amd/display/dc/dml/soc_bounding_box.h | 36 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 11 + .../amd/display/dc/gpio/dcn10/hw_factory_dcn10.c | 192 + .../amd/display/dc/gpio/dcn10/hw_factory_dcn10.h | 32 + .../amd/display/dc/gpio/dcn10/hw_translate_dcn10.c | 408 + .../amd/display/dc/gpio/dcn10/hw_translate_dcn10.h | 34 + drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c | 9 +- drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c | 9 + drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 11 + .../drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c | 125 + .../drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.h | 32 + drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c | 8 + drivers/gpu/drm/amd/display/dc/inc/core_dc.h | 5 + drivers/gpu/drm/amd/display/dc/inc/core_types.h | 26 + drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h | 629 + .../gpu/drm/amd/display/dc/inc/hw/display_clock.h | 7 + drivers/gpu/drm/amd/display/dc/inc/hw/ipp.h | 1 + drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 41 + drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h | 110 + drivers/gpu/drm/amd/display/dc/inc/hw/opp.h | 1 + .../drm/amd/display/dc/inc/hw/timing_generator.h | 16 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + .../amd/display/dc/irq/dcn10/irq_service_dcn10.c | 361 + .../amd/display/dc/irq/dcn10/irq_service_dcn10.h | 34 + drivers/gpu/drm/amd/display/dc/irq/irq_service.c | 5 + drivers/gpu/drm/amd/display/include/dal_asic_id.h | 13 + drivers/gpu/drm/amd/display/include/dal_types.h | 5 +- drivers/gpu/drm/amd/include/amd_shared.h | 4 +- .../include/asic_reg/raven1/DCN/dcn_1_0_default.h | 7988 ++ .../include/asic_reg/raven1/DCN/dcn_1_0_offset.h | 14087 +++ .../include/asic_reg/raven1/DCN/dcn_1_0_sh_mask.h | 54316 ++++++++ .../include/asic_reg/raven1/GC/gc_9_1_default.h | 4005 + .../amd/include/asic_reg/raven1/GC/gc_9_1_offset.h | 7491 ++ .../include/asic_reg/raven1/GC/gc_9_1_sh_mask.h | 31191 +++++ .../asic_reg/raven1/MMHUB/mmhub_9_1_default.h | 1028 + .../asic_reg/raven1/MMHUB/mmhub_9_1_offset.h | 1999 + .../asic_reg/raven1/MMHUB/mmhub_9_1_sh_mask.h | 9790 ++ .../include/asic_reg/raven1/MP/mp_10_0_default.h | 182 + .../include/asic_reg/raven1/MP/mp_10_0_offset.h | 336 + .../include/asic_reg/raven1/MP/mp_10_0_sh_mask.h | 886 + .../asic_reg/raven1/NBIO/nbio_7_0_default.h | 14865 +++ .../include/asic_reg/raven1/NBIO/nbio_7_0_offset.h | 4640 + .../asic_reg/raven1/NBIO/nbio_7_0_sh_mask.h | 118945 ++++++++++++++++++ .../asic_reg/raven1/SDMA0/sdma0_4_1_default.h | 242 + .../asic_reg/raven1/SDMA0/sdma0_4_1_offset.h | 459 + .../asic_reg/raven1/SDMA0/sdma0_4_1_sh_mask.h | 1658 + .../include/asic_reg/raven1/THM/thm_10_0_default.h | 141 + .../include/asic_reg/raven1/THM/thm_10_0_offset.h | 257 + .../include/asic_reg/raven1/THM/thm_10_0_sh_mask.h | 885 + .../include/asic_reg/raven1/VCN/vcn_1_0_default.h | 202 + .../include/asic_reg/raven1/VCN/vcn_1_0_offset.h | 376 + .../include/asic_reg/raven1/VCN/vcn_1_0_sh_mask.h | 1308 + .../gpu/drm/amd/include/ivsrcid/irqsrcs_dcn_1_0.h | 1134 + drivers/gpu/drm/amd/include/pptable.h | 57 +- drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 9 + .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 4 + drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 974 + drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h | 295 + drivers/gpu/drm/amd/powerplay/hwmgr/rv_inc.h | 43 + drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 3 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 7 +- drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h | 76 + drivers/gpu/drm/amd/powerplay/inc/smu10.h | 188 + .../gpu/drm/amd/powerplay/inc/smu10_driver_if.h | 116 + drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 399 + drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 62 + drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 9 + include/uapi/drm/amdgpu_drm.h | 5 +- sound/soc/amd/Kconfig | 4 + sound/soc/amd/Makefile | 1 + sound/soc/amd/raven/Makefile | 8 + sound/soc/amd/raven/acp3x-dummy5102.c | 136 + sound/soc/amd/raven/acp3x-pcm-dma.c | 805 + sound/soc/amd/raven/acp3x.h | 34 + sound/soc/amd/raven/chip_offset_byte.h | 655 + sound/soc/amd/raven/dummy-w5102.c | 102 + sound/soc/amd/raven/pci-acp3x.c | 189 + 175 files changed, 314946 insertions(+), 121 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v10_0.h create mode 100644 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.h create mode 100644 drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.c create mode 100644 drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_auto.h create mode 100644 drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.c create mode 100644 drivers/gpu/drm/amd/display/dc/calcs/dcn_calc_math.h create mode 100644 drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_ipp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mem_input.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_opp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_timing_generator.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_transform.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_transform.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dc_features.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_mode_enums.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_mode_support.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_mode_support.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_rq_dlg_calc.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_rq_dlg_calc.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_rq_dlg_helpers.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_rq_dlg_helpers.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_watermark.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_watermark.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/soc_bounding_box.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/soc_bounding_box.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn10/hw_factory_dcn10.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn10/hw_factory_dcn10.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn10/hw_translate_dcn10.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn10/hw_translate_dcn10.h create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.c create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dcn10/i2caux_dcn10.h create mode 100644 drivers/gpu/drm/amd/display/dc/inc/dcn_calcs.h create mode 100644 drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn10/irq_service_dcn10.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/DCN/dcn_1_0_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/DCN/dcn_1_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/DCN/dcn_1_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/GC/gc_9_1_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/GC/gc_9_1_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/GC/gc_9_1_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/MMHUB/mmhub_9_1_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/MMHUB/mmhub_9_1_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/MMHUB/mmhub_9_1_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/MP/mp_10_0_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/MP/mp_10_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/MP/mp_10_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/NBIO/nbio_7_0_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/NBIO/nbio_7_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/NBIO/nbio_7_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/SDMA0/sdma0_4_1_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/SDMA0/sdma0_4_1_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/SDMA0/sdma0_4_1_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/THM/thm_10_0_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/THM/thm_10_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/THM/thm_10_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/VCN/vcn_1_0_default.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/VCN/vcn_1_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/raven1/VCN/vcn_1_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/irqsrcs_dcn_1_0.h create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/rv_inc.h create mode 100644 drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu10.h create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu10_driver_if.h create mode 100644 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c create mode 100644 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h create mode 100644 sound/soc/amd/raven/Makefile create mode 100644 sound/soc/amd/raven/acp3x-dummy5102.c create mode 100644 sound/soc/amd/raven/acp3x-pcm-dma.c create mode 100644 sound/soc/amd/raven/acp3x.h create mode 100644 sound/soc/amd/raven/chip_offset_byte.h create mode 100644 sound/soc/amd/raven/dummy-w5102.c create mode 100644 sound/soc/amd/raven/pci-acp3x.c
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1494442068-8202-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 1/117 ASoC: AMD: add ACP 3.x IP register header
From: Maruthi Srinivas Bayyavarapu <[email protected]>
ACP 3.x is a new audio block in raven. Added register header of the same.
--- sound/soc/amd/raven/chip_offset_byte.h | 655 +++++++++++++++++++++++++++++++++ 1 file changed, 655 insertions(+) create mode 100644 sound/soc/amd/raven/chip_offset_byte.h
sound/soc/amd/raven/chip_offset_byte.h new file +655 -0
@@ -0,0 +1,655 @@ +/* +* ACP 3.0 Register documentation +* +* Copyright (C) 2016 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) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +#ifndef _acp_ip_OFFSET_HEADER +#define _acp_ip_OFFSET_HEADER +// Registers from ACP_DMA block + +#define mmACP_DMA_CNTL_0 0x1240000 +#define mmACP_DMA_CNTL_1 0x1240004 +#define mmACP_DMA_CNTL_2 0x1240008 +#define mmACP_DMA_CNTL_3 0x124000C +#define mmACP_DMA_CNTL_4 0x1240010 +#define mmACP_DMA_CNTL_5 0x1240014 +#define mmACP_DMA_CNTL_6 0x1240018 +#define mmACP_DMA_CNTL_7 0x124001C +#define mmACP_DMA_DSCR_STRT_IDX_0 0x1240020 +#define mmACP_DMA_DSCR_STRT_IDX_1 0x1240024 +#define mmACP_DMA_DSCR_STRT_IDX_2 0x1240028 +#define mmACP_DMA_DSCR_STRT_IDX_3 0x124002C +#define mmACP_DMA_DSCR_STRT_IDX_4 0x1240030 +#define mmACP_DMA_DSCR_STRT_IDX_5 0x1240034 +#define mmACP_DMA_DSCR_STRT_IDX_6 0x1240038 +#define mmACP_DMA_DSCR_STRT_IDX_7 0x124003C +#define mmACP_DMA_DSCR_CNT_0 0x1240040 +#define mmACP_DMA_DSCR_CNT_1 0x1240044 +#define mmACP_DMA_DSCR_CNT_2 0x1240048 +#define mmACP_DMA_DSCR_CNT_3 0x124004C +#define mmACP_DMA_DSCR_CNT_4 0x1240050 +#define mmACP_DMA_DSCR_CNT_5 0x1240054 +#define mmACP_DMA_DSCR_CNT_6 0x1240058 +#define mmACP_DMA_DSCR_CNT_7 0x124005C +#define mmACP_DMA_PRIO_0 0x1240060 +#define mmACP_DMA_PRIO_1 0x1240064 +#define mmACP_DMA_PRIO_2 0x1240068 +#define mmACP_DMA_PRIO_3 0x124006C +#define mmACP_DMA_PRIO_4 0x1240070 +#define mmACP_DMA_PRIO_5 0x1240074 +#define mmACP_DMA_PRIO_6 0x1240078 +#define mmACP_DMA_PRIO_7 0x124007C +#define mmACP_DMA_CUR_DSCR_0 0x1240080 +#define mmACP_DMA_CUR_DSCR_1 0x1240084 +#define mmACP_DMA_CUR_DSCR_2 0x1240088 +#define mmACP_DMA_CUR_DSCR_3 0x124008C +#define mmACP_DMA_CUR_DSCR_4 0x1240090 +#define mmACP_DMA_CUR_DSCR_5 0x1240094 +#define mmACP_DMA_CUR_DSCR_6 0x1240098 +#define mmACP_DMA_CUR_DSCR_7 0x124009C +#define mmACP_DMA_CUR_TRANS_CNT_0 0x12400A0 +#define mmACP_DMA_CUR_TRANS_CNT_1 0x12400A4 +#define mmACP_DMA_CUR_TRANS_CNT_2 0x12400A8 +#define mmACP_DMA_CUR_TRANS_CNT_3 0x12400AC +#define mmACP_DMA_CUR_TRANS_CNT_4 0x12400B0 +#define mmACP_DMA_CUR_TRANS_CNT_5 0x12400B4 +#define mmACP_DMA_CUR_TRANS_CNT_6 0x12400B8 +#define mmACP_DMA_CUR_TRANS_CNT_7 0x12400BC +#define mmACP_DMA_ERR_STS_0 0x12400C0 +#define mmACP_DMA_ERR_STS_1 0x12400C4 +#define mmACP_DMA_ERR_STS_2 0x12400C8 +#define mmACP_DMA_ERR_STS_3 0x12400CC +#define mmACP_DMA_ERR_STS_4 0x12400D0 +#define mmACP_DMA_ERR_STS_5 0x12400D4 +#define mmACP_DMA_ERR_STS_6 0x12400D8 +#define mmACP_DMA_ERR_STS_7 0x12400DC +#define mmACP_DMA_DESC_BASE_ADDR 0x12400E0 +#define mmACP_DMA_DESC_MAX_NUM_DSCR 0x12400E4 +#define mmACP_DMA_CH_STS 0x12400E8 +#define mmACP_DMA_CH_GROUP 0x12400EC +#define mmACP_DMA_CH_RST_STS 0x12400F0 + + +// Registers from ACP_AXI2AXIATU block + +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1 0x1240C00 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1 0x1240C04 +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_2 0x1240C08 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_2 0x1240C0C +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_3 0x1240C10 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_3 0x1240C14 +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_4 0x1240C18 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_4 0x1240C1C +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_5 0x1240C20 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_5 0x1240C24 +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_6 0x1240C28 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_6 0x1240C2C +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_7 0x1240C30 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_7 0x1240C34 +#define mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_8 0x1240C38 +#define mmACPAXI2AXI_ATU_BASE_ADDR_GRP_8 0x1240C3C +#define mmACPAXI2AXI_ATU_CTRL 0x1240C40 + + +// Registers from ACP_CLKRST block + +#define mmACP_SOFT_RESET 0x1241000 +#define mmACP_CONTROL 0x1241004 +#define mmACP_STATUS 0x1241008 +#define mmACP_DSP0_OCD_HALT_ON_RST 0x124100C +#define mmACP_DYNAMIC_CG_MASTER_CONTROL 0x1241010 + + +// Registers from ACP_MISC block + +#define mmACP_EXTERNAL_INTR_ENB 0x1241800 +#define mmACP_EXTERNAL_INTR_CNTL 0x1241804 +#define mmACP_EXTERNAL_INTR_STAT 0x1241808 +#define mmACP_DSP0_INTR_CNTL 0x124180C +#define mmACP_DSP0_INTR_STAT 0x1241810 +#define mmACP_DSP_SW_INTR_CNTL 0x1241814 +#define mmACP_DSP_SW_INTR_STAT 0x1241818 +#define mmACP_SW_INTR_TRIG 0x124181C +#define mmACP_SMU_MAILBOX 0x1241820 +#define mmDSP_INTERRUPT_ROUTING_CTRL 0x1241824 +#define mmACP_DSP0_WATCHDOG_TIMER_CNTL 0x1241828 +#define mmACP_DSP0_EXT_TIMER1_CNTL 0x124182C +#define mmACP_DSP0_EXT_TIMER2_CNTL 0x1241830 +#define mmACP_DSP0_EXT_TIMER3_CNTL 0x1241834 +#define mmACP_DSP0_EXT_TIMER4_CNTL 0x1241838 +#define mmACP_DSP0_EXT_TIMER5_CNTL 0x124183C +#define mmACP_DSP0_EXT_TIMER6_CNTL 0x1241840 +#define mmACP_DSP0_EXT_TIMER1_CURR_VALUE 0x1241844 +#define mmACP_DSP0_EXT_TIMER2_CURR_VALUE 0x1241848 +#define mmACP_DSP0_EXT_TIMER3_CURR_VALUE 0x124184C +#define mmACP_DSP0_EXT_TIMER4_CURR_VALUE 0x1241850 +#define mmACP_DSP0_EXT_TIMER5_CURR_VALUE 0x1241854 +#define mmACP_DSP0_EXT_TIMER6_CURR_VALUE 0x1241858 +#define mmACP_FW_STATUS 0x124185C +#define mmACP_TIMER 0x1241874 +#define mmACP_TIMER_CNTL 0x1241878 +#define mmACP_PGMEM_CTRL 0x12418C0 +#define mmACP_ERROR_STATUS 0x12418C4 +#define mmACP_SW_I2S_ERROR_REASON 0x12418C8 +#define mmACP_MEM_PG_STS 0x12418CC + + +// Registers from ACP_PGFSM block + +#define mmACP_I2S_PIN_CONFIG 0x1241400 +#define mmACP_PAD_PULLUP_PULLDOWN_CTRL 0x1241404 +#define mmACP_PAD_DRIVE_STRENGTH_CTRL 0x1241408 +#define mmACP_SW_PAD_KEEPER_EN 0x124140C +#define mmACP_SW_WAKE_EN 0x1241410 +#define mmACP_I2S_WAKE_EN 0x1241414 +#define mmACP_PME_EN 0x1241418 +#define mmACP_PGFSM_CONTROL 0x124141C +#define mmACP_PGFSM_STATUS 0x1241420 + + +// Registers from ACP_SCRATCH block + +#define mmACP_SCRATCH_REG_0 0x1250000 +#define mmACP_SCRATCH_REG_1 0x1250004 +#define mmACP_SCRATCH_REG_2 0x1250008 +#define mmACP_SCRATCH_REG_3 0x125000C +#define mmACP_SCRATCH_REG_4 0x1250010 +#define mmACP_SCRATCH_REG_5 0x1250014 +#define mmACP_SCRATCH_REG_6 0x1250018 +#define mmACP_SCRATCH_REG_7 0x125001C +#define mmACP_SCRATCH_REG_8 0x1250020 +#define mmACP_SCRATCH_REG_9 0x1250024 +#define mmACP_SCRATCH_REG_10 0x1250028 +#define mmACP_SCRATCH_REG_11 0x125002C +#define mmACP_SCRATCH_REG_12 0x1250030 +#define mmACP_SCRATCH_REG_13 0x1250034 +#define mmACP_SCRATCH_REG_14 0x1250038 +#define mmACP_SCRATCH_REG_15 0x125003C +#define mmACP_SCRATCH_REG_16 0x1250040 +#define mmACP_SCRATCH_REG_17 0x1250044 +#define mmACP_SCRATCH_REG_18 0x1250048 +#define mmACP_SCRATCH_REG_19 0x125004C +#define mmACP_SCRATCH_REG_20 0x1250050 +#define mmACP_SCRATCH_REG_21 0x1250054 +#define mmACP_SCRATCH_REG_22 0x1250058 +#define mmACP_SCRATCH_REG_23 0x125005C +#define mmACP_SCRATCH_REG_24 0x1250060 +#define mmACP_SCRATCH_REG_25 0x1250064 +#define mmACP_SCRATCH_REG_26 0x1250068 +#define mmACP_SCRATCH_REG_27 0x125006C +#define mmACP_SCRATCH_REG_28 0x1250070 +#define mmACP_SCRATCH_REG_29 0x1250074 +#define mmACP_SCRATCH_REG_30 0x1250078 +#define mmACP_SCRATCH_REG_31 0x125007C +#define mmACP_SCRATCH_REG_32 0x1250080 +#define mmACP_SCRATCH_REG_33 0x1250084 +#define mmACP_SCRATCH_REG_34 0x1250088 +#define mmACP_SCRATCH_REG_35 0x125008C +#define mmACP_SCRATCH_REG_36 0x1250090 +#define mmACP_SCRATCH_REG_37 0x1250094 +#define mmACP_SCRATCH_REG_38 0x1250098 +#define mmACP_SCRATCH_REG_39 0x125009C +#define mmACP_SCRATCH_REG_40 0x12500A0 +#define mmACP_SCRATCH_REG_41 0x12500A4 +#define mmACP_SCRATCH_REG_42 0x12500A8 +#define mmACP_SCRATCH_REG_43 0x12500AC +#define mmACP_SCRATCH_REG_44 0x12500B0 +#define mmACP_SCRATCH_REG_45 0x12500B4 +#define mmACP_SCRATCH_REG_46 0x12500B8 +#define mmACP_SCRATCH_REG_47 0x12500BC +#define mmACP_SCRATCH_REG_48 0x12500C0 +#define mmACP_SCRATCH_REG_49 0x12500C4 +#define mmACP_SCRATCH_REG_50 0x12500C8 +#define mmACP_SCRATCH_REG_51 0x12500CC +#define mmACP_SCRATCH_REG_52 0x12500D0 +#define mmACP_SCRATCH_REG_53 0x12500D4 +#define mmACP_SCRATCH_REG_54 0x12500D8 +#define mmACP_SCRATCH_REG_55 0x12500DC +#define mmACP_SCRATCH_REG_56 0x12500E0 +#define mmACP_SCRATCH_REG_57 0x12500E4 +#define mmACP_SCRATCH_REG_58 0x12500E8 +#define mmACP_SCRATCH_REG_59 0x12500EC +#define mmACP_SCRATCH_REG_60 0x12500F0 +#define mmACP_SCRATCH_REG_61 0x12500F4 +#define mmACP_SCRATCH_REG_62 0x12500F8 +#define mmACP_SCRATCH_REG_63 0x12500FC +#define mmACP_SCRATCH_REG_64 0x1250100 +#define mmACP_SCRATCH_REG_65 0x1250104 +#define mmACP_SCRATCH_REG_66 0x1250108 +#define mmACP_SCRATCH_REG_67 0x125010C +#define mmACP_SCRATCH_REG_68 0x1250110 +#define mmACP_SCRATCH_REG_69 0x1250114 +#define mmACP_SCRATCH_REG_70 0x1250118 +#define mmACP_SCRATCH_REG_71 0x125011C +#define mmACP_SCRATCH_REG_72 0x1250120 +#define mmACP_SCRATCH_REG_73 0x1250124 +#define mmACP_SCRATCH_REG_74 0x1250128 +#define mmACP_SCRATCH_REG_75 0x125012C +#define mmACP_SCRATCH_REG_76 0x1250130 +#define mmACP_SCRATCH_REG_77 0x1250134 +#define mmACP_SCRATCH_REG_78 0x1250138 +#define mmACP_SCRATCH_REG_79 0x125013C +#define mmACP_SCRATCH_REG_80 0x1250140 +#define mmACP_SCRATCH_REG_81 0x1250144 +#define mmACP_SCRATCH_REG_82 0x1250148 +#define mmACP_SCRATCH_REG_83 0x125014C +#define mmACP_SCRATCH_REG_84 0x1250150 +#define mmACP_SCRATCH_REG_85 0x1250154 +#define mmACP_SCRATCH_REG_86 0x1250158 +#define mmACP_SCRATCH_REG_87 0x125015C +#define mmACP_SCRATCH_REG_88 0x1250160 +#define mmACP_SCRATCH_REG_89 0x1250164 +#define mmACP_SCRATCH_REG_90 0x1250168 +#define mmACP_SCRATCH_REG_91 0x125016C +#define mmACP_SCRATCH_REG_92 0x1250170 +#define mmACP_SCRATCH_REG_93 0x1250174 +#define mmACP_SCRATCH_REG_94 0x1250178 +#define mmACP_SCRATCH_REG_95 0x125017C +#define mmACP_SCRATCH_REG_96 0x1250180 +#define mmACP_SCRATCH_REG_97 0x1250184 +#define mmACP_SCRATCH_REG_98 0x1250188 +#define mmACP_SCRATCH_REG_99 0x125018C +#define mmACP_SCRATCH_REG_100 0x1250190 +#define mmACP_SCRATCH_REG_101 0x1250194 +#define mmACP_SCRATCH_REG_102 0x1250198 +#define mmACP_SCRATCH_REG_103 0x125019C +#define mmACP_SCRATCH_REG_104 0x12501A0 +#define mmACP_SCRATCH_REG_105 0x12501A4 +#define mmACP_SCRATCH_REG_106 0x12501A8 +#define mmACP_SCRATCH_REG_107 0x12501AC +#define mmACP_SCRATCH_REG_108 0x12501B0 +#define mmACP_SCRATCH_REG_109 0x12501B4 +#define mmACP_SCRATCH_REG_110 0x12501B8 +#define mmACP_SCRATCH_REG_111 0x12501BC +#define mmACP_SCRATCH_REG_112 0x12501C0 +#define mmACP_SCRATCH_REG_113 0x12501C4 +#define mmACP_SCRATCH_REG_114 0x12501C8 +#define mmACP_SCRATCH_REG_115 0x12501CC +#define mmACP_SCRATCH_REG_116 0x12501D0 +#define mmACP_SCRATCH_REG_117 0x12501D4 +#define mmACP_SCRATCH_REG_118 0x12501D8 +#define mmACP_SCRATCH_REG_119 0x12501DC +#define mmACP_SCRATCH_REG_120 0x12501E0 +#define mmACP_SCRATCH_REG_121 0x12501E4 +#define mmACP_SCRATCH_REG_122 0x12501E8 +#define mmACP_SCRATCH_REG_123 0x12501EC +#define mmACP_SCRATCH_REG_124 0x12501F0 +#define mmACP_SCRATCH_REG_125 0x12501F4 +#define mmACP_SCRATCH_REG_126 0x12501F8 +#define mmACP_SCRATCH_REG_127 0x12501FC +#define mmACP_SCRATCH_REG_128 0x1250200 + + +// Registers from ACP_SW_ACLK block + +#define mmSW_CORB_Base_Address 0x1243200 +#define mmSW_CORB_Write_Pointer 0x1243204 +#define mmSW_CORB_Read_Pointer 0x1243208 +#define mmSW_CORB_Control 0x124320C +#define mmSW_CORB_Size 0x1243214 +#define mmSW_RIRB_Base_Address 0x1243218 +#define mmSW_RIRB_Write_Pointer 0x124321C +#define mmSW_RIRB_Response_Interrupt_Count 0x1243220 +#define mmSW_RIRB_Control 0x1243224 +#define mmSW_RIRB_Size 0x1243228 +#define mmSW_RIRB_FIFO_MIN_THDL 0x124322C +#define mmSW_imm_cmd_UPPER_WORD 0x1243230 +#define mmSW_imm_cmd_LOWER_QWORD 0x1243234 +#define mmSW_imm_resp_UPPER_WORD 0x1243238 +#define mmSW_imm_resp_LOWER_QWORD 0x124323C +#define mmSW_imm_cmd_sts 0x1243240 +#define mmSW_BRA_BASE_ADDRESS 0x1243244 +#define mmSW_BRA_TRANSFER_SIZE 0x1243248 +#define mmSW_BRA_DMA_BUSY 0x124324C +#define mmSW_BRA_RESP 0x1243250 +#define mmSW_BRA_RESP_FRAME_ADDR 0x1243254 +#define mmSW_BRA_CURRENT_TRANSFER_SIZE 0x1243258 +#define mmSW_STATE_CHANGE_STATUS_0TO7 0x124325C +#define mmSW_STATE_CHANGE_STATUS_8TO11 0x1243260 +#define mmSW_STATE_CHANGE_STATUS_MASK_0to7 0x1243264 +#define mmSW_STATE_CHANGE_STATUS_MASK_8to11 0x1243268 +#define mmSW_CLK_FREQUENCY_CTRL 0x124326C +#define mmSW_ERROR_INTR_MASK 0x1243270 +#define mmSW_PHY_TEST_MODE_DATA_OFF 0x1243274 + + +// Registers from ACP_SW_SWCLK block + +#define mmACP_SW_EN 0x1243000 +#define mmACP_SW_EN_STATUS 0x1243004 +#define mmACP_SW_FRAMESIZE 0x1243008 +#define mmACP_SW_SSP_Counter 0x124300C +#define mmACP_SW_Audio_TX_EN 0x1243010 +#define mmACP_SW_Audio_TX_EN_STATUS 0x1243014 +#define mmACP_SW_Audio_TX_Frame_Format 0x1243018 +#define mmACP_SW_Audio_TX_SampleInterval 0x124301C +#define mmACP_SW_Audio_TX_Hctrl_DP0 0x1243020 +#define mmACP_SW_Audio_TX_Hctrl_DP1 0x1243024 +#define mmACP_SW_Audio_TX_Hctrl_DP2 0x1243028 +#define mmACP_SW_Audio_TX_Hctrl_DP3 0x124302C +#define mmACP_SW_Audio_TX_offset_DP0 0x1243030 +#define mmACP_SW_Audio_TX_offset_DP1 0x1243034 +#define mmACP_SW_Audio_TX_offset_DP2 0x1243038 +#define mmACP_SW_Audio_TX_offset_DP3 0x124303C +#define mmACP_SW_Audio_TX_Channel_Enable_DP0 0x1243040 +#define mmACP_SW_Audio_TX_Channel_Enable_DP1 0x1243044 +#define mmACP_SW_Audio_TX_Channel_Enable_DP2 0x1243048 +#define mmACP_SW_Audio_TX_Channel_Enable_DP3 0x124304C +#define mmACP_SW_BT_TX_EN 0x1243050 +#define mmACP_SW_BT_TX_EN_STATUS 0x1243054 +#define mmACP_SW_BT_TX_Frame_Format 0x1243058 +#define mmACP_SW_BT_TX_SampleInterval 0x124305C +#define mmACP_SW_BT_TX_Hctrl 0x1243060 +#define mmACP_SW_BT_TX_offset 0x1243064 +#define mmACP_SW_BT_TX_Channel_Enable_DP0 0x1243068 +#define mmACP_SW_Headset_TX_EN 0x124306C +#define mmACP_SW_Headset_TX_EN_STATUS 0x1243070 +#define mmACP_SW_Headset_TX_Frame_Format 0x1243074 +#define mmACP_SW_Headset_TX_SampleInterval 0x1243078 +#define mmACP_SW_Headset_TX_Hctrl 0x124307C +#define mmACP_SW_Headset_TX_offset 0x1243080 +#define mmACP_SW_Headset_TX_Channel_Enable_DP0 0x1243084 +#define mmACP_SW_Audio_RX_EN 0x1243088 +#define mmACP_SW_Audio_RX_EN_STATUS 0x124308C +#define mmACP_SW_Audio_RX_Frame_Format 0x1243090 +#define mmACP_SW_Audio_RX_SampleInterval 0x1243094 +#define mmACP_SW_Audio_RX_Hctrl_DP0 0x1243098 +#define mmACP_SW_Audio_RX_Hctrl_DP1 0x124309C +#define mmACP_SW_Audio_RX_Hctrl_DP2 0x1243100 +#define mmACP_SW_Audio_RX_Hctrl_DP3 0x1243104 +#define mmACP_SW_Audio_RX_offset_DP0 0x1243108 +#define mmACP_SW_Audio_RX_offset_DP1 0x124310C +#define mmACP_SW_Audio_RX_offset_DP2 0x1243110 +#define mmACP_SW_Audio_RX_offset_DP3 0x1243114 +#define mmACP_SW_Audio_RX_Channel_Enable_DP0 0x1243118 +#define mmACP_SW_Audio_RX_Channel_Enable_DP1 0x124311C +#define mmACP_SW_Audio_RX_Channel_Enable_DP2 0x1243120 +#define mmACP_SW_Audio_RX_Channel_Enable_DP3 0x1243124 +#define mmACP_SW_BT_RX_EN 0x1243128 +#define mmACP_SW_BT_RX_EN_STATUS 0x124312C +#define mmACP_SW_BT_RX_Frame_Format 0x1243130 +#define mmACP_SW_BT_RX_SampleInterval 0x1243134 +#define mmACP_SW_BT_RX_Hctrl 0x1243138 +#define mmACP_SW_BT_RX_offset 0x124313C +#define mmACP_SW_BT_RX_Channel_Enable_DP0 0x1243140 +#define mmACP_SW_Headset_RX_EN 0x1243144 +#define mmACP_SW_Headset_RX_EN_STATUS 0x1243148 +#define mmACP_SW_Headset_RX_Frame_Format 0x124314C +#define mmACP_SW_Headset_RX_SampleInterval 0x1243150 +#define mmACP_SW_Headset_RX_Hctrl 0x1243154 +#define mmACP_SW_Headset_RX_offset 0x1243158 +#define mmACP_SW_Headset_RX_Channel_Enable_DP0 0x124315C +#define mmACP_SW_BPT_PORT_EN 0x1243160 +#define mmACP_SW_BPT_PORT_EN_STATUS 0x1243164 +#define mmACP_SW_BPT_PORT_Frame_Format 0x1243168 +#define mmACP_SW_BPT_PORT_SampleInterval 0x124316C +#define mmACP_SW_BPT_PORT_Hctrl 0x1243170 +#define mmACP_SW_BPT_PORT_offset 0x1243174 +#define mmACP_SW_BPT_PORT_Channel_Enable 0x1243178 +#define mmACP_SW_BPT_PORT_First_byte_addr 0x124317C +#define mmACP_SW_CLK_RESUME_CTRL 0x1243180 +#define mmACP_SW_CLK_RESUME_Delay_Cntr 0x1243184 +#define mmACP_SW_BUS_RESET_CTRL 0x1243188 +#define mmACP_SW_PRBS_ERR_STATUS 0x124318C + + +// Registers from ACP_AUDIO_BUFFERS block + +#define mmACP_I2S_RX_RINGBUFADDR 0x1242000 +#define mmACP_I2S_RX_RINGBUFSIZE 0x1242004 +#define mmACP_I2S_RX_LINKPOSITIONCNTR 0x1242008 +#define mmACP_I2S_RX_FIFOADDR 0x124200C +#define mmACP_I2S_RX_FIFOSIZE 0x1242010 +#define mmACP_I2S_RX_DMA_SIZE 0x1242014 +#define mmACP_I2S_RX_LINEARPOSITIONCNTR_HIGH 0x1242018 +#define mmACP_I2S_RX_LINEARPOSITIONCNTR_LOW 0x124201C +#define mmACP_I2S_RX_INTR_WATERMARK_SIZE 0x1242020 +#define mmACP_I2S_TX_RINGBUFADDR 0x1242024 +#define mmACP_I2S_TX_RINGBUFSIZE 0x1242028 +#define mmACP_I2S_TX_LINKPOSITIONCNTR 0x124202C +#define mmACP_I2S_TX_FIFOADDR 0x1242030 +#define mmACP_I2S_TX_FIFOSIZE 0x1242034 +#define mmACP_I2S_TX_DMA_SIZE 0x1242038 +#define mmACP_I2S_TX_LINEARPOSITIONCNTR_HIGH 0x124203C +#define mmACP_I2S_TX_LINEARPOSITIONCNTR_LOW 0x1242040 +#define mmACP_I2S_TX_INTR_WATERMARK_SIZE 0x1242044 +#define mmACP_BT_RX_RINGBUFADDR 0x1242048 +#define mmACP_BT_RX_RINGBUFSIZE 0x124204C +#define mmACP_BT_RX_LINKPOSITIONCNTR 0x1242050 +#define mmACP_BT_RX_FIFOADDR 0x1242054 +#define mmACP_BT_RX_FIFOSIZE 0x1242058 +#define mmACP_BT_RX_DMA_SIZE 0x124205C +#define mmACP_BT_RX_LINEARPOSITIONCNTR_HIGH 0x1242060 +#define mmACP_BT_RX_LINEARPOSITIONCNTR_LOW 0x1242064 +#define mmACP_BT_RX_INTR_WATERMARK_SIZE 0x1242068 +#define mmACP_BT_TX_RINGBUFADDR 0x124206C +#define mmACP_BT_TX_RINGBUFSIZE 0x1242070 +#define mmACP_BT_TX_LINKPOSITIONCNTR 0x1242074 +#define mmACP_BT_TX_FIFOADDR 0x1242078 +#define mmACP_BT_TX_FIFOSIZE 0x124207C +#define mmACP_BT_TX_DMA_SIZE 0x1242080 +#define mmACP_BT_TX_LINEARPOSITIONCNTR_HIGH 0x1242084 +#define mmACP_BT_TX_LINEARPOSITIONCNTR_LOW 0x1242088 +#define mmACP_BT_TX_INTR_WATERMARK_SIZE 0x124208C +#define mmACP_HS_RX_RINGBUFADDR 0x1242090 +#define mmACP_HS_RX_RINGBUFSIZE 0x1242094 +#define mmACP_HS_RX_LINKPOSITIONCNTR 0x1242098 +#define mmACP_HS_RX_FIFOADDR 0x124209C +#define mmACP_HS_RX_FIFOSIZE 0x12420A0 +#define mmACP_HS_RX_DMA_SIZE 0x12420A4 +#define mmACP_HS_RX_LINEARPOSITIONCNTR_HIGH 0x12420A8 +#define mmACP_HS_RX_LINEARPOSITIONCNTR_LOW 0x12420AC +#define mmACP_HS_RX_INTR_WATERMARK_SIZE 0x12420B0 +#define mmACP_HS_TX_RINGBUFADDR 0x12420B4 +#define mmACP_HS_TX_RINGBUFSIZE 0x12420B8 +#define mmACP_HS_TX_LINKPOSITIONCNTR 0x12420BC +#define mmACP_HS_TX_FIFOADDR 0x12420C0 +#define mmACP_HS_TX_FIFOSIZE 0x12420C4 +#define mmACP_HS_TX_DMA_SIZE 0x12420C8 +#define mmACP_HS_TX_LINEARPOSITIONCNTR_HIGH 0x12420CC +#define mmACP_HS_TX_LINEARPOSITIONCNTR_LOW 0x12420D0 +#define mmACP_HS_TX_INTR_WATERMARK_SIZE 0x12420D4 + + +// Registers from ACP_I2S_TDM block + +#define mmACP_I2STDM_IER 0x1242400 +#define mmACP_I2STDM_IRER 0x1242404 +#define mmACP_I2STDM_RXFRMT 0x1242408 +#define mmACP_I2STDM_ITER 0x124240C +#define mmACP_I2STDM_TXFRMT 0x1242410 + + +// Registers from ACP_BT_TDM block + +#define mmACP_BTTDM_IER 0x1242800 +#define mmACP_BTTDM_IRER 0x1242804 +#define mmACP_BTTDM_RXFRMT 0x1242808 +#define mmACP_BTTDM_ITER 0x124280C +#define mmACP_BTTDM_TXFRMT 0x1242810 + + +// Registers from AZALIA_IP block + +#define mmAudio_Az_Global_Capabilities 0x1200000 +#define mmAudio_Az_Minor_Version 0x1200002 +#define mmAudio_Az_Major_Version 0x1200003 +#define mmAudio_Az_Output_Payload_Capability 0x1200004 +#define mmAudio_Az_Input_Payload_Capability 0x1200006 +#define mmAudio_Az_Global_Control 0x1200008 +#define mmAudio_Az_Wake_Enable 0x120000C +#define mmAudio_Az_State_Change_Status 0x120000E +#define mmAudio_Az_Global_Status 0x1200010 +#define mmAudio_Az_Linked_List_Capability_Header 0x1200014 +#define mmAudio_Az_Output_Stream_Payload_Capability 0x1200018 +#define mmAudio_Az_Input_Stream_Payload_Capability 0x120001A +#define mmAudio_Az_Interrupt_Control 0x1200020 +#define mmAudio_Az_Interrupt_Status 0x1200024 +#define mmAudio_Az_Wall_Clock_Counter 0x1200030 +#define mmAudio_Az_Stream_Synchronization 0x1200038 +#define mmAudio_Az_CORB_Lower_Base_Address 0x1200040 +#define mmAudio_Az_CORB_Upper_Base_Address 0x1200044 +#define mmAudio_Az_CORB_Write_Pointer 0x1200048 +#define mmAudio_Az_CORB_Read_Pointer 0x120004A +#define mmAudio_Az_CORB_Control 0x120004C +#define mmAudio_Az_CORB_Status 0x120004D +#define mmAudio_Az_CORB_Size 0x120004E +#define mmAudio_Az_RIRB_Lower_Base_Address 0x1200050 +#define mmAudio_Az_RIRB_Upper_Base_Address 0x1200054 +#define mmAudio_Az_RIRB_Write_Pointer 0x1200058 +#define mmAudio_Az_RIRB_Response_Interrupt_Count 0x120005A +#define mmAudio_Az_RIRB_Control 0x120005C +#define mmAudio_Az_RIRB_Status 0x120005D +#define mmAudio_Az_RIRB_Size 0x120005E +#define mmAudio_Az_Immediate_Command_Output_Interface 0x1200060 +#define mmAudio_Az_Immediate_Response_Input_Interface 0x1200064 +#define mmAudio_Az_Immediate_Command_Status 0x1200068 +#define mmAudio_Az_DPLBASE 0x1200070 +#define mmAudio_Az_DPUBASE 0x1200074 +#define mmAudio_Az_Input_SD0CTL_and_STS 0x1200080 +#define mmAudio_Az_Input_SD0LPIB 0x1200084 +#define mmAudio_Az_Input_SD0CBL 0x1200088 +#define mmAudio_Az_Input_SD0LVI 0x120008C +#define mmAudio_Az_Input_SD0FIFOS 0x1200090 +#define mmAudio_Az_Input_SD0FMT 0x1200092 +#define mmAudio_Az_Input_SD0BDPL 0x1200098 +#define mmAudio_Az_Input_SD0BDPU 0x120009C +#define mmAudio_Az_Input_SD1CTL_and_STS 0x12000A0 +#define mmAudio_Az_Input_SD1LPIB 0x12000A4 +#define mmAudio_Az_Input_SD1CBL 0x12000A8 +#define mmAudio_Az_Input_SD1LVI 0x12000AC +#define mmAudio_Az_Input_SD1FIFOS 0x12000B0 +#define mmAudio_Az_Input_SD1FMT 0x12000B2 +#define mmAudio_Az_Input_SD1BDPL 0x12000B8 +#define mmAudio_Az_Input_SD1BDPU 0x12000BC +#define mmAudio_Az_Input_SD2CTL_and_STS 0x12000C0 +#define mmAudio_Az_Input_SD2LPIB 0x12000C4 +#define mmAudio_Az_Input_SD2CBL 0x12000C8 +#define mmAudio_Az_Input_SD2LVI 0x12000CC +#define mmAudio_Az_Input_SD2FIFOS 0x12000D0 +#define mmAudio_Az_Input_SD2FMT 0x12000D2 +#define mmAudio_Az_Input_SD2BDPL 0x12000D8 +#define mmAudio_Az_Input_SD2BDPU 0x12000DC +#define mmAudio_Az_Input_SD3CTL_and_STS 0x12000E0 +#define mmAudio_Az_Input_SD3LPIB 0x12000E4 +#define mmAudio_Az_Input_SD3CBL 0x12000E8 +#define mmAudio_Az_Input_SD3LVI 0x12000EC +#define mmAudio_Az_Input_SD3FIFOS 0x12000F0 +#define mmAudio_Az_Input_SD3FMT 0x12000F2 +#define mmAudio_Az_Input_SD3BDPL 0x12000F8 +#define mmAudio_Az_Input_SD3BDPU 0x12000FC +#define mmAudio_Az_Output_SD0CTL_and_STS 0x1200100 +#define mmAudio_Az_Output_SD0LPIB 0x1200104 +#define mmAudio_Az_Output_SD0CBL 0x1200108 +#define mmAudio_Az_Output_SD0LVI 0x120010C +#define mmAudio_Az_Output_SD0FIFOS 0x1200110 +#define mmAudio_Az_Output_SD0FMT 0x1200112 +#define mmAudio_Az_Output_SD0BDPL 0x1200118 +#define mmAudio_Az_Output_SD0BDPU 0x120011C +#define mmAudio_Az_Output_SD1CTL_and_STS 0x1200120 +#define mmAudio_Az_Output_SD1LPIB 0x1200124 +#define mmAudio_Az_Output_SD1CBL 0x1200128 +#define mmAudio_Az_Output_SD1LVI 0x120012C +#define mmAudio_Az_Output_SD1FIFOS 0x1200130 +#define mmAudio_Az_Output_SD1FMT 0x1200132 +#define mmAudio_Az_Output_SD1BDPL 0x1200138 +#define mmAudio_Az_Output_SD1BDPU 0x120013C +#define mmAudio_Az_Output_SD2CTL_and_STS 0x1200140 +#define mmAudio_Az_Output_SD2LPIB 0x1200144 +#define mmAudio_Az_Output_SD2CBL 0x1200148 +#define mmAudio_Az_Output_SD2LVI 0x120014C +#define mmAudio_Az_Output_SD2FIFOS 0x1200150 +#define mmAudio_Az_Output_SD2FMT 0x1200152 +#define mmAudio_Az_Output_SD2BDPL 0x1200158 +#define mmAudio_Az_Output_SD2BDPU 0x120015C +#define mmAudio_Az_Output_SD3CTL_and_STS 0x1200160 +#define mmAudio_Az_Output_SD3LPIB 0x1200164 +#define mmAudio_Az_Output_SD3CBL 0x1200168 +#define mmAudio_Az_Output_SD3LVI 0x120016C +#define mmAudio_Az_Output_SD3FIFOS 0x1200170 +#define mmAudio_Az_Output_SD3FMT 0x1200172 +#define mmAudio_Az_Output_SD3BDPL 0x1200178 +#define mmAudio_Az_Output_SD3BDPU 0x120017C +#define mmAudioAZ_Misc_Control_Register_1 0x1200180 +#define mmAudioAZ_Misc_Control_Register_2 0x1200182 +#define mmAudioAZ_Misc_Control_Register_3 0x1200183 +#define mmAudio_AZ_Multiple_Links_Capability_Header 0x1200200 +#define mmAudio_AZ_Multiple_Links_Capability_Declaration 0x1200204 +#define mmAudio_AZ_Link0_Capabilities 0x1200240 +#define mmAudio_AZ_Link0_Control 0x1200244 +#define mmAudio_AZ_Link0_Output_Stream_ID 0x1200248 +#define mmAudio_AZ_Link0_SDI_Identifier 0x120024C +#define mmAudio_AZ_Link0_Per_Stream_Overhead 0x1200250 +#define mmAudio_AZ_Link0_Wall_Frame_Counter 0x1200258 +#define mmAudio_AZ_Link0_Output_Payload_Capability_L 0x1200260 +#define mmAudio_AZ_Link0_Output_Payload_Capability_U 0x1200264 +#define mmAudio_AZ_Link0_Input_Payload_Capability_L 0x1200270 +#define mmAudio_AZ_Link0_Input_Payload_Capability_U 0x1200274 +#define mmAudio_Az_Input_SD0LICBA 0x1202084 +#define mmAudio_Az_Input_SD1LICBA 0x12020A4 +#define mmAudio_Az_Input_SD2LICBA 0x12020C4 +#define mmAudio_Az_Input_SD3LICBA 0x12020E4 +#define mmAudio_Az_Output_SD0LICBA 0x1202104 +#define mmAudio_Az_Output_SD1LICBA 0x1202124 +#define mmAudio_Az_Output_SD2LICBA 0x1202144 +#define mmAudio_Az_Output_SD3LICBA 0x1202164 +#define mmAUDIO_AZ_POWER_MANAGEMENT_CONTROL 0x1204000 +#define mmAUDIO_AZ_IOC_SOFTRST_CONTROL 0x1204004 +#define mmAUDIO_AZ_IOC_CLKGATE_CONTROL 0x1204008 + + +// Registers from ACP_AZALIA block + +#define mmACP_AZ_PAGE0_LBASE_ADDR 0x1243800 +#define mmACP_AZ_PAGE0_UBASE_ADDR 0x1243804 +#define mmACP_AZ_PAGE0_PGEN_SIZE 0x1243808 +#define mmACP_AZ_PAGE0_OFFSET 0x124380C +#define mmACP_AZ_PAGE1_LBASE_ADDR 0x1243810 +#define mmACP_AZ_PAGE1_UBASE_ADDR 0x1243814 +#define mmACP_AZ_PAGE1_PGEN_SIZE 0x1243818 +#define mmACP_AZ_PAGE1_OFFSET 0x124381C +#define mmACP_AZ_PAGE2_LBASE_ADDR 0x1243820 +#define mmACP_AZ_PAGE2_UBASE_ADDR 0x1243824 +#define mmACP_AZ_PAGE2_PGEN_SIZE 0x1243828 +#define mmACP_AZ_PAGE2_OFFSET 0x124382C +#define mmACP_AZ_PAGE3_LBASE_ADDR 0x1243830 +#define mmACP_AZ_PAGE3_UBASE_ADDR 0x1243834 +#define mmACP_AZ_PAGE3_PGEN_SIZE 0x1243838 +#define mmACP_AZ_PAGE3_OFFSET 0x124383C +#define mmACP_AZ_PAGE4_LBASE_ADDR 0x1243840 +#define mmACP_AZ_PAGE4_UBASE_ADDR 0x1243844 +#define mmACP_AZ_PAGE4_PGEN_SIZE 0x1243848 +#define mmACP_AZ_PAGE4_OFFSET 0x124384C +#define mmACP_AZ_PAGE5_LBASE_ADDR 0x1243850 +#define mmACP_AZ_PAGE5_UBASE_ADDR 0x1243854 +#define mmACP_AZ_PAGE5_PGEN_SIZE 0x1243858 +#define mmACP_AZ_PAGE5_OFFSET 0x124385C +#define mmACP_AZ_PAGE6_LBASE_ADDR 0x1243860 +#define mmACP_AZ_PAGE6_UBASE_ADDR 0x1243864 +#define mmACP_AZ_PAGE6_PGEN_SIZE 0x1243868 +#define mmACP_AZ_PAGE6_OFFSET 0x124386C +#define mmACP_AZ_PAGE7_LBASE_ADDR 0x1243870 +#define mmACP_AZ_PAGE7_UBASE_ADDR 0x1243874 +#define mmACP_AZ_PAGE7_PGEN_SIZE 0x1243878 +#define mmACP_AZ_PAGE7_OFFSET 0x124387C + + +#endif
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/117 ASoC: AMD: add ACP3.0 PCI driver
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
ACP 3.0 is a PCI audio device. This patch adds PCI driver to bind to this device and get PCI resources.
--- sound/soc/amd/raven/acp3x.h | 13 ++++++ sound/soc/amd/raven/pci-acp3x.c | 97 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 sound/soc/amd/raven/acp3x.h create mode 100644 sound/soc/amd/raven/pci-acp3x.c
sound/soc/amd/raven/acp3x.h new file +13 -0
@@ -0,0 +1,13 @@ +#include "chip_offset_byte.h" + +#define ACP3x_PHY_BASE_ADDRESS 0x1240000 + +static inline u32 rv_readl (void __iomem *base_addr) +{ +return readl (base_addr - ACP3x_PHY_BASE_ADDRESS); +} + +static inline void rv_writel (u32 val,void __iomem *base_addr) +{ +writel (val, base_addr - ACP3x_PHY_BASE_ADDRESS); +}
sound/soc/amd/raven/pci-acp3x.c new file +97 -0
97 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/117 ASoC: AMD: create ACP3x PCM platform device
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
ACP 3x IP have I2S controller device as one of IP blocks. Create a platform device for it, so that PCM platform driver can be binded to this device. Pass PCI resources like MMIO, irq to the platform device.
--- sound/soc/amd/raven/acp3x.h | 3 ++ sound/soc/amd/raven/pci-acp3x.c | 68 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 70 insertions(+), 1 deletion(-)
sound/soc/amd/raven/acp3x.h +3 -0
@@ -1,6 +1,9 @@#include "chip_offset_byte.h" #define ACP3x_PHY_BASE_ADDRESS 0x1240000 +#define ACP3x_I2S_MODE 0 +#define ACP3x_REG_START 0x1240000 +#define ACP3x_REG_END 0x1250200static inline u32 rv_readl (void __iomem *base_addr) {
sound/soc/amd/raven/pci-acp3x.c +67 -1
107 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/117 ASoC: AMD: add ACP3x PCM platform driver
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
PCM platform driver binds to the platform device creatd by ACP3x PCI device. PCM driver registers ALSA DMA and CPU DAI components with ASoC framework.
--- sound/soc/amd/raven/acp3x-pcm-dma.c | 278 ++++++++++++++++++++++++++++++++++++ sound/soc/amd/raven/acp3x.h | 3 + 2 files changed, 281 insertions(+) create mode 100644 sound/soc/amd/raven/acp3x-pcm-dma.c
sound/soc/amd/raven/acp3x-pcm-dma.c new file +278 -0
@@ -0,0 +1,278 @@ +/* +* AMD ALSA SoC PCM Driver +* +* Copyright 2016 Advanced Micro Devices, Inc. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +*/ + +#include <linux/platform_device.h> +#include <linux/module.h> +#include <linux/err.h> + +#include <sound/pcm.h> +#include <sound/pcm_params.h> +#include <sound/soc.h> +#include <sound/soc-dai.h> + +#include "acp3x.h" + +struct i2s_dev_data { +void __iomem *acp3x_base; +struct snd_pcm_substream *play_stream; +struct snd_pcm_substream *capture_stream; +}; + +static int acp3x_power_on (void __iomem *acp3x_base,bool on) +{ +u16 val, mask; +u32 timeout; + +if (on == true) { + val =1 ; + mask =0 ; + }else { + val =0 ; + mask =2 ; + } + +rv_writel (val, acp3x_base + mmACP_PGFSM_CONTROL); + timeout =0 ; +while (true) { + val =rv_readl (acp3x_base + mmACP_PGFSM_STATUS); +if ((val &0x3 ) == mask) +break ; +if (timeout >100 ) { +pr_err ("ACP3x power state change failure\n" ); +return -ENODEV ; + } + timeout++; +cpu_relax (); + } +return 0 ; +} + +static int acp3x_reset (void __iomem *acp3x_base) +{ +u32 val, timeout; + +rv_writel (1 , acp3x_base + mmACP_SOFT_RESET); + timeout =0 ; +while (true) { + val =rv_readl (acp3x_base + mmACP_SOFT_RESET); +if ((val &0x00010001 ) || timeout >100 ) { +if (val &0x00010001 ) +break ; +return -ENODEV ; + } + timeout++; +cpu_relax (); + } + +rv_writel (0 , acp3x_base + mmACP_SOFT_RESET); + timeout =0 ; +while (true) { + val =rv_readl (acp3x_base + mmACP_SOFT_RESET); +if (!val || timeout >100 ) { +if (!val) +break ; +return -ENODEV ; + } + timeout++; +cpu_relax (); + } +return 0 ; +} + +static int acp3x_init (void __iomem *acp3x_base) +{ +int ret; + +/* power on */ + ret =acp3x_power_on (acp3x_base, true); +if (ret) { +pr_err ("ACP3x power on failed\n" ); +return ret; + } + +/* Reset */ + ret =acp3x_reset (acp3x_base); +if (ret) { +pr_err ("ACP3x reset failed\n" ); +return ret; + } + +pr_info ("ACP Initialized\n" ); +return 0 ; +} + +static int acp3x_deinit (void __iomem *acp3x_base) +{ +int ret; + +/* Reset */ + ret =acp3x_reset (acp3x_base); +if (ret) { +pr_err ("ACP3x reset failed\n" ); +return ret; + } + +/* power off */ + ret =acp3x_power_on (acp3x_base, false); +if (ret) { +pr_err ("ACP3x power off failed\n" ); +return ret; + } + +pr_info ("ACP De-Initialized\n" ); +return 0 ; +} + +static struct snd_pcm_ops acp3x_dma_ops = { + .open =NULL , + .close =NULL , + .ioctl =NULL , + .hw_params =NULL , + .hw_free =NULL , + .pointer =NULL , + .mmap =NULL , +}; + +static struct snd_soc_platform_driver acp3x_asoc_platform = { + .ops = &acp3x_dma_ops, + .pcm_new =NULL , +}; + +struct snd_soc_dai_ops acp3x_dai_i2s_ops = { + .hw_params =NULL , + .trigger =NULL , + .set_fmt =NULL , +}; + +static struct snd_soc_dai_driver acp3x_i2s_dai_driver = { + .playback = { + .rates =SNDRV_PCM_RATE_8000_96000 , + .formats =SNDRV_PCM_FMTBIT_S16_LE |SNDRV_PCM_FMTBIT_S8 | +SNDRV_PCM_FMTBIT_U8 | +SNDRV_PCM_FMTBIT_S24_LE | +SNDRV_PCM_FMTBIT_S32_LE , + .channels_min =2 , + .channels_max =8 , + + .rate_min =8000 , + .rate_max =96000 , + }, + .capture = { + .rates =SNDRV_PCM_RATE_8000_48000 , + .formats =SNDRV_PCM_FMTBIT_S16_LE |SNDRV_PCM_FMTBIT_S8 | +SNDRV_PCM_FMTBIT_U8 | +SNDRV_PCM_FMTBIT_S24_LE | +SNDRV_PCM_FMTBIT_S32_LE , + .channels_min =2 , + .channels_max =2 , + .rate_min =8000 , + .rate_max =48000 , + }, + .ops = &acp3x_dai_i2s_ops, +}; + +static const struct snd_soc_component_driver acp3x_i2s_component = { + .name ="acp3x_i2s" , +}; + +static int acp3x_audio_probe (struct platform_device *pdev) +{ +int status; +struct resource *res; +struct i2s_dev_data *adata; +unsigned int irqflags; + +if (pdev->dev.platform_data ==NULL ) { +dev_err (&pdev->dev,"platform_data not retrieved\n" ); +return -ENODEV ; + } + irqflags = *((unsigned int *)(pdev->dev.platform_data)); + + adata =devm_kzalloc (&pdev->dev,sizeof (struct i2s_dev_data ), +GFP_KERNEL ); + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); +if (!res) { +dev_err (&pdev->dev,"IORESOURCE_IRQ FAILED\n" ); +return -ENODEV ; + } + + adata->acp3x_base =devm_ioremap (&pdev->dev, res->start, +resource_size (res)); + + adata->play_stream =NULL ; + adata->capture_stream =NULL ; + +dev_set_drvdata (&pdev->dev, adata); +/* Initialize ACP */ + status =acp3x_init (adata->acp3x_base); +if (status) +return -ENODEV ; + + status =snd_soc_register_platform (&pdev->dev, &acp3x_asoc_platform); +if (status !=0 ) { +dev_err (&pdev->dev,"Fail to register ALSA platform device\n" ); + goto dev_err; + } + + status =devm_snd_soc_register_component (&pdev->dev, + &acp3x_i2s_component, &acp3x_i2s_dai_driver,1 ); +if (status !=0 ) { +dev_err (&pdev->dev,"Fail to register acp i2s dai\n" ); +snd_soc_unregister_platform (&pdev->dev); + goto dev_err; + } + +return 0 ; +dev_err: + status =acp3x_deinit (adata->acp3x_base); +if (status) +dev_err (&pdev->dev,"ACP de-init failed\n" ); +else +dev_info (&pdev->dev,"ACP de-initialized\n" ); +/*ignore device status and return driver probe error*/ +return -ENODEV ; +} + +static int acp3x_audio_remove (struct platform_device *pdev) +{ +int ret; +struct i2s_dev_data *adata =dev_get_drvdata (&pdev->dev); + +snd_soc_unregister_component (&pdev->dev); +snd_soc_unregister_platform (&pdev->dev); + + ret =acp3x_deinit (adata->acp3x_base); +if (ret) +dev_err (&pdev->dev,"ACP de-init failed\n" ); +else +dev_info (&pdev->dev,"ACP de-initialized\n" ); + +return 0 ; +} + +static struct platform_driver acp3x_dma_driver = { + .probe = acp3x_audio_probe, + .remove = acp3x_audio_remove, + .driver = { + .name ="acp3x_rv_i2s" , + }, +}; + +module_platform_driver (acp3x_dma_driver); + +MODULE_AUTHOR ("[email protected]" ); +MODULE_DESCRIPTION ("AMD ACP 3.x PCM Driver" ); +MODULE_LICENSE ("GPL v2" ); +MODULE_ALIAS ("platform:acp3x-i2s-audio" );
sound/soc/amd/raven/acp3x.h +3 -0
@@ -4,6 +4,9 @@#define ACP3x_I2S_MODE 0#define ACP3x_REG_START 0x1240000#define ACP3x_REG_END 0x1250200 +#define BT_TX_THRESHOLD 26 +#define BT_RX_THRESHOLD 25 +static inline u32 rv_readl (void __iomem *base_addr) {
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/117 ASoC: AMD: handle ACP3x i2s watermark interrupt
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
whenever audio data equal to I2S fifo watermark level is produced/consumed, interrupt is generated. Amount of data is equal to half of ALSA ring buffer size. Acknowledge the interrupt.
--- sound/soc/amd/raven/acp3x-pcm-dma.c | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
sound/soc/amd/raven/acp3x-pcm-dma.c +49 -0
@@ -25,6 +25,7 @@#include "acp3x.h" struct i2s_dev_data { +unsigned int i2s_irq;void __iomem *acp3x_base;struct snd_pcm_substream *play_stream;struct snd_pcm_substream *capture_stream;
@@ -135,6 +136,38 @@ static int acp3x_deinit(void __iomem *acp3x_base)return 0 ; } +static irqreturn_t i2s_irq_handler (int irq,void *dev_id) +{ +u16 play_flag, cap_flag; +u32 val; +struct i2s_dev_data *rv_i2s_data = dev_id; + +if (rv_i2s_data ==NULL ) +return IRQ_NONE ; + + play_flag = cap_flag =0 ; + + val =rv_readl (rv_i2s_data->acp3x_base + mmACP_EXTERNAL_INTR_STAT); +if ((val &BIT (BT_TX_THRESHOLD )) && (rv_i2s_data->play_stream)) { +rv_writel (BIT (BT_TX_THRESHOLD ), rv_i2s_data->acp3x_base + + mmACP_EXTERNAL_INTR_STAT); +snd_pcm_period_elapsed (rv_i2s_data->play_stream); + play_flag =1 ; + } + +if ((val &BIT (BT_RX_THRESHOLD )) && rv_i2s_data->capture_stream) { +rv_writel (BIT (BT_RX_THRESHOLD ), rv_i2s_data->acp3x_base + + mmACP_EXTERNAL_INTR_STAT); +snd_pcm_period_elapsed (rv_i2s_data->capture_stream); + cap_flag =1 ; + } + +if (play_flag | cap_flag) +return IRQ_HANDLED ; +else +return IRQ_NONE ; +} +static struct snd_pcm_ops acp3x_dma_ops = { .open =NULL , .close =NULL ,
@@ -211,6 +244,13 @@ static int acp3x_audio_probe(struct platform_device *pdev) adata->acp3x_base =devm_ioremap (&pdev->dev, res->start,resource_size (res)); + res =platform_get_resource (pdev,IORESOURCE_IRQ ,0 ); +if (!res) { +dev_err (&pdev->dev,"IORESOURCE_IRQ FAILED\n" ); +return -ENODEV ; + } + + adata->i2s_irq = res->start; adata->play_stream =NULL ; adata->capture_stream =NULL ;
@@ -234,6 +274,15 @@ static int acp3x_audio_probe(struct platform_device *pdev) goto dev_err; } + status =devm_request_irq (&pdev->dev, adata->i2s_irq, i2s_irq_handler, + irqflags,"ACP3x_I2S_IRQ" , adata); +if (status) { +dev_err (&pdev->dev,"ACP3x I2S IRQ request failed\n" ); +snd_soc_unregister_platform (&pdev->dev); +snd_soc_unregister_component (&pdev->dev); + goto dev_err; + } +return 0 ; dev_err: status =acp3x_deinit (adata->acp3x_base);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/117 ASoC: AMD: add ACP3x PCM driver DMA ops
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
ACP3x has a DMA controller to access system memory. This controller transfers data from/to system memory to/from ACP internal fifo. The patch adds PCM driver DMA operations.
--- sound/soc/amd/raven/acp3x-pcm-dma.c | 269 ++++++++++++++++++++++++++++++++++-- sound/soc/amd/raven/acp3x.h | 14 ++ 2 files changed, 275 insertions(+), 8 deletions(-)
sound/soc/amd/raven/acp3x-pcm-dma.c +261 -8
@@ -31,6 +31,56 @@ struct i2s_dev_data {struct snd_pcm_substream *capture_stream; }; +struct i2s_stream_instance { +u16 num_pages; +u16 channels; +u32 xfer_resolution; +u32 fmt; +u32 val; +struct page *pg; +void __iomem *acp3x_base; +}; + +static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = { + .info =SNDRV_PCM_INFO_INTERLEAVED | +SNDRV_PCM_INFO_BLOCK_TRANSFER | +SNDRV_PCM_INFO_BATCH | +SNDRV_PCM_INFO_PAUSE |SNDRV_PCM_INFO_RESUME , + .formats =SNDRV_PCM_FMTBIT_S16_LE |SNDRV_PCM_FMTBIT_S8 | +SNDRV_PCM_FMTBIT_U8 |SNDRV_PCM_FMTBIT_S24_LE | +SNDRV_PCM_FMTBIT_S32_LE , + .channels_min =2 , + .channels_max =8 , + .rates =SNDRV_PCM_RATE_8000_96000 , + .rate_min =8000 , + .rate_max =96000 , + .buffer_bytes_max =PLAYBACK_MAX_NUM_PERIODS *PLAYBACK_MAX_PERIOD_SIZE , + .period_bytes_min =PLAYBACK_MIN_PERIOD_SIZE , + .period_bytes_max =PLAYBACK_MAX_PERIOD_SIZE , + .periods_min =PLAYBACK_MIN_NUM_PERIODS , + .periods_max =PLAYBACK_MAX_NUM_PERIODS , +}; + +static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = { + .info =SNDRV_PCM_INFO_INTERLEAVED | +SNDRV_PCM_INFO_BLOCK_TRANSFER | +SNDRV_PCM_INFO_BATCH | +SNDRV_PCM_INFO_PAUSE |SNDRV_PCM_INFO_RESUME , + .formats =SNDRV_PCM_FMTBIT_S16_LE |SNDRV_PCM_FMTBIT_S8 | +SNDRV_PCM_FMTBIT_U8 |SNDRV_PCM_FMTBIT_S24_LE | +SNDRV_PCM_FMTBIT_S32_LE , + .channels_min =2 , + .channels_max =2 , + .rates =SNDRV_PCM_RATE_8000_48000 , + .rate_min =8000 , + .rate_max =48000 , + .buffer_bytes_max =CAPTURE_MAX_NUM_PERIODS *CAPTURE_MAX_PERIOD_SIZE , + .period_bytes_min =CAPTURE_MIN_PERIOD_SIZE , + .period_bytes_max =CAPTURE_MAX_PERIOD_SIZE , + .periods_min =CAPTURE_MIN_NUM_PERIODS , + .periods_max =CAPTURE_MAX_NUM_PERIODS , +}; +static int acp3x_power_on (void __iomem *acp3x_base,bool on) {u16 val, mask;
@@ -168,19 +218,222 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)return IRQ_NONE ; } +static void config_acp3x_dma (struct i2s_stream_instance *rtd,int direction) +{ +u16 page_idx; +u64 addr; +u32 low, high, val, acp_fifo_addr; +struct page *pg = rtd->pg; + +/* 8 scratch registers used to map one 64 bit address. +* For 2 pages (4096 * 2 bytes), it will be 16 registers. +*/ +if (direction ==SNDRV_PCM_STREAM_PLAYBACK ) + val =0 ; +else + val =16 ; + +/* Group Enable */ +rv_writel (ACP_SRAM_PTE_OFFSET |BIT (31 ), rtd->acp3x_base + + mmACPAXI2AXI_ATU_BASE_ADDR_GRP_1); +rv_writel (PAGE_SIZE_4K_ENABLE , rtd->acp3x_base + + mmACPAXI2AXI_ATU_PAGE_SIZE_GRP_1); + +for (page_idx =0 ; page_idx < rtd->num_pages; page_idx++) { +/* Load the low address of page int ACP SRAM through SRBM */ + addr =page_to_phys (pg); + low =lower_32_bits (addr); + high =upper_32_bits (addr); + +rv_writel (low, rtd->acp3x_base + mmACP_SCRATCH_REG_0 + val); + high |=BIT (31 ); +rv_writel (high, rtd->acp3x_base + mmACP_SCRATCH_REG_0 + val + +4 ); +/* Move to next physically contiguos page */ + val +=8 ; + pg++; + } + +if (direction ==SNDRV_PCM_STREAM_PLAYBACK ) { +/* Config ringbuffer */ +rv_writel (MEM_WINDOW_START , rtd->acp3x_base + + mmACP_BT_TX_RINGBUFADDR); +rv_writel (MAX_BUFFER , rtd->acp3x_base + + mmACP_BT_TX_RINGBUFSIZE); +rv_writel (0x40 , rtd->acp3x_base + mmACP_BT_TX_DMA_SIZE); + +/* Config audio fifo */ + acp_fifo_addr =ACP_SRAM_PTE_OFFSET + (rtd->num_pages *8 ) + +1024 ; +rv_writel (acp_fifo_addr, rtd->acp3x_base + + mmACP_BT_TX_FIFOADDR); +rv_writel (256 , rtd->acp3x_base + mmACP_BT_TX_FIFOSIZE); +rv_writel (PLAYBACK_MIN_PERIOD_SIZE , rtd->acp3x_base + + mmACP_BT_TX_INTR_WATERMARK_SIZE); + }else { +/* Config ringbuffer */ +rv_writel (MEM_WINDOW_START +MAX_BUFFER , rtd->acp3x_base + + mmACP_BT_RX_RINGBUFADDR); +rv_writel (MAX_BUFFER , rtd->acp3x_base + + mmACP_BT_RX_RINGBUFSIZE); +rv_writel (0x40 , rtd->acp3x_base + mmACP_BT_RX_DMA_SIZE); + +/* Config audio fifo */ + acp_fifo_addr =ACP_SRAM_PTE_OFFSET + + (rtd->num_pages *8 ) +1024 +256 ; +rv_writel (acp_fifo_addr, rtd->acp3x_base + + mmACP_BT_RX_FIFOADDR); +rv_writel (256 , rtd->acp3x_base + mmACP_BT_RX_FIFOSIZE); +rv_writel (CAPTURE_MIN_PERIOD_SIZE , rtd->acp3x_base + + mmACP_BT_RX_INTR_WATERMARK_SIZE); + } + +/* Enable watermark/period interrupt to host */ +rv_writel (BIT (BT_TX_THRESHOLD ) |BIT (BT_RX_THRESHOLD ), + rtd->acp3x_base + mmACP_EXTERNAL_INTR_CNTL); +} + +static int acp3x_dma_open (struct snd_pcm_substream *substream) +{ +int ret =0 ; + +struct snd_pcm_runtime *runtime = substream->runtime; +struct snd_soc_pcm_runtime *prtd = substream->private_data; +struct i2s_dev_data *adata =dev_get_drvdata (prtd->platform->dev); + +struct i2s_stream_instance *i2s_data =kzalloc (sizeof ( +struct i2s_stream_instance ),GFP_KERNEL ); +if (i2s_data ==NULL ) +return -EINVAL ; + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) + runtime->hw = acp3x_pcm_hardware_playback; +else + runtime->hw = acp3x_pcm_hardware_capture; + + ret =snd_pcm_hw_constraint_integer (runtime, +SNDRV_PCM_HW_PARAM_PERIODS ); +if (ret <0 ) { +dev_err (prtd->platform->dev,"set integer constraint failed\n" ); +return ret; + } + +if (!adata->play_stream && !adata->capture_stream) +rv_writel (1 , adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) + adata->play_stream = substream; +else + adata->capture_stream = substream; + + i2s_data->acp3x_base = adata->acp3x_base; + runtime->private_data = i2s_data; +return 0 ; +} + +static int acp3x_dma_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params) +{ +int status; +uint64_t size; +struct snd_dma_buffer *dma_buffer; +struct page *pg; +struct i2s_stream_instance *rtd = substream->runtime->private_data; + +if (rtd ==NULL ) +return -EINVAL ; + + dma_buffer = &substream->dma_buffer; + size =params_buffer_bytes (params); + status =snd_pcm_lib_malloc_pages (substream, size); +if (status <0 ) +return status; + +memset (substream->runtime->dma_area,0 ,params_buffer_bytes (params)); + pg =virt_to_page (substream->dma_buffer.area); +if (pg !=NULL ) { + rtd->pg = pg; + rtd->num_pages = (PAGE_ALIGN (size) >>PAGE_SHIFT ); +config_acp3x_dma (rtd, substream->stream); + status =0 ; + }else { + status = -ENOMEM ; + } +return status; +} + +static snd_pcm_uframes_t acp3x_dma_pointer (struct snd_pcm_substream *substream) +{ +u32 pos =0 ; +struct i2s_stream_instance *rtd = substream->runtime->private_data; + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) + pos =rv_readl (rtd->acp3x_base + + mmACP_BT_TX_LINKPOSITIONCNTR); +else + pos =rv_readl (rtd->acp3x_base + + mmACP_BT_RX_LINKPOSITIONCNTR); + +if (pos >=MAX_BUFFER ) + pos =0 ; + +return bytes_to_frames (substream->runtime, pos); +} + +static int acp3x_dma_new (struct snd_soc_pcm_runtime *rtd) +{ +return snd_pcm_lib_preallocate_pages_for_all (rtd->pcm, +SNDRV_DMA_TYPE_DEV , +NULL ,MIN_BUFFER , +MAX_BUFFER ); +} + +static int acp3x_dma_hw_free (struct snd_pcm_substream *substream) +{ +return snd_pcm_lib_free_pages (substream); +} + +static int acp3x_dma_mmap (struct snd_pcm_substream *substream, +struct vm_area_struct *vma) +{ +return snd_pcm_lib_default_mmap (substream, vma); +} + +static int acp3x_dma_close (struct snd_pcm_substream *substream) +{ +struct snd_soc_pcm_runtime *prtd = substream->private_data; +struct i2s_dev_data *adata =dev_get_drvdata (prtd->platform->dev); +struct i2s_stream_instance *rtd = substream->runtime->private_data; + +kfree (rtd); + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) + adata->play_stream =NULL ; +else + adata->capture_stream =NULL ; + +/* Disable ACP irq, when the current stream is being closed and +* another stream is also not active. +*/ +if (!adata->play_stream && !adata->capture_stream) +rv_writel (0 , adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); + +return 0 ; +} +static struct snd_pcm_ops acp3x_dma_ops = { - .open =NULL , - .close =NULL , - .ioctl =NULL , - .hw_params =NULL , - .hw_free =NULL , - .pointer =NULL , - .mmap =NULL , + .open = acp3x_dma_open, + .close = acp3x_dma_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = acp3x_dma_hw_params, + .hw_free = acp3x_dma_hw_free, + .pointer = acp3x_dma_pointer, + .mmap = acp3x_dma_mmap, };static struct snd_soc_platform_driver acp3x_asoc_platform = { .ops = &acp3x_dma_ops, - .pcm_new =NULL , + .pcm_new = acp3x_dma_new, };struct snd_soc_dai_ops acp3x_dai_i2s_ops = {
sound/soc/amd/raven/acp3x.h +14 -0
@@ -6,7 +6,21 @@#define ACP3x_REG_END 0x1250200#define BT_TX_THRESHOLD 26#define BT_RX_THRESHOLD 25 +#define ACP_SRAM_PTE_OFFSET 0x02050000 +#define PAGE_SIZE_4K_ENABLE 0x2 +#define MEM_WINDOW_START 0x4000000 +#define PLAYBACK_MIN_NUM_PERIODS 2 +#define PLAYBACK_MAX_NUM_PERIODS 2 +#define PLAYBACK_MAX_PERIOD_SIZE 4096 +#define PLAYBACK_MIN_PERIOD_SIZE 4096 +#define CAPTURE_MIN_NUM_PERIODS 2 +#define CAPTURE_MAX_NUM_PERIODS 2 +#define CAPTURE_MAX_PERIOD_SIZE 4096 +#define CAPTURE_MIN_PERIOD_SIZE 4096 + +#define MAX_BUFFER (PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS) +#define MIN_BUFFER MAX_BUFFERstatic inline u32 rv_readl (void __iomem *base_addr) {
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/117 ASoC: AMD: add ACP3x i2s ops
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
ACP3x has a i2s controller block for playback and capture. This patch adds ACP3x i2s operations.
--- sound/soc/amd/raven/acp3x-pcm-dma.c | 85 +++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-)
sound/soc/amd/raven/acp3x-pcm-dma.c +82 -3
@@ -436,10 +436,89 @@ static struct snd_soc_platform_driver acp3x_asoc_platform = { .pcm_new = acp3x_dma_new, }; +static int acp3x_dai_i2s_hwparams (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *dai) +{ +struct i2s_stream_instance *rtd = substream->runtime->private_data; + +switch (params_format (params)) { +case SNDRV_PCM_FORMAT_U8 : +case SNDRV_PCM_FORMAT_S8 : + rtd->xfer_resolution =0x0 ; +break ; +case SNDRV_PCM_FORMAT_S16_LE : + rtd->xfer_resolution =0x02 ; +break ; + +case SNDRV_PCM_FORMAT_S24_LE : + rtd->xfer_resolution =0x04 ; +break ; +case SNDRV_PCM_FORMAT_S32_LE : + rtd->xfer_resolution =0x05 ; +break ; +default : +return -EINVAL ; + } + +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) +rv_writel ((rtd->xfer_resolution <<3 ), + rtd->acp3x_base + mmACP_BTTDM_ITER); +else +rv_writel ((rtd->xfer_resolution <<3 ), + rtd->acp3x_base + mmACP_BTTDM_IRER); + +return 0 ; +} + +static int acp3x_dai_i2s_trigger (struct snd_pcm_substream *substream, +int cmd,struct snd_soc_dai *dai) +{ +int ret =0 ; +struct i2s_stream_instance *rtd = substream->runtime->private_data; +u32 val; + +switch (cmd) { +case SNDRV_PCM_TRIGGER_START : +case SNDRV_PCM_TRIGGER_RESUME : +case SNDRV_PCM_TRIGGER_PAUSE_RELEASE : +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) { + val =rv_readl (rtd->acp3x_base + mmACP_BTTDM_ITER); + val = val |BIT (0 ); +rv_writel (val, rtd->acp3x_base + mmACP_BTTDM_ITER); + }else { + val =rv_readl (rtd->acp3x_base + mmACP_BTTDM_IRER); + val = val |BIT (0 ); +rv_writel (val, rtd->acp3x_base + mmACP_BTTDM_IRER); + } +rv_writel (1 , rtd->acp3x_base + mmACP_BTTDM_IER); +break ; + +case SNDRV_PCM_TRIGGER_STOP : +case SNDRV_PCM_TRIGGER_SUSPEND : +case SNDRV_PCM_TRIGGER_PAUSE_PUSH : +if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) { + val =rv_readl (rtd->acp3x_base + mmACP_BTTDM_ITER); + val = val & ~BIT (0 ); +rv_writel (val, rtd->acp3x_base + mmACP_BTTDM_ITER); + }else { + val =rv_readl (rtd->acp3x_base + mmACP_BTTDM_IRER); + val = val & ~BIT (0 ); +rv_writel (val, rtd->acp3x_base + mmACP_BTTDM_IRER); + } +rv_writel (0 , rtd->acp3x_base + mmACP_BTTDM_IER); +break ; +default : + ret = -EINVAL ; +break ; + } + +return ret; +} +struct snd_soc_dai_ops acp3x_dai_i2s_ops = { - .hw_params =NULL , - .trigger =NULL , - .set_fmt =NULL , + .hw_params = acp3x_dai_i2s_hwparams, + .trigger = acp3x_dai_i2s_trigger, };static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/117 ASoC: AMD: add ACP3x TDM mode support
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support for TDM mode. Desired mode can be selected from ASoC machine driver.
--- sound/soc/amd/raven/acp3x-pcm-dma.c | 63 ++++++++++++++++++++++++++++++++++++- sound/soc/amd/raven/acp3x.h | 1 + 2 files changed, 63 insertions(+), 1 deletion(-)
sound/soc/amd/raven/acp3x-pcm-dma.c +62 -1
@@ -25,7 +25,9 @@#include "acp3x.h" struct i2s_dev_data { +bool tdm_mode;unsigned int i2s_irq; +u32 tdm_fmt;void __iomem *acp3x_base;struct snd_pcm_substream *play_stream;struct snd_pcm_substream *capture_stream;
@@ -35,7 +37,6 @@ struct i2s_stream_instance {u16 num_pages;u16 channels;u32 xfer_resolution; -u32 fmt;u32 val;struct page *pg;void __iomem *acp3x_base;
@@ -436,6 +437,64 @@ static struct snd_soc_platform_driver acp3x_asoc_platform = { .pcm_new = acp3x_dma_new, }; +static int acp3x_dai_i2s_set_fmt (struct snd_soc_dai *cpu_dai,unsigned int fmt) +{ + +struct i2s_dev_data *adata =snd_soc_dai_get_drvdata (cpu_dai); + +switch (fmt &SND_SOC_DAIFMT_FORMAT_MASK ) { +case SND_SOC_DAIFMT_I2S : + adata->tdm_mode = false; +break ; +case SND_SOC_DAIFMT_DSP_A : + adata->tdm_mode = true; +break ; +default : +return -EINVAL ; + } + +return 0 ; +} + +static int acp3x_dai_set_tdm_slot (struct snd_soc_dai *cpu_dai,u32 tx_mask, +u32 rx_mask,int slots,int slot_width) +{ +u32 val =0 ; +u16 resolution; + +struct i2s_dev_data *adata =snd_soc_dai_get_drvdata (cpu_dai); + +switch (slot_width) { +case 8 : + resolution =0 ; +break ; +case 16 : + resolution =2 ; +break ; +case 24 : + resolution =4 ; +break ; +case 32 : + resolution =5 ; +break ; +default : +return -EINVAL ; +break ; + } + + val =rv_readl (adata->acp3x_base + mmACP_BTTDM_ITER); +rv_writel ((val |0x2 ), adata->acp3x_base + mmACP_BTTDM_ITER); + val =rv_readl (adata->acp3x_base + mmACP_BTTDM_IRER); +rv_writel ((val |0x2 ), adata->acp3x_base + mmACP_BTTDM_IRER); + + val = (FRM_LEN | ((slots-1 ) <<15 ) | (resolution <<18 )); +rv_writel (val, adata->acp3x_base + mmACP_BTTDM_TXFRMT); +rv_writel (val, adata->acp3x_base + mmACP_BTTDM_RXFRMT); + + adata->tdm_fmt = val; +return 0 ; +} +static int acp3x_dai_i2s_hwparams (struct snd_pcm_substream *substream,struct snd_pcm_hw_params *params,struct snd_soc_dai *dai)
@@ -519,6 +578,8 @@ static int acp3x_dai_i2s_trigger(struct snd_pcm_substream *substream,struct snd_soc_dai_ops acp3x_dai_i2s_ops = { .hw_params = acp3x_dai_i2s_hwparams, .trigger = acp3x_dai_i2s_trigger, + .set_fmt = acp3x_dai_i2s_set_fmt, + .set_tdm_slot = acp3x_dai_set_tdm_slot, };static struct snd_soc_dai_driver acp3x_i2s_dai_driver = {
sound/soc/amd/raven/acp3x.h +1 -0
@@ -9,6 +9,7 @@#define ACP_SRAM_PTE_OFFSET 0x02050000#define PAGE_SIZE_4K_ENABLE 0x2#define MEM_WINDOW_START 0x4000000 +#define FRM_LEN 256#define PLAYBACK_MIN_NUM_PERIODS 2#define PLAYBACK_MAX_NUM_PERIODS 2
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/117 ASoC: AMD: Add ACP3x runtime pm ops
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
Added runtime PM operations for ACP3x PCM platform device. Device will be powered on/off based on device is in use or not.
--- sound/soc/amd/raven/acp3x-pcm-dma.c | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+)
sound/soc/amd/raven/acp3x-pcm-dma.c +39 -0
@@ -16,6 +16,7 @@#include <linux/platform_device.h> #include <linux/module.h> #include <linux/err.h> +#include <linux/pm_runtime.h> #include <sound/pcm.h> #include <sound/pcm_params.h>
@@ -676,6 +677,9 @@ static int acp3x_audio_probe(struct platform_device *pdev) goto dev_err; } +pm_runtime_set_autosuspend_delay (&pdev->dev,10000 ); +pm_runtime_use_autosuspend (&pdev->dev); +pm_runtime_enable (&pdev->dev);return 0 ; dev_err: status =acp3x_deinit (adata->acp3x_base);
@@ -701,14 +705,49 @@ static int acp3x_audio_remove(struct platform_device *pdev)else dev_info (&pdev->dev,"ACP de-initialized\n" ); +pm_runtime_disable (&pdev->dev);return 0 ; } +static int acp3x_pcm_runtime_suspend (struct device *dev) +{ +int status; +struct i2s_dev_data *adata =dev_get_drvdata (dev); + + status =acp3x_deinit (adata->acp3x_base); +if (status) +dev_err (dev,"ACP de-init failed\n" ); +else +dev_info (dev,"ACP de-initialized\n" ); + +rv_writel (0 , adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); + +return 0 ; +} + +static int acp3x_pcm_runtime_resume (struct device *dev) +{ +int status; +struct i2s_dev_data *adata =dev_get_drvdata (dev); + + status =acp3x_init (adata->acp3x_base); +if (status) +return -ENODEV ; +rv_writel (1 , adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); +return 0 ; +} + +static const struct dev_pm_ops acp3x_pm_ops = { + .runtime_suspend = acp3x_pcm_runtime_suspend, + .runtime_resume = acp3x_pcm_runtime_resume, +}; +static struct platform_driver acp3x_dma_driver = { .probe = acp3x_audio_probe, .remove = acp3x_audio_remove, .driver = { .name ="acp3x_rv_i2s" , + .pm = &acp3x_pm_ops, }, };
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/117 ASoC: AMD: Add ACP3x system resume pm op
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
When audio usecase in progress and system wide suspend happens, ACP will be powered off and when system resumes, for audio usecase to continue, all the runtime configuration data needs to be programmed again. Added 'resume'pm call back to ACP pm ops.
--- sound/soc/amd/raven/acp3x-pcm-dma.c | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
sound/soc/amd/raven/acp3x-pcm-dma.c +46 -0
@@ -709,6 +709,51 @@ static int acp3x_audio_remove(struct platform_device *pdev)return 0 ; } +static int acp3x_resume (struct device *dev) +{ +int status; +u32 val; +struct i2s_dev_data *adata =dev_get_drvdata (dev); + + status =acp3x_init (adata->acp3x_base); +if (status) +return -ENODEV ; + +if (adata->play_stream && adata->play_stream->runtime) { +struct i2s_stream_instance *rtd = + adata->play_stream->runtime->private_data; +config_acp3x_dma (rtd,SNDRV_PCM_STREAM_PLAYBACK ); +rv_writel ((rtd->xfer_resolution <<3 ), + rtd->acp3x_base + mmACP_BTTDM_ITER); +if (adata->tdm_mode == true) { +rv_writel (adata->tdm_fmt, adata->acp3x_base + + mmACP_BTTDM_TXFRMT); + val =rv_readl (adata->acp3x_base + mmACP_BTTDM_ITER); +rv_writel ((val |0x2 ), adata->acp3x_base + + mmACP_BTTDM_ITER); + } + } + +if (adata->capture_stream && adata->capture_stream->runtime) { +struct i2s_stream_instance *rtd = + adata->capture_stream->runtime->private_data; +config_acp3x_dma (rtd,SNDRV_PCM_STREAM_CAPTURE ); +rv_writel ((rtd->xfer_resolution <<3 ), + rtd->acp3x_base + mmACP_BTTDM_IRER); +if (adata->tdm_mode == true) { +rv_writel (adata->tdm_fmt, adata->acp3x_base + + mmACP_BTTDM_RXFRMT); + val =rv_readl (adata->acp3x_base + mmACP_BTTDM_IRER); +rv_writel ((val |0x2 ), adata->acp3x_base + + mmACP_BTTDM_IRER); + } + } + +rv_writel (1 , adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); +return 0 ; +} + +static int acp3x_pcm_runtime_suspend (struct device *dev) {int status;
@@ -740,6 +785,7 @@ static int acp3x_pcm_runtime_resume(struct device *dev)static const struct dev_pm_ops acp3x_pm_ops = { .runtime_suspend = acp3x_pcm_runtime_suspend, .runtime_resume = acp3x_pcm_runtime_resume, + .resume = acp3x_resume, };static struct platform_driver acp3x_dma_driver = {
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/117 ASoC: AMD: enable ACP3x drivers build
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
ACP3x drivers can be build by selecting necessary kernel config option. The patch enables build support of the same.
--- sound/soc/amd/Kconfig | 4 ++++ sound/soc/amd/Makefile | 1 + sound/soc/amd/raven/Makefile | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 sound/soc/amd/raven/Makefile
sound/soc/amd/Kconfig +4 -0
@@ -2,3 +2,7 @@ config SND_SOC_AMD_ACP tristate "AMD Audio Coprocessor support" help This option enables ACP DMA support on AMD platform. +config SND_SOC_AMD_ACP3x + tristate "AMD Audio Coprocessor-v3.x support" + help + This option enables ACP v3.x I2S support on AMD platform.
sound/soc/amd/Makefile +1 -0
@@ -1,3 +1,4 @@ snd-soc-acp-pcm-objs := acp-pcm-dma.o obj-$(CONFIG_SND_SOC_AMD_ACP) += snd-soc-acp-pcm.o +obj-$(CONFIG_SND_SOC_AMD_ACP3x) += raven/
sound/soc/amd/raven/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +snd-pci-acp3x-objs := pci-acp3x.o +snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o +obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o +obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/117 ASoC: AMD: create/add dummy codec and machine devices/drivers
In reply to a message not in the archiveFrom: Maruthi Srinivas Bayyavarapu <[email protected]>
Dummy codec and machine devices are created so that ASoC based soundcard can be created. Respective drivers which bound to these devices are added.
--- sound/soc/amd/raven/Makefile | 4 + sound/soc/amd/raven/acp3x-dummy5102.c | 136 ++++++++++++++++++++++++++++++++++ sound/soc/amd/raven/dummy-w5102.c | 102 +++++++++++++++++++++++++ sound/soc/amd/raven/pci-acp3x.c | 34 ++++++++- 4 files changed, 272 insertions(+), 4 deletions(-) create mode 100644 sound/soc/amd/raven/acp3x-dummy5102.c create mode 100644 sound/soc/amd/raven/dummy-w5102.c
sound/soc/amd/raven/Makefile +4 -0
@@ -1,4 +1,8 @@ snd-pci-acp3x-objs := pci-acp3x.o snd-acp3x-pcm-dma-objs := acp3x-pcm-dma.o +snd-soc-dummy-w5102-objs := dummy-w5102.o +snd-soc-acp3x-mach-objs := acp3x-dummy5102.o obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-pci-acp3x.o obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-acp3x-pcm-dma.o +obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-soc-dummy-w5102.o +obj-$(CONFIG_SND_SOC_AMD_ACP3x) += snd-soc-acp3x-mach.o
sound/soc/amd/raven/acp3x-dummy5102.c new file +136 -0
136 lines not on this page · raw message
sound/soc/amd/raven/dummy-w5102.c new file +102 -0
102 lines not on this page · raw message
sound/soc/amd/raven/pci-acp3x.c +30 -4
@@ -24,7 +24,7 @@ struct acp3x_dev_data {void __iomem *acp3x_base;bool acp3x_audio_mode;struct resource *res; -struct platform_device *pdev; +struct platform_device *pdev[3 ]; }; static int snd_acp3x_probe(struct pci_dev *pci,
@@ -103,13 +103,30 @@ static int snd_acp3x_probe(struct pci_dev *pci, pdevinfo.data = &irqflags; pdevinfo.size_data =sizeof (irqflags); - adata->pdev =platform_device_register_full (&pdevinfo); -if (adata->pdev ==NULL ) { + adata->pdev[0 ] =platform_device_register_full (&pdevinfo); +if (adata->pdev[0 ] ==NULL ) {dev_err (&pci->dev,"cannot register %s device\n" , pdevinfo.name); ret = -ENODEV ; goto unmap_mmio; } + +/* create dummy codec device */ + adata->pdev[1 ] =platform_device_register_simple ("dummy_w5102" , +0 ,NULL ,0 ); +if (IS_ERR (adata->pdev[1 ])) { +dev_err (&pci->dev,"Cannot register dummy_w5102\n" ); + ret = -ENODEV ; + goto unregister_pdev0; + } +/* create dummy mach device */ + adata->pdev[2 ] =platform_device_register_simple ( +"acp3x_w5102_mach" ,0 ,NULL ,0 ); +if (IS_ERR (adata->pdev[2 ])) { +dev_err (&pci->dev,"Cannot register acp3x_w5102_mach\n" ); + ret = -ENODEV ; + goto unregister_pdev1; + } }else {dev_err (&pci->dev,"Inavlid ACP audio mode : %d\n" , val); ret = -ENODEV ;
@@ -118,6 +135,10 @@ static int snd_acp3x_probe(struct pci_dev *pci,return 0 ; +unregister_pdev1: +platform_device_unregister (adata->pdev[1 ]); +unregister_pdev0: +platform_device_unregister (adata->pdev[0 ]); unmap_mmio:pci_disable_msi (pci);iounmap (adata->acp3x_base);
@@ -131,9 +152,14 @@ static int snd_acp3x_probe(struct pci_dev *pci,static void snd_acp3x_remove (struct pci_dev *pci) { +int i;struct acp3x_dev_data *adata =pci_get_drvdata (pci); -platform_device_unregister (adata->pdev); +if (adata->acp3x_audio_mode == ACP3x_I2S_MODE) { +for (i =2 ; i >=0 ; i--) +platform_device_unregister (adata->pdev[i]); + } +iounmap (adata->acp3x_base);pci_disable_msi (pci);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/117 soc/amd/raven: Disabling TDM mode flag
In reply to a message not in the archiveFrom: Vijendar Mukunda <[email protected]>
--- sound/soc/amd/raven/acp3x-dummy5102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/amd/raven/acp3x-dummy5102.c +1 -1
@@ -52,7 +52,7 @@ static struct snd_soc_dai_link acp3x_dai_w5102[] = { .cpu_dai_name = "acp3x_rv_i2s.0", .codec_dai_name = "dummy_w5102_dai", .codec_name = "dummy_w5102.0", - .dai_fmt =SND_SOC_DAIFMT_DSP_A /*SND_SOC_DAIFMT_I2S*/ |SND_SOC_DAIFMT_NB_NF + .dai_fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, .ops = &acp3x_wm5102_ops, .init = acp3x_init,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/117 drm/amdgpu: add gpu_info firmware (v3)
In reply to a message not in the archiveAdd a new gpu info firmware to store gpu specific configuration data. This allows us to store hw constants in a unified place.
v2: adjust structure and elements
v3: further restructure
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 21 +++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 25 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +21 -0
@@ -197,6 +197,27 @@ void amdgpu_ucode_print_sdma_hdr(const struct common_firmware_header *hdr) } } +void amdgpu_ucode_print_gpu_info_hdr (const struct common_firmware_header *hdr) +{ +uint16_t version_major =le16_to_cpu (hdr->header_version_major); +uint16_t version_minor =le16_to_cpu (hdr->header_version_minor); + +DRM_DEBUG ("GPU_INFO\n" ); +amdgpu_ucode_print_common_hdr (hdr); + +if (version_major ==1 ) { +const struct gpu_info_firmware_header_v1_0 *gpu_info_hdr = + container_of(hdr, struct gpu_info_firmware_header_v1_0, header); + +DRM_DEBUG ("version_major: %u\n" , +le16_to_cpu (gpu_info_hdr->version_major)); +DRM_DEBUG ("version_minor: %u\n" , +le16_to_cpu (gpu_info_hdr->version_minor)); + }else { +DRM_ERROR ("Unknown gpu_info ucode version: %u.%u\n" , version_major, version_minor); + } +} +int amdgpu_ucode_validate (const struct firmware *fw) { const struct common_firmware_header *hdr =
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +25 -0
@@ -113,6 +113,29 @@ struct sdma_firmware_header_v1_1 {uint32_t digest_size; }; +/* gpu info payload */ +struct gpu_info_firmware_v1_0 { +uint32_t gc_num_se; +uint32_t gc_num_cu_per_sh; +uint32_t gc_num_sh_per_se; +uint32_t gc_num_rb_per_se; +uint32_t gc_num_tccs; +uint32_t gc_num_gprs; +uint32_t gc_num_max_gs_thds; +uint32_t gc_gs_table_depth; +uint32_t gc_gsprim_buff_depth; +uint32_t gc_parameter_cache_depth; +uint32_t gc_double_offchip_lds_buffer; +uint32_t gc_wave_size; +}; + +/* version_major=1, version_minor=0 */ +struct gpu_info_firmware_header_v1_0 { +struct common_firmware_header header; +uint16_t version_major;/* version */ +uint16_t version_minor;/* version */ +}; +/* header is fixed size */ union amdgpu_firmware_header {struct common_firmware_header common;
@@ -124,6 +147,7 @@ union amdgpu_firmware_header {struct rlc_firmware_header_v2_0 rlc_v2_0;struct sdma_firmware_header_v1_0 sdma;struct sdma_firmware_header_v1_1 sdma_v1_1; +struct gpu_info_firmware_header_v1_0 gpu_info;uint8_t raw[0x100 ]; };
@@ -184,6 +208,7 @@ void amdgpu_ucode_print_smc_hdr(const struct common_firmware_header *hdr);void amdgpu_ucode_print_gfx_hdr (const struct common_firmware_header *hdr);void amdgpu_ucode_print_rlc_hdr (const struct common_firmware_header *hdr);void amdgpu_ucode_print_sdma_hdr (const struct common_firmware_header *hdr); +void amdgpu_ucode_print_gpu_info_hdr (const struct common_firmware_header *hdr);int amdgpu_ucode_validate (const struct firmware *fw);bool amdgpu_ucode_hdr_version (union amdgpu_firmware_header *hdr,uint16_t hdr_major,uint16_t hdr_minor);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/117 drm/amdgpu: parse the gpu_info firmware (v4)
In reply to a message not in the archiveAnd populate the gfx structures from it.
v2: update the structures updated by the table
v3: rework based on new table structure
v4: simplify things
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 98 ++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +98 -0
@@ -55,6 +55,8 @@#include <linux/pci.h> #include <linux/firmware.h> +MODULE_FIRMWARE ("amdgpu/vega10_gpu_info.bin" ); +static int amdgpu_debugfs_regs_init (struct amdgpu_device *adev);static void amdgpu_debugfs_regs_cleanup (struct amdgpu_device *adev);
@@ -1392,6 +1394,98 @@ static void amdgpu_device_enable_virtual_display(struct amdgpu_device *adev) } } +static int amdgpu_device_parse_gpu_info_fw (struct amdgpu_device *adev) +{ +const struct firmware *fw; +const char *chip_name; +char fw_name[30 ]; +int err; +const struct gpu_info_firmware_header_v1_0 *hdr; + +switch (adev->asic_type) { +case CHIP_TOPAZ : +case CHIP_TONGA : +case CHIP_FIJI : +case CHIP_POLARIS11 : +case CHIP_POLARIS10 : +case CHIP_POLARIS12 : +case CHIP_CARRIZO : +case CHIP_STONEY : +#ifdef CONFIG_DRM_AMDGPU_SI +case CHIP_VERDE : +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_OLAND : +case CHIP_HAINAN : +#endif +#ifdef CONFIG_DRM_AMDGPU_CIK +case CHIP_BONAIRE : +case CHIP_HAWAII : +case CHIP_KAVERI : +case CHIP_KABINI : +case CHIP_MULLINS : +#endif +default : +return 0 ; +case CHIP_VEGA10 : + chip_name ="vega10" ; +break ; + } + +snprintf (fw_name,sizeof (fw_name),"amdgpu/%s_gpu_info.bin" , chip_name); + err =request_firmware (&fw, fw_name, adev->dev); +if (err) { +dev_err (adev->dev, +"Failed to load gpu_info firmware \"%s\"\n" , + fw_name); + goto out; + } + err =amdgpu_ucode_validate (fw); +if (err) { +dev_err (adev->dev, +"Failed to validate gpu_info firmware \"%s\"\n" , + fw_name); + goto out; + } + + hdr = (const struct gpu_info_firmware_header_v1_0 *)fw->data; +amdgpu_ucode_print_gpu_info_hdr (&hdr->header); + +switch (hdr->version_major) { +case 1 : + { +const struct gpu_info_firmware_v1_0 *gpu_info_fw = + (const struct gpu_info_firmware_v1_0 *)(fw->data + +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); + + adev->gfx.config.max_shader_engines = gpu_info_fw->gc_num_se; + adev->gfx.config.max_cu_per_sh = gpu_info_fw->gc_num_cu_per_sh; + adev->gfx.config.max_sh_per_se = gpu_info_fw->gc_num_sh_per_se; + adev->gfx.config.max_backends_per_se = gpu_info_fw->gc_num_rb_per_se; + adev->gfx.config.max_texture_channel_caches = + gpu_info_fw->gc_num_tccs; + adev->gfx.config.max_gprs = gpu_info_fw->gc_num_gprs; + adev->gfx.config.max_gs_threads = gpu_info_fw->gc_num_max_gs_thds; + adev->gfx.config.gs_vgt_table_depth = gpu_info_fw->gc_gs_table_depth; + adev->gfx.config.gs_prim_buffer_depth = gpu_info_fw->gc_gsprim_buff_depth; + adev->gfx.config.double_offchip_lds_buf = + gpu_info_fw->gc_double_offchip_lds_buffer; + adev->gfx.cu_info.wave_front_size = gpu_info_fw->gc_wave_size; +break ; + } +default : +dev_err (adev->dev, +"Unsupported gpu_info table %d\n" , hdr->header.ucode_version); + err = -EINVAL ; + goto out; + } +out: +release_firmware (fw); + fw =NULL ; + +return err; +} +static int amdgpu_early_init (struct amdgpu_device *adev) {int i, r;
@@ -1456,6 +1550,10 @@ static int amdgpu_early_init(struct amdgpu_device *adev)return -EINVAL ; } + r =amdgpu_device_parse_gpu_info_fw (adev); +if (r) +return r; +if (amdgpu_sriov_vf (adev)) { r =amdgpu_virt_request_full_gpu (adev, true);if (r)
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/117 drm/amdgpu/gfx9: drop duplicate gfx info init (v3)
In reply to a message not in the archiveTaken care of by gpu info firmware now.
v2: rebase
v3: rework based on latest firmware
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -10
@@ -781,21 +781,11 @@ static void gfx_v9_0_gpu_early_init(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_VEGA10 : - adev->gfx.config.max_shader_engines =4 ; - adev->gfx.config.max_cu_per_sh =16 ; - adev->gfx.config.max_sh_per_se =1 ; - adev->gfx.config.max_backends_per_se =4 ; - adev->gfx.config.max_texture_channel_caches =16 ; - adev->gfx.config.max_gprs =256 ; - adev->gfx.config.max_gs_threads =32 ; adev->gfx.config.max_hw_contexts =8 ; - adev->gfx.config.sc_prim_fifo_size_frontend =0x20 ; adev->gfx.config.sc_prim_fifo_size_backend =0x100 ; adev->gfx.config.sc_hiz_tile_fifo_size =0x30 ; adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; - adev->gfx.config.gs_vgt_table_depth =32 ; - adev->gfx.config.gs_prim_buffer_depth =1792 ; gb_addr_config =VEGA10_GB_ADDR_CONFIG_GOLDEN ;break ;default :
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 25/117 drm/amdgpu: add RAVEN family id definition
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
RAVEN is a new APU.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++-- drivers/gpu/drm/amd/include/amd_shared.h | 1 + include/uapi/drm/amdgpu_drm.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -2
@@ -80,6 +80,7 @@ static const char *amdgpu_asic_name[] = {"POLARIS11" ,"POLARIS12" ,"VEGA10" , +"RAVEN" , "LAST", };
@@ -1538,8 +1539,12 @@ static int amdgpu_early_init(struct amdgpu_device *adev)return r;break ;#endif -case CHIP_VEGA10 : - adev->family =AMDGPU_FAMILY_AI ; +case CHIP_VEGA10 : +case CHIP_RAVEN : +if (adev->asic_type ==CHIP_RAVEN ) + adev->family =AMDGPU_FAMILY_RV ; +else + adev->family =AMDGPU_FAMILY_AI ; r =soc15_set_ip_blocks (adev);if (r)
drivers/gpu/drm/amd/include/amd_shared.h +1 -0
@@ -48,6 +48,7 @@ enum amd_asic_type {CHIP_POLARIS11 ,CHIP_POLARIS12 ,CHIP_VEGA10 , +CHIP_RAVEN , CHIP_LAST, };
include/uapi/drm/amdgpu_drm.h +1 -0
@@ -862,6 +862,7 @@ struct drm_amdgpu_info_vce_clock_table {#define AMDGPU_FAMILY_VI 130/* Iceland, Tonga */ #define AMDGPU_FAMILY_CZ 135/* Carrizo, Stoney */ #define AMDGPU_FAMILY_AI 141/* Vega10 */ +#define AMDGPU_FAMILY_RV 142/* Raven */ /* * Definition of free sync enter and exit signals
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 26/117 drm/amdgpu: add Raven ip blocks
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Add the IP blocks for RAVEN.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +15 -0
@@ -485,6 +485,21 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_ip_block_add (adev, &uvd_v7_0_ip_block);amdgpu_ip_block_add (adev, &vce_v4_0_ip_block);break ; +case CHIP_RAVEN : +amdgpu_ip_block_add (adev, &vega10_common_ip_block); +amdgpu_ip_block_add (adev, &gfxhub_v1_0_ip_block); +amdgpu_ip_block_add (adev, &mmhub_v1_0_ip_block); +amdgpu_ip_block_add (adev, &gmc_v9_0_ip_block); +amdgpu_ip_block_add (adev, &vega10_ih_ip_block); +#if defined(CONFIG_DRM_AMD_DC ) +if (amdgpu_device_has_dc_support (adev)) +amdgpu_ip_block_add (adev, &dm_ip_block); +#else +# warning "Enable CONFIG_DRM_AMD_DC for display support on Raven." +#endif +amdgpu_ip_block_add (adev, &gfx_v9_0_ip_block); +amdgpu_ip_block_add (adev, &sdma_v4_0_ip_block); +break ;default :return -EINVAL ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 27/117 drm/amdgpu/soc15: add Raven golden setting
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Add the common golden settings for Raven.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +9 -0
@@ -206,6 +206,10 @@ static const u32 vega10_golden_init[] = { }; +static const u32 raven_golden_init[] = +{ +}; +static void soc15_init_golden_registers (struct amdgpu_device *adev) {/* Some of the registers might be dependent on GRBM_GFX_INDEX */
@@ -217,6 +221,11 @@ static void soc15_init_golden_registers(struct amdgpu_device *adev) vega10_golden_init, (const u32)ARRAY_SIZE(vega10_golden_init));break ; +case CHIP_RAVEN : +amdgpu_program_register_sequence (adev, + raven_golden_init, + (const u32 )ARRAY_SIZE (raven_golden_init)); +break ;default :break ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 28/117 drm/amd/amdgpu: fill in raven case in soc15 early init
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +5 -0
@@ -599,6 +599,11 @@ static int soc15_common_early_init(void *handle) adev->pg_flags =0 ; adev->external_rev_id =0x1 ;break ; +case CHIP_RAVEN : + adev->cg_flags =0 ; + adev->pg_flags =0 ; + adev->external_rev_id =0x1 ; +break ;default :/* FIXME: not supported yet */ return -EINVAL ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 29/117 drm/amdgpu/soc15: add clock gating functions for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +14 -0
@@ -831,6 +831,20 @@ static int soc15_common_set_clockgating_state(void *handle,soc15_update_df_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false);break ; +case CHIP_RAVEN : +nbio_v6_1_update_medium_grain_clock_gating (adev, + state ==AMD_CG_STATE_GATE ? true : false); +nbio_v6_1_update_medium_grain_light_sleep (adev, + state ==AMD_CG_STATE_GATE ? true : false); +soc15_update_hdp_light_sleep (adev, + state ==AMD_CG_STATE_GATE ? true : false); +soc15_update_drm_clock_gating (adev, + state ==AMD_CG_STATE_GATE ? true : false); +soc15_update_drm_light_sleep (adev, + state ==AMD_CG_STATE_GATE ? true : false); +soc15_update_rom_medium_grain_clock_gating (adev, + state ==AMD_CG_STATE_GATE ? true : false); +break ;default :break ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 30/117 drm/amdgpu: enable soc15 clock gating flags for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +15 -1
@@ -600,7 +600,21 @@ static int soc15_common_early_init(void *handle) adev->external_rev_id =0x1 ;break ;case CHIP_RAVEN : - adev->cg_flags =0 ; + adev->cg_flags =AMD_CG_SUPPORT_GFX_MGCG | +AMD_CG_SUPPORT_GFX_MGLS | +AMD_CG_SUPPORT_GFX_RLC_LS | +AMD_CG_SUPPORT_GFX_CP_LS | +AMD_CG_SUPPORT_GFX_3D_CGCG | +AMD_CG_SUPPORT_GFX_3D_CGLS | +AMD_CG_SUPPORT_GFX_CGCG | +AMD_CG_SUPPORT_GFX_CGLS | +AMD_CG_SUPPORT_BIF_MGCG | +AMD_CG_SUPPORT_BIF_LS | +AMD_CG_SUPPORT_HDP_MGCG | +AMD_CG_SUPPORT_HDP_LS | +AMD_CG_SUPPORT_DRM_MGCG | +AMD_CG_SUPPORT_DRM_LS | +AMD_CG_SUPPORT_ROM_MGCG ; adev->pg_flags =0 ; adev->external_rev_id =0x1 ;break ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 31/117 drm/amdgpu: add Raven chip id case for ucode
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Set the appropriate ucode loading mechanism. Set to direct for now.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +9 -0
@@ -274,6 +274,15 @@ 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_RAVEN : +#if 0 +if (!load_type) +return AMDGPU_FW_LOAD_DIRECT ; +else +return AMDGPU_FW_LOAD_PSP ; +#else +return AMDGPU_FW_LOAD_DIRECT ; +#endif default :DRM_ERROR ("Unknow firmware load type\n" ); }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 32/117 drm/amdgpu: add module firmware for raven
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Fetch correct firmware for raven for gfx and sdma.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +7 -0
@@ -48,6 +48,13 @@ MODULE_FIRMWARE("amdgpu/vega10_mec.bin");MODULE_FIRMWARE ("amdgpu/vega10_mec2.bin" );MODULE_FIRMWARE ("amdgpu/vega10_rlc.bin" ); +MODULE_FIRMWARE ("amdgpu/raven_ce.bin" ); +MODULE_FIRMWARE ("amdgpu/raven_pfp.bin" ); +MODULE_FIRMWARE ("amdgpu/raven_me.bin" ); +MODULE_FIRMWARE ("amdgpu/raven_mec.bin" ); +MODULE_FIRMWARE ("amdgpu/raven_mec2.bin" ); +MODULE_FIRMWARE ("amdgpu/raven_rlc.bin" ); +static const struct amdgpu_gds_reg_offset amdgpu_gds_reg_offset[] = { {SOC15_REG_OFFSET (GC ,0 , mmGDS_VMID0_BASE),SOC15_REG_OFFSET (GC ,0 , mmGDS_VMID0_SIZE),
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +5 -1
@@ -42,6 +42,7 @@MODULE_FIRMWARE ("amdgpu/vega10_sdma.bin" );MODULE_FIRMWARE ("amdgpu/vega10_sdma1.bin" ); +MODULE_FIRMWARE ("amdgpu/raven_sdma.bin" );static void sdma_v4_0_set_ring_funcs (struct amdgpu_device *adev);static void sdma_v4_0_set_buffer_funcs (struct amdgpu_device *adev);
@@ -1074,7 +1075,10 @@ static int sdma_v4_0_early_init(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; - adev->sdma.num_instances =2 ; +if (adev->asic_type ==CHIP_RAVEN ) + adev->sdma.num_instances =1 ; +else + adev->sdma.num_instances =2 ;sdma_v4_0_set_ring_funcs (adev);sdma_v4_0_set_buffer_funcs (adev);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 33/117 drm/amdgpu: add gc9.1 golden setting (v2)
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Add the GFX9 golden settings.
v2: squash in updates
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +29 -0
@@ -116,6 +116,27 @@ static const u32 golden_settings_gc_9_0_vg10[] = };#define VEGA10_GB_ADDR_CONFIG_GOLDEN 0x2a114042 +static const u32 golden_settings_gc_9_1[] = +{ +SOC15_REG_OFFSET (GC ,0 , mmCB_HW_CONTROL),0xfffdf3cf ,0x00014104 , +SOC15_REG_OFFSET (GC ,0 , mmDB_DEBUG2),0xf00fffff ,0x00000420 , +SOC15_REG_OFFSET (GC ,0 , mmGB_GPU_ID),0x0000000f ,0x00000000 , +SOC15_REG_OFFSET (GC ,0 , mmPA_SC_BINNER_EVENT_CNTL_3),0x00000003 ,0x82400024 , +SOC15_REG_OFFSET (GC ,0 , mmPA_SC_ENHANCE),0x3fffffff ,0x00000001 , +SOC15_REG_OFFSET (GC ,0 , mmPA_SC_LINE_STIPPLE_STATE),0x0000ff0f ,0x00000000 , +SOC15_REG_OFFSET (GC ,0 , mmTA_CNTL_AUX),0xfffffeef ,0x010b0000 , +SOC15_REG_OFFSET (GC ,0 , mmTCP_CHAN_STEER_HI),0xffffffff ,0x00000000 , +SOC15_REG_OFFSET (GC ,0 , mmTCP_CHAN_STEER_LO),0xffffffff ,0x00003120 , +SOC15_REG_OFFSET (GC ,0 , mmVGT_GS_MAX_WAVE_ID),0x00000fff ,0x000003ff +}; + +static const u32 golden_settings_gc_9_1_rv1[] = +{ +SOC15_REG_OFFSET (GC ,0 , mmGB_ADDR_CONFIG),0xffff77ff ,0x26013042 , +SOC15_REG_OFFSET (GC ,0 , mmGB_ADDR_CONFIG_READ),0xffff77ff ,0x26013042 , +SOC15_REG_OFFSET (GC ,0 , mmPA_SC_ENHANCE_1),0xffffffff ,0x00048000 , +SOC15_REG_OFFSET (GC ,0 , mmTD_CNTL),0x01bd9f33 ,0x00000800 +};static void gfx_v9_0_set_ring_funcs (struct amdgpu_device *adev);static void gfx_v9_0_set_irq_funcs (struct amdgpu_device *adev);
@@ -138,6 +159,14 @@ static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev) golden_settings_gc_9_0_vg10, (const u32)ARRAY_SIZE(golden_settings_gc_9_0_vg10));break ; +case CHIP_RAVEN : +amdgpu_program_register_sequence (adev, + golden_settings_gc_9_1, + (const u32 )ARRAY_SIZE (golden_settings_gc_9_1)); +amdgpu_program_register_sequence (adev, + golden_settings_gc_9_1_rv1, + (const u32 )ARRAY_SIZE (golden_settings_gc_9_1_rv1)); +break ;default :break ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 34/117 drm/amdgpu/gfx9: add chip name for raven when initializing microcode
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Fetch the correct ucode for raven.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +3 -0
@@ -328,6 +328,9 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev)case CHIP_VEGA10 : chip_name ="vega10" ;break ; +case CHIP_RAVEN : + chip_name ="raven" ; +break ;default :BUG (); }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 35/117 drm/amdgpu/gfx9: add raven gfx config
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +11 -1
@@ -115,7 +115,6 @@ static const u32 golden_settings_gc_9_0_vg10[] =SOC15_REG_OFFSET (GC ,0 , mmSPI_CONFIG_CNTL_1),0x0000000f ,0x00000007 }; -#define VEGA10_GB_ADDR_CONFIG_GOLDEN 0x2a114042static const u32 golden_settings_gc_9_1[] = { SOC15_REG_OFFSET(GC, 0, mmCB_HW_CONTROL), 0xfffdf3cf, 0x00014104,
@@ -138,6 +137,9 @@ static const u32 golden_settings_gc_9_1_rv1[] = SOC15_REG_OFFSET(GC, 0, mmTD_CNTL), 0x01bd9f33, 0x00000800 }; +#define VEGA10_GB_ADDR_CONFIG_GOLDEN 0x2a114042 +#define RAVEN_GB_ADDR_CONFIG_GOLDEN 0x26013042 +static void gfx_v9_0_set_ring_funcs (struct amdgpu_device *adev);static void gfx_v9_0_set_irq_funcs (struct amdgpu_device *adev);static void gfx_v9_0_set_gds_init (struct amdgpu_device *adev);
@@ -827,6 +829,14 @@ static void gfx_v9_0_gpu_early_init(struct amdgpu_device *adev) adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; gb_addr_config =VEGA10_GB_ADDR_CONFIG_GOLDEN ;break ; +case CHIP_RAVEN : + adev->gfx.config.max_hw_contexts =8 ; + adev->gfx.config.sc_prim_fifo_size_frontend =0x20 ; + adev->gfx.config.sc_prim_fifo_size_backend =0x100 ; + adev->gfx.config.sc_hiz_tile_fifo_size =0x30 ; + adev->gfx.config.sc_earlyz_tile_fifo_size =0x4C0 ; + gb_addr_config =RAVEN_GB_ADDR_CONFIG_GOLDEN ; +break ;default :BUG ();break ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 36/117 drm/amdgpu: add gfx clock gating for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -0
@@ -2877,6 +2877,7 @@ static int gfx_v9_0_set_clockgating_state(void *handle,switch (adev->asic_type) {case CHIP_VEGA10 : +case CHIP_RAVEN :gfx_v9_0_update_gfx_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false);break ;
@@ -3736,6 +3737,7 @@ static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev) {switch (adev->asic_type) {case CHIP_VEGA10 : +case CHIP_RAVEN : adev->gfx.rlc.funcs = &gfx_v9_0_rlc_funcs;break ;default :
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 37/117 drm/amdgpu/gfx9: extend rlc fw setup
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
Required for gfx powergating.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 46 ++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +43 -3
@@ -323,6 +323,9 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev)struct amdgpu_firmware_info *info =NULL ;const struct common_firmware_header *header =NULL ;const struct gfx_firmware_header_v1_0 *cp_hdr; +const struct rlc_firmware_header_v2_0 *rlc_hdr; +unsigned int *tmp =NULL ; +unsigned int i =0 ;DRM_DEBUG ("\n" );
@@ -375,9 +378,46 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev)if (err) goto out; err =amdgpu_ucode_validate (adev->gfx.rlc_fw); - cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.rlc_fw->data; - adev->gfx.rlc_fw_version =le32_to_cpu (cp_hdr->header.ucode_version); - adev->gfx.rlc_feature_version =le32_to_cpu (cp_hdr->ucode_feature_version); + rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data; + adev->gfx.rlc_fw_version =le32_to_cpu (rlc_hdr->header.ucode_version); + adev->gfx.rlc_feature_version =le32_to_cpu (rlc_hdr->ucode_feature_version); + adev->gfx.rlc.save_and_restore_offset = +le32_to_cpu (rlc_hdr->save_and_restore_offset); + adev->gfx.rlc.clear_state_descriptor_offset = +le32_to_cpu (rlc_hdr->clear_state_descriptor_offset); + adev->gfx.rlc.avail_scratch_ram_locations = +le32_to_cpu (rlc_hdr->avail_scratch_ram_locations); + adev->gfx.rlc.reg_restore_list_size = +le32_to_cpu (rlc_hdr->reg_restore_list_size); + adev->gfx.rlc.reg_list_format_start = +le32_to_cpu (rlc_hdr->reg_list_format_start); + adev->gfx.rlc.reg_list_format_separate_start = +le32_to_cpu (rlc_hdr->reg_list_format_separate_start); + adev->gfx.rlc.starting_offsets_start = +le32_to_cpu (rlc_hdr->starting_offsets_start); + adev->gfx.rlc.reg_list_format_size_bytes = +le32_to_cpu (rlc_hdr->reg_list_format_size_bytes); + adev->gfx.rlc.reg_list_size_bytes = +le32_to_cpu (rlc_hdr->reg_list_size_bytes); + adev->gfx.rlc.register_list_format = +kmalloc (adev->gfx.rlc.reg_list_format_size_bytes + + adev->gfx.rlc.reg_list_size_bytes,GFP_KERNEL ); +if (!adev->gfx.rlc.register_list_format) { + err = -ENOMEM ; + goto out; + } + + tmp = (unsigned int *)((uintptr_t )rlc_hdr + +le32_to_cpu (rlc_hdr->reg_list_format_array_offset_bytes)); +for (i =0 ; i < (rlc_hdr->reg_list_format_size_bytes >>2 ); i++) + adev->gfx.rlc.register_list_format[i] =le32_to_cpu (tmp[i]); + + adev->gfx.rlc.register_restore = adev->gfx.rlc.register_list_format + i; + + tmp = (unsigned int *)((uintptr_t )rlc_hdr + +le32_to_cpu (rlc_hdr->reg_list_array_offset_bytes)); +for (i =0 ; i < (rlc_hdr->reg_list_size_bytes >>2 ); i++) + adev->gfx.rlc.register_restore[i] =le32_to_cpu (tmp[i]);snprintf (fw_name,sizeof (fw_name),"amdgpu/%s_mec.bin" , chip_name); err =request_firmware (&adev->gfx.mec_fw, fw_name, adev->dev);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 38/117 drm/amdgpu/gfx9: enable cp interrupt for CGCG/CGLS/MGCG
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
Required for proper handshaking between the GFX and RLC.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -3
@@ -1460,9 +1460,6 @@ static void gfx_v9_0_enable_gui_idle_interrupt(struct amdgpu_device *adev, {u32 tmp =RREG32_SOC15 (GC ,0 , mmCP_INT_CNTL_RING0); -if (enable) -return ; - tmp =REG_SET_FIELD (tmp,CP_INT_CNTL_RING0 ,CNTX_BUSY_INT_ENABLE , enable ?1 :0 ); tmp =REG_SET_FIELD (tmp,CP_INT_CNTL_RING0 ,CNTX_EMPTY_INT_ENABLE , enable ?1 :0 ); tmp =REG_SET_FIELD (tmp,CP_INT_CNTL_RING0 ,CMP_BUSY_INT_ENABLE , enable ?1 :0 );
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 39/117 drm/amdgpu: correct gfx9 csb size
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
programming pa_sc_raster_config/config1 reg is removed from gfx9 csb
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +0 -2
@@ -1665,8 +1665,6 @@ static u32 gfx_v9_0_get_csb_size(struct amdgpu_device *adev)return 0 ; } } -/* pa_sc_raster_config/pa_sc_raster_config1 */ - count +=4 ;/* end clear state */ count +=2 ;/* clear state */
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 40/117 drm/amdgpu/gfx9: add rlc bo init/fini
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
setup the save and restore buffers used for gfx powergating.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 236 ++++++++++++++++++++++++++++++---- 1 file changed, 209 insertions(+), 27 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +209 -27
@@ -529,6 +529,209 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev)return err; } +static u32 gfx_v9_0_get_csb_size (struct amdgpu_device *adev) +{ +u32 count =0 ; +const struct cs_section_def *sect =NULL ; +const struct cs_extent_def *ext =NULL ; + +/* begin clear state */ + count +=2 ; +/* context control state */ + count +=3 ; + +for (sect = gfx9_cs_data; sect->section !=NULL ; ++sect) { +for (ext = sect->section; ext->extent !=NULL ; ++ext) { +if (sect->id ==SECT_CONTEXT ) + count +=2 + ext->reg_count; +else +return 0 ; + } + } + +/* end clear state */ + count +=2 ; +/* clear state */ + count +=2 ; + +return count; +} + +static void gfx_v9_0_get_csb_buffer (struct amdgpu_device *adev, +volatile u32 *buffer) +{ +u32 count =0 , i; +const struct cs_section_def *sect =NULL ; +const struct cs_extent_def *ext =NULL ; + +if (adev->gfx.rlc.cs_data ==NULL ) +return ; +if (buffer ==NULL ) +return ; + + buffer[count++] =cpu_to_le32 (PACKET3 (PACKET3_PREAMBLE_CNTL ,0 )); + buffer[count++] =cpu_to_le32 (PACKET3_PREAMBLE_BEGIN_CLEAR_STATE ); + + buffer[count++] =cpu_to_le32 (PACKET3 (PACKET3_CONTEXT_CONTROL ,1 )); + buffer[count++] =cpu_to_le32 (0x80000000 ); + buffer[count++] =cpu_to_le32 (0x80000000 ); + +for (sect = adev->gfx.rlc.cs_data; sect->section !=NULL ; ++sect) { +for (ext = sect->section; ext->extent !=NULL ; ++ext) { +if (sect->id ==SECT_CONTEXT ) { + buffer[count++] = +cpu_to_le32 (PACKET3 (PACKET3_SET_CONTEXT_REG , ext->reg_count)); + buffer[count++] =cpu_to_le32 (ext->reg_index - +PACKET3_SET_CONTEXT_REG_START ); +for (i =0 ; i < ext->reg_count; i++) + buffer[count++] =cpu_to_le32 (ext->extent[i]); + }else { +return ; + } + } + } + + buffer[count++] =cpu_to_le32 (PACKET3 (PACKET3_PREAMBLE_CNTL ,0 )); + buffer[count++] =cpu_to_le32 (PACKET3_PREAMBLE_END_CLEAR_STATE ); + + buffer[count++] =cpu_to_le32 (PACKET3 (PACKET3_CLEAR_STATE ,0 )); + buffer[count++] =cpu_to_le32 (0 ); +} + +static void rv_init_cp_jump_table (struct amdgpu_device *adev) +{ +const __le32 *fw_data; +volatile u32 *dst_ptr; +int me, i, max_me =5 ; +u32 bo_offset =0 ; +u32 table_offset, table_size; + +/* write the cp table buffer */ + dst_ptr = adev->gfx.rlc.cp_table_ptr; +for (me =0 ; me < max_me; me++) { +if (me ==0 ) { +const struct gfx_firmware_header_v1_0 *hdr = + (const struct gfx_firmware_header_v1_0 *)adev->gfx.ce_fw->data; + fw_data = (const __le32 *) + (adev->gfx.ce_fw->data + +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); + table_offset =le32_to_cpu (hdr->jt_offset); + table_size =le32_to_cpu (hdr->jt_size); + }else if (me ==1 ) { +const struct gfx_firmware_header_v1_0 *hdr = + (const struct gfx_firmware_header_v1_0 *)adev->gfx.pfp_fw->data; + fw_data = (const __le32 *) + (adev->gfx.pfp_fw->data + +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); + table_offset =le32_to_cpu (hdr->jt_offset); + table_size =le32_to_cpu (hdr->jt_size); + }else if (me ==2 ) { +const struct gfx_firmware_header_v1_0 *hdr = + (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data; + fw_data = (const __le32 *) + (adev->gfx.me_fw->data + +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); + table_offset =le32_to_cpu (hdr->jt_offset); + table_size =le32_to_cpu (hdr->jt_size); + }else if (me ==3 ) { +const struct gfx_firmware_header_v1_0 *hdr = + (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data; + fw_data = (const __le32 *) + (adev->gfx.mec_fw->data + +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); + table_offset =le32_to_cpu (hdr->jt_offset); + table_size =le32_to_cpu (hdr->jt_size); + }else if (me ==4 ) { +const struct gfx_firmware_header_v1_0 *hdr = + (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec2_fw->data; + fw_data = (const __le32 *) + (adev->gfx.mec2_fw->data + +le32_to_cpu (hdr->header.ucode_array_offset_bytes)); + table_offset =le32_to_cpu (hdr->jt_offset); + table_size =le32_to_cpu (hdr->jt_size); + } + +for (i =0 ; i < table_size; i ++) { + dst_ptr[bo_offset + i] = +cpu_to_le32 (le32_to_cpu (fw_data[table_offset + i])); + } + + bo_offset += table_size; + } +} + +static void gfx_v9_0_rlc_fini (struct amdgpu_device *adev) +{ +/* clear state block */ +amdgpu_bo_free_kernel (&adev->gfx.rlc.clear_state_obj, + &adev->gfx.rlc.clear_state_gpu_addr, + (void **)&adev->gfx.rlc.cs_ptr); + +/* jump table block */ +amdgpu_bo_free_kernel (&adev->gfx.rlc.cp_table_obj, + &adev->gfx.rlc.cp_table_gpu_addr, + (void **)&adev->gfx.rlc.cp_table_ptr); +} + +static int gfx_v9_0_rlc_init (struct amdgpu_device *adev) +{ +volatile u32 *dst_ptr; +u32 dws; +const struct cs_section_def *cs_data; +int r; + + adev->gfx.rlc.cs_data = gfx9_cs_data; + + cs_data = adev->gfx.rlc.cs_data; + +if (cs_data) { +/* clear state block */ + adev->gfx.rlc.clear_state_size = dws =gfx_v9_0_get_csb_size (adev); +if (adev->gfx.rlc.clear_state_obj ==NULL ) { + r =amdgpu_bo_create_kernel (adev, dws *4 ,PAGE_SIZE , +AMDGPU_GEM_DOMAIN_VRAM , + &adev->gfx.rlc.clear_state_obj, + &adev->gfx.rlc.clear_state_gpu_addr, + (void **)&adev->gfx.rlc.cs_ptr); +if (r) { +dev_err (adev->dev, +"(%d) failed to create rlc csb bo\n" , r); +gfx_v9_0_rlc_fini (adev); +return r; + } + } +/* set up the cs buffer */ + dst_ptr = adev->gfx.rlc.cs_ptr; +gfx_v9_0_get_csb_buffer (adev, dst_ptr); +amdgpu_bo_kunmap (adev->gfx.rlc.clear_state_obj); +amdgpu_bo_unreserve (adev->gfx.rlc.clear_state_obj); + } + +if (adev->asic_type ==CHIP_RAVEN ) { +/* TODO: double check the cp_table_size for RV */ + adev->gfx.rlc.cp_table_size =ALIGN (96 *5 *4 ,2048 ) + (64 *1024 );/* JT + GDS */ +if (adev->gfx.rlc.cp_table_obj ==NULL ) { + r =amdgpu_bo_create_kernel (adev, adev->gfx.rlc.cp_table_size, +PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM , + &adev->gfx.rlc.cp_table_obj, + &adev->gfx.rlc.cp_table_gpu_addr, + (void **)&adev->gfx.rlc.cp_table_ptr); +if (r) { +dev_err (adev->dev, +"(%d) failed to create cp table bo\n" , r); +gfx_v9_0_rlc_fini (adev); +return r; + } + } + +rv_init_cp_jump_table (adev); +amdgpu_bo_kunmap (adev->gfx.rlc.cp_table_obj); +amdgpu_bo_unreserve (adev->gfx.rlc.cp_table_obj); + } + +return 0 ; +} +static void gfx_v9_0_mec_fini (struct amdgpu_device *adev) {int r;
@@ -1152,6 +1355,12 @@ static int gfx_v9_0_sw_init(void *handle)return r; } + r =gfx_v9_0_rlc_init (adev); +if (r) { +DRM_ERROR ("Failed to init rlc BOs!\n" ); +return r; + } + r =gfx_v9_0_mec_init (adev);if (r) {DRM_ERROR ("Failed to init MEC BOs!\n" );
@@ -1646,33 +1855,6 @@ static int gfx_v9_0_cp_gfx_load_microcode(struct amdgpu_device *adev)return 0 ; } -static u32 gfx_v9_0_get_csb_size (struct amdgpu_device *adev) -{ -u32 count =0 ; -const struct cs_section_def *sect =NULL ; -const struct cs_extent_def *ext =NULL ; - -/* begin clear state */ - count +=2 ; -/* context control state */ - count +=3 ; - -for (sect = gfx9_cs_data; sect->section !=NULL ; ++sect) { -for (ext = sect->section; ext->extent !=NULL ; ++ext) { -if (sect->id ==SECT_CONTEXT ) - count +=2 + ext->reg_count; -else -return 0 ; - } - } -/* end clear state */ - count +=2 ; -/* clear state */ - count +=2 ; - -return count; -} -static int gfx_v9_0_cp_gfx_start (struct amdgpu_device *adev) {struct amdgpu_ring *ring = &adev->gfx.gfx_ring[0 ];
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 41/117 drm/amdgpu/gfx9: rlc save&restore list programming
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 169 +++++++++++++++++++++++++++++++++- 1 file changed, 168 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +168 -1
@@ -39,7 +39,9 @@#define GFX9_NUM_GFX_RINGS 1#define GFX9_NUM_COMPUTE_RINGS 8 -#define RLCG_UCODE_LOADING_START_ADDRESS 0x2000 +#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L +#define RLC_SAVE_RESTORE_ADDR_STARTING_OFFSET 0x00000000L +#define GFX9_RLC_FORMAT_DIRECT_REG_LIST_LENGTH 34MODULE_FIRMWARE ("amdgpu/vega10_ce.bin" );MODULE_FIRMWARE ("amdgpu/vega10_pfp.bin" );
@@ -1677,6 +1679,169 @@ static void gfx_v9_0_enable_gui_idle_interrupt(struct amdgpu_device *adev,WREG32_SOC15 (GC ,0 , mmCP_INT_CNTL_RING0, tmp); } +static void gfx_v9_0_init_csb (struct amdgpu_device *adev) +{ +/* csib */ +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_CSIB_ADDR_HI), + adev->gfx.rlc.clear_state_gpu_addr >>32 ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_CSIB_ADDR_LO), + adev->gfx.rlc.clear_state_gpu_addr &0xfffffffc ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_CSIB_LENGTH), + adev->gfx.rlc.clear_state_size); +} + +static void gfx_v9_0_parse_ind_reg_list (int *register_list_format, +int indirect_offset, +int list_size, +int *unique_indirect_regs, +int *unique_indirect_reg_count, +int max_indirect_reg_count, +int *indirect_start_offsets, +int *indirect_start_offsets_count, +int max_indirect_start_offsets_count) +{ +int idx; +bool new_entry = true; + +for (; indirect_offset < list_size; indirect_offset++) { + +if (new_entry) { + new_entry = false; + indirect_start_offsets[*indirect_start_offsets_count] = indirect_offset; + *indirect_start_offsets_count = *indirect_start_offsets_count +1 ; +BUG_ON (*indirect_start_offsets_count >= max_indirect_start_offsets_count); + } + +if (register_list_format[indirect_offset] ==0xFFFFFFFF ) { + new_entry = true; +continue ; + } + + indirect_offset +=2 ; + +/* look for the matching indice */ +for (idx =0 ; idx < *unique_indirect_reg_count; idx++) { +if (unique_indirect_regs[idx] == + register_list_format[indirect_offset]) +break ; + } + +if (idx >= *unique_indirect_reg_count) { + unique_indirect_regs[*unique_indirect_reg_count] = + register_list_format[indirect_offset]; + idx = *unique_indirect_reg_count; + *unique_indirect_reg_count = *unique_indirect_reg_count +1 ; +BUG_ON (*unique_indirect_reg_count >= max_indirect_reg_count); + } + + register_list_format[indirect_offset] = idx; + } +} + +static int gfx_v9_0_init_rlc_save_restore_list (struct amdgpu_device *adev) +{ +int unique_indirect_regs[] = {0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 }; +int unique_indirect_reg_count =0 ; + +int indirect_start_offsets[] = {0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 ,0x0 }; +int indirect_start_offsets_count =0 ; + +int list_size =0 ; +int i =0 ; +u32 tmp =0 ; + +u32 *register_list_format = +kmalloc (adev->gfx.rlc.reg_list_format_size_bytes,GFP_KERNEL ); +if (!register_list_format) +return -ENOMEM ; +memcpy (register_list_format, adev->gfx.rlc.register_list_format, + adev->gfx.rlc.reg_list_format_size_bytes); + +/* setup unique_indirect_regs array and indirect_start_offsets array */ +gfx_v9_0_parse_ind_reg_list (register_list_format, +GFX9_RLC_FORMAT_DIRECT_REG_LIST_LENGTH , + adev->gfx.rlc.reg_list_format_size_bytes >>2 , + unique_indirect_regs, + &unique_indirect_reg_count, +sizeof (unique_indirect_regs)/sizeof (int ), + indirect_start_offsets, + &indirect_start_offsets_count, +sizeof (indirect_start_offsets)/sizeof (int )); + +/* enable auto inc in case it is disabled */ + tmp =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_CNTL)); + tmp |=RLC_SRM_CNTL__AUTO_INCR_ADDR_MASK ; +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_CNTL), tmp); + +/* write register_restore table to offset 0x0 using RLC_SRM_ARAM_ADDR/DATA */ +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_ARAM_ADDR), +RLC_SAVE_RESTORE_ADDR_STARTING_OFFSET ); +for (i =0 ; i < adev->gfx.rlc.reg_list_size_bytes >>2 ; i++) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_ARAM_DATA), + adev->gfx.rlc.register_restore[i]); + +/* load direct register */ +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_ARAM_ADDR),0 ); +for (i =0 ; i < adev->gfx.rlc.reg_list_size_bytes >>2 ; i++) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_ARAM_DATA), + adev->gfx.rlc.register_restore[i]); + +/* load indirect register */ +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_GPM_SCRATCH_ADDR), + adev->gfx.rlc.reg_list_format_start); +for (i =0 ; i < adev->gfx.rlc.reg_list_format_size_bytes >>2 ; i++) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_GPM_SCRATCH_DATA), + register_list_format[i]); + +/* set save/restore list size */ + list_size = adev->gfx.rlc.reg_list_size_bytes >>2 ; + list_size = list_size >>1 ; +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_GPM_SCRATCH_ADDR), + adev->gfx.rlc.reg_restore_list_size); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_GPM_SCRATCH_DATA), list_size); + +/* write the starting offsets to RLC scratch ram */ +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_GPM_SCRATCH_ADDR), + adev->gfx.rlc.starting_offsets_start); +for (i =0 ; i <sizeof (indirect_start_offsets)/sizeof (int ); i++) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_GPM_SCRATCH_DATA), + indirect_start_offsets[i]); + +/* load unique indirect regs*/ +for (i =0 ; i <sizeof (unique_indirect_regs)/sizeof (int ); i++) { +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_INDEX_CNTL_ADDR_0) + i, + unique_indirect_regs[i] &0x3FFFF ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_INDEX_CNTL_DATA_0) + i, + unique_indirect_regs[i] >>20 ); + } + +kfree (register_list_format); +return 0 ; +} + +static void gfx_v9_0_enable_save_restore_machine (struct amdgpu_device *adev) +{ +u32 tmp =0 ; + + tmp =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_CNTL)); + tmp |=RLC_SRM_CNTL__SRM_ENABLE_MASK ; +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_CNTL), tmp); +} + +static void gfx_v9_0_init_pg (struct amdgpu_device *adev) +{ +if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG | +AMD_PG_SUPPORT_GFX_SMG | +AMD_PG_SUPPORT_GFX_DMG | +AMD_PG_SUPPORT_CP | +AMD_PG_SUPPORT_GDS | +AMD_PG_SUPPORT_RLC_SMU_HS )) { +gfx_v9_0_init_csb (adev); +gfx_v9_0_init_rlc_save_restore_list (adev); +gfx_v9_0_enable_save_restore_machine (adev); + } +} +void gfx_v9_0_rlc_stop (struct amdgpu_device *adev) {u32 tmp =RREG32_SOC15 (GC ,0 , mmRLC_CNTL);
@@ -1770,6 +1935,8 @@ static int gfx_v9_0_rlc_resume(struct amdgpu_device *adev)gfx_v9_0_rlc_reset (adev); +gfx_v9_0_init_pg (adev); +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) {/* legacy rlc firmware loading */ r =gfx_v9_0_rlc_load_microcode (adev);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 42/117 drm/amdgpu: init gfx power gating on raven
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 81 +++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +81 -0
@@ -43,6 +43,13 @@#define RLC_SAVE_RESTORE_ADDR_STARTING_OFFSET 0x00000000L#define GFX9_RLC_FORMAT_DIRECT_REG_LIST_LENGTH 34 +#define mmPWR_MISC_CNTL_STATUS 0x0183 +#define mmPWR_MISC_CNTL_STATUS_BASE_IDX 0 +#define PWR_MISC_CNTL_STATUS__PWR_GFX_RLC_CGPG_EN__SHIFT 0x0 +#define PWR_MISC_CNTL_STATUS__PWR_GFXOFF_STATUS__SHIFT 0x1 +#define PWR_MISC_CNTL_STATUS__PWR_GFX_RLC_CGPG_EN_MASK 0x00000001L +#define PWR_MISC_CNTL_STATUS__PWR_GFXOFF_STATUS_MASK 0x00000006L +MODULE_FIRMWARE ("amdgpu/vega10_ce.bin" );MODULE_FIRMWARE ("amdgpu/vega10_pfp.bin" );MODULE_FIRMWARE ("amdgpu/vega10_me.bin" );
@@ -1828,6 +1835,74 @@ static void gfx_v9_0_enable_save_restore_machine(struct amdgpu_device *adev)WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_SRM_CNTL), tmp); } +static void pwr_10_0_gfxip_control_over_cgpg (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data =0 ; +uint32_t default_data =0 ; + + default_data = data =RREG32 (SOC15_REG_OFFSET (PWR ,0 , mmPWR_MISC_CNTL_STATUS)); +if (enable == true) { +/* enable GFXIP control over CGPG */ + data |=PWR_MISC_CNTL_STATUS__PWR_GFX_RLC_CGPG_EN_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (PWR ,0 , mmPWR_MISC_CNTL_STATUS), data); + +/* update status */ + data &= ~PWR_MISC_CNTL_STATUS__PWR_GFXOFF_STATUS_MASK ; + data |= (2 <<PWR_MISC_CNTL_STATUS__PWR_GFXOFF_STATUS__SHIFT ); +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (PWR ,0 , mmPWR_MISC_CNTL_STATUS), data); + }else { +/* restore GFXIP control over GCPG */ + data &= ~PWR_MISC_CNTL_STATUS__PWR_GFX_RLC_CGPG_EN_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (PWR ,0 , mmPWR_MISC_CNTL_STATUS), data); + } +} + +static void gfx_v9_0_init_gfx_power_gating (struct amdgpu_device *adev) +{ +uint32_t data =0 ; + +if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG | +AMD_PG_SUPPORT_GFX_SMG | +AMD_PG_SUPPORT_GFX_DMG )) { +/* init IDLE_POLL_COUNT = 60 */ + data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_RB_WPTR_POLL_CNTL)); + data &= ~CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT_MASK ; + data |= (0x60 <<CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmCP_RB_WPTR_POLL_CNTL), data); + +/* init RLC PG Delay */ + data =0 ; + data |= (0x10 <<RLC_PG_DELAY__POWER_UP_DELAY__SHIFT ); + data |= (0x10 <<RLC_PG_DELAY__POWER_DOWN_DELAY__SHIFT ); + data |= (0x10 <<RLC_PG_DELAY__CMD_PROPAGATE_DELAY__SHIFT ); + data |= (0x40 <<RLC_PG_DELAY__MEM_SLEEP_DELAY__SHIFT ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_DELAY), data); + + data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_DELAY_2)); + data &= ~RLC_PG_DELAY_2__SERDES_CMD_DELAY_MASK ; + data |= (0x4 <<RLC_PG_DELAY_2__SERDES_CMD_DELAY__SHIFT ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_DELAY_2), data); + + data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_DELAY_3)); + data &= ~RLC_PG_DELAY_3__CGCG_ACTIVE_BEFORE_CGPG_MASK ; + data |= (0xff <<RLC_PG_DELAY_3__CGCG_ACTIVE_BEFORE_CGPG__SHIFT ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_DELAY_3), data); + + data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_AUTO_PG_CTRL)); + data &= ~RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD_MASK ; + +/* program GRBM_REG_SAVE_GFX_IDLE_THRESHOLD to 0x55f0 */ + data |= (0x55f0 <<RLC_AUTO_PG_CTRL__GRBM_REG_SAVE_GFX_IDLE_THRESHOLD__SHIFT ); +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_AUTO_PG_CTRL), data); + +pwr_10_0_gfxip_control_over_cgpg (adev, true); + } +} +static void gfx_v9_0_init_pg (struct amdgpu_device *adev) { if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG |
@@ -1839,6 +1914,12 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)gfx_v9_0_init_csb (adev);gfx_v9_0_init_rlc_save_restore_list (adev);gfx_v9_0_enable_save_restore_machine (adev); + +if (adev->asic_type ==CHIP_RAVEN ) { +WREG32 (mmRLC_JUMP_TABLE_RESTORE, + adev->gfx.rlc.cp_table_gpu_addr >>8 ); +gfx_v9_0_init_gfx_power_gating (adev); + } } }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 43/117 drm/amdgpu/gfx9: enable/disable sck slowdown thru rlc-smu handshake
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
Required for proper powergating operation.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +45 -0
@@ -1903,6 +1903,44 @@ static void gfx_v9_0_init_gfx_power_gating(struct amdgpu_device *adev) } } +static void gfx_v9_0_enable_sck_slow_down_on_power_up (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data =0 ; +uint32_t default_data =0 ; + + default_data = data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL)); + +if (enable == true) { + data |=RLC_PG_CNTL__SMU_CLK_SLOWDOWN_ON_PU_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); + }else { + data &= ~RLC_PG_CNTL__SMU_CLK_SLOWDOWN_ON_PU_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); + } +} + +static void gfx_v9_0_enable_sck_slow_down_on_power_down (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data =0 ; +uint32_t default_data =0 ; + + default_data = data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL)); + +if (enable == true) { + data |=RLC_PG_CNTL__SMU_CLK_SLOWDOWN_ON_PD_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); + }else { + data &= ~RLC_PG_CNTL__SMU_CLK_SLOWDOWN_ON_PD_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); + } +} +static void gfx_v9_0_init_pg (struct amdgpu_device *adev) { if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG |
@@ -1919,6 +1957,13 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)WREG32 (mmRLC_JUMP_TABLE_RESTORE, adev->gfx.rlc.cp_table_gpu_addr >>8 );gfx_v9_0_init_gfx_power_gating (adev); +if (adev->pg_flags &AMD_PG_SUPPORT_RLC_SMU_HS ) { +gfx_v9_0_enable_sck_slow_down_on_power_up (adev, true); +gfx_v9_0_enable_sck_slow_down_on_power_down (adev, true); + }else { +gfx_v9_0_enable_sck_slow_down_on_power_up (adev, false); +gfx_v9_0_enable_sck_slow_down_on_power_down (adev, false); + } } } }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 44/117 drm/amdgpu/gfx9: add enable/disable funcs for cp power gating
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
Used to enable/disable cp powergating.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +25 -0
@@ -1941,6 +1941,25 @@ static void gfx_v9_0_enable_sck_slow_down_on_power_down(struct amdgpu_device *ad } } +static void gfx_v9_0_enable_cp_power_gating (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data =0 ; +uint32_t default_data =0 ; + + default_data = data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL)); + +if (enable == true) { + data &= ~RLC_PG_CNTL__CP_PG_DISABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); + }else { + data |=RLC_PG_CNTL__CP_PG_DISABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); + } +} +static void gfx_v9_0_init_pg (struct amdgpu_device *adev) { if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG |
@@ -1957,6 +1976,7 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)WREG32 (mmRLC_JUMP_TABLE_RESTORE, adev->gfx.rlc.cp_table_gpu_addr >>8 );gfx_v9_0_init_gfx_power_gating (adev); +if (adev->pg_flags &AMD_PG_SUPPORT_RLC_SMU_HS ) {gfx_v9_0_enable_sck_slow_down_on_power_up (adev, true);gfx_v9_0_enable_sck_slow_down_on_power_down (adev, true);
@@ -1964,6 +1984,11 @@ static void gfx_v9_0_init_pg(struct amdgpu_device *adev)gfx_v9_0_enable_sck_slow_down_on_power_up (adev, false);gfx_v9_0_enable_sck_slow_down_on_power_down (adev, false); } + +if (adev->pg_flags &AMD_PG_SUPPORT_CP ) +gfx_v9_0_enable_cp_power_gating (adev, true); +else +gfx_v9_0_enable_cp_power_gating (adev, false); } } }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 45/117 drm/amdgpu/gfx9: allow updating sck slowdown and cp pg state
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
More stuff for gfx pg.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +21 -0
@@ -3399,6 +3399,27 @@ static const struct amdgpu_rlc_funcs gfx_v9_0_rlc_funcs = {static int gfx_v9_0_set_powergating_state (void *handle,enum amd_powergating_state state) { +struct amdgpu_device *adev = (struct amdgpu_device *)handle; + +switch (adev->asic_type) { +case CHIP_RAVEN : +if (adev->pg_flags &AMD_PG_SUPPORT_RLC_SMU_HS ) { +gfx_v9_0_enable_sck_slow_down_on_power_up (adev, true); +gfx_v9_0_enable_sck_slow_down_on_power_down (adev, true); + }else { +gfx_v9_0_enable_sck_slow_down_on_power_up (adev, false); +gfx_v9_0_enable_sck_slow_down_on_power_down (adev, false); + } + +if (adev->pg_flags &AMD_PG_SUPPORT_CP ) +gfx_v9_0_enable_cp_power_gating (adev, true); +else +gfx_v9_0_enable_cp_power_gating (adev, false); +break ; +default : +break ; + } +return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 46/117 drm/amdgpu/gfx9: allow updating gfx cgpg state
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
Wire up the enable functions to enable coarse
grained powegating.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +54 -0
@@ -1960,6 +1960,38 @@ static void gfx_v9_0_enable_cp_power_gating(struct amdgpu_device *adev, } } +static void gfx_v9_0_enable_gfx_cg_power_gating (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data, default_data; + + default_data = data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL)); +if (enable == true) + data |=RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK ; +else + data &= ~RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); +} + +static void gfx_v9_0_enable_gfx_pipeline_powergating (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data, default_data; + + default_data = data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL)); +if (enable == true) + data |=RLC_PG_CNTL__GFX_PIPELINE_PG_ENABLE_MASK ; +else + data &= ~RLC_PG_CNTL__GFX_PIPELINE_PG_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); + +if (!enable) +/* read any GFX register to wake up GFX */ + data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmDB_RENDER_CONTROL)); +} +static void gfx_v9_0_init_pg (struct amdgpu_device *adev) { if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG |
@@ -3209,6 +3241,24 @@ static void gfx_v9_0_exit_rlc_safe_mode(struct amdgpu_device *adev) } } +static void gfx_v9_0_update_gfx_cg_power_gating (struct amdgpu_device *adev, +bool enable) +{ +/* TODO: double check if we need to perform under safe mdoe */ +/* gfx_v9_0_enter_rlc_safe_mode(adev); */ + +if ((adev->pg_flags &AMD_PG_SUPPORT_GFX_PG ) && enable) { +gfx_v9_0_enable_gfx_cg_power_gating (adev, true); +if (adev->pg_flags &AMD_PG_SUPPORT_GFX_PIPELINE ) +gfx_v9_0_enable_gfx_pipeline_powergating (adev, true); + }else { +gfx_v9_0_enable_gfx_cg_power_gating (adev, false); +gfx_v9_0_enable_gfx_pipeline_powergating (adev, false); + } + +/* gfx_v9_0_exit_rlc_safe_mode(adev); */ +} +static void gfx_v9_0_update_medium_grain_clock_gating (struct amdgpu_device *adev,bool enable) {
@@ -3400,6 +3450,7 @@ static int gfx_v9_0_set_powergating_state(void *handle, enum amd_powergating_state state) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; +bool enable = (state ==AMD_PG_STATE_GATE ) ? true : false;switch (adev->asic_type) {case CHIP_RAVEN :
@@ -3415,6 +3466,9 @@ static int gfx_v9_0_set_powergating_state(void *handle,gfx_v9_0_enable_cp_power_gating (adev, true); elsegfx_v9_0_enable_cp_power_gating (adev ,false ); + +/* update gfx cgpg state */ +gfx_v9_0_update_gfx_cg_power_gating (adev, enable);break ;default :break ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 47/117 drm/amdgpu/gfx9: allow updating gfx mgpg state
In reply to a message not in the archiveFrom: Hawking Zhang <[email protected]>
Wire up the functions to control medium grained
powergating.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +50 -0
@@ -1992,6 +1992,34 @@ static void gfx_v9_0_enable_gfx_pipeline_powergating(struct amdgpu_device *adev, data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmDB_RENDER_CONTROL)); } +void gfx_v9_0_enable_gfx_static_mg_power_gating (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data, default_data; + + default_data = data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL)); +if (enable == true) + data |=RLC_PG_CNTL__STATIC_PER_CU_PG_ENABLE_MASK ; +else + data &= ~RLC_PG_CNTL__STATIC_PER_CU_PG_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); +} + +void gfx_v9_0_enable_gfx_dynamic_mg_power_gating (struct amdgpu_device *adev, +bool enable) +{ +uint32_t data, default_data; + + default_data = data =RREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL)); +if (enable == true) + data |=RLC_PG_CNTL__DYN_PER_CU_PG_ENABLE_MASK ; +else + data &= ~RLC_PG_CNTL__DYN_PER_CU_PG_ENABLE_MASK ; +if (default_data != data) +WREG32 (SOC15_REG_OFFSET (GC ,0 , mmRLC_PG_CNTL), data); +} +static void gfx_v9_0_init_pg (struct amdgpu_device *adev) { if (adev->pg_flags & (AMD_PG_SUPPORT_GFX_PG |
@@ -3259,6 +3287,25 @@ static void gfx_v9_0_update_gfx_cg_power_gating(struct amdgpu_device *adev,/* gfx_v9_0_exit_rlc_safe_mode(adev); */ } +static void gfx_v9_0_update_gfx_mg_power_gating (struct amdgpu_device *adev, +bool enable) +{ +/* TODO: double check if we need to perform under safe mode */ +/* gfx_v9_0_enter_rlc_safe_mode(adev); */ + +if ((adev->pg_flags &AMD_PG_SUPPORT_GFX_SMG ) && enable) +gfx_v9_0_enable_gfx_static_mg_power_gating (adev, true); +else +gfx_v9_0_enable_gfx_static_mg_power_gating (adev, false); + +if ((adev->pg_flags &AMD_PG_SUPPORT_GFX_DMG ) && enable) +gfx_v9_0_enable_gfx_dynamic_mg_power_gating (adev, true); +else +gfx_v9_0_enable_gfx_dynamic_mg_power_gating (adev, false); + +/* gfx_v9_0_exit_rlc_safe_mode(adev); */ +} +static void gfx_v9_0_update_medium_grain_clock_gating (struct amdgpu_device *adev,bool enable) {
@@ -3469,6 +3516,9 @@ static int gfx_v9_0_set_powergating_state(void *handle,/* update gfx cgpg state */ gfx_v9_0_update_gfx_cg_power_gating (adev, enable); + +/* update mgcg state */ +gfx_v9_0_update_gfx_mg_power_gating (adev, enable);break ;default :break ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 48/117 drm/amdgpu: add raven case for gmc9 golden setting
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Golden settings for GMC9.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2 -0
@@ -686,6 +686,8 @@ static void gmc_v9_0_init_golden_registers(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_VEGA10 :break ; +case CHIP_RAVEN : +break ;default :break ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 49/117 drm/amdgpu/gmc9: set mc vm fb offset for raven
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
APU fb offset is set by sbios, which is different with DGPU.
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h | 2 +- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c +5 -0
@@ -31,6 +31,11 @@#include "soc15_common.h" +u64 gfxhub_v1_0_get_mc_fb_offset (struct amdgpu_device *adev) +{ +return (u64 )RREG32 (SOC15_REG_OFFSET (GC ,0 , mmMC_VM_FB_OFFSET)) <<24 ; +} +int gfxhub_v1_0_gart_enable (struct amdgpu_device *adev) {u32 tmp;
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h +1 -1
@@ -28,7 +28,7 @@ int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev);void gfxhub_v1_0_gart_disable (struct amdgpu_device *adev);void gfxhub_v1_0_set_fault_enable_default (struct amdgpu_device *adev,bool value); - +u64 gfxhub_v1_0_get_mc_fb_offset (struct amdgpu_device *adev);extern const struct amd_ip_funcs gfxhub_v1_0_ip_funcs;extern const struct amdgpu_ip_block_version gfxhub_v1_0_ip_block;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +4 -2
@@ -548,8 +548,10 @@ static int gmc_v9_0_vm_init(struct amdgpu_device *adev)amdgpu_vm_manager_init (adev);/* base offset of vram pages */ -/*XXX This value is not zero for APU*/ - adev->vm_manager.vram_base_offset =0 ; +if (adev->flags &AMD_IS_APU ) + adev->vm_manager.vram_base_offset =gfxhub_v1_0_get_mc_fb_offset (adev); +else + adev->vm_manager.vram_base_offset =0 ;return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 50/117 drm/amdgpu/gmc9: change fb offset sequence so that used wider
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Initialize the values earlier.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +5 -6
@@ -415,6 +415,11 @@ static void gmc_v9_0_vram_gtt_location(struct amdgpu_device *adev,amdgpu_vram_location (adev, &adev->mc, base); adev->mc.gtt_base_align =0 ;amdgpu_gtt_location (adev, mc); +/* base offset of vram pages */ +if (adev->flags &AMD_IS_APU ) + adev->vm_manager.vram_base_offset =gfxhub_v1_0_get_mc_fb_offset (adev); +else + adev->vm_manager.vram_base_offset =0 ; }/**
@@ -547,12 +552,6 @@ static int gmc_v9_0_vm_init(struct amdgpu_device *adev) adev->vm_manager.num_level =3 ;amdgpu_vm_manager_init (adev); -/* base offset of vram pages */ -if (adev->flags &AMD_IS_APU ) - adev->vm_manager.vram_base_offset =gfxhub_v1_0_get_mc_fb_offset (adev); -else - adev->vm_manager.vram_base_offset =0 ; -return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 51/117 drm/amdgpu: add raven clock gating and light sleep for mmhub
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 50 +++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +32 -18
@@ -34,6 +34,9 @@#include "soc15_common.h" +#define mmDAGB0_CNTL_MISC2_RV 0x008f +#define mmDAGB0_CNTL_MISC2_RV_BASE_IDX 0 +u64 mmhub_v1_0_get_fb_location (struct amdgpu_device *adev) {u64 base =RREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmMC_VM_FB_LOCATION_BASE));
@@ -407,11 +410,15 @@ static int mmhub_v1_0_soft_reset(void *handle)static void mmhub_v1_0_update_medium_grain_clock_gating (struct amdgpu_device *adev,bool enable) { -uint32_t def, data, def1, data1, def2, data2; +uint32_t def, data, def1, data1, def2 =0 , data2 =0 ; def = data =RREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmATC_L2_MISC_CG)); - def1 = data1 =RREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB0_CNTL_MISC2)); - def2 = data2 =RREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB1_CNTL_MISC2)); + +if (adev->asic_type !=CHIP_RAVEN ) { + def1 = data1 =RREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB0_CNTL_MISC2)); + def2 = data2 =RREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB1_CNTL_MISC2)); + }else + def1 = data1 =RREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB0_CNTL_MISC2_RV));if (enable && (adev->cg_flags &AMD_CG_SUPPORT_MC_MGCG )) { data |=ATC_L2_MISC_CG__ENABLE_MASK ;
@@ -423,12 +430,13 @@ static void mmhub_v1_0_update_medium_grain_clock_gating(struct amdgpu_device *adDAGB0_CNTL_MISC2__DISABLE_TLBWR_CG_MASK | DAGB0_CNTL_MISC2__DISABLE_TLBRD_CG_MASK); - data2 &= ~(DAGB1_CNTL_MISC2__DISABLE_WRREQ_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_WRRET_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_RDREQ_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_RDRET_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_TLBWR_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_TLBRD_CG_MASK ); +if (adev->asic_type !=CHIP_RAVEN ) + data2 &= ~(DAGB1_CNTL_MISC2__DISABLE_WRREQ_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_WRRET_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_RDREQ_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_RDRET_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_TLBWR_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_TLBRD_CG_MASK ); }else { data &= ~ATC_L2_MISC_CG__ENABLE_MASK ;
@@ -439,21 +447,26 @@ static void mmhub_v1_0_update_medium_grain_clock_gating(struct amdgpu_device *adDAGB0_CNTL_MISC2__DISABLE_TLBWR_CG_MASK | DAGB0_CNTL_MISC2__DISABLE_TLBRD_CG_MASK); - data2 |= (DAGB1_CNTL_MISC2__DISABLE_WRREQ_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_WRRET_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_RDREQ_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_RDRET_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_TLBWR_CG_MASK | -DAGB1_CNTL_MISC2__DISABLE_TLBRD_CG_MASK ); +if (adev->asic_type !=CHIP_RAVEN ) + data2 |= (DAGB1_CNTL_MISC2__DISABLE_WRREQ_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_WRRET_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_RDREQ_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_RDRET_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_TLBWR_CG_MASK | +DAGB1_CNTL_MISC2__DISABLE_TLBRD_CG_MASK ); }if (def != data)WREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmATC_L2_MISC_CG), data); -if (def1 != data1) -WREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB0_CNTL_MISC2), data1); +if (def1 != data1) { +if (adev->asic_type !=CHIP_RAVEN ) +WREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB0_CNTL_MISC2), data1); +else +WREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB0_CNTL_MISC2_RV), data1); + } -if (def2 != data2) +if (adev->asic_type !=CHIP_RAVEN && def2 != data2)WREG32 (SOC15_REG_OFFSET (MMHUB ,0 , mmDAGB1_CNTL_MISC2), data2); }
@@ -516,6 +529,7 @@ static int mmhub_v1_0_set_clockgating_state(void *handle,switch (adev->asic_type) {case CHIP_VEGA10 : +case CHIP_RAVEN :mmhub_v1_0_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false); athub_update_medium_grain_clock_gating(adev,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 52/117 drm/amdgpu: enable MC MGCG and LS for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -1
@@ -614,7 +614,9 @@ static int soc15_common_early_init(void *handle)AMD_CG_SUPPORT_HDP_LS |AMD_CG_SUPPORT_DRM_MGCG |AMD_CG_SUPPORT_DRM_LS | -AMD_CG_SUPPORT_ROM_MGCG ; +AMD_CG_SUPPORT_ROM_MGCG | +AMD_CG_SUPPORT_MC_MGCG | +AMD_CG_SUPPORT_MC_LS ; adev->pg_flags =0 ; adev->external_rev_id =0x1 ;break ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 53/117 drm/amdgpu: add Raven sdma golden setting and chip id case
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Add golden settings for SDMA.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +33 -0
@@ -83,6 +83,26 @@ static const u32 golden_settings_sdma_vg10[] = {SOC15_REG_OFFSET (SDMA1 ,0 , mmSDMA1_GB_ADDR_CONFIG_READ),0x0018773f ,0x00104002 }; +static const u32 golden_settings_sdma_4_1[] = +{ +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CHICKEN_BITS),0xfe931f07 ,0x02831f07 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CLK_CTRL),0xffffffff ,0x3f000100 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_GFX_IB_CNTL),0x800f0111 ,0x00000100 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_GFX_RB_WPTR_POLL_CNTL),0xfffffff7 ,0x00403000 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_POWER_CNTL),0xfc3fffff ,0x40000051 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_RLC0_IB_CNTL),0x800f0111 ,0x00000100 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_RLC0_RB_WPTR_POLL_CNTL),0xfffffff7 ,0x00403000 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_RLC1_IB_CNTL),0x800f0111 ,0x00000100 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_RLC1_RB_WPTR_POLL_CNTL),0xfffffff7 ,0x00403000 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_UTCL1_PAGE),0x000003ff ,0x000003c0 +}; + +static const u32 golden_settings_sdma_rv1[] = +{ +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_GB_ADDR_CONFIG),0x0018773f ,0x00003002 , +SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_GB_ADDR_CONFIG_READ),0x0018773f ,0x00003002 +}; +static u32 sdma_v4_0_get_reg_offset (u32 instance,u32 internal_offset) {u32 base =0 ;
@@ -113,6 +133,14 @@ static void sdma_v4_0_init_golden_registers(struct amdgpu_device *adev) golden_settings_sdma_vg10, (const u32)ARRAY_SIZE(golden_settings_sdma_vg10));break ; +case CHIP_RAVEN : +amdgpu_program_register_sequence (adev, + golden_settings_sdma_4_1, + (const u32 )ARRAY_SIZE (golden_settings_sdma_4_1)); +amdgpu_program_register_sequence (adev, + golden_settings_sdma_rv1, + (const u32 )ARRAY_SIZE (golden_settings_sdma_rv1)); +break ;default :break ; }
@@ -159,6 +187,9 @@ static int sdma_v4_0_init_microcode(struct amdgpu_device *adev)case CHIP_VEGA10 : chip_name ="vega10" ;break ; +case CHIP_RAVEN : + chip_name ="raven" ; +break ;default :BUG (); }
@@ -1415,6 +1446,8 @@ static int sdma_v4_0_set_clockgating_state(void *handle,sdma_v4_0_update_medium_grain_light_sleep (adev, state ==AMD_CG_STATE_GATE ? true : false);break ; +case CHIP_RAVEN : +break ;default :break ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 54/117 drm/amdgpu: reuse sdma v4 MGCG and LS function for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -2
@@ -1441,13 +1441,12 @@ static int sdma_v4_0_set_clockgating_state(void *handle,switch (adev->asic_type) {case CHIP_VEGA10 : +case CHIP_RAVEN :sdma_v4_0_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false);sdma_v4_0_update_medium_grain_light_sleep (adev, state ==AMD_CG_STATE_GATE ? true : false);break ; -case CHIP_RAVEN : -break ;default :break ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 55/117 drm/amdgpu: enable sdma v4 MGCG and LS for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -1
@@ -616,7 +616,9 @@ static int soc15_common_early_init(void *handle)AMD_CG_SUPPORT_DRM_LS |AMD_CG_SUPPORT_ROM_MGCG |AMD_CG_SUPPORT_MC_MGCG | -AMD_CG_SUPPORT_MC_LS ; +AMD_CG_SUPPORT_MC_LS | +AMD_CG_SUPPORT_SDMA_MGCG | +AMD_CG_SUPPORT_SDMA_LS ; adev->pg_flags =0 ; adev->external_rev_id =0x1 ;break ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 56/117 drm/amdgpu: init sdma power gating for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Initialize sdma for powergating.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 48 +++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +47 -1
@@ -35,6 +35,7 @@#include "vega10/MMHUB/mmhub_1_0_offset.h" #include "vega10/MMHUB/mmhub_1_0_sh_mask.h" #include "vega10/HDP/hdp_4_0_offset.h" +#include "raven1/SDMA0/sdma0_4_1_default.h" #include "soc15_common.h" #include "soc15.h"
@@ -44,6 +45,9 @@ MODULE_FIRMWARE("amdgpu/vega10_sdma.bin");MODULE_FIRMWARE ("amdgpu/vega10_sdma1.bin" );MODULE_FIRMWARE ("amdgpu/raven_sdma.bin" ); +#define SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK 0x000000F8L +#define SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK 0xFC000000L +static void sdma_v4_0_set_ring_funcs (struct amdgpu_device *adev);static void sdma_v4_0_set_buffer_funcs (struct amdgpu_device *adev);static void sdma_v4_0_set_vm_pte_funcs (struct amdgpu_device *adev);
@@ -665,6 +669,47 @@ static int sdma_v4_0_gfx_resume(struct amdgpu_device *adev)return 0 ; } +static void sdma_v4_1_init_power_gating (struct amdgpu_device *adev) +{ +uint32_t def, data; + +/* Enable HW based PG. */ + def = data =RREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_POWER_CNTL)); + data |=SDMA0_POWER_CNTL__PG_CNTL_ENABLE_MASK ; +if (data != def) +WREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_POWER_CNTL), data); + +/* enable interrupt */ + def = data =RREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CNTL)); + data |=SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK ; +if (data != def) +WREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CNTL), data); + +/* Configure hold time to filter in-valid power on/off request. Use default right now */ + def = data =RREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_POWER_CNTL)); + data &= ~SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK ; + data |= (mmSDMA0_POWER_CNTL_DEFAULT &SDMA0_POWER_CNTL__ON_OFF_CONDITION_HOLD_TIME_MASK ); +/* Configure switch time for hysteresis purpose. Use default right now */ + data &= ~SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK ; + data |= (mmSDMA0_POWER_CNTL_DEFAULT &SDMA0_POWER_CNTL__ON_OFF_STATUS_DURATION_TIME_MASK ); +if (data != def) +WREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_POWER_CNTL), data); +} + +static void sdma_v4_0_init_pg (struct amdgpu_device *adev) +{ +if (!(adev->pg_flags &AMD_PG_SUPPORT_SDMA )) +return ; + +switch (adev->asic_type) { +case CHIP_RAVEN : +sdma_v4_1_init_power_gating (adev); +break ; +default : +break ; + } +} +/** * sdma_v4_0_rlc_resume - setup and start the async dma engines *
@@ -675,7 +720,8 @@ static int sdma_v4_0_gfx_resume(struct amdgpu_device *adev)*/ static int sdma_v4_0_rlc_resume (struct amdgpu_device *adev) { -/* XXX todo */ +sdma_v4_0_init_pg (adev); +return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 57/117 drm/amdgpu/sdma4: add dynamic power gating for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add the functions to enable dynamic powergating.
--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +33 -0
@@ -669,6 +669,27 @@ static int sdma_v4_0_gfx_resume(struct amdgpu_device *adev)return 0 ; } +static void +sdma_v4_1_update_power_gating (struct amdgpu_device *adev,bool enable) +{ +uint32_t def, data; + +if (enable && (adev->pg_flags &AMD_PG_SUPPORT_SDMA )) { +/* disable idle interrupt */ + def = data =RREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CNTL)); + data |=SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK ; + +if (data != def) +WREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CNTL), data); + }else { +/* disable idle interrupt */ + def = data =RREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CNTL)); + data &= ~SDMA0_CNTL__CTXEMPTY_INT_ENABLE_MASK ; +if (data != def) +WREG32 (SOC15_REG_OFFSET (SDMA0 ,0 , mmSDMA0_CNTL), data); + } +} +static void sdma_v4_1_init_power_gating (struct amdgpu_device *adev) {uint32_t def, data;
@@ -704,6 +725,7 @@ static void sdma_v4_0_init_pg(struct amdgpu_device *adev)switch (adev->asic_type) {case CHIP_RAVEN :sdma_v4_1_init_power_gating (adev); +sdma_v4_1_update_power_gating (adev, true);break ;default :break ;
@@ -1502,6 +1524,17 @@ static int sdma_v4_0_set_clockgating_state(void *handle,static int sdma_v4_0_set_powergating_state (void *handle,enum amd_powergating_state state) { +struct amdgpu_device *adev = (struct amdgpu_device *)handle; + +switch (adev->asic_type) { +case CHIP_RAVEN : +sdma_v4_1_update_power_gating (adev, + state ==AMD_PG_STATE_GATE ? true : false); +break ; +default : +break ; + } +return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 58/117 drm/amdgpu: enable sdma power gating for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -1
@@ -619,7 +619,7 @@ static int soc15_common_early_init(void *handle)AMD_CG_SUPPORT_MC_LS |AMD_CG_SUPPORT_SDMA_MGCG |AMD_CG_SUPPORT_SDMA_LS ; - adev->pg_flags =0 ; + adev->pg_flags =AMD_PG_SUPPORT_SDMA ; adev->external_rev_id =0x1 ;break ;default :
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 59/117 drm/amdgpu: add nbio7 support
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
NBIO handles misc bus io functions on the chip. This helper lib has the apppropriate functions for NBIO 7.0.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c | 220 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h | 49 ++++++++ 3 files changed, 270 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
@@ -40,7 +40,7 @@ amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o kv_dpm.o \ amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o dce_v6_0.o si_dpm.o si_smc.o amdgpu-y += \ - vi.o mxgpu_vi.o nbio_v6_1.o soc15.o mxgpu_ai.o + vi.o mxgpu_vi.o nbio_v6_1.o soc15.o mxgpu_ai.o nbio_v7_0.o # add GMC block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/nbio_v7_0.c new file +220 -0
220 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/nbio_v7_0.h new file +49 -0
49 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 60/117 drm/amdgpu: apply nbio7 for Raven (v3)
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
nbio handles misc bus io operations. Handle
differences between different nbio bus versions.
v2: switch checks from RAVEN to APU (Alex)
squash in raven rev id fetch
squash in fix uninitalized hdp flush reg index for raven
v3: add some missed RAVEN to APU checks (Alex)
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 ++++++++++--- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 9 ++++++-- drivers/gpu/drm/amd/amdgpu/soc15.c | 38 ++++++++++++++++++++++++---------- drivers/gpu/drm/amd/amdgpu/soc15.h | 1 + drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 10 +++++++-- 5 files changed, 54 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +11 -3
@@ -33,6 +33,7 @@#include "soc15_common.h" #include "nbio_v6_1.h" +#include "nbio_v7_0.h" #include "gfxhub_v1_0.h" #include "mmhub_v1_0.h"
@@ -215,7 +216,10 @@ static void gmc_v9_0_gart_flush_gpu_tlb(struct amdgpu_device *adev,unsigned i, j;/* flush hdp cache */ -nbio_v6_1_hdp_flush (adev); +if (adev->flags &AMD_IS_APU ) +nbio_v7_0_hdp_flush (adev); +else +nbio_v6_1_hdp_flush (adev);spin_lock (&adev->mc.invalidate_lock);
@@ -479,7 +483,8 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev) adev->mc.aper_size =pci_resource_len (adev->pdev,0 );/* size in MB on si */ adev->mc.mc_vram_size = -nbio_v6_1_get_memsize (adev) *1024ULL *1024ULL ; + ((adev->flags &AMD_IS_APU ) ?nbio_v7_0_get_memsize (adev) : +nbio_v6_1_get_memsize (adev)) *1024ULL *1024ULL ; adev->mc.real_vram_size = adev->mc.mc_vram_size; adev->mc.visible_vram_size = adev->mc.aper_size;
@@ -718,7 +723,10 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev)return r;/* After HDP is initialized, flush HDP.*/ -nbio_v6_1_hdp_flush (adev); +if (adev->flags &AMD_IS_APU ) +nbio_v7_0_hdp_flush (adev); +else +nbio_v6_1_hdp_flush (adev); r =gfxhub_v1_0_gart_enable (adev);if (r)
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +7 -2
@@ -386,7 +386,9 @@ static void sdma_v4_0_ring_emit_hdp_flush(struct amdgpu_ring *ring)u32 ref_and_mask =0 ;struct nbio_hdp_flush_reg *nbio_hf_reg; -if (ring->adev->asic_type ==CHIP_VEGA10 ) +if (ring->adev->flags &AMD_IS_APU ) + nbio_hf_reg = &nbio_v7_0_hdp_flush_reg; +else nbio_hf_reg = &nbio_v6_1_hdp_flush_reg;if (ring == &ring->adev->sdma.instance[0 ].ring)
@@ -617,7 +619,10 @@ static int sdma_v4_0_gfx_resume(struct amdgpu_device *adev) }WREG32 (sdma_v4_0_get_reg_offset (i, mmSDMA0_GFX_DOORBELL), doorbell);WREG32 (sdma_v4_0_get_reg_offset (i, mmSDMA0_GFX_DOORBELL_OFFSET), doorbell_offset); -nbio_v6_1_sdma_doorbell_range (adev, i, ring->use_doorbell, ring->doorbell_index); +if (adev->flags &AMD_IS_APU ) +nbio_v7_0_sdma_doorbell_range (adev, i, ring->use_doorbell, ring->doorbell_index); +else +nbio_v6_1_sdma_doorbell_range (adev, i, ring->use_doorbell, ring->doorbell_index);if (amdgpu_sriov_vf (adev))sdma_v4_0_ring_set_wptr (ring);
drivers/gpu/drm/amd/amdgpu/soc15.c +27 -11
@@ -104,10 +104,10 @@ static u32 soc15_pcie_rreg(struct amdgpu_device *adev, u32 reg)u32 r;struct nbio_pcie_index_data *nbio_pcie_id; -if (adev->asic_type ==CHIP_VEGA10 ) - nbio_pcie_id = &nbio_v6_1_pcie_index_data; +if (adev->flags &AMD_IS_APU ) + nbio_pcie_id = &nbio_v7_0_pcie_index_data;else -BUG (); + nbio_pcie_id = &nbio_v6_1_pcie_index_data; address = nbio_pcie_id->index_offset; data = nbio_pcie_id->data_offset;
@@ -125,10 +125,10 @@ static void soc15_pcie_wreg(struct amdgpu_device *adev, u32 reg, u32 v)unsigned long flags, address, data;struct nbio_pcie_index_data *nbio_pcie_id; -if (adev->asic_type ==CHIP_VEGA10 ) - nbio_pcie_id = &nbio_v6_1_pcie_index_data; +if (adev->flags &AMD_IS_APU ) + nbio_pcie_id = &nbio_v7_0_pcie_index_data;else -BUG (); + nbio_pcie_id = &nbio_v6_1_pcie_index_data; address = nbio_pcie_id->index_offset; data = nbio_pcie_id->data_offset;
@@ -199,7 +199,10 @@ static void soc15_didt_wreg(struct amdgpu_device *adev, u32 reg, u32 v)static u32 soc15_get_config_memsize (struct amdgpu_device *adev) { -return nbio_v6_1_get_memsize (adev); +if (adev->flags &AMD_IS_APU ) +return nbio_v7_0_get_memsize (adev); +else +return nbio_v6_1_get_memsize (adev); } static const u32 vega10_golden_init[] =
@@ -376,7 +379,10 @@ static void soc15_gpu_pci_config_reset(struct amdgpu_device *adev)/* wait for asic to come out of reset */ for (i =0 ; i < adev->usec_timeout; i++) { -if (nbio_v6_1_get_memsize (adev) !=0xffffffff ) +u32 memsize = (adev->flags &AMD_IS_APU ) ? +nbio_v7_0_get_memsize (adev) : +nbio_v6_1_get_memsize (adev); +if (memsize !=0xffffffff )break ;udelay (1 ); }
@@ -450,8 +456,12 @@ static void soc15_program_aspm(struct amdgpu_device *adev)static void soc15_enable_doorbell_aperture (struct amdgpu_device *adev,bool enable) { -nbio_v6_1_enable_doorbell_aperture (adev, enable); -nbio_v6_1_enable_doorbell_selfring_aperture (adev, enable); +if (adev->flags &AMD_IS_APU ) { +nbio_v7_0_enable_doorbell_aperture (adev, enable); + }else { +nbio_v6_1_enable_doorbell_aperture (adev, enable); +nbio_v6_1_enable_doorbell_selfring_aperture (adev, enable); + } } static const struct amdgpu_ip_block_version vega10_common_ip_block =
@@ -518,7 +528,10 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)static uint32_t soc15_get_rev_id (struct amdgpu_device *adev) { -return nbio_v6_1_get_rev_id (adev); +if (adev->flags &AMD_IS_APU ) +return nbio_v7_0_get_rev_id (adev); +else +return nbio_v6_1_get_rev_id (adev); }
@@ -569,6 +582,9 @@ static int soc15_common_early_init(void *handle)case CHIP_VEGA10 :nbio_v6_1_init (adev);break ; +case CHIP_RAVEN : +nbio_v7_0_init (adev); +break ;default :return -EINVAL ; }
drivers/gpu/drm/amd/amdgpu/soc15.h +1 -0
@@ -25,6 +25,7 @@#define __SOC15_H__#include "nbio_v6_1.h" +#include "nbio_v7_0.h" extern const struct amd_ip_funcs soc15_common_ip_funcs;
drivers/gpu/drm/amd/amdgpu/vega10_ih.c +8 -2
@@ -97,7 +97,10 @@ static int vega10_ih_irq_init(struct amdgpu_device *adev)/* disable irqs */ vega10_ih_disable_interrupts (adev); -nbio_v6_1_ih_control (adev); +if (adev->flags &AMD_IS_APU ) +nbio_v7_0_ih_control (adev); +else +nbio_v6_1_ih_control (adev); ih_rb_cntl =RREG32 (SOC15_REG_OFFSET (OSSSYS ,0 , mmIH_RB_CNTL));/* Ring Buffer base. [39:8] of 40-bit address of the beginning of the ring buffer*/
@@ -148,7 +151,10 @@ static int vega10_ih_irq_init(struct amdgpu_device *adev) ENABLE, 0); }WREG32 (SOC15_REG_OFFSET (OSSSYS ,0 , mmIH_DOORBELL_RPTR), ih_doorbell_rtpr); -nbio_v6_1_ih_doorbell_range (adev, adev->irq.ih.use_doorbell, adev->irq.ih.doorbell_index); +if (adev->flags &AMD_IS_APU ) +nbio_v7_0_ih_doorbell_range (adev, adev->irq.ih.use_doorbell, adev->irq.ih.doorbell_index); +else +nbio_v6_1_ih_doorbell_range (adev, adev->irq.ih.use_doorbell, adev->irq.ih.doorbell_index); tmp =RREG32 (SOC15_REG_OFFSET (OSSSYS ,0 , mmIH_STORM_CLIENT_LIST_CNTL)); tmp = REG_SET_FIELD(tmp, IH_STORM_CLIENT_LIST_CNTL,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 61/117 drm/amdgpu: add nbio MGCG for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add medium grained nbio clockgating implementation.
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -1
@@ -866,7 +866,7 @@ static int soc15_common_set_clockgating_state(void *handle, state == AMD_CG_STATE_GATE ? true : false);break ;case CHIP_RAVEN : -nbio_v6_1_update_medium_grain_clock_gating (adev, +nbio_v7_0_update_medium_grain_clock_gating (adev, state ==AMD_CG_STATE_GATE ? true : false);nbio_v6_1_update_medium_grain_light_sleep (adev, state ==AMD_CG_STATE_GATE ? true : false);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 62/117 drm/amdgpu: add psp v10 function callback for raven
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
PSP is the security processor. These are the support functions.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 309 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/psp_v10_0.h | 41 +++++ 3 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c create mode 100644 drivers/gpu/drm/amd/amdgpu/psp_v10_0.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
@@ -60,7 +60,8 @@ amdgpu-y += \ # add PSP block amdgpu-y += \ amdgpu_psp.o \ - psp_v3_1.o + psp_v3_1.o \ + psp_v10_0.o # add SMC block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c new file +309 -0
309 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/psp_v10_0.h new file +41 -0
41 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 63/117 drm/amdgpu: add psp v10 ip block
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add the ip block version structure for psp 10.0.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 ++ 2 files changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +9 -0
@@ -549,3 +549,12 @@ const struct amdgpu_ip_block_version psp_v3_1_ip_block = .rev = 0, .funcs = &psp_ip_funcs, }; + +const struct amdgpu_ip_block_version psp_v10_0_ip_block = +{ + .type =AMD_IP_BLOCK_TYPE_PSP , + .major =10 , + .minor =0 , + .rev =0 , + .funcs = &psp_ip_funcs, +};
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +2 -0
@@ -138,4 +138,6 @@ extern const struct amdgpu_ip_block_version psp_v3_1_ip_block;extern int psp_wait_for (struct psp_context *psp,uint32_t reg_index,uint32_t field_val,uint32_t mask,bool check_changed); +extern const struct amdgpu_ip_block_version psp_v10_0_ip_block; +#endif
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 64/117 drm/amdgpu: register the psp v10 function pointers at psp sw_init
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add the psp 10.0 callbacks for PSP.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +7 -0
@@ -30,6 +30,7 @@#include "amdgpu_ucode.h" #include "soc15_common.h" #include "psp_v3_1.h" +#include "psp_v10_0.h" static void psp_set_funcs (struct amdgpu_device *adev);
@@ -61,6 +62,12 @@ static int psp_sw_init(void *handle) psp->compare_sram_data = psp_v3_1_compare_sram_data; psp->smu_reload_quirk = psp_v3_1_smu_reload_quirk;break ; +case CHIP_RAVEN : + psp->prep_cmd_buf = psp_v10_0_prep_cmd_buf; + psp->ring_init = psp_v10_0_ring_init; + psp->cmd_submit = psp_v10_0_cmd_submit; + psp->compare_sram_data = psp_v10_0_compare_sram_data; +break ;default :return -EINVAL ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 65/117 drm/amdgpu/soc15: add psp ip block
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -0
@@ -510,6 +510,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_ip_block_add (adev, &mmhub_v1_0_ip_block);amdgpu_ip_block_add (adev, &gmc_v9_0_ip_block);amdgpu_ip_block_add (adev, &vega10_ih_ip_block); +amdgpu_ip_block_add (adev, &psp_v10_0_ip_block);#if defined(CONFIG_DRM_AMD_DC )if (amdgpu_device_has_dc_support (adev))amdgpu_ip_block_add (adev, &dm_ip_block);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 66/117 drm/amdgpu: add initial vcn support and decode tests
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
VCN is the new media block on Raven. Add core support and the ring and ib tests for decode.
--- drivers/gpu/drm/amd/amdgpu/Makefile | 4 + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 40 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 425 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 35 +++ 4 files changed, 500 insertions(+), 4 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h
drivers/gpu/drm/amd/amdgpu/Makefile +4 -0
@@ -99,6 +99,10 @@ amdgpu-y += \ vce_v3_0.o \ vce_v4_0.o +# add VCN block +amdgpu-y += \ + amdgpu_vcn.o + # add amdkfd interfaces amdgpu-y += \ amdgpu_amdkfd.o \
drivers/gpu/drm/amd/amdgpu/amdgpu.h +36 -4
@@ -1181,6 +1181,31 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb);void amdgpu_get_pcie_info (struct amdgpu_device *adev);/* +* VCN +*/ +#define AMDGPU_VCN_STACK_SIZE (200*1024) +#define AMDGPU_VCN_HEAP_SIZE (256*1024) +#define AMDGPU_VCN_SESSION_SIZE (50*1024) +#define AMDGPU_VCN_FIRMWARE_OFFSET 256 +#define AMDGPU_VCN_MAX_ENC_RINGS 3 + +struct amdgpu_vcn { +struct amdgpu_bo *vcpu_bo; +void *cpu_addr; +uint64_t gpu_addr; +unsigned fw_version; +void *saved_bo; +struct delayed_work idle_work; +const struct firmware *fw;/* VCN firmware */ +struct amdgpu_ring ring_dec; +struct amdgpu_ring ring_enc[AMDGPU_VCN_MAX_ENC_RINGS ]; +struct amdgpu_irq_src irq; +struct amd_sched_entity entity_dec; +struct amd_sched_entity entity_enc; +uint32_t srbm_soft_reset; +}; + +/* * SDMA */ struct amdgpu_sdma_instance {
@@ -1576,11 +1601,18 @@ struct amdgpu_device {/* sdma */ struct amdgpu_sdma sdma; -/* uvd */ -struct amdgpu_uvd uvd; +union { +struct { +/* uvd */ +struct amdgpu_uvd uvd; + +/* vce */ +struct amdgpu_vce vce; + }; -/* vce */ -struct amdgpu_vce vce; +/* vcn */ +struct amdgpu_vcn vcn; + };/* firmwares */ struct amdgpu_firmware firmware;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c new file +425 -0
425 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright 2016 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +#ifndef __AMDGPU_VCN_H__ +#define __AMDGPU_VCN_H__ + +int amdgpu_vcn_sw_init (struct amdgpu_device *adev); +int amdgpu_vcn_sw_fini (struct amdgpu_device *adev); +int amdgpu_vcn_suspend (struct amdgpu_device *adev); +int amdgpu_vcn_resume (struct amdgpu_device *adev); +void amdgpu_vcn_ring_begin_use (struct amdgpu_ring *ring); +void amdgpu_vcn_ring_end_use (struct amdgpu_ring *ring); +int amdgpu_vcn_dec_ring_test_ib (struct amdgpu_ring *ring,long timeout); + +#endif
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 67/117 drm/amdgpu: add encode tests for vcn
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Add encode ring and ib tests.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 203 ++++++++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 3 + 2 files changed, 206 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +203 -0
@@ -112,6 +112,15 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)return r; } + ring = &adev->vcn.ring_enc[0 ]; + rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_NORMAL ]; + r =amd_sched_entity_init (&ring->sched, &adev->vcn.entity_enc, + rq, amdgpu_sched_jobs); +if (r !=0 ) { +DRM_ERROR ("Failed setting up VCN enc run queue.\n" ); +return r; + } +return 0 ; }
@@ -121,6 +130,8 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)amd_sched_entity_fini (&adev->vcn.ring_dec.sched, &adev->vcn.entity_dec); +amd_sched_entity_fini (&adev->vcn.ring_enc[0 ].sched, &adev->vcn.entity_enc); +amdgpu_bo_free_kernel (&adev->vcn.vcpu_bo, &adev->vcn.gpu_addr, (void **)&adev->vcn.cpu_addr);
@@ -423,3 +434,195 @@ int amdgpu_vcn_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout) error:return r; } + +static int amdgpu_vcn_enc_get_create_msg (struct amdgpu_ring *ring,uint32_t handle, +struct dma_fence **fence) +{ +const unsigned ib_size_dw =1024 ; +struct amdgpu_job *job; +struct amdgpu_ib *ib; +struct dma_fence *f =NULL ; +uint64_t dummy; +int i, r; + + r =amdgpu_job_alloc_with_ib (ring->adev, ib_size_dw *4 , &job); +if (r) +return r; + + ib = &job->ibs[0 ]; + + dummy = ib->gpu_addr +1024 ; + +/* stitch together an VCN enc create msg */ + ib->length_dw =0 ; + ib->ptr[ib->length_dw++] =0x0000000c ;/* len */ + ib->ptr[ib->length_dw++] =0x00000001 ;/* session cmd */ + ib->ptr[ib->length_dw++] = handle; + + ib->ptr[ib->length_dw++] =0x00000040 ;/* len */ + ib->ptr[ib->length_dw++] =0x01000001 ;/* create cmd */ + ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000042 ; + ib->ptr[ib->length_dw++] =0x0000000a ; + ib->ptr[ib->length_dw++] =0x00000001 ; + ib->ptr[ib->length_dw++] =0x00000080 ; + ib->ptr[ib->length_dw++] =0x00000060 ; + ib->ptr[ib->length_dw++] =0x00000100 ; + ib->ptr[ib->length_dw++] =0x00000100 ; + ib->ptr[ib->length_dw++] =0x0000000c ; + ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000000 ; + + ib->ptr[ib->length_dw++] =0x00000014 ;/* len */ + ib->ptr[ib->length_dw++] =0x05000005 ;/* feedback buffer */ + ib->ptr[ib->length_dw++] =upper_32_bits (dummy); + ib->ptr[ib->length_dw++] = dummy; + ib->ptr[ib->length_dw++] =0x00000001 ; + +for (i = ib->length_dw; i < ib_size_dw; ++i) + ib->ptr[i] =0x0 ; + + r =amdgpu_ib_schedule (ring,1 , ib,NULL , &f); + job->fence =dma_fence_get (f); +if (r) + goto err; + +amdgpu_job_free (job); +if (fence) + *fence =dma_fence_get (f); +dma_fence_put (f); +return 0 ; + +err: +amdgpu_job_free (job); +return r; +} + +static int amdgpu_vcn_enc_get_destroy_msg (struct amdgpu_ring *ring,uint32_t handle, +bool direct,struct dma_fence **fence) +{ +const unsigned ib_size_dw =1024 ; +struct amdgpu_job *job; +struct amdgpu_ib *ib; +struct dma_fence *f =NULL ; +int i, r; + + r =amdgpu_job_alloc_with_ib (ring->adev, ib_size_dw *4 , &job); +if (r) +return r; + + ib = &job->ibs[0 ]; + +/* stitch together an VCN enc destroy msg */ + ib->length_dw =0 ; + ib->ptr[ib->length_dw++] =0x0000000c ;/* len */ + ib->ptr[ib->length_dw++] =0x00000001 ;/* session cmd */ + ib->ptr[ib->length_dw++] = handle; + + ib->ptr[ib->length_dw++] =0x00000020 ;/* len */ + ib->ptr[ib->length_dw++] =0x00000002 ;/* task info */ + ib->ptr[ib->length_dw++] =0xffffffff ;/* next task info, set to 0xffffffff if no */ + ib->ptr[ib->length_dw++] =0x00000001 ;/* destroy session */ + ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0xffffffff ;/* feedback is not needed, set to 0xffffffff and firmware will not output feedback */ + ib->ptr[ib->length_dw++] =0x00000000 ; + + ib->ptr[ib->length_dw++] =0x00000008 ;/* len */ + ib->ptr[ib->length_dw++] =0x02000001 ;/* destroy cmd */ + +for (i = ib->length_dw; i < ib_size_dw; ++i) + ib->ptr[i] =0x0 ; + +if (direct) { + r =amdgpu_ib_schedule (ring,1 , ib,NULL , &f); + job->fence =dma_fence_get (f); +if (r) + goto err; + +amdgpu_job_free (job); + }else { + r =amdgpu_job_submit (job, ring, &ring->adev->vcn.entity_enc, +AMDGPU_FENCE_OWNER_UNDEFINED , &f); +if (r) + goto err; + } + +if (fence) + *fence =dma_fence_get (f); +dma_fence_put (f); +return 0 ; + +err: +amdgpu_job_free (job); +return r; +} + +int amdgpu_vcn_enc_ring_test_ring (struct amdgpu_ring *ring) +{ +struct amdgpu_device *adev = ring->adev; +uint32_t rptr =amdgpu_ring_get_rptr (ring); +unsigned i; +int r; + + r =amdgpu_ring_alloc (ring,16 ); +if (r) { +DRM_ERROR ("amdgpu: vcn enc failed to lock ring %d (%d).\n" , + ring->idx, r); +return r; + } +amdgpu_ring_write (ring,VCE_CMD_END ); +amdgpu_ring_commit (ring); + +for (i =0 ; i < adev->usec_timeout; i++) { +if (amdgpu_ring_get_rptr (ring) != rptr) +break ; +DRM_UDELAY (1 ); + } + +if (i < adev->usec_timeout) { +DRM_INFO ("ring test on %d succeeded in %d usecs\n" , + ring->idx, i); + }else { +DRM_ERROR ("amdgpu: ring %d test failed\n" , + ring->idx); + r = -ETIMEDOUT ; + } + +return r; +} + +int amdgpu_vcn_enc_ring_test_ib (struct amdgpu_ring *ring,long timeout) +{ +struct dma_fence *fence =NULL ; +long r; + + r =amdgpu_vcn_enc_get_create_msg (ring,1 ,NULL ); +if (r) { +DRM_ERROR ("amdgpu: failed to get create msg (%ld).\n" , r); + goto error; + } + + r =amdgpu_vcn_enc_get_destroy_msg (ring,1 , true, &fence); +if (r) { +DRM_ERROR ("amdgpu: failed to get destroy ib (%ld).\n" , r); + goto error; + } + + r =dma_fence_wait_timeout (fence, false, timeout); +if (r ==0 ) { +DRM_ERROR ("amdgpu: IB test timed out.\n" ); + r = -ETIMEDOUT ; + }else if (r <0 ) { +DRM_ERROR ("amdgpu: fence wait failed (%ld).\n" , r); + }else { +DRM_INFO ("ib test on ring %d succeeded\n" , ring->idx); + r =0 ; + } +error: +dma_fence_put (fence); +return r; +}
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +3 -0
@@ -32,4 +32,7 @@ void amdgpu_vcn_ring_begin_use(struct amdgpu_ring *ring);void amdgpu_vcn_ring_end_use (struct amdgpu_ring *ring);int amdgpu_vcn_dec_ring_test_ib (struct amdgpu_ring *ring,long timeout); +int amdgpu_vcn_enc_ring_test_ring (struct amdgpu_ring *ring); +int amdgpu_vcn_enc_ring_test_ib (struct amdgpu_ring *ring,long timeout); +#endif
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 68/117 drm/amdgpu: add vcn ip block functions (v2)
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Fill in the core VCN 1.0 setup functionality.
v2: squash in fixup (Alex)
--- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 417 +++++++++++++++++++++++++++++++++ 3 files changed, 421 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
@@ -101,7 +101,8 @@ amdgpu-y += \ # add VCN block amdgpu-y += \ - amdgpu_vcn.o + amdgpu_vcn.o \ + vcn_v1_0.o # add amdkfd interfaces amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/amdgpu_ih.h +2 -1
@@ -62,8 +62,9 @@ enum amdgpu_ih_clientidAMDGPU_IH_CLIENTID_MP0 =0x1e ,AMDGPU_IH_CLIENTID_MP1 =0x1f , - AMDGPU_IH_CLIENTID_MAX +AMDGPU_IH_CLIENTID_MAX , + AMDGPU_IH_CLIENTID_VCN = AMDGPU_IH_CLIENTID_UVD };#define AMDGPU_IH_CLIENTID_LEGACY 0
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c new file +417 -0
417 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 69/117 drm/amdgpu: add vcn decode ring support
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Add the decode ring init.
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +43 -0
@@ -59,6 +59,7 @@ static int vcn_v1_0_early_init(void *handle)*/ static int vcn_v1_0_sw_init (void *handle) { +struct amdgpu_ring *ring;int r;struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -75,6 +76,10 @@ static int vcn_v1_0_sw_init(void *handle)if (r)return r; + ring = &adev->vcn.ring_dec; +sprintf (ring->name,"vcn_dec" ); + r =amdgpu_ring_init (adev, ring,512 , &adev->vcn.irq,0 ); +return r; }
@@ -246,6 +251,8 @@ static void vcn_v1_0_mc_resume(struct amdgpu_device *adev)*/ static int vcn_v1_0_start (struct amdgpu_device *adev) { +struct amdgpu_ring *ring = &adev->vcn.ring_dec; +uint32_t rb_bufsz, tmp;uint32_t lmi_swap_cntl;int i, j, r;
@@ -356,6 +363,39 @@ static int vcn_v1_0_start(struct amdgpu_device *adev)WREG32_P (SOC15_REG_OFFSET (UVD ,0 , mmUVD_STATUS),0 , ~(2 <<UVD_STATUS__VCPU_REPORT__SHIFT )); +/* force RBC into idle state */ + rb_bufsz =order_base_2 (ring->ring_size); + tmp =REG_SET_FIELD (0 ,UVD_RBC_RB_CNTL ,RB_BUFSZ , rb_bufsz); + tmp =REG_SET_FIELD (tmp,UVD_RBC_RB_CNTL ,RB_BLKSZ ,1 ); + tmp =REG_SET_FIELD (tmp,UVD_RBC_RB_CNTL ,RB_NO_FETCH ,1 ); + tmp =REG_SET_FIELD (tmp,UVD_RBC_RB_CNTL ,RB_WPTR_POLL_EN ,0 ); + tmp =REG_SET_FIELD (tmp,UVD_RBC_RB_CNTL ,RB_NO_UPDATE ,1 ); + tmp =REG_SET_FIELD (tmp,UVD_RBC_RB_CNTL ,RB_RPTR_WR_EN ,1 ); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_CNTL), tmp); + +/* set the write pointer delay */ +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_WPTR_CNTL),0 ); + +/* set the wb address */ +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_RPTR_ADDR), + (upper_32_bits (ring->gpu_addr) >>2 )); + +/* programm the RB_BASE for ring buffer */ +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_RBC_RB_64BIT_BAR_LOW), +lower_32_bits (ring->gpu_addr)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_RBC_RB_64BIT_BAR_HIGH), +upper_32_bits (ring->gpu_addr)); + +/* Initialize the ring buffer's read and write pointers */ +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_RPTR),0 ); + + ring->wptr =RREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_RPTR)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_WPTR), +lower_32_bits (ring->wptr)); + +WREG32_P (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_CNTL),0 , + ~UVD_RBC_RB_CNTL__RB_NO_FETCH_MASK ); +return 0 ; }
@@ -368,6 +408,9 @@ static int vcn_v1_0_start(struct amdgpu_device *adev)*/ static int vcn_v1_0_stop (struct amdgpu_device *adev) { +/* force RBC into idle state */ +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_CNTL),0x11010101 ); +/* Stall UMC and register bus before resetting VCPU */ WREG32_P(SOC15_REG_OFFSET(UVD, 0, mmUVD_LMI_CTRL2), UVD_LMI_CTRL2__STALL_ARB_UMC_MASK,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 70/117 drm/amdgpu: add vcn decode ring type and functions
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Add the ring function callbacks for the decode ring.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 266 +++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +2 -1
@@ -47,7 +47,8 @@ enum amdgpu_ring_type {AMDGPU_RING_TYPE_UVD ,AMDGPU_RING_TYPE_VCE ,AMDGPU_RING_TYPE_KIQ , - AMDGPU_RING_TYPE_UVD_ENC +AMDGPU_RING_TYPE_UVD_ENC , + AMDGPU_RING_TYPE_VCN_DEC };struct amdgpu_device ;
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +266 -0
287 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 71/117 drm/amdgpu: add vcn irq functions
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +32 -0
@@ -38,6 +38,7 @@static int vcn_v1_0_start (struct amdgpu_device *adev);static int vcn_v1_0_stop (struct amdgpu_device *adev);static void vcn_v1_0_set_dec_ring_funcs (struct amdgpu_device *adev); +static void vcn_v1_0_set_irq_funcs (struct amdgpu_device *adev);/** * vcn_v1_0_early_init - set function pointers
@@ -51,6 +52,7 @@ static int vcn_v1_0_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;vcn_v1_0_set_dec_ring_funcs (adev); +vcn_v1_0_set_irq_funcs (adev);return 0 ; }
@@ -674,6 +676,25 @@ static void vcn_v1_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,vcn_v1_0_dec_vm_reg_wait (ring, data0, data1, mask); } +static int vcn_v1_0_set_interrupt_state (struct amdgpu_device *adev, +struct amdgpu_irq_src *source, +unsigned type, +enum amdgpu_interrupt_state state) +{ +return 0 ; +} + +static int vcn_v1_0_process_interrupt (struct amdgpu_device *adev, +struct amdgpu_irq_src *source, +struct amdgpu_iv_entry *entry) +{ +DRM_DEBUG ("IH: VCN TRAP\n" ); + +amdgpu_fence_process (&adev->vcn.ring_dec); + +return 0 ; +} +static const struct amd_ip_funcs vcn_v1_0_ip_funcs = { .name ="vcn_v1_0" , .early_init = vcn_v1_0_early_init,
@@ -724,3 +745,14 @@ static void vcn_v1_0_set_dec_ring_funcs(struct amdgpu_device *adev) adev->vcn.ring_dec.funcs = &vcn_v1_0_dec_ring_vm_funcs;DRM_INFO ("VCN decode is enabled in VM mode\n" ); } + +static const struct amdgpu_irq_src_funcs vcn_v1_0_irq_funcs = { + .set = vcn_v1_0_set_interrupt_state, + .process = vcn_v1_0_process_interrupt, +}; + +static void vcn_v1_0_set_irq_funcs (struct amdgpu_device *adev) +{ + adev->vcn.irq.num_types =1 ; + adev->vcn.irq.funcs = &vcn_v1_0_irq_funcs; +}
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 72/117 drm/amdgpu: add vcn ip block and type
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 9 +++++++++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.h | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/amd/include/amd_shared.h | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.h
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +9 -0
@@ -756,3 +756,12 @@ static void vcn_v1_0_set_irq_funcs(struct amdgpu_device *adev) adev->vcn.irq.num_types =1 ; adev->vcn.irq.funcs = &vcn_v1_0_irq_funcs; } + +const struct amdgpu_ip_block_version vcn_v1_0_ip_block = +{ + .type =AMD_IP_BLOCK_TYPE_VCN , + .major =1 , + .minor =0 , + .rev =0 , + .funcs = &vcn_v1_0_ip_funcs, +};
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright 2016 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +#ifndef __VCN_V1_0_H__ +#define __VCN_V1_0_H__ + +extern const struct amdgpu_ip_block_version vcn_v1_0_ip_block; + +#endif
drivers/gpu/drm/amd/include/amd_shared.h +2 -1
@@ -77,7 +77,8 @@ enum amd_ip_block_type {AMD_IP_BLOCK_TYPE_VCE ,AMD_IP_BLOCK_TYPE_ACP ,AMD_IP_BLOCK_TYPE_GFXHUB , -AMD_IP_BLOCK_TYPE_MMHUB +AMD_IP_BLOCK_TYPE_MMHUB , +AMD_IP_BLOCK_TYPE_VCN }; enum amd_clockgating_state {
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 73/117 drm/amdgpu: move amdgpu_vcn structure to vcn header
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26 +------------------------- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 25 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -25
@@ -62,6 +62,7 @@#include "amdgpu_acp.h" #include "amdgpu_uvd.h" #include "amdgpu_vce.h" +#include "amdgpu_vcn.h" #include "amdgpu_dm.h" #include "gpu_scheduler.h"
@@ -1181,31 +1182,6 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb);void amdgpu_get_pcie_info (struct amdgpu_device *adev);/* -* VCN -*/ -#define AMDGPU_VCN_STACK_SIZE (200*1024) -#define AMDGPU_VCN_HEAP_SIZE (256*1024) -#define AMDGPU_VCN_SESSION_SIZE (50*1024) -#define AMDGPU_VCN_FIRMWARE_OFFSET 256 -#define AMDGPU_VCN_MAX_ENC_RINGS 3 - -struct amdgpu_vcn { -struct amdgpu_bo *vcpu_bo; -void *cpu_addr; -uint64_t gpu_addr; -unsigned fw_version; -void *saved_bo; -struct delayed_work idle_work; -const struct firmware *fw;/* VCN firmware */ -struct amdgpu_ring ring_dec; -struct amdgpu_ring ring_enc[AMDGPU_VCN_MAX_ENC_RINGS ]; -struct amdgpu_irq_src irq; -struct amd_sched_entity entity_dec; -struct amd_sched_entity entity_enc; -uint32_t srbm_soft_reset; -}; - -/* * SDMA */ struct amdgpu_sdma_instance {
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +22 -0
@@ -24,6 +24,28 @@#ifndef __AMDGPU_VCN_H__#define __AMDGPU_VCN_H__ +#define AMDGPU_VCN_STACK_SIZE (200*1024) +#define AMDGPU_VCN_HEAP_SIZE (256*1024) +#define AMDGPU_VCN_SESSION_SIZE (50*1024) +#define AMDGPU_VCN_FIRMWARE_OFFSET 256 +#define AMDGPU_VCN_MAX_ENC_RINGS 3 + +struct amdgpu_vcn { +struct amdgpu_bo *vcpu_bo; +void *cpu_addr; +uint64_t gpu_addr; +unsigned fw_version; +void *saved_bo; +struct delayed_work idle_work; +const struct firmware *fw;/* VCN firmware */ +struct amdgpu_ring ring_dec; +struct amdgpu_ring ring_enc[AMDGPU_VCN_MAX_ENC_RINGS ]; +struct amdgpu_irq_src irq; +struct amd_sched_entity entity_dec; +struct amd_sched_entity entity_enc; +uint32_t srbm_soft_reset; +}; +int amdgpu_vcn_sw_init (struct amdgpu_device *adev);int amdgpu_vcn_sw_fini (struct amdgpu_device *adev);int amdgpu_vcn_suspend (struct amdgpu_device *adev);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 74/117 drm/amdgpu: re-group the functions in amdgpu_vcn.c
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 140 ++++++++++++++++---------------- 1 file changed, 70 insertions(+), 70 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +70 -70
@@ -196,6 +196,42 @@ int amdgpu_vcn_resume(struct amdgpu_device *adev)return 0 ; } +static void amdgpu_vcn_idle_work_handler (struct work_struct *work) +{ +struct amdgpu_device *adev = + container_of(work, struct amdgpu_device, vcn.idle_work.work); +unsigned fences =amdgpu_fence_count_emitted (&adev->vcn.ring_dec); + +if (fences ==0 ) { +if (adev->pm.dpm_enabled) { +amdgpu_dpm_enable_uvd (adev, false); + }else { +amdgpu_asic_set_uvd_clocks (adev,0 ,0 ); + } + }else { +schedule_delayed_work (&adev->vcn.idle_work,VCN_IDLE_TIMEOUT ); + } +} + +void amdgpu_vcn_ring_begin_use (struct amdgpu_ring *ring) +{ +struct amdgpu_device *adev = ring->adev; +bool set_clocks = !cancel_delayed_work_sync (&adev->vcn.idle_work); + +if (set_clocks) { +if (adev->pm.dpm_enabled) { +amdgpu_dpm_enable_uvd (adev, true); + }else { +amdgpu_asic_set_uvd_clocks (adev,53300 ,40000 ); + } + } +} + +void amdgpu_vcn_ring_end_use (struct amdgpu_ring *ring) +{ +schedule_delayed_work (&ring->adev->vcn.idle_work,VCN_IDLE_TIMEOUT ); +} +static int amdgpu_vcn_dec_send_msg (struct amdgpu_ring *ring,struct amdgpu_bo *bo,bool direct,struct dma_fence **fence) {
@@ -365,42 +401,6 @@ static int amdgpu_vcn_dec_get_destroy_msg(struct amdgpu_ring *ring, uint32_t hanreturn amdgpu_vcn_dec_send_msg (ring, bo, direct, fence); } -static void amdgpu_vcn_idle_work_handler (struct work_struct *work) -{ -struct amdgpu_device *adev = - container_of(work, struct amdgpu_device, vcn.idle_work.work); -unsigned fences =amdgpu_fence_count_emitted (&adev->vcn.ring_dec); - -if (fences ==0 ) { -if (adev->pm.dpm_enabled) { -amdgpu_dpm_enable_uvd (adev, false); - }else { -amdgpu_asic_set_uvd_clocks (adev,0 ,0 ); - } - }else { -schedule_delayed_work (&adev->vcn.idle_work,VCN_IDLE_TIMEOUT ); - } -} - -void amdgpu_vcn_ring_begin_use (struct amdgpu_ring *ring) -{ -struct amdgpu_device *adev = ring->adev; -bool set_clocks = !cancel_delayed_work_sync (&adev->vcn.idle_work); - -if (set_clocks) { -if (adev->pm.dpm_enabled) { -amdgpu_dpm_enable_uvd (adev, true); - }else { -amdgpu_asic_set_uvd_clocks (adev,53300 ,40000 ); - } - } -} - -void amdgpu_vcn_ring_end_use (struct amdgpu_ring *ring) -{ -schedule_delayed_work (&ring->adev->vcn.idle_work,VCN_IDLE_TIMEOUT ); -} -int amdgpu_vcn_dec_ring_test_ib (struct amdgpu_ring *ring,long timeout) {struct dma_fence *fence;
@@ -435,6 +435,40 @@ int amdgpu_vcn_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout)return r; } +int amdgpu_vcn_enc_ring_test_ring (struct amdgpu_ring *ring) +{ +struct amdgpu_device *adev = ring->adev; +uint32_t rptr =amdgpu_ring_get_rptr (ring); +unsigned i; +int r; + + r =amdgpu_ring_alloc (ring,16 ); +if (r) { +DRM_ERROR ("amdgpu: vcn enc failed to lock ring %d (%d).\n" , + ring->idx, r); +return r; + } +amdgpu_ring_write (ring,VCE_CMD_END ); +amdgpu_ring_commit (ring); + +for (i =0 ; i < adev->usec_timeout; i++) { +if (amdgpu_ring_get_rptr (ring) != rptr) +break ; +DRM_UDELAY (1 ); + } + +if (i < adev->usec_timeout) { +DRM_INFO ("ring test on %d succeeded in %d usecs\n" , + ring->idx, i); + }else { +DRM_ERROR ("amdgpu: ring %d test failed\n" , + ring->idx); + r = -ETIMEDOUT ; + } + +return r; +} +static int amdgpu_vcn_enc_get_create_msg (struct amdgpu_ring *ring,uint32_t handle,struct dma_fence **fence) {
@@ -561,40 +595,6 @@ static int amdgpu_vcn_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t hanreturn r; } -int amdgpu_vcn_enc_ring_test_ring (struct amdgpu_ring *ring) -{ -struct amdgpu_device *adev = ring->adev; -uint32_t rptr =amdgpu_ring_get_rptr (ring); -unsigned i; -int r; - - r =amdgpu_ring_alloc (ring,16 ); -if (r) { -DRM_ERROR ("amdgpu: vcn enc failed to lock ring %d (%d).\n" , - ring->idx, r); -return r; - } -amdgpu_ring_write (ring,VCE_CMD_END ); -amdgpu_ring_commit (ring); - -for (i =0 ; i < adev->usec_timeout; i++) { -if (amdgpu_ring_get_rptr (ring) != rptr) -break ; -DRM_UDELAY (1 ); - } - -if (i < adev->usec_timeout) { -DRM_INFO ("ring test on %d succeeded in %d usecs\n" , - ring->idx, i); - }else { -DRM_ERROR ("amdgpu: ring %d test failed\n" , - ring->idx); - r = -ETIMEDOUT ; - } - -return r; -} -int amdgpu_vcn_enc_ring_test_ib (struct amdgpu_ring *ring,long timeout) {struct dma_fence *fence =NULL ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 75/117 drm/amdgpu: move vcn ring test to amdgpu_vcn.c
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Hope it will be generic for vcn later
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 36 ++++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 ++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 45 +-------------------------------- 3 files changed, 39 insertions(+), 44 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +36 -0
@@ -232,6 +232,42 @@ void amdgpu_vcn_ring_end_use(struct amdgpu_ring *ring)schedule_delayed_work (&ring->adev->vcn.idle_work,VCN_IDLE_TIMEOUT ); } +int amdgpu_vcn_dec_ring_test_ring (struct amdgpu_ring *ring) +{ +struct amdgpu_device *adev = ring->adev; +uint32_t tmp =0 ; +unsigned i; +int r; + +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_CONTEXT_ID),0xCAFEDEAD ); + r =amdgpu_ring_alloc (ring,3 ); +if (r) { +DRM_ERROR ("amdgpu: cp failed to lock ring %d (%d).\n" , + ring->idx, r); +return r; + } +amdgpu_ring_write (ring, +PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_CONTEXT_ID),0 )); +amdgpu_ring_write (ring,0xDEADBEEF ); +amdgpu_ring_commit (ring); +for (i =0 ; i < adev->usec_timeout; i++) { + tmp =RREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_CONTEXT_ID)); +if (tmp ==0xDEADBEEF ) +break ; +DRM_UDELAY (1 ); + } + +if (i < adev->usec_timeout) { +DRM_INFO ("ring test on %d succeeded in %d usecs\n" , + ring->idx, i); + }else { +DRM_ERROR ("amdgpu: ring %d test failed (0x%08X)\n" , + ring->idx, tmp); + r = -EINVAL ; + } +return r; +} +static int amdgpu_vcn_dec_send_msg (struct amdgpu_ring *ring,struct amdgpu_bo *bo,bool direct,struct dma_fence **fence) {
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +2 -0
@@ -52,6 +52,8 @@ int amdgpu_vcn_suspend(struct amdgpu_device *adev);int amdgpu_vcn_resume (struct amdgpu_device *adev);void amdgpu_vcn_ring_begin_use (struct amdgpu_ring *ring);void amdgpu_vcn_ring_end_use (struct amdgpu_ring *ring); + +int amdgpu_vcn_dec_ring_test_ring (struct amdgpu_ring *ring);int amdgpu_vcn_dec_ring_test_ib (struct amdgpu_ring *ring,long timeout);int amdgpu_vcn_enc_ring_test_ring (struct amdgpu_ring *ring);
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +1 -44
57 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 76/117 drm/amdgpu: expose vcn RB command
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 7 +++++++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +7 -0
@@ -30,6 +30,13 @@#define AMDGPU_VCN_FIRMWARE_OFFSET 256#define AMDGPU_VCN_MAX_ENC_RINGS 3 +#define VCN_CMD_FENCE 0x00000000 +#define VCN_CMD_TRAP 0x00000001 +#define VCN_CMD_WRITE_REG 0x00000004 +#define VCN_CMD_REG_READ_COND_WAIT 0x00000006 +#define VCN_CMD_PACKET_START 0x0000000a +#define VCN_CMD_PACKET_END 0x0000000b +struct amdgpu_vcn {struct amdgpu_bo *vcpu_bo;void *cpu_addr;
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +4 -4
@@ -512,7 +512,7 @@ static void vcn_v1_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64amdgpu_ring_write (ring,upper_32_bits (addr) &0xff );amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,0 ); +amdgpu_ring_write (ring,VCN_CMD_FENCE <<1 );amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_DATA0),0 ));
@@ -522,7 +522,7 @@ static void vcn_v1_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64amdgpu_ring_write (ring,0 );amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,2 ); +amdgpu_ring_write (ring,VCN_CMD_TRAP <<1 ); }/**
@@ -576,7 +576,7 @@ static void vcn_v1_0_dec_vm_reg_write(struct amdgpu_ring *ring,amdgpu_ring_write (ring, data1);amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,8 ); +amdgpu_ring_write (ring,VCN_CMD_WRITE_REG <<1 ); } static void vcn_v1_0_dec_vm_reg_wait(struct amdgpu_ring *ring,
@@ -593,7 +593,7 @@ static void vcn_v1_0_dec_vm_reg_wait(struct amdgpu_ring *ring,amdgpu_ring_write (ring, mask);amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,12 ); +amdgpu_ring_write (ring,VCN_CMD_REG_READ_COND_WAIT <<1 ); } static void vcn_v1_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 77/117 drm/amdgpu: add a ring func for vcn start command
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Needed for the proper command sequence for VCN.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 1 + 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +3 -0
@@ -161,6 +161,9 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,return r; } +if (ring->funcs->insert_start) + ring->funcs->insert_start (ring); +if (vm) { r =amdgpu_vm_flush (ring, job);if (r) {
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -0
@@ -131,6 +131,7 @@ struct amdgpu_ring_funcs {int (*test_ib)(struct amdgpu_ring *ring,long timeout);/* insert NOP packets */ void (*insert_nop)(struct amdgpu_ring *ring,uint32_t count); +void (*insert_start)(struct amdgpu_ring *ring);void (*insert_end)(struct amdgpu_ring *ring);/* pad the indirect buffer to the necessary number of dw */ void (*pad_ib)(struct amdgpu_ring *ring,struct amdgpu_ib *ib);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 78/117 drm/amdgpu: implement vcn start RB command
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +20 -1
@@ -489,6 +489,23 @@ static void vcn_v1_0_dec_ring_set_wptr(struct amdgpu_ring *ring) }/** +* vcn_v1_0_dec_ring_insert_start - insert a start command +* +* @ring: amdgpu_ring pointer +* +* Write a start command to the ring. +*/ +static void vcn_v1_0_dec_ring_insert_start (struct amdgpu_ring *ring) +{ +amdgpu_ring_write (ring, +PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_DATA0),0 )); +amdgpu_ring_write (ring,0 ); +amdgpu_ring_write (ring, +PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); +amdgpu_ring_write (ring,VCN_CMD_PACKET_START <<1 ); +} + +/** * vcn_v1_0_dec_ring_emit_fence - emit an fence & trap command * * @ring: amdgpu_ring pointer
@@ -683,7 +700,8 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = { .emit_frame_size =2 +/* vcn_v1_0_dec_ring_emit_hdp_invalidate */ 34 *AMDGPU_MAX_VMHUBS +/* vcn_v1_0_dec_ring_emit_vm_flush */ - 14 + 14, /* vcn_v1_0_dec_ring_emit_fence x2 vm fence */ +14 +14 +/* vcn_v1_0_dec_ring_emit_fence x2 vm fence */ + 4, .emit_ib_size = 8, /* vcn_v1_0_dec_ring_emit_ib */ .emit_ib = vcn_v1_0_dec_ring_emit_ib, .emit_fence = vcn_v1_0_dec_ring_emit_fence,
@@ -692,6 +710,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = { .test_ring = amdgpu_vcn_dec_ring_test_ring, .test_ib = amdgpu_vcn_dec_ring_test_ib, .insert_nop = amdgpu_ring_insert_nop, + .insert_start = vcn_v1_0_dec_ring_insert_start, .pad_ib = amdgpu_ring_generic_pad_ib, .begin_use = amdgpu_vcn_ring_begin_use, .end_use = amdgpu_vcn_ring_end_use,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 79/117 drm/amdgpu: implement insert end ring function for vcn decode
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +16 -1
@@ -506,6 +506,20 @@ static void vcn_v1_0_dec_ring_insert_start(struct amdgpu_ring *ring) }/** +* vcn_v1_0_dec_ring_insert_end - insert a end command +* +* @ring: amdgpu_ring pointer +* +* Write a end command to the ring. +*/ +static void vcn_v1_0_dec_ring_insert_end (struct amdgpu_ring *ring) +{ +amdgpu_ring_write (ring, +PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); +amdgpu_ring_write (ring,VCN_CMD_PACKET_END <<1 ); +} + +/** * vcn_v1_0_dec_ring_emit_fence - emit an fence & trap command * * @ring: amdgpu_ring pointer
@@ -701,7 +715,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = {2 +/* vcn_v1_0_dec_ring_emit_hdp_invalidate */ 34 *AMDGPU_MAX_VMHUBS +/* vcn_v1_0_dec_ring_emit_vm_flush */ 14 +14 +/* vcn_v1_0_dec_ring_emit_fence x2 vm fence */ - 4, + 6, .emit_ib_size = 8, /* vcn_v1_0_dec_ring_emit_ib */ .emit_ib = vcn_v1_0_dec_ring_emit_ib, .emit_fence = vcn_v1_0_dec_ring_emit_fence,
@@ -711,6 +725,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = { .test_ib = amdgpu_vcn_dec_ring_test_ib, .insert_nop = amdgpu_ring_insert_nop, .insert_start = vcn_v1_0_dec_ring_insert_start, + .insert_end = vcn_v1_0_dec_ring_insert_end, .pad_ib = amdgpu_ring_generic_pad_ib, .begin_use = amdgpu_vcn_ring_begin_use, .end_use = amdgpu_vcn_ring_end_use,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 80/117 drm/amdgpu/vcn: implement ib tests with new message buffer interface
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 40 ++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +24 -16
@@ -373,19 +373,26 @@ static int amdgpu_vcn_dec_get_create_msg(struct amdgpu_ring *ring, uint32_t handreturn r; } -/* stitch together an vcn create msg */ - msg[0 ] =cpu_to_le32 (0x00000de4 ); - msg[1 ] =cpu_to_le32 (0x00000000 ); - msg[2 ] =cpu_to_le32 (handle); + msg[0 ] =cpu_to_le32 (0x00000028 ); + msg[1 ] =cpu_to_le32 (0x0000004c ); + msg[2 ] =cpu_to_le32 (0x00000001 ); msg[3 ] =cpu_to_le32 (0x00000000 ); - msg[4 ] =cpu_to_le32 (0x00000000 ); + msg[4 ] =cpu_to_le32 (handle); msg[5 ] =cpu_to_le32 (0x00000000 ); - msg[6 ] =cpu_to_le32 (0x00000000 ); - msg[7 ] =cpu_to_le32 (0x00000780 ); - msg[8 ] =cpu_to_le32 (0x00000440 ); + msg[6 ] =cpu_to_le32 (0x00000001 ); + msg[7 ] =cpu_to_le32 (0x00000028 ); + msg[8 ] =cpu_to_le32 (0x00000024 ); msg[9 ] =cpu_to_le32 (0x00000000 ); - msg[10 ] =cpu_to_le32 (0x01b37000 ); -for (i =11 ; i <1024 ; ++i) + msg[10 ] =cpu_to_le32 (0x00000007 ); + msg[11 ] =cpu_to_le32 (0x00000000 ); + msg[12 ] =cpu_to_le32 (0x00000000 ); + msg[13 ] =cpu_to_le32 (0x00000780 ); + msg[14 ] =cpu_to_le32 (0x00000440 ); + msg[15 ] =cpu_to_le32 (0x00000000 ); + msg[16 ] =cpu_to_le32 (0x01b37000 ); + msg[17 ] =cpu_to_le32 (0x00000000 ); + msg[18 ] =cpu_to_le32 (0x00000000 ); +for (i =19 ; i <1024 ; ++i) msg[i] =cpu_to_le32 (0x0 );amdgpu_bo_kunmap (bo);
@@ -423,12 +430,13 @@ static int amdgpu_vcn_dec_get_destroy_msg(struct amdgpu_ring *ring, uint32_t hanreturn r; } -/* stitch together an vcn destroy msg */ - msg[0 ] =cpu_to_le32 (0x00000de4 ); - msg[1 ] =cpu_to_le32 (0x00000002 ); - msg[2 ] =cpu_to_le32 (handle); - msg[3 ] =cpu_to_le32 (0x00000000 ); -for (i =4 ; i <1024 ; ++i) + msg[0 ] =cpu_to_le32 (0x00000028 ); + msg[1 ] =cpu_to_le32 (0x00000018 ); + msg[2 ] =cpu_to_le32 (0x00000000 ); + msg[3 ] =cpu_to_le32 (0x00000002 ); + msg[4 ] =cpu_to_le32 (handle); + msg[5 ] =cpu_to_le32 (0x00000000 ); +for (i =6 ; i <1024 ; ++i) msg[i] =cpu_to_le32 (0x0 );amdgpu_bo_kunmap (bo);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 81/117 uapi/drm: add AMDGPU_HW_IP_VCN_DEC for decode CS
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- include/uapi/drm/amdgpu_drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/drm/amdgpu_drm.h +2 -1
@@ -433,7 +433,8 @@ struct drm_amdgpu_gem_va {#define AMDGPU_HW_IP_UVD 3#define AMDGPU_HW_IP_VCE 4#define AMDGPU_HW_IP_UVD_ENC 5 -#define AMDGPU_HW_IP_NUM 6 +#define AMDGPU_HW_IP_VCN_DEC 6 +#define AMDGPU_HW_IP_NUM 7#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 82/117 uapi/drm: add AMDGPU_HW_IP_VCN_ENC for encode CS
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- include/uapi/drm/amdgpu_drm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/drm/amdgpu_drm.h +2 -1
@@ -434,7 +434,8 @@ struct drm_amdgpu_gem_va {#define AMDGPU_HW_IP_VCE 4#define AMDGPU_HW_IP_UVD_ENC 5#define AMDGPU_HW_IP_VCN_DEC 6 -#define AMDGPU_HW_IP_NUM 7 +#define AMDGPU_HW_IP_VCN_ENC 7 +#define AMDGPU_HW_IP_NUM 8#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 83/117 drm/amdgpu: add AMDGPU_HW_IP_VCN_DEC to info query
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +9 -0
@@ -318,6 +318,12 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file ib_start_alignment =AMDGPU_GPU_PAGE_SIZE ; ib_size_alignment =1 ;break ; +case AMDGPU_HW_IP_VCN_DEC : + type =AMD_IP_BLOCK_TYPE_VCN ; + ring_mask = adev->vcn.ring_dec.ready ?1 :0 ; + ib_start_alignment =AMDGPU_GPU_PAGE_SIZE ; + ib_size_alignment =16 ; +break ;default :return -EINVAL ; }
@@ -360,6 +366,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_filecase AMDGPU_HW_IP_UVD_ENC : type =AMD_IP_BLOCK_TYPE_UVD ;break ; +case AMDGPU_HW_IP_VCN_DEC : + type =AMD_IP_BLOCK_TYPE_VCN ; +break ;default :return -EINVAL ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 84/117 drm/amdgpu: get cs support of AMDGPU_HW_IP_VCN_DEC
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3 -0
@@ -91,6 +91,9 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type,return -EINVAL ; }break ; +case AMDGPU_HW_IP_VCN_DEC : + *out_ring = &adev->vcn.ring_dec; +break ; }if (!(*out_ring && (*out_ring)->adev)) {
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 85/117 drm/amdgpu: Disable uvd and vce free handles for raven
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Not required on raven.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +4 -2
@@ -822,8 +822,10 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,amdgpu_ctx_mgr_fini (&fpriv->ctx_mgr); -amdgpu_uvd_free_handles (adev, file_priv); -amdgpu_vce_free_handles (adev, file_priv); +if (adev->asic_type !=CHIP_RAVEN ) { +amdgpu_uvd_free_handles (adev, file_priv); +amdgpu_vce_free_handles (adev, file_priv); + }amdgpu_vm_bo_rmv (adev, fpriv->prt_va);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 86/117 drm/amdgpu: implement new vcn cache window programming
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +16 -18
@@ -215,31 +215,29 @@ static int vcn_v1_0_resume(void *handle)*/ static void vcn_v1_0_mc_resume (struct amdgpu_device *adev) { -uint64_t offset; -uint32_t size; +uint32_t size =AMDGPU_GPU_PAGE_ALIGN (adev->vcn.fw->size +4 ); -/* programm memory controller bits 0-27 */ WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW),lower_32_bits (adev->vcn.gpu_addr));WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH),upper_32_bits (adev->vcn.gpu_addr)); - -/* Current FW has no signed header, but will be added later on */ -/* offset = AMDGPU_VCN_FIRMWARE_OFFSET; */ - offset =0 ; - size =AMDGPU_GPU_PAGE_ALIGN (adev->vcn.fw->size +4 ); -WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET0), offset >>3 ); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET0),0 );WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_SIZE0), size); - offset += size; - size =AMDGPU_VCN_HEAP_SIZE ; -WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET1), offset >>3 ); -WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_SIZE1), size); - - offset += size; - size =AMDGPU_VCN_STACK_SIZE + (AMDGPU_VCN_SESSION_SIZE *40 ); -WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET2), offset >>3 ); -WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_SIZE2), size); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW), +lower_32_bits (adev->vcn.gpu_addr + size)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_HIGH), +upper_32_bits (adev->vcn.gpu_addr + size)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET1),0 ); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_SIZE1),AMDGPU_VCN_HEAP_SIZE ); + +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_LOW), +lower_32_bits (adev->vcn.gpu_addr + size +AMDGPU_VCN_HEAP_SIZE )); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_HIGH), +upper_32_bits (adev->vcn.gpu_addr + size +AMDGPU_VCN_HEAP_SIZE )); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET2),0 ); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_SIZE2), +AMDGPU_VCN_STACK_SIZE + (AMDGPU_VCN_SESSION_SIZE *40 ));WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_UDEC_ADDR_CONFIG), adev->gfx.config.gb_addr_config);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 87/117 drm/amdgpu: add vcn ip block to soc15
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -0
@@ -57,6 +57,7 @@#include "sdma_v4_0.h" #include "uvd_v7_0.h" #include "vce_v4_0.h" +#include "vcn_v1_0.h" #include "amdgpu_powerplay.h" #include "dce_virtual.h" #include "mxgpu_ai.h"
@@ -519,6 +520,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)#endif amdgpu_ip_block_add (adev, &gfx_v9_0_ip_block);amdgpu_ip_block_add (adev, &sdma_v4_0_ip_block); +amdgpu_ip_block_add (adev, &vcn_v1_0_ip_block);break ;default :return -EINVAL ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 88/117 drm/amdgpu: change vcn dec rb command specific for decode
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +6 -6
@@ -30,12 +30,12 @@#define AMDGPU_VCN_FIRMWARE_OFFSET 256#define AMDGPU_VCN_MAX_ENC_RINGS 3 -#define VCN_CMD_FENCE 0x00000000 -#define VCN_CMD_TRAP 0x00000001 -#define VCN_CMD_WRITE_REG 0x00000004 -#define VCN_CMD_REG_READ_COND_WAIT 0x00000006 -#define VCN_CMD_PACKET_START 0x0000000a -#define VCN_CMD_PACKET_END 0x0000000b +#define VCN_DEC_CMD_FENCE 0x00000000 +#define VCN_DEC_CMD_TRAP 0x00000001 +#define VCN_DEC_CMD_WRITE_REG 0x00000004 +#define VCN_DEC_CMD_REG_READ_COND_WAIT 0x00000006 +#define VCN_DEC_CMD_PACKET_START 0x0000000a +#define VCN_DEC_CMD_PACKET_END 0x0000000bstruct amdgpu_vcn {struct amdgpu_bo *vcpu_bo;
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +6 -6
@@ -500,7 +500,7 @@ static void vcn_v1_0_dec_ring_insert_start(struct amdgpu_ring *ring)amdgpu_ring_write (ring,0 );amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,VCN_CMD_PACKET_START <<1 ); +amdgpu_ring_write (ring,VCN_DEC_CMD_PACKET_START <<1 ); }/**
@@ -514,7 +514,7 @@ static void vcn_v1_0_dec_ring_insert_end(struct amdgpu_ring *ring) {amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,VCN_CMD_PACKET_END <<1 ); +amdgpu_ring_write (ring,VCN_DEC_CMD_PACKET_END <<1 ); }/**
@@ -541,7 +541,7 @@ static void vcn_v1_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64amdgpu_ring_write (ring,upper_32_bits (addr) &0xff );amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,VCN_CMD_FENCE <<1 ); +amdgpu_ring_write (ring,VCN_DEC_CMD_FENCE <<1 );amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_DATA0),0 ));
@@ -551,7 +551,7 @@ static void vcn_v1_0_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64amdgpu_ring_write (ring,0 );amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,VCN_CMD_TRAP <<1 ); +amdgpu_ring_write (ring,VCN_DEC_CMD_TRAP <<1 ); }/**
@@ -605,7 +605,7 @@ static void vcn_v1_0_dec_vm_reg_write(struct amdgpu_ring *ring,amdgpu_ring_write (ring, data1);amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,VCN_CMD_WRITE_REG <<1 ); +amdgpu_ring_write (ring,VCN_DEC_CMD_WRITE_REG <<1 ); } static void vcn_v1_0_dec_vm_reg_wait(struct amdgpu_ring *ring,
@@ -622,7 +622,7 @@ static void vcn_v1_0_dec_vm_reg_wait(struct amdgpu_ring *ring,amdgpu_ring_write (ring, mask);amdgpu_ring_write (ring,PACKET0 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_GPCOM_VCPU_CMD),0 )); -amdgpu_ring_write (ring,VCN_CMD_REG_READ_COND_WAIT <<1 ); +amdgpu_ring_write (ring,VCN_DEC_CMD_REG_READ_COND_WAIT <<1 ); } static void vcn_v1_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 89/117 drm/amdgpu: add vcn enc rings
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 28 +++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +5 -0
@@ -126,6 +126,8 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)int amdgpu_vcn_sw_fini (struct amdgpu_device *adev) { +int i; +kfree (adev->vcn.saved_bo);amd_sched_entity_fini (&adev->vcn.ring_dec.sched, &adev->vcn.entity_dec);
@@ -138,6 +140,9 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)amdgpu_ring_fini (&adev->vcn.ring_dec); +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) +amdgpu_ring_fini (&adev->vcn.ring_enc[i]); +release_firmware (adev->vcn.fw);return 0 ;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +1 -1
@@ -50,7 +50,7 @@ struct amdgpu_vcn {struct amdgpu_irq_src irq;struct amd_sched_entity entity_dec;struct amd_sched_entity entity_enc; -uint32_t srbm_soft_reset; +unsigned num_enc_rings; };int amdgpu_vcn_sw_init (struct amdgpu_device *adev);
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +27 -1
@@ -51,6 +51,8 @@ static int vcn_v1_0_early_init(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; + adev->vcn.num_enc_rings =2 ; +vcn_v1_0_set_dec_ring_funcs (adev);vcn_v1_0_set_irq_funcs (adev);
@@ -67,7 +69,7 @@ static int vcn_v1_0_early_init(void *handle)static int vcn_v1_0_sw_init (void *handle) {struct amdgpu_ring *ring; -int r; +int i, r;struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* VCN TRAP */
@@ -86,6 +88,16 @@ static int vcn_v1_0_sw_init(void *handle) ring = &adev->vcn.ring_dec;sprintf (ring->name,"vcn_dec" ); r =amdgpu_ring_init (adev, ring,512 , &adev->vcn.irq,0 ); +if (r) +return r; + +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { + ring = &adev->vcn.ring_enc[i]; +sprintf (ring->name,"vcn_enc%d" , i); + r =amdgpu_ring_init (adev, ring,512 , &adev->vcn.irq,0 ); +if (r) +return r; + }return r; }
@@ -401,6 +413,20 @@ static int vcn_v1_0_start(struct amdgpu_device *adev)WREG32_P (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RBC_RB_CNTL),0 , ~UVD_RBC_RB_CNTL__RB_NO_FETCH_MASK ); + ring = &adev->vcn.ring_enc[0 ]; +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_RPTR),lower_32_bits (ring->wptr)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_WPTR),lower_32_bits (ring->wptr)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_BASE_LO), ring->gpu_addr); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_BASE_HI),upper_32_bits (ring->gpu_addr)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_SIZE), ring->ring_size /4 ); + + ring = &adev->vcn.ring_enc[1 ]; +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_RPTR2),lower_32_bits (ring->wptr)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_WPTR2),lower_32_bits (ring->wptr)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_BASE_LO2), ring->gpu_addr); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_BASE_HI2),upper_32_bits (ring->gpu_addr)); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_RB_SIZE2), ring->ring_size /4 ); +return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 90/117 drm/amdgpu: add vcn enc ring type and functions
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Add the ring function callbacks for the encode rings.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 8 ++ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 170 +++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +2 -1
@@ -48,7 +48,8 @@ enum amdgpu_ring_type {AMDGPU_RING_TYPE_VCE ,AMDGPU_RING_TYPE_KIQ ,AMDGPU_RING_TYPE_UVD_ENC , - AMDGPU_RING_TYPE_VCN_DEC +AMDGPU_RING_TYPE_VCN_DEC , + AMDGPU_RING_TYPE_VCN_ENC };struct amdgpu_device ;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +8 -0
@@ -37,6 +37,14 @@#define VCN_DEC_CMD_PACKET_START 0x0000000a#define VCN_DEC_CMD_PACKET_END 0x0000000b +#define VCN_ENC_CMD_NO_OP 0x00000000 +#define VCN_ENC_CMD_END 0x00000001 +#define VCN_ENC_CMD_IB 0x00000002 +#define VCN_ENC_CMD_FENCE 0x00000003 +#define VCN_ENC_CMD_TRAP 0x00000004 +#define VCN_ENC_CMD_REG_WRITE 0x0000000b +#define VCN_ENC_CMD_REG_WAIT 0x0000000c +struct amdgpu_vcn {struct amdgpu_bo *vcpu_bo;void *cpu_addr;
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +170 -0
200 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 91/117 drm/amdgpu: add vcn enc irq support
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +25 -3
@@ -74,11 +74,19 @@ static int vcn_v1_0_sw_init(void *handle)int i, r;struct amdgpu_device *adev = (struct amdgpu_device *)handle; -/* VCN TRAP */ +/* VCN DEC TRAP */ r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_VCN ,124 , &adev->vcn.irq);if (r)return r; +/* VCN ENC TRAP */ +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { + r =amdgpu_irq_add_id (adev,AMDGPU_IH_CLIENTID_VCN , i +119 , + &adev->vcn.irq); +if (r) +return r; + } + r =amdgpu_vcn_sw_init (adev);if (r)return r;
@@ -839,7 +847,21 @@ static int vcn_v1_0_process_interrupt(struct amdgpu_device *adev, {DRM_DEBUG ("IH: VCN TRAP\n" ); -amdgpu_fence_process (&adev->vcn.ring_dec); +switch (entry->src_id) { +case 124 : +amdgpu_fence_process (&adev->vcn.ring_dec); +break ; +case 119 : +amdgpu_fence_process (&adev->vcn.ring_enc[0 ]); +break ; +case 120 : +amdgpu_fence_process (&adev->vcn.ring_enc[1 ]); +break ; +default : +DRM_ERROR ("Unhandled interrupt: %d %d\n" , + entry->src_id, entry->src_data[0 ]); +break ; + }return 0 ; }
@@ -938,7 +960,7 @@ static const struct amdgpu_irq_src_funcs vcn_v1_0_irq_funcs = {static void vcn_v1_0_set_irq_funcs (struct amdgpu_device *adev) { - adev->vcn.irq.num_types =1 ; + adev->uvd.irq.num_types = adev->vcn.num_enc_rings +1 ; adev->vcn.irq.funcs = &vcn_v1_0_irq_funcs; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 92/117 drm/amdgpu: enable vcn encode ring tests
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Wire up the callback and enable them.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 +- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +1 -1
@@ -497,7 +497,7 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring) ring->idx, r);return r; } -amdgpu_ring_write (ring,VCE_CMD_END ); +amdgpu_ring_write (ring,VCN_ENC_CMD_END );amdgpu_ring_commit (ring);for (i =0 ; i < adev->usec_timeout; i++) {
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +13 -2
@@ -144,7 +144,7 @@ static int vcn_v1_0_hw_init(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle;struct amdgpu_ring *ring = &adev->vcn.ring_dec; -int r; +int i, r; r =vcn_v1_0_start (adev);if (r)
@@ -157,9 +157,19 @@ static int vcn_v1_0_hw_init(void *handle) goto done; } +for (i =0 ; i < adev->vcn.num_enc_rings; ++i) { + ring = &adev->vcn.ring_enc[i]; + ring->ready = true; + r =amdgpu_ring_test_ring (ring); +if (r) { + ring->ready = false; + goto done; + } + } + done:if (!r) -DRM_INFO ("VCN decode initialized successfully.\n" ); +DRM_INFO ("VCN decode and encode initialized successfully.\n" );return r; }
@@ -930,6 +940,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_enc_ring_vm_funcs = { .emit_ib = vcn_v1_0_enc_ring_emit_ib, .emit_fence = vcn_v1_0_enc_ring_emit_fence, .emit_vm_flush = vcn_v1_0_enc_ring_emit_vm_flush, + .test_ring = amdgpu_vcn_enc_ring_test_ring, .insert_nop = amdgpu_ring_insert_nop, .insert_end = vcn_v1_0_enc_ring_insert_end, .pad_ib = amdgpu_ring_generic_pad_ib,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 93/117 drm/amdgpu: add vcn enc ib test
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Update and enable the vcn encode IB test.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 84 +++++++++++++-------------------- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 1 + 2 files changed, 34 insertions(+), 51 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +33 -51
@@ -521,7 +521,7 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring)static int amdgpu_vcn_enc_get_create_msg (struct amdgpu_ring *ring,uint32_t handle,struct dma_fence **fence) { -const unsigned ib_size_dw =1024 ; +const unsigned ib_size_dw =16 ;struct amdgpu_job *job;struct amdgpu_ib *ib;struct dma_fence *f =NULL ;
@@ -533,37 +533,24 @@ static int amdgpu_vcn_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handreturn r; ib = &job->ibs[0 ]; - dummy = ib->gpu_addr +1024 ; -/* stitch together an VCN enc create msg */ ib->length_dw =0 ; - ib->ptr[ib->length_dw++] =0x0000000c ;/* len */ - ib->ptr[ib->length_dw++] =0x00000001 ;/* session cmd */ + ib->ptr[ib->length_dw++] =0x00000018 ; + ib->ptr[ib->length_dw++] =0x00000001 ;/* session info */ ib->ptr[ib->length_dw++] = handle; + ib->ptr[ib->length_dw++] =upper_32_bits (dummy); + ib->ptr[ib->length_dw++] = dummy; + ib->ptr[ib->length_dw++] =0x0000000b ; - ib->ptr[ib->length_dw++] =0x00000040 ;/* len */ - ib->ptr[ib->length_dw++] =0x01000001 ;/* create cmd */ - ib->ptr[ib->length_dw++] =0x00000000 ; - ib->ptr[ib->length_dw++] =0x00000042 ; - ib->ptr[ib->length_dw++] =0x0000000a ; - ib->ptr[ib->length_dw++] =0x00000001 ; - ib->ptr[ib->length_dw++] =0x00000080 ; - ib->ptr[ib->length_dw++] =0x00000060 ; - ib->ptr[ib->length_dw++] =0x00000100 ; - ib->ptr[ib->length_dw++] =0x00000100 ; - ib->ptr[ib->length_dw++] =0x0000000c ; - ib->ptr[ib->length_dw++] =0x00000000 ; - ib->ptr[ib->length_dw++] =0x00000000 ; - ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000014 ; + ib->ptr[ib->length_dw++] =0x00000002 ;/* task info */ + ib->ptr[ib->length_dw++] =0x0000001c ; ib->ptr[ib->length_dw++] =0x00000000 ; ib->ptr[ib->length_dw++] =0x00000000 ; - ib->ptr[ib->length_dw++] =0x00000014 ;/* len */ - ib->ptr[ib->length_dw++] =0x05000005 ;/* feedback buffer */ - ib->ptr[ib->length_dw++] =upper_32_bits (dummy); - ib->ptr[ib->length_dw++] = dummy; - ib->ptr[ib->length_dw++] =0x00000001 ; + ib->ptr[ib->length_dw++] =0x00000008 ; + ib->ptr[ib->length_dw++] =0x08000001 ;/* op initialize */ for (i = ib->length_dw; i < ib_size_dw; ++i) ib->ptr[i] =0x0 ;
@@ -577,6 +564,7 @@ static int amdgpu_vcn_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handif (fence) *fence =dma_fence_get (f);dma_fence_put (f); +return 0 ; err:
@@ -585,12 +573,13 @@ static int amdgpu_vcn_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t hand }static int amdgpu_vcn_enc_get_destroy_msg (struct amdgpu_ring *ring,uint32_t handle, -bool direct,struct dma_fence **fence) +struct dma_fence **fence) { -const unsigned ib_size_dw =1024 ; +const unsigned ib_size_dw =16 ;struct amdgpu_job *job;struct amdgpu_ib *ib;struct dma_fence *f =NULL ; +uint64_t dummy;int i, r; r =amdgpu_job_alloc_with_ib (ring->adev, ib_size_dw *4 , &job);
@@ -598,45 +587,38 @@ static int amdgpu_vcn_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t hanreturn r; ib = &job->ibs[0 ]; + dummy = ib->gpu_addr +1024 ; -/* stitch together an VCN enc destroy msg */ ib->length_dw =0 ; - ib->ptr[ib->length_dw++] =0x0000000c ;/* len */ - ib->ptr[ib->length_dw++] =0x00000001 ;/* session cmd */ + ib->ptr[ib->length_dw++] =0x00000018 ; + ib->ptr[ib->length_dw++] =0x00000001 ; ib->ptr[ib->length_dw++] = handle; + ib->ptr[ib->length_dw++] =upper_32_bits (dummy); + ib->ptr[ib->length_dw++] = dummy; + ib->ptr[ib->length_dw++] =0x0000000b ; - ib->ptr[ib->length_dw++] =0x00000020 ;/* len */ - ib->ptr[ib->length_dw++] =0x00000002 ;/* task info */ - ib->ptr[ib->length_dw++] =0xffffffff ;/* next task info, set to 0xffffffff if no */ - ib->ptr[ib->length_dw++] =0x00000001 ;/* destroy session */ - ib->ptr[ib->length_dw++] =0x00000000 ; + ib->ptr[ib->length_dw++] =0x00000014 ; + ib->ptr[ib->length_dw++] =0x00000002 ; + ib->ptr[ib->length_dw++] =0x0000001c ; ib->ptr[ib->length_dw++] =0x00000000 ; - ib->ptr[ib->length_dw++] =0xffffffff ;/* feedback is not needed, set to 0xffffffff and firmware will not output feedback */ ib->ptr[ib->length_dw++] =0x00000000 ; - ib->ptr[ib->length_dw++] =0x00000008 ;/* len */ - ib->ptr[ib->length_dw++] =0x02000001 ;/* destroy cmd */ + ib->ptr[ib->length_dw++] =0x00000008 ; + ib->ptr[ib->length_dw++] =0x08000002 ;/* op close session */ for (i = ib->length_dw; i < ib_size_dw; ++i) ib->ptr[i] =0x0 ; -if (direct) { - r =amdgpu_ib_schedule (ring,1 , ib,NULL , &f); - job->fence =dma_fence_get (f); -if (r) - goto err; - -amdgpu_job_free (job); - }else { - r =amdgpu_job_submit (job, ring, &ring->adev->vcn.entity_enc, -AMDGPU_FENCE_OWNER_UNDEFINED , &f); -if (r) - goto err; - } + r =amdgpu_ib_schedule (ring,1 , ib,NULL , &f); + job->fence =dma_fence_get (f); +if (r) + goto err; +amdgpu_job_free (job);if (fence) *fence =dma_fence_get (f);dma_fence_put (f); +return 0 ; err:
@@ -655,7 +637,7 @@ int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout) goto error; } - r =amdgpu_vcn_enc_get_destroy_msg (ring,1 , true, &fence); + r =amdgpu_vcn_enc_get_destroy_msg (ring,1 , &fence);if (r) {DRM_ERROR ("amdgpu: failed to get destroy ib (%ld).\n" , r); goto error;
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +1 -0
@@ -941,6 +941,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_enc_ring_vm_funcs = { .emit_fence = vcn_v1_0_enc_ring_emit_fence, .emit_vm_flush = vcn_v1_0_enc_ring_emit_vm_flush, .test_ring = amdgpu_vcn_enc_ring_test_ring, + .test_ib = amdgpu_vcn_enc_ring_test_ib, .insert_nop = amdgpu_ring_insert_nop, .insert_end = vcn_v1_0_enc_ring_insert_end, .pad_ib = amdgpu_ring_generic_pad_ib,
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 94/117 drm/amdgpu: add AMDGPU_HW_IP_VCN_ENC to info query
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +8 -0
@@ -324,6 +324,13 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file ib_start_alignment =AMDGPU_GPU_PAGE_SIZE ; ib_size_alignment =16 ;break ; +case AMDGPU_HW_IP_VCN_ENC : + type =AMD_IP_BLOCK_TYPE_VCN ; +for (i =0 ; i < adev->vcn.num_enc_rings; i++) + ring_mask |= ((adev->vcn.ring_enc[i].ready ?1 :0 ) << i); + ib_start_alignment =AMDGPU_GPU_PAGE_SIZE ; + ib_size_alignment =1 ; +break ;default :return -EINVAL ; }
@@ -367,6 +374,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file type =AMD_IP_BLOCK_TYPE_UVD ;break ;case AMDGPU_HW_IP_VCN_DEC : +case AMDGPU_HW_IP_VCN_ENC : type =AMD_IP_BLOCK_TYPE_VCN ;break ;default :
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 95/117 drm/amdgpu: get cs support for AMDGPU_HW_IP_VCN_ENC
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +9 -0
@@ -94,6 +94,15 @@ int amdgpu_cs_get_ring(struct amdgpu_device *adev, u32 ip_type,case AMDGPU_HW_IP_VCN_DEC : *out_ring = &adev->vcn.ring_dec;break ; +case AMDGPU_HW_IP_VCN_ENC : +if (ring < adev->vcn.num_enc_rings){ + *out_ring = &adev->vcn.ring_enc[ring]; + }else { +DRM_ERROR ("only %d VCN ENC rings are supported\n" , + adev->vcn.num_enc_rings); +return -EINVAL ; + } +break ; }if (!(*out_ring && (*out_ring)->adev)) {
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 96/117 drm/amdgpu: add vcn firmware header offset
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
New firmware add psp header.
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +2 -1
@@ -253,7 +253,8 @@ static void vcn_v1_0_mc_resume(struct amdgpu_device *adev) lower_32_bits(adev->vcn.gpu_addr));WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH),upper_32_bits (adev->vcn.gpu_addr)); -WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET0),0 ); +WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET0), +AMDGPU_UVD_FIRMWARE_OFFSET >>3 );WREG32 (SOC15_REG_OFFSET (UVD ,0 , mmUVD_VCPU_CACHE_SIZE0), size); WREG32(SOC15_REG_OFFSET(UVD, 0, mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW),
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 97/117 drm/amdgpu: update vcn decode create msg
In reply to a message not in the archiveFrom: Leo Liu <[email protected]>
Based on new vcn firmware interface changes
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +5 -10
@@ -379,25 +379,20 @@ static int amdgpu_vcn_dec_get_create_msg(struct amdgpu_ring *ring, uint32_t hand } msg[0 ] =cpu_to_le32 (0x00000028 ); - msg[1 ] =cpu_to_le32 (0x0000004c ); + msg[1 ] =cpu_to_le32 (0x00000038 ); msg[2 ] =cpu_to_le32 (0x00000001 ); msg[3 ] =cpu_to_le32 (0x00000000 ); msg[4 ] =cpu_to_le32 (handle); msg[5 ] =cpu_to_le32 (0x00000000 ); msg[6 ] =cpu_to_le32 (0x00000001 ); msg[7 ] =cpu_to_le32 (0x00000028 ); - msg[8 ] =cpu_to_le32 (0x00000024 ); + msg[8 ] =cpu_to_le32 (0x00000010 ); msg[9 ] =cpu_to_le32 (0x00000000 ); msg[10 ] =cpu_to_le32 (0x00000007 ); msg[11 ] =cpu_to_le32 (0x00000000 ); - msg[12 ] =cpu_to_le32 (0x00000000 ); - msg[13 ] =cpu_to_le32 (0x00000780 ); - msg[14 ] =cpu_to_le32 (0x00000440 ); - msg[15 ] =cpu_to_le32 (0x00000000 ); - msg[16 ] =cpu_to_le32 (0x01b37000 ); - msg[17 ] =cpu_to_le32 (0x00000000 ); - msg[18 ] =cpu_to_le32 (0x00000000 ); -for (i =19 ; i <1024 ; ++i) + msg[12 ] =cpu_to_le32 (0x00000780 ); + msg[13 ] =cpu_to_le32 (0x00000440 ); +for (i =14 ; i <1024 ; ++i) msg[i] =cpu_to_le32 (0x0 );amdgpu_bo_kunmap (bo);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 98/117 drm/amdgpu/vcn: add sw clock gating
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
Add sw controlled clockgating for VCN.
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 207 +++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +205 -2
@@ -281,6 +281,207 @@ static void vcn_v1_0_mc_resume(struct amdgpu_device *adev) }/** +* vcn_v1_0_disable_clock_gating - disable VCN clock gating +* +* @adev: amdgpu_device pointer +* @sw: enable SW clock gating +* +* Disable clock gating for VCN block +*/ +static void vcn_v1_0_disable_clock_gating (struct amdgpu_device *adev,bool sw) +{ +uint32_t data; + +/* JPEG disable CGC */ + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_CTRL)); + +if (sw) + data |=1 <<JPEG_CGC_CTRL__DYN_CLOCK_MODE__SHIFT ; +else + data &= ~JPEG_CGC_CTRL__DYN_CLOCK_MODE_MASK ; + + data |=1 <<JPEG_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT ; + data |=4 <<JPEG_CGC_CTRL__CLK_OFF_DELAY__SHIFT ; +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_CTRL), data); + + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_GATE)); + data &= ~(JPEG_CGC_GATE__JPEG_MASK |JPEG_CGC_GATE__JPEG2_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_GATE), data); + +/* UVD disable CGC */ + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL)); +if (sw) + data |=1 <<UVD_CGC_CTRL__DYN_CLOCK_MODE__SHIFT ; +else + data &= ~UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK ; + + data |=1 <<UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT ; + data |=4 <<UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT ; +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL), data); + + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_GATE)); + data &= ~(UVD_CGC_GATE__SYS_MASK + |UVD_CGC_GATE__UDEC_MASK + |UVD_CGC_GATE__MPEG2_MASK + |UVD_CGC_GATE__REGS_MASK + |UVD_CGC_GATE__RBC_MASK + |UVD_CGC_GATE__LMI_MC_MASK + |UVD_CGC_GATE__LMI_UMC_MASK + |UVD_CGC_GATE__IDCT_MASK + |UVD_CGC_GATE__MPRD_MASK + |UVD_CGC_GATE__MPC_MASK + |UVD_CGC_GATE__LBSI_MASK + |UVD_CGC_GATE__LRBBM_MASK + |UVD_CGC_GATE__UDEC_RE_MASK + |UVD_CGC_GATE__UDEC_CM_MASK + |UVD_CGC_GATE__UDEC_IT_MASK + |UVD_CGC_GATE__UDEC_DB_MASK + |UVD_CGC_GATE__UDEC_MP_MASK + |UVD_CGC_GATE__WCB_MASK + |UVD_CGC_GATE__VCPU_MASK + |UVD_CGC_GATE__SCPU_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_GATE), data); + + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL)); + data &= ~(UVD_CGC_CTRL__UDEC_RE_MODE_MASK + |UVD_CGC_CTRL__UDEC_CM_MODE_MASK + |UVD_CGC_CTRL__UDEC_IT_MODE_MASK + |UVD_CGC_CTRL__UDEC_DB_MODE_MASK + |UVD_CGC_CTRL__UDEC_MP_MODE_MASK + |UVD_CGC_CTRL__SYS_MODE_MASK + |UVD_CGC_CTRL__UDEC_MODE_MASK + |UVD_CGC_CTRL__MPEG2_MODE_MASK + |UVD_CGC_CTRL__REGS_MODE_MASK + |UVD_CGC_CTRL__RBC_MODE_MASK + |UVD_CGC_CTRL__LMI_MC_MODE_MASK + |UVD_CGC_CTRL__LMI_UMC_MODE_MASK + |UVD_CGC_CTRL__IDCT_MODE_MASK + |UVD_CGC_CTRL__MPRD_MODE_MASK + |UVD_CGC_CTRL__MPC_MODE_MASK + |UVD_CGC_CTRL__LBSI_MODE_MASK + |UVD_CGC_CTRL__LRBBM_MODE_MASK + |UVD_CGC_CTRL__WCB_MODE_MASK + |UVD_CGC_CTRL__VCPU_MODE_MASK + |UVD_CGC_CTRL__SCPU_MODE_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL), data); + +/* turn on */ + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_SUVD_CGC_GATE)); + data |= (UVD_SUVD_CGC_GATE__SRE_MASK + |UVD_SUVD_CGC_GATE__SIT_MASK + |UVD_SUVD_CGC_GATE__SMP_MASK + |UVD_SUVD_CGC_GATE__SCM_MASK + |UVD_SUVD_CGC_GATE__SDB_MASK + |UVD_SUVD_CGC_GATE__SRE_H264_MASK + |UVD_SUVD_CGC_GATE__SRE_H264_MASK + |UVD_SUVD_CGC_GATE__SRE_HEVC_MASK + |UVD_SUVD_CGC_GATE__SIT_H264_MASK + |UVD_SUVD_CGC_GATE__SIT_HEVC_MASK + |UVD_SUVD_CGC_GATE__SCM_H264_MASK + |UVD_SUVD_CGC_GATE__SCM_HEVC_MASK + |UVD_SUVD_CGC_GATE__SDB_H264_MASK + |UVD_SUVD_CGC_GATE__SDB_HEVC_MASK + |UVD_SUVD_CGC_GATE__SCLR_MASK + |UVD_SUVD_CGC_GATE__UVD_SC_MASK + |UVD_SUVD_CGC_GATE__ENT_MASK + |UVD_SUVD_CGC_GATE__SIT_HEVC_DEC_MASK + |UVD_SUVD_CGC_GATE__SIT_HEVC_ENC_MASK + |UVD_SUVD_CGC_GATE__SITE_MASK + |UVD_SUVD_CGC_GATE__SRE_VP9_MASK + |UVD_SUVD_CGC_GATE__SCM_VP9_MASK + |UVD_SUVD_CGC_GATE__SIT_VP9_DEC_MASK + |UVD_SUVD_CGC_GATE__SDB_VP9_MASK + |UVD_SUVD_CGC_GATE__IME_HEVC_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_SUVD_CGC_GATE), data); + + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_SUVD_CGC_CTRL)); + data &= ~(UVD_SUVD_CGC_CTRL__SRE_MODE_MASK + |UVD_SUVD_CGC_CTRL__SIT_MODE_MASK + |UVD_SUVD_CGC_CTRL__SMP_MODE_MASK + |UVD_SUVD_CGC_CTRL__SCM_MODE_MASK + |UVD_SUVD_CGC_CTRL__SDB_MODE_MASK + |UVD_SUVD_CGC_CTRL__SCLR_MODE_MASK + |UVD_SUVD_CGC_CTRL__UVD_SC_MODE_MASK + |UVD_SUVD_CGC_CTRL__ENT_MODE_MASK + |UVD_SUVD_CGC_CTRL__IME_MODE_MASK + |UVD_SUVD_CGC_CTRL__SITE_MODE_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_SUVD_CGC_CTRL), data); +} + +/** +* vcn_v1_0_enable_clock_gating - enable VCN clock gating +* +* @adev: amdgpu_device pointer +* @sw: enable SW clock gating +* +* Enable clock gating for VCN block +*/ +static void vcn_v1_0_enable_clock_gating (struct amdgpu_device *adev,bool sw) +{ +uint32_t data =0 ; + +/* enable JPEG CGC */ + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_CTRL)); +if (sw) + data |=1 <<JPEG_CGC_CTRL__DYN_CLOCK_MODE__SHIFT ; +else + data |=0 <<JPEG_CGC_CTRL__DYN_CLOCK_MODE__SHIFT ; + data |=1 <<JPEG_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT ; + data |=4 <<JPEG_CGC_CTRL__CLK_OFF_DELAY__SHIFT ; +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_CTRL), data); + + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_GATE)); + data |= (JPEG_CGC_GATE__JPEG_MASK |JPEG_CGC_GATE__JPEG2_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmJPEG_CGC_GATE), data); + +/* enable UVD CGC */ + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL)); +if (sw) + data |=1 <<UVD_CGC_CTRL__DYN_CLOCK_MODE__SHIFT ; +else + data |=0 <<UVD_CGC_CTRL__DYN_CLOCK_MODE__SHIFT ; + data |=1 <<UVD_CGC_CTRL__CLK_GATE_DLY_TIMER__SHIFT ; + data |=4 <<UVD_CGC_CTRL__CLK_OFF_DELAY__SHIFT ; +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL), data); + + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL)); + data |= (UVD_CGC_CTRL__UDEC_RE_MODE_MASK + |UVD_CGC_CTRL__UDEC_CM_MODE_MASK + |UVD_CGC_CTRL__UDEC_IT_MODE_MASK + |UVD_CGC_CTRL__UDEC_DB_MODE_MASK + |UVD_CGC_CTRL__UDEC_MP_MODE_MASK + |UVD_CGC_CTRL__SYS_MODE_MASK + |UVD_CGC_CTRL__UDEC_MODE_MASK + |UVD_CGC_CTRL__MPEG2_MODE_MASK + |UVD_CGC_CTRL__REGS_MODE_MASK + |UVD_CGC_CTRL__RBC_MODE_MASK + |UVD_CGC_CTRL__LMI_MC_MODE_MASK + |UVD_CGC_CTRL__LMI_UMC_MODE_MASK + |UVD_CGC_CTRL__IDCT_MODE_MASK + |UVD_CGC_CTRL__MPRD_MODE_MASK + |UVD_CGC_CTRL__MPC_MODE_MASK + |UVD_CGC_CTRL__LBSI_MODE_MASK + |UVD_CGC_CTRL__LRBBM_MODE_MASK + |UVD_CGC_CTRL__WCB_MODE_MASK + |UVD_CGC_CTRL__VCPU_MODE_MASK + |UVD_CGC_CTRL__SCPU_MODE_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_CGC_CTRL), data); + + data =RREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_SUVD_CGC_CTRL)); + data |= (UVD_SUVD_CGC_CTRL__SRE_MODE_MASK + |UVD_SUVD_CGC_CTRL__SIT_MODE_MASK + |UVD_SUVD_CGC_CTRL__SMP_MODE_MASK + |UVD_SUVD_CGC_CTRL__SCM_MODE_MASK + |UVD_SUVD_CGC_CTRL__SDB_MODE_MASK + |UVD_SUVD_CGC_CTRL__SCLR_MODE_MASK + |UVD_SUVD_CGC_CTRL__UVD_SC_MODE_MASK + |UVD_SUVD_CGC_CTRL__ENT_MODE_MASK + |UVD_SUVD_CGC_CTRL__IME_MODE_MASK + |UVD_SUVD_CGC_CTRL__SITE_MODE_MASK ); +WREG32 (SOC15_REG_OFFSET (VCN ,0 , mmUVD_SUVD_CGC_CTRL), data); +} + +/** * vcn_v1_0_start - start VCN block * * @adev: amdgpu_device pointer
@@ -300,8 +501,7 @@ static int vcn_v1_0_start(struct amdgpu_device *adev)vcn_v1_0_mc_resume (adev);/* disable clock gating */ -WREG32_P (SOC15_REG_OFFSET (UVD ,0 , mmUVD_CGC_CTRL),0 , - ~UVD_CGC_CTRL__DYN_CLOCK_MODE_MASK ); +vcn_v1_0_disable_clock_gating (adev, false);/* disable interupt */ WREG32_P(SOC15_REG_OFFSET(UVD, 0, mmUVD_MASTINT_EN), 0,
@@ -481,6 +681,9 @@ static int vcn_v1_0_stop(struct amdgpu_device *adev)WREG32_P (SOC15_REG_OFFSET (UVD ,0 , mmUVD_LMI_CTRL2),0 , ~UVD_LMI_CTRL2__STALL_ARB_UMC_MASK ); +/* enable clock gating */ +vcn_v1_0_enable_clock_gating (adev, false); +return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 99/117 drm/amdgpu: enable sw clock gating for vcn
In reply to a message not in the archiveFrom: Huang Rui <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +2 -2
@@ -501,7 +501,7 @@ static int vcn_v1_0_start(struct amdgpu_device *adev)vcn_v1_0_mc_resume (adev);/* disable clock gating */ -vcn_v1_0_disable_clock_gating (adev, false); +vcn_v1_0_disable_clock_gating (adev, true);/* disable interupt */ WREG32_P(SOC15_REG_OFFSET(UVD, 0, mmUVD_MASTINT_EN), 0,
@@ -682,7 +682,7 @@ static int vcn_v1_0_stop(struct amdgpu_device *adev) ~UVD_LMI_CTRL2__STALL_ARB_UMC_MASK);/* enable clock gating */ -vcn_v1_0_enable_clock_gating (adev, false); +vcn_v1_0_enable_clock_gating (adev, true);return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 100/117 drm/amdgpu/powerplay: add header file for smu10. (v2)
In reply to a message not in the archiveFrom: Rex Zhu <[email protected]>
Headers define the driver/fw interface for smu10.
v2: squash in updates (Alex)
--- drivers/gpu/drm/amd/powerplay/inc/smu10.h | 188 +++++++++++++++++++++ .../gpu/drm/amd/powerplay/inc/smu10_driver_if.h | 116 +++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu10.h create mode 100644 drivers/gpu/drm/amd/powerplay/inc/smu10_driver_if.h
drivers/gpu/drm/amd/powerplay/inc/smu10.h new file +188 -0
@@ -0,0 +1,188 @@ +/* +* Copyright 2017 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +#ifndef SMU10_H +#define SMU10_H + +#pragma pack(push, 1) + +#define ENABLE_DEBUG_FEATURES + +/* Feature Control Defines */ +#define FEATURE_CCLK_CONTROLLER_BIT 0 +#define FEATURE_FAN_CONTROLLER_BIT 1 +#define FEATURE_DATA_CALCULATION_BIT 2 +#define FEATURE_PPT_BIT 3 +#define FEATURE_TDC_BIT 4 +#define FEATURE_THERMAL_BIT 5 +#define FEATURE_FIT_BIT 6 +#define FEATURE_EDC_BIT 7 +#define FEATURE_PLL_POWER_DOWN_BIT 8 +#define FEATURE_ULV_BIT 9 +#define FEATURE_VDDOFF_BIT 10 +#define FEATURE_VCN_DPM_BIT 11 +#define FEATURE_ACP_DPM_BIT 12 +#define FEATURE_ISP_DPM_BIT 13 +#define FEATURE_FCLK_DPM_BIT 14 +#define FEATURE_SOCCLK_DPM_BIT 15 +#define FEATURE_MP0CLK_DPM_BIT 16 +#define FEATURE_LCLK_DPM_BIT 17 +#define FEATURE_SHUBCLK_DPM_BIT 18 +#define FEATURE_DCEFCLK_DPM_BIT 19 +#define FEATURE_GFX_DPM_BIT 20 +#define FEATURE_DS_GFXCLK_BIT 21 +#define FEATURE_DS_SOCCLK_BIT 22 +#define FEATURE_DS_LCLK_BIT 23 +#define FEATURE_DS_DCEFCLK_BIT 24 +#define FEATURE_DS_SHUBCLK_BIT 25 +#define FEATURE_RM_BIT 26 +#define FEATURE_S0i2_BIT 27 +#define FEATURE_WHISPER_MODE_BIT 28 +#define FEATURE_DS_FCLK_BIT 29 +#define FEATURE_DS_SMNCLK_BIT 30 +#define FEATURE_DS_MP1CLK_BIT 31 +#define FEATURE_DS_MP0CLK_BIT 32 +#define FEATURE_MGCG_BIT 33 +#define FEATURE_DS_FUSE_SRAM_BIT 34 +#define FEATURE_GFX_CKS 35 +#define FEATURE_PSI0_BIT 36 +#define FEATURE_PROCHOT_BIT 37 +#define FEATURE_CPUOFF_BIT 38 +#define FEATURE_STAPM_BIT 39 +#define FEATURE_CORE_CSTATES_BIT 40 +#define FEATURE_SPARE_41_BIT 41 +#define FEATURE_SPARE_42_BIT 42 +#define FEATURE_SPARE_43_BIT 43 +#define FEATURE_SPARE_44_BIT 44 +#define FEATURE_SPARE_45_BIT 45 +#define FEATURE_SPARE_46_BIT 46 +#define FEATURE_SPARE_47_BIT 47 +#define FEATURE_SPARE_48_BIT 48 +#define FEATURE_SPARE_49_BIT 49 +#define FEATURE_SPARE_50_BIT 50 +#define FEATURE_SPARE_51_BIT 51 +#define FEATURE_SPARE_52_BIT 52 +#define FEATURE_SPARE_53_BIT 53 +#define FEATURE_SPARE_54_BIT 54 +#define FEATURE_SPARE_55_BIT 55 +#define FEATURE_SPARE_56_BIT 56 +#define FEATURE_SPARE_57_BIT 57 +#define FEATURE_SPARE_58_BIT 58 +#define FEATURE_SPARE_59_BIT 59 +#define FEATURE_SPARE_60_BIT 60 +#define FEATURE_SPARE_61_BIT 61 +#define FEATURE_SPARE_62_BIT 62 +#define FEATURE_SPARE_63_BIT 63 + +#define NUM_FEATURES 64 + +#define FEATURE_CCLK_CONTROLLER_MASK (1 << FEATURE_CCLK_CONTROLLER_BIT) +#define FEATURE_FAN_CONTROLLER_MASK (1 << FEATURE_FAN_CONTROLLER_BIT) +#define FEATURE_DATA_CALCULATION_MASK (1 << FEATURE_DATA_CALCULATION_BIT) +#define FEATURE_PPT_MASK (1 << FEATURE_PPT_BIT) +#define FEATURE_TDC_MASK (1 << FEATURE_TDC_BIT) +#define FEATURE_THERMAL_MASK (1 << FEATURE_THERMAL_BIT) +#define FEATURE_FIT_MASK (1 << FEATURE_FIT_BIT) +#define FEATURE_EDC_MASK (1 << FEATURE_EDC_BIT) +#define FEATURE_PLL_POWER_DOWN_MASK (1 << FEATURE_PLL_POWER_DOWN_BIT) +#define FEATURE_ULV_MASK (1 << FEATURE_ULV_BIT) +#define FEATURE_VDDOFF_MASK (1 << FEATURE_VDDOFF_BIT) +#define FEATURE_VCN_DPM_MASK (1 << FEATURE_VCN_DPM_BIT) +#define FEATURE_ACP_DPM_MASK (1 << FEATURE_ACP_DPM_BIT) +#define FEATURE_ISP_DPM_MASK (1 << FEATURE_ISP_DPM_BIT) +#define FEATURE_FCLK_DPM_MASK (1 << FEATURE_FCLK_DPM_BIT) +#define FEATURE_SOCCLK_DPM_MASK (1 << FEATURE_SOCCLK_DPM_BIT) +#define FEATURE_MP0CLK_DPM_MASK (1 << FEATURE_MP0CLK_DPM_BIT) +#define FEATURE_LCLK_DPM_MASK (1 << FEATURE_LCLK_DPM_BIT) +#define FEATURE_SHUBCLK_DPM_MASK (1 << FEATURE_SHUBCLK_DPM_BIT) +#define FEATURE_DCEFCLK_DPM_MASK (1 << FEATURE_DCEFCLK_DPM_BIT) +#define FEATURE_GFX_DPM_MASK (1 << FEATURE_GFX_DPM_BIT) +#define FEATURE_DS_GFXCLK_MASK (1 << FEATURE_DS_GFXCLK_BIT) +#define FEATURE_DS_SOCCLK_MASK (1 << FEATURE_DS_SOCCLK_BIT) +#define FEATURE_DS_LCLK_MASK (1 << FEATURE_DS_LCLK_BIT) +#define FEATURE_DS_DCEFCLK_MASK (1 << FEATURE_DS_DCEFCLK_BIT) +#define FEATURE_DS_SHUBCLK_MASK (1 << FEATURE_DS_SHUBCLK_BIT) +#define FEATURE_RM_MASK (1 << FEATURE_RM_BIT) +#define FEATURE_DS_FCLK_MASK (1 << FEATURE_DS_FCLK_BIT) +#define FEATURE_DS_SMNCLK_MASK (1 << FEATURE_DS_SMNCLK_BIT) +#define FEATURE_DS_MP1CLK_MASK (1 << FEATURE_DS_MP1CLK_BIT) +#define FEATURE_DS_MP0CLK_MASK (1 << FEATURE_DS_MP0CLK_BIT) +#define FEATURE_MGCG_MASK (1 << FEATURE_MGCG_BIT) +#define FEATURE_DS_FUSE_SRAM_MASK (1 << FEATURE_DS_FUSE_SRAM_BIT) +#define FEATURE_PSI0_MASK (1 << FEATURE_PSI0_BIT) +#define FEATURE_STAPM_MASK (1 << FEATURE_STAPM_BIT) +#define FEATURE_PROCHOT_MASK (1 << FEATURE_PROCHOT_BIT) +#define FEATURE_CPUOFF_MASK (1 << FEATURE_CPUOFF_BIT) +#define FEATURE_CORE_CSTATES_MASK (1 << FEATURE_CORE_CSTATES_BIT) + +/* Workload bits */ +#define WORKLOAD_PPLIB_FULL_SCREEN_3D_BIT 0 +#define WORKLOAD_PPLIB_VIDEO_BIT 2 +#define WORKLOAD_PPLIB_VR_BIT 3 +#define WORKLOAD_PPLIB_COMPUTE_BIT 4 +#define WORKLOAD_PPLIB_CUSTOM_BIT 5 +#define WORKLOAD_PPLIB_COUNT 6 + +typedef struct { +/* MP1_EXT_SCRATCH0 */ +uint32_t CurrLevel_ACP :4 ; +uint32_t CurrLevel_ISP :4 ; +uint32_t CurrLevel_VCN :4 ; +uint32_t CurrLevel_LCLK :4 ; +uint32_t CurrLevel_MP0CLK :4 ; +uint32_t CurrLevel_FCLK :4 ; +uint32_t CurrLevel_SOCCLK :4 ; +uint32_t CurrLevel_DCEFCLK :4 ; +/* MP1_EXT_SCRATCH1 */ +uint32_t TargLevel_ACP :4 ; +uint32_t TargLevel_ISP :4 ; +uint32_t TargLevel_VCN :4 ; +uint32_t TargLevel_LCLK :4 ; +uint32_t TargLevel_MP0CLK :4 ; +uint32_t TargLevel_FCLK :4 ; +uint32_t TargLevel_SOCCLK :4 ; +uint32_t TargLevel_DCEFCLK :4 ; +/* MP1_EXT_SCRATCH2 */ +uint32_t CurrLevel_SHUBCLK :4 ; +uint32_t TargLevel_SHUBCLK :4 ; +uint32_t InUlv :1 ; +uint32_t InS0i2 :1 ; +uint32_t InWhisperMode :1 ; +uint32_t Reserved :21 ; +/* MP1_EXT_SCRATCH3-4 */ +uint32_t Reserved2[2 ]; +/* MP1_EXT_SCRATCH5 */ +uint32_t FeatureStatus[NUM_FEATURES /32 ]; +}FwStatus_t ; + +#define TABLE_BIOS_IF 0/* Called by BIOS */ +#define TABLE_WATERMARKS 1/* Called by Driver */ +#define TABLE_CUSTOM_DPM 2/* Called by Driver */ +#define TABLE_PMSTATUSLOG 3/* Called by Tools for Agm logging */ +#define TABLE_DPMCLOCKS 4/* Called by Driver */ +#define TABLE_MOMENTARY_PM 5/* Called by Tools */ +#define TABLE_COUNT 6 + +#pragma pack(pop) + +#endif
drivers/gpu/drm/amd/powerplay/inc/smu10_driver_if.h new file +116 -0
116 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 101/117 drm/amdgpu: add raven related define in pptable.h.
In reply to a message not in the archiveFrom: Rex Zhu <[email protected]>
--- drivers/gpu/drm/amd/include/pptable.h | 57 +++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/include/pptable.h +54 -3
@@ -61,13 +61,17 @@ typedef struct _ATOM_PPLIB_THERMALCONTROLLER#define ATOM_PP_THERMALCONTROLLER_LM96163 17#define ATOM_PP_THERMALCONTROLLER_CISLANDS 18#define ATOM_PP_THERMALCONTROLLER_KAVERI 19 +#define ATOM_PP_THERMALCONTROLLER_ICELAND 20 +#define ATOM_PP_THERMALCONTROLLER_TONGA 21 +#define ATOM_PP_THERMALCONTROLLER_FIJI 22 +#define ATOM_PP_THERMALCONTROLLER_POLARIS10 23 +#define ATOM_PP_THERMALCONTROLLER_VEGA10 24// Thermal controller 'combo type' to use an external controller for Fan control and an internal controller for thermal. // We probably should reserve the bit 0x80 for this use. // To keep the number of these types low we should also use the same code for all ASICs (i.e. do not distinguish RV6xx and RV7xx Internal here). // The driver can pick the correct internal controller based on the ASIC. -#define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller#define ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D // EMC2103 Fan Control + Internal Thermal Controller
@@ -104,6 +108,21 @@ typedef struct _ATOM_PPLIB_FANTABLE3USHORT usFanOutputSensitivity; }ATOM_PPLIB_FANTABLE3 ; +typedef struct _ATOM_PPLIB_FANTABLE4 +{ +ATOM_PPLIB_FANTABLE3 basicTable3; +USHORT usFanRPMMax; +}ATOM_PPLIB_FANTABLE4 ; + +typedef struct _ATOM_PPLIB_FANTABLE5 +{ +ATOM_PPLIB_FANTABLE4 basicTable4; +USHORT usFanCurrentLow; +USHORT usFanCurrentHigh; +USHORT usFanRPMLow; +USHORT usFanRPMHigh; +}ATOM_PPLIB_FANTABLE5 ; + typedef struct _ATOM_PPLIB_EXTENDEDHEADER { USHORT usSize;
@@ -119,6 +138,7 @@ typedef struct _ATOM_PPLIB_EXTENDEDHEADERUSHORT usPowerTuneTableOffset;/* points to ATOM_PPLIB_CLOCK_Voltage_Dependency_Table for sclkVddgfxTable */ USHORT usSclkVddgfxTableOffset; +USHORT usVQBudgetingTableOffset;/* points to the vqBudgetingTable; */ }ATOM_PPLIB_EXTENDEDHEADER ;//// ATOM_PPLIB_POWERPLAYTABLE::ulPlatformCaps
@@ -147,8 +167,9 @@ typedef struct _ATOM_PPLIB_EXTENDEDHEADER#define ATOM_PP_PLATFORM_CAP_TEMP_INVERSION 0x00400000 // Does the driver supports Temp Inversion feature.#define ATOM_PP_PLATFORM_CAP_EVV 0x00800000#define ATOM_PP_PLATFORM_COMBINE_PCC_WITH_THERMAL_SIGNAL 0x01000000 -#define ATOM_PP_PLATFORM_LOAD_POST_PRODUCTION_FIRMWARE 0x02000000 -#define ATOM_PP_PLATFORM_CAP_DISABLE_USING_ACTUAL_TEMPERATURE_FOR_POWER_CALC 0x04000000 +#define ATOM_PP_PLATFORM_LOAD_POST_PRODUCTION_FIRMWARE 0x02000000 +#define ATOM_PP_PLATFORM_CAP_DISABLE_USING_ACTUAL_TEMPERATURE_FOR_POWER_CALC 0x04000000 +#define ATOM_PP_PLATFORM_CAP_VRHOT_POLARITY_HIGH 0x08000000 typedef struct _ATOM_PPLIB_POWERPLAYTABLE {
@@ -427,6 +448,15 @@ typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{ULONG rsv2[2 ]; }ATOM_PPLIB_SUMO_CLOCK_INFO ; +typedef struct _ATOM_PPLIB_KV_CLOCK_INFO { +USHORT usEngineClockLow; +UCHAR ucEngineClockHigh; +UCHAR vddcIndex; +USHORT tdpLimit; +USHORT rsv1; +ULONG rsv2[2 ]; +}ATOM_PPLIB_KV_CLOCK_INFO ; + typedef struct _ATOM_PPLIB_CZ_CLOCK_INFO { UCHAR index; UCHAR rsv[3];
@@ -697,6 +727,27 @@ typedef struct _ATOM_PPLIB_PPM_Table ULONG ulTjmax; } ATOM_PPLIB_PPM_Table; +#define VQ_DisplayConfig_NoneAWD 1 +#define VQ_DisplayConfig_AWD 2 + +typedef struct ATOM_PPLIB_VQ_Budgeting_Record { +ULONG ulDeviceID; +ULONG ulSustainableSOCPowerLimitLow;/* in mW */ +ULONG ulSustainableSOCPowerLimitHigh;/* in mW */ + +ULONG ulDClk; +ULONG ulEClk; +ULONG ulDispSclk; +UCHAR ucDispConfig; + +}ATOM_PPLIB_VQ_Budgeting_Record ; + +typedef struct ATOM_PPLIB_VQ_Budgeting_Table { +UCHAR revid; +UCHAR numEntries; +ATOM_PPLIB_VQ_Budgeting_Record entries[1 ]; +}ATOM_PPLIB_VQ_Budgeting_Table ; +#pragma pack()#endif
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 102/117 drm/amd/powerplay: add ppt_v3 define
In reply to a message not in the archiveFrom: Rex Zhu <[email protected]>
defines clock dependencies for raven.
--- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +11 -0
@@ -609,6 +609,17 @@ struct phm_ppt_v2_information {uint8_t uc_dcef_dpm_voltage_mode; }; +struct phm_ppt_v3_information { +struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_sclk; +struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_mclk; +struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_socclk; +struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_dcefclk; +struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_pixclk; +struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_dispclk; +struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_phyclk; +}; + +struct phm_dynamic_state_info {struct phm_clock_voltage_dependency_table *vddc_dependency_on_sclk;struct phm_clock_voltage_dependency_table *vddci_dependency_on_mclk;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 103/117 drm/amd/powerplay: add raven support in smumgr. (v2)
In reply to a message not in the archiveFrom: Rex Zhu <[email protected]>
smumgr provides the interface for interacting with the smu firmware which handles power management.
v2: squash in updates (Alex)
--- drivers/gpu/drm/amd/powerplay/hwmgr/rv_inc.h | 43 +++ drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h | 76 +++++ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 352 +++++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h | 62 ++++ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 9 + 7 files changed, 544 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/rv_inc.h create mode 100644 drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h create mode 100644 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c create mode 100644 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h
drivers/gpu/drm/amd/powerplay/hwmgr/rv_inc.h new file +43 -0
@@ -0,0 +1,43 @@ +/* +* Copyright 2016 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +*/ + +#ifndef RAVEN_INC_H +#define RAVEN_INC_H + + +#include "asic_reg/raven1/MP/mp_10_0_default.h" +#include "asic_reg/raven1/MP/mp_10_0_offset.h" +#include "asic_reg/raven1/MP/mp_10_0_sh_mask.h" + +#include "asic_reg/raven1/NBIO/nbio_7_0_default.h" +#include "asic_reg/raven1/NBIO/nbio_7_0_offset.h" +#include "asic_reg/raven1/NBIO/nbio_7_0_sh_mask.h" + +#include "asic_reg/raven1/THM/thm_10_0_default.h" +#include "asic_reg/raven1/THM/thm_10_0_offset.h" +#include "asic_reg/raven1/THM/thm_10_0_sh_mask.h" + + +#define ixDDI_PHY_GEN_STATUS 0x3FCE8 + +#endif
drivers/gpu/drm/amd/powerplay/inc/rv_ppsmc.h new file +76 -0
76 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/inc/smumgr.h +1 -0
@@ -39,6 +39,7 @@ extern const struct pp_smumgr_func tonga_smu_funcs;extern const struct pp_smumgr_func fiji_smu_funcs;extern const struct pp_smumgr_func polaris10_smu_funcs;extern const struct pp_smumgr_func vega10_smu_funcs; +extern const struct pp_smumgr_func rv_smu_funcs;enum AVFS_BTC_STATUS {AVFS_BTC_BOOT =0 ,
drivers/gpu/drm/amd/powerplay/smumgr/Makefile +1 -1
@@ -4,7 +4,7 @@ SMU_MGR = smumgr.o cz_smumgr.o tonga_smumgr.o fiji_smumgr.o fiji_smc.o \ polaris10_smumgr.o iceland_smumgr.o polaris10_smc.o tonga_smc.o \ - smu7_smumgr.o iceland_smc.o vega10_smumgr.o + smu7_smumgr.o iceland_smc.o vega10_smumgr.o rv_smumgr.o AMD_PP_SMUMGR = $(addprefix $(AMD_PP_PATH)/smumgr/,$(SMU_MGR))
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c new file +352 -0
352 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.h new file +62 -0
62 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c +9 -0
@@ -95,6 +95,15 @@ int smum_early_init(struct pp_instance *handle)return -EINVAL ; }break ; +case AMDGPU_FAMILY_RV : +switch (smumgr->chip_id) { +case CHIP_RAVEN : + smumgr->smumgr_funcs = &rv_smu_funcs; +break ; +default : +return -EINVAL ; + } +break ;default :kfree (smumgr);return -EINVAL ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 104/117 drm/amd/powerplay: add raven support in hwmgr. (v2)
In reply to a message not in the archiveFrom: Rex Zhu <[email protected]>
hwmgr handles the GPU power state management.
v2: squash in updates (Alex)
--- drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c | 4 +- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 9 + .../gpu/drm/amd/powerplay/hwmgr/processpptables.c | 4 + drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 974 +++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h | 295 +++++++ drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h | 3 +- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 18 +- 8 files changed, 1291 insertions(+), 18 deletions(-) create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c create mode 100644 drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h
drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c +2 -2
@@ -42,8 +42,8 @@ static int pem_init(struct pp_eventmgr *eventmgr)/* Call initialization event */ result =pem_handle_event (eventmgr,AMD_PP_EVENT_INITIALIZE , &event_data); -if (0 != result) -return result; +/* if (0 != result) +return result; */ /* Register interrupt callback functions */ result =pem_register_interrupts (eventmgr);
drivers/gpu/drm/amd/powerplay/hwmgr/Makefile +1 -1
@@ -9,7 +9,7 @@ HARDWARE_MGR = hwmgr.o processpptables.o functiontables.o \ smu7_hwmgr.o smu7_powertune.o smu7_thermal.o \ smu7_clockpowergating.o \ vega10_processpptables.o vega10_hwmgr.o vega10_powertune.o \ - vega10_thermal.o + vega10_thermal.o rv_hwmgr.o AMD_PP_HWMGR = $(addprefix $(AMD_PP_PATH)/hwmgr/,$(HARDWARE_MGR))
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +9 -0
@@ -115,6 +115,15 @@ int hwmgr_early_init(struct pp_instance *handle)return -EINVAL ; }break ; +case AMDGPU_FAMILY_RV : +switch (hwmgr->chip_id) { +case CHIP_RAVEN : +rv_init_function_pointers (hwmgr); +break ; +default : +return -EINVAL ; + } +break ;default :return -EINVAL ; }
drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c +4 -0
@@ -1015,6 +1015,10 @@ static int init_overdrive_limits(struct pp_hwmgr *hwmgr, hwmgr->platform_descriptor.overdriveLimit.memoryClock =0 ; hwmgr->platform_descriptor.minOverdriveVDDC =0 ; hwmgr->platform_descriptor.maxOverdriveVDDC =0 ; + hwmgr->platform_descriptor.overdriveVDDCStep =0 ; + +if (hwmgr->chip_id ==CHIP_RAVEN ) +return 0 ;/* We assume here that fw_info is unchanged if this call fails.*/ fw_info = cgs_atom_get_data_table(hwmgr->device,
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c new file +974 -0
974 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.h new file +295 -0
295 lines not on this page · raw message
drivers/gpu/drm/amd/powerplay/inc/amd_powerplay.h +2 -1
@@ -273,7 +273,8 @@ enum amd_pp_clock_type { amd_pp_dcef_clock, amd_pp_soc_clock, amd_pp_pixel_clock, - amd_pp_phy_clock + amd_pp_phy_clock, + amd_pp_dpp_clock };#define MAX_NUM_CLOCKS 16
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +4 -14
@@ -609,17 +609,6 @@ struct phm_ppt_v2_information {uint8_t uc_dcef_dpm_voltage_mode; }; -struct phm_ppt_v3_information { -struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_sclk; -struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_mclk; -struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_socclk; -struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_dcefclk; -struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_pixclk; -struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_dispclk; -struct phm_ppt_v1_clock_voltage_dependency_table *vdd_dep_on_phyclk; -}; - -struct phm_dynamic_state_info {struct phm_clock_voltage_dependency_table *vddc_dependency_on_sclk;struct phm_clock_voltage_dependency_table *vddci_dependency_on_mclk;
@@ -635,7 +624,7 @@ struct phm_dynamic_state_info {uint32_t vddc_vddci_delta;uint32_t min_vddc_for_pcie_gen2;struct phm_cac_leakage_table *cac_leakage_table; -struct phm_phase_shedding_limits_table *vddc_phase_shed_limits_table; +struct phm_phase_shedding_limits_table *vddc_phase_shed_limits_table;struct phm_vce_clock_voltage_dependency_table *vce_clock_voltage_dependency_table;
@@ -648,8 +637,8 @@ struct phm_dynamic_state_info {struct phm_ppm_table *ppm_parameter_table;struct phm_cac_tdp_table *cac_dtp_table; -struct phm_clock_voltage_dependency_table *vdd_gfx_dependency_on_sclk; -struct phm_vq_budgeting_table *vq_budgeting_table; +struct phm_clock_voltage_dependency_table *vdd_gfx_dependency_on_sclk; +struct phm_vq_budgeting_table *vq_budgeting_table; };struct pp_fan_info {
@@ -832,6 +821,7 @@ extern void phm_apply_dal_min_voltage_request(struct pp_hwmgr *hwmgr);extern int smu7_init_function_pointers (struct pp_hwmgr *hwmgr);extern int vega10_hwmgr_init (struct pp_hwmgr *hwmgr); +extern int rv_init_function_pointers (struct pp_hwmgr *hwmgr);extern int phm_get_voltage_evv_on_sclk (struct pp_hwmgr *hwmgr,uint8_t voltage_type,uint32_t sclk,uint16_t id,uint16_t *voltage);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 105/117 drm/amd/powerplay/rv: power up/down sdma via the SMU
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
sdma is powered down by default in vbios, need to power up in driver init. Power it down again on driver tear down.
--- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c +23 -0
@@ -243,6 +243,26 @@ static int rv_verify_smc_interface(struct pp_smumgr *smumgr)return 0 ; } +/* sdma is disabled by default in vbios, need to re-enable in driver */ +static int rv_smc_enable_sdma (struct pp_smumgr *smumgr) +{ +PP_ASSERT_WITH_CODE (!rv_send_msg_to_smc (smumgr, + PPSMC_MSG_PowerUpSdma), +"Attempt to power up sdma Failed!" , + return -EINVAL ); + +return 0 ; +} + +static int rv_smc_disable_sdma (struct pp_smumgr *smumgr) +{ +PP_ASSERT_WITH_CODE (!rv_send_msg_to_smc (smumgr, + PPSMC_MSG_PowerDownSdma), +"Attempt to power down sdma Failed!" , + return -EINVAL ); + +return 0 ; +}static int rv_smu_fini (struct pp_smumgr *smumgr) {
@@ -250,6 +270,7 @@ static int rv_smu_fini(struct pp_smumgr *smumgr) (struct rv_smumgr *)(smumgr->backend);if (priv) { +rv_smc_disable_sdma (smumgr);cgs_free_gpu_mem (smumgr->device, priv->smu_tables.entry[WMTABLE ].handle); cgs_free_gpu_mem(smumgr->device,
@@ -265,6 +286,8 @@ static int rv_start_smu(struct pp_smumgr *smumgr) {if (rv_verify_smc_interface (smumgr))return -EINVAL ; +if (rv_smc_enable_sdma (smumgr)) +return -EINVAL ;return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 106/117 drm/amdgpu/raven: power up/down VCN via the SMU (v2)
In reply to a message not in the archiveBy default VCN is powered down like SDMA, power it up/down on driver load/unload.
[Rui: Fix to add the parameter 0 to un-gate VCN] v2
--- drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c +24 -0
@@ -264,6 +264,27 @@ static int rv_smc_disable_sdma(struct pp_smumgr *smumgr)return 0 ; } +/* vcn is disabled by default in vbios, need to re-enable in driver */ +static int rv_smc_enable_vcn (struct pp_smumgr *smumgr) +{ +PP_ASSERT_WITH_CODE (!rv_send_msg_to_smc_with_parameter (smumgr, + PPSMC_MSG_PowerUpVcn,0 ), +"Attempt to power up vcn Failed!" , + return -EINVAL ); + +return 0 ; +} + +static int rv_smc_disable_vcn (struct pp_smumgr *smumgr) +{ +PP_ASSERT_WITH_CODE (!rv_send_msg_to_smc_with_parameter (smumgr, + PPSMC_MSG_PowerDownVcn,0 ), +"Attempt to power down vcn Failed!" , + return -EINVAL ); + +return 0 ; +} +static int rv_smu_fini (struct pp_smumgr *smumgr) { struct rv_smumgr *priv =
@@ -271,6 +292,7 @@ static int rv_smu_fini(struct pp_smumgr *smumgr)if (priv) {rv_smc_disable_sdma (smumgr); +rv_smc_disable_vcn (smumgr);cgs_free_gpu_mem (smumgr->device, priv->smu_tables.entry[WMTABLE ].handle); cgs_free_gpu_mem(smumgr->device,
@@ -288,6 +310,8 @@ static int rv_start_smu(struct pp_smumgr *smumgr)return -EINVAL ;if (rv_smc_enable_sdma (smumgr))return -EINVAL ; +if (rv_smc_enable_vcn (smumgr)) +return -EINVAL ;return 0 ; }
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 107/117 drm/amdgpu/powerplay/raven: add smu block and enable powerplay
In reply to a message not in the archiveFrom: Chunming Zhou <[email protected]>
Add the ip block and enable powerplay on raven.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 1 + drivers/gpu/drm/amd/amdgpu/soc15.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +1 -0
@@ -72,6 +72,7 @@ static int amdgpu_pp_early_init(void *handle)case CHIP_CARRIZO :case CHIP_STONEY :case CHIP_VEGA10 : +case CHIP_RAVEN : adev->pp_enabled = true;if (amdgpu_create_pp_handle (adev))return -EINVAL ;
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -0
@@ -512,6 +512,7 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_ip_block_add (adev, &gmc_v9_0_ip_block);amdgpu_ip_block_add (adev, &vega10_ih_ip_block);amdgpu_ip_block_add (adev, &psp_v10_0_ip_block); +amdgpu_ip_block_add (adev, &amdgpu_pp_ip_block);#if defined(CONFIG_DRM_AMD_DC )if (amdgpu_device_has_dc_support (adev))amdgpu_ip_block_add (adev, &dm_ip_block);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 108/117 drm/amd: Add DCN ivsrcids (v2)
In reply to a message not in the archiveFrom: Andrey Grodzovsky <[email protected]>
v2: squash in some updates (Alex)
--- .../gpu/drm/amd/include/ivsrcid/irqsrcs_dcn_1_0.h | 1134 ++++++++++++++++++++ 1 file changed, 1134 insertions(+) create mode 100644 drivers/gpu/drm/amd/include/ivsrcid/irqsrcs_dcn_1_0.h
drivers/gpu/drm/amd/include/ivsrcid/irqsrcs_dcn_1_0.h new file +1134 -0
@@ -0,0 +1,1134 @@ +/* +* Copyright 2017 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 __IRQSRCS_DCN_1_0_H__ +#define __IRQSRCS_DCN_1_0_H__ + + +#define DCN_1_0__SRCID__DC_I2C_SW_DONE 1 // DC_I2C SW done DC_I2C_SW_DONE_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_I2C_SW_DONE 0 + +#define DCN_1_0__SRCID__DC_I2C_DDC1_HW_DONE 1 // DC_I2C DDC1 HW done DOUT_IHC_I2C_DDC1_HW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_I2C_DDC1_HW_DONE 1 + +#define DCN_1_0__SRCID__DC_I2C_DDC2_HW_DONE 1 // DC_I2C DDC2 HW done DOUT_IHC_I2C_DDC2_HW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_I2C_DDC2_HW_DONE 2 + +#define DCN_1_0__SRCID__DC_I2C_DDC3_HW_DONE 1 // DC_I2C DDC3 HW done DOUT_IHC_I2C_DDC3_HW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_I2C_DDC3_HW_DONE 3 + +#define DCN_1_0__SRCID__DC_I2C_DDC4_HW_DONE 1 // DC_I2C_DDC4 HW done DOUT_IHC_I2C_DDC4_HW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_I2C_DDC4_HW_DONE 4 + +#define DCN_1_0__SRCID__DC_I2C_DDC5_HW_DONE 1 // DC_I2C_DDC5 HW done DOUT_IHC_I2C_DDC5_HW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_I2C_DDC5_HW_DONE 5 + +#define DCN_1_0__SRCID__DC_I2C_DDC6_HW_DONE 1 // DC_I2C_DDC6 HW done DOUT_IHC_I2C_DDC6_HW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_I2C_DDC6_HW_DONE 6 + +#define DCN_1_0__SRCID__DC_I2C_DDCVGA_HW_DONE 1 // DC_I2C_DDCVGA HW done DOUT_IHC_I2C_DDCVGA_HW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_I2C_DDCVGA_HW_DONE 7 + +#define DCN_1_0__SRCID__DC_I2C_DDC1_READ_REQUEST 1 // DC_I2C DDC1 read request DC_I2C_DDC1_READ_REQUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DC_I2C_DDC1_READ_REQUEST 8 + +#define DCN_1_0__SRCID__DC_I2C_DDC2_READ_REQUEST 1 // DC_I2C DDC2 read request DC_I2C_DDC2_READ_REQUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DC_I2C_DDC2_READ_REQUEST 9 + +#define DCN_1_0__SRCID__DC_I2C_DDC3_READ_REQUEST 1 // DC_I2C DDC3 read request DC_I2C_DDC3_READ_REQUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DC_I2C_DDC3_READ_REQUEST 10 + +#define DCN_1_0__SRCID__DC_I2C_DDC4_READ_REQUEST 1 // DC_I2C_DDC4 read request DC_I2C_DDC4_READ_REQUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DC_I2C_DDC4_READ_REQUEST 11 + +#define DCN_1_0__SRCID__DC_I2C_DDC5_READ_REQUEST 1 // DC_I2C_DDC5 read request DC_I2C_DDC5_READ_REQUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DC_I2C_DDC5_READ_REQUEST 12 + +#define DCN_1_0__SRCID__DC_I2C_DDC6_READ_REQUEST 1 // DC_I2C_DDC6 read request DC_I2C_DDC6_READ_REQUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DC_I2C_DDC6_READ_REQUEST 13 + +#define DCN_1_0__SRCID__DC_I2C_DDCVGA_READ_REQUEST 1 // DC_I2C_DDCVGA read request DC_I2C_VGA_READ_REQUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DC_I2C_DDCVGA_READ_REQUEST 14 + +#define DCN_1_0__SRCID__GENERIC_I2C_DDC_READ_REQUEST 1 // GENERIC_I2C_DDC read request GENERIC_I2C_DDC_READ_REUEST_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__GENERIC_I2C_DDC_READ_REQUEST 15 + +#define DCN_1_0__SRCID__DCCG_PERFCOUNTER_INT0_STATUS 2 // DCCG perfmon counter0 interrupt DCCG_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level / Pulse +#define DCN_1_0__CTXID__DCCG_PERFCOUNTER_INT0_STATUS 7 + +#define DCN_1_0__SRCID__DCCG_PERFCOUNTER_INT1_STATUS 2 // DCCG perfmon counter1 interrupt DCCG_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level +#define DCN_1_0__CTXID__DCCG_PERFCOUNTER_INT1_STATUS 8 + +#define DCN_1_0__SRCID__DMU_PERFCOUNTER_INT0_STATUS 3 // DMU perfmon counter0 interrupt DMU_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level / Pulse +#define DCN_1_0__CTXID__DMU_PERFCOUNTER_INT0_STATUS 7 + +#define DCN_1_0__SRCID__DMU_PERFCOUNTER_INT1_STATUS 3 // DMU perfmon counter1 interrupt DMU_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level +#define DCN_1_0__CTXID__DMU_PERFCOUNTER_INT1_STATUS 8 + +#define DCN_1_0__SRCID__DIO_PERFCOUNTER_INT0_STATUS 4 // DIO perfmon counter0 interrupt DIO_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level / Pulse +#define DCN_1_0__CTXID__DIO_PERFCOUNTER_INT0_STATUS 7 + +#define DCN_1_0__SRCID__DIO_PERFCOUNTER_INT1_STATUS 4 // DIO perfmon counter1 interrupt DIO_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level +#define DCN_1_0__CTXID__DIO_PERFCOUNTER_INT1_STATUS 8 + +#define DCN_1_0__SRCID__RBBMIF_TIMEOUT_INT 5 // RBBMIF timeout interrupt RBBMIF_IHC_TIMEOUT_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__RBBMIF_TIMEOUT_INT 12 + +#define DCN_1_0__SRCID__DMCU_INTERNAL_INT 5 // DMCU execution exception DMCU_UC_INTERNAL_INT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DMCU_INTERNAL_INT 13 + +#define DCN_1_0__SRCID__DMCU_SCP_INT 5 // DMCU Slave Communication Port Interrupt DMCU_SCP_INT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DMCU_SCP_INT 14 + +#define DCN_1_0__SRCID__DMCU_ABM0_HG_READY_INT 6 // ABM histogram ready interrupt ABM0_HG_READY_INT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DMCU_ABM0_HG_READY_INT 0 + +#define DCN_1_0__SRCID__DMCU_ABM0_LS_READY_INT 6 // ABM luma stat ready interrupt ABM0_LS_READY_INT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DMCU_ABM0_LS_READY_INT 1 + +#define DCN_1_0__SRCID__DMCU_ABM0_BL_UPDATE_INT 6 // ABM Backlight update interrupt ABM0_BL_UPDATE_INT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DMCU_ABM0_BL_UPDATE_INT 2 + +#define DCN_1_0__SRCID__DMCU_ABM1_HG_READY_INT 6 // ABM histogram ready interrupt ABM1_HG_READY_INT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DMCU_ABM1_HG_READY_INT 3 + +#define DCN_1_0__SRCID__DMCU_ABM1_LS_READY_INT 6 // ABM luma stat ready interrupt ABM1_LS_READY_INT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DMCU_ABM1_LS_READY_INT 4 + +#define DCN_1_0__SRCID__DMCU_ABM1_BL_UPDATE_INT 6 // ABM Backlight update interrupt ABM1_BL_UPDATE_INT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DMCU_ABM1_BL_UPDATE_INT 5 + +#define DCN_1_0__SRCID__WB0_PERFCOUNTER_INT0_STATUS 6 // WB0 perfmon counter0 interrupt WB0_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level / Pulse +#define DCN_1_0__CTXID__WB0_PERFCOUNTER_INT0_STATUS 6 + +#define DCN_1_0__SRCID__WB0_PERFCOUNTER_INT1_STATUS 6 // WB0 perfmon counter1 interrupt WB0_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE7 Level +#define DCN_1_0__CTXID__WB0_PERFCOUNTER_INT1_STATUS 7 + +#define DCN_1_0__SRCID__DPDBG_FIFO_OVERFLOW_INT 7 // DP debug FIFO overflow interrupt DPDBG_IHC_FIFO_OVERFLOW_INT DISP_INTERRUPT_STATUS_CONTINUE21 Level / Pulse +#define DCN_1_0__CTXID__DPDBG_FIFO_OVERFLOW_INT 1 + +#define DCN_1_0__SRCID__DCIO_DPCS_TXA_ERROR_INT 8 // DPCS TXA error interrupt DCIO_DPCS_TXA_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_TXA_ERROR_INT 0 + +#define DCN_1_0__SRCID__DCIO_DPCS_TXB_ERROR_INT 8 // DPCS TXB error interrupt DCIO_DPCS_TXB_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_TXB_ERROR_INT 1 + +#define DCN_1_0__SRCID__DCIO_DPCS_TXC_ERROR_INT 8 // DPCS TXC error interrupt DCIO_DPCS_TXC_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_TXC_ERROR_INT 2 + +#define DCN_1_0__SRCID__DCIO_DPCS_TXD_ERROR_INT 8 // DPCS TXD error interrupt DCIO_DPCS_TXD_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_TXD_ERROR_INT 3 + +#define DCN_1_0__SRCID__DCIO_DPCS_TXE_ERROR_INT 8 // DPCS TXE error interrupt DCIO_DPCS_TXE_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_TXE_ERROR_INT 4 + +#define DCN_1_0__SRCID__DCIO_DPCS_TXF_ERROR_INT 8 // DPCS TXF error interrupt DCIO_DPCS_TXF_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_TXF_ERROR_INT 5 + +#define DCN_1_0__SRCID__DCIO_DPCS_TXG_ERROR_INT 8 // DPCS TXG error interrupt DCIO_DPCS_TXG_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_TXG_ERROR_INT 6 + +#define DCN_1_0__SRCID__DCIO_DPCS_RXA_ERROR_INT 8 // DPCS RXA error interrupt DCIO_DPCS_RXA_IHC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__DCIO_DPCS_RXA_ERROR_INT 7 + +#define DCN_1_0__SRCID__DC_HPD1_INT 9 // Hot Plug Detection 1 DC_HPD1_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_HPD1_INT 0 + +#define DCN_1_0__SRCID__DC_HPD2_INT 9 // Hot Plug Detection 2 DC_HPD2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level +#define DCN_1_0__CTXID__DC_HPD2_INT 1 + +#define DCN_1_0__SRCID__DC_HPD3_INT 9 // Hot Plug Detection 3 DC_HPD3_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level +#define DCN_1_0__CTXID__DC_HPD3_INT 2 + +#define DCN_1_0__SRCID__DC_HPD4_INT 9 // Hot Plug Detection 4 DC_HPD4_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__DC_HPD4_INT 3 + +#define DCN_1_0__SRCID__DC_HPD5_INT 9 // Hot Plug Detection 5 DC_HPD5_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__DC_HPD5_INT 4 + +#define DCN_1_0__SRCID__DC_HPD6_INT 9 // Hot Plug Detection 6 DC_HPD6_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level +#define DCN_1_0__CTXID__DC_HPD6_INT 5 + +#define DCN_1_0__SRCID__DC_HPD1_RX_INT 9 // Hot Plug Detection RX interrupt 1 DC_HPD1_RX_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_HPD1_RX_INT 6 + +#define DCN_1_0__SRCID__DC_HPD2_RX_INT 9 // Hot Plug Detection RX interrupt 2 DC_HPD2_RX_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level +#define DCN_1_0__CTXID__DC_HPD2_RX_INT 7 + +#define DCN_1_0__SRCID__DC_HPD3_RX_INT 9 // Hot Plug Detection RX interrupt 3 DC_HPD3_RX_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level +#define DCN_1_0__CTXID__DC_HPD3_RX_INT 8 + +#define DCN_1_0__SRCID__DC_HPD4_RX_INT 9 // Hot Plug Detection RX interrupt 4 DC_HPD4_RX_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__DC_HPD4_RX_INT 9 + +#define DCN_1_0__SRCID__DC_HPD5_RX_INT 9 // Hot Plug Detection RX interrupt 5 DC_HPD5_RX_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__DC_HPD5_RX_INT 10 + +#define DCN_1_0__SRCID__DC_HPD6_RX_INT 9 // Hot Plug Detection RX interrupt 6 DC_HPD6_RX_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level +#define DCN_1_0__CTXID__DC_HPD6_RX_INT 11 + +#define DCN_1_0__SRCID__DC_DAC_A_AUTO_DET 0xA // DAC A auto - detection DACA_AUTODETECT_GENERITE_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_DAC_A_AUTO_DET 0 + +#define DCN_1_0__SRCID__AZ_ENDPOINT0_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint0 format changed AZ_IHC_ENDPOINT0_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT0_AUDIO_FMT_CHANGED_INT 2 + +#define DCN_1_0__SRCID__AZ_ENDPOINT1_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint1 format changed AZ_IHC_ENDPOINT1_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT1_AUDIO_FMT_CHANGED_INT 3 + +#define DCN_1_0__SRCID__AZ_ENDPOINT2_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint2 format changed AZ_IHC_ENDPOINT2_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT2_AUDIO_FMT_CHANGED_INT 4 + +#define DCN_1_0__SRCID__AZ_ENDPOINT3_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint3 format changed AZ_IHC_ENDPOINT3_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT3_AUDIO_FMT_CHANGED_INT 5 + +#define DCN_1_0__SRCID__AZ_ENDPOINT4_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint4 format changed AZ_IHC_ENDPOINT4_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT4_AUDIO_FMT_CHANGED_INT 6 + +#define DCN_1_0__SRCID__AZ_ENDPOINT5_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint5 format changed AZ_IHC_ENDPOINT5_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT5_AUDIO_FMT_CHANGED_INT 7 + +#define DCN_1_0__SRCID__AZ_ENDPOINT6_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint6 format changed AZ_IHC_ENDPOINT6_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT6_AUDIO_FMT_CHANGED_INT 8 + +#define DCN_1_0__SRCID__AZ_ENDPOINT7_AUDIO_FMT_CHANGED_INT 0xA // AZ Endpoint7 format changed AZ_IHC_ENDPOINT7_AUDIO_FORMAT_CHANGED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT7_AUDIO_FMT_CHANGED_INT 9 + +#define DCN_1_0__SRCID__AZ_ENDPOINT0_AUDIO_ENABLED_INT 0xB // AZ Endpoint0 enabled AZ_IHC_ENDPOINT0_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT0_AUDIO_ENABLED_INT 0 + +#define DCN_1_0__SRCID__AZ_ENDPOINT1_AUDIO_ENABLED_INT 0xB // AZ Endpoint1 enabled AZ_IHC_ENDPOINT1_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT1_AUDIO_ENABLED_INT 1 + +#define DCN_1_0__SRCID__AZ_ENDPOINT2_AUDIO_ENABLED_INT 0xB // AZ Endpoint2 enabled AZ_IHC_ENDPOINT2_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT2_AUDIO_ENABLED_INT 2 + +#define DCN_1_0__SRCID__AZ_ENDPOINT3_AUDIO_ENABLED_INT 0xB // AZ Endpoint3 enabled AZ_IHC_ENDPOINT3_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT3_AUDIO_ENABLED_INT 3 + +#define DCN_1_0__SRCID__AZ_ENDPOINT4_AUDIO_ENABLED_INT 0xB // AZ Endpoint4 enabled AZ_IHC_ENDPOINT4_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT4_AUDIO_ENABLED_INT 4 + +#define DCN_1_0__SRCID__AZ_ENDPOINT5_AUDIO_ENABLED_INT 0xB // AZ Endpoint5 enabled AZ_IHC_ENDPOINT5_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT5_AUDIO_ENABLED_INT 5 + +#define DCN_1_0__SRCID__AZ_ENDPOINT6_AUDIO_ENABLED_INT 0xB // AZ Endpoint6 enabled AZ_IHC_ENDPOINT6_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT6_AUDIO_ENABLED_INT 6 + +#define DCN_1_0__SRCID__AZ_ENDPOINT7_AUDIO_ENABLED_INT 0xB // AZ Endpoint7 enabled AZ_IHC_ENDPOINT7_AUDIO_ENABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT7_AUDIO_ENABLED_INT 7 + +#define DCN_1_0__SRCID__AZ_ENDPOINT0_AUDIO_DISABLED_INT 0xC // AZ Endpoint0 disabled AZ_IHC_ENDPOINT0_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT0_AUDIO_DISABLED_INT 0 + +#define DCN_1_0__SRCID__AZ_ENDPOINT1_AUDIO_DISABLED_INT 0xC // AZ Endpoint1 disabled AZ_IHC_ENDPOINT1_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT1_AUDIO_DISABLED_INT 1 + +#define DCN_1_0__SRCID__AZ_ENDPOINT2_AUDIO_DISABLED_INT 0xC // AZ Endpoint2 disabled AZ_IHC_ENDPOINT2_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT2_AUDIO_DISABLED_INT 2 + +#define DCN_1_0__SRCID__AZ_ENDPOINT3_AUDIO_DISABLED_INT 0xC // AZ Endpoint3 disabled AZ_IHC_ENDPOINT3_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT3_AUDIO_DISABLED_INT 3 + +#define DCN_1_0__SRCID__AZ_ENDPOINT4_AUDIO_DISABLED_INT 0xC // AZ Endpoint4 disabled AZ_IHC_ENDPOINT4_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT4_AUDIO_DISABLED_INT 4 + +#define DCN_1_0__SRCID__AZ_ENDPOINT5_AUDIO_DISABLED_INT 0xC // AZ Endpoint5 disabled AZ_IHC_ENDPOINT5_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT5_AUDIO_DISABLED_INT 5 + +#define DCN_1_0__SRCID__AZ_ENDPOINT6_AUDIO_DISABLED_INT 0xC // AZ Endpoint6 disabled AZ_IHC_ENDPOINT6_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT6_AUDIO_DISABLED_INT 6 + +#define DCN_1_0__SRCID__AZ_ENDPOINT7_AUDIO_DISABLED_INT 0xC // AZ Endpoint7 disabled AZ_IHC_ENDPOINT7_AUDIO_DISABLED_INT DISP_INTERRUPT_STATUS_CONTINUE19 Level / Pulse +#define DCN_1_0__CTXID__AZ_ENDPOINT7_AUDIO_DISABLED_INT 7 + +#define DCN_1_0__SRCID__DC_AUX1_GTC_SYNC_LOCK_DONE 0xD // AUX1 GTC sync lock complete AUX1_GTC_SYNC_LOCK_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX1_GTC_SYNC_LOCK_DONE 0 + +#define DCN_1_0__SRCID__DC_AUX1_GTC_SYNC_ERROR 0xD // AUX1 GTC sync error occurred AUX1_GTC_SYNC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX1_GTC_SYNC_ERROR 1 + +#define DCN_1_0__SRCID__DC_AUX2_GTC_SYNC_LOCK_DONE 0xD // AUX2 GTC sync lock complete AUX2_GTC_SYNC_LOCK_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX2_GTC_SYNC_LOCK_DONE 2 + +#define DCN_1_0__SRCID__DC_AUX2_GTC_SYNC_ERROR 0xD // AUX2 GTC sync error occurred AUX2_GTC_SYNC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX2_GTC_SYNC_ERROR 3 + +#define DCN_1_0__SRCID__DC_AUX3_GTC_SYNC_LOCK_DONE 0xD // AUX3 GTC sync lock complete AUX3_GTC_SYNC_LOCK_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX3_GTC_SYNC_LOCK_DONE 4 + +#define DCN_1_0__SRCID__DC_AUX3_GTC_SYNC_ERROR 0xD // AUX3 GTC sync error occurred AUX3_GTC_SYNC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX3_GTC_SYNC_ERROR 5 + +#define DCN_1_0__SRCID__DC_DIGA_VID_STRM_DISABLE 0xE // DIGA vid stream disable DIGA_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_DIGA_VID_STRM_DISABLE 0 + +#define DCN_1_0__SRCID__DC_DIGB_VID_STRM_DISABLE 0xE // DIGB vid stream disable DIGB_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level +#define DCN_1_0__CTXID__DC_DIGB_VID_STRM_DISABLE 1 + +#define DCN_1_0__SRCID__DC_DIGC_VID_STRM_DISABLE 0xE // DIGC vid stream disable DIGC_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level +#define DCN_1_0__CTXID__DC_DIGC_VID_STRM_DISABLE 2 + +#define DCN_1_0__SRCID__DC_DIGD_VID_STRM_DISABLE 0xE // DIGD vid stream disable DIGD_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__DC_DIGD_VID_STRM_DISABLE 3 + +#define DCN_1_0__SRCID__DC_DIGE_VID_STRM_DISABLE 0xE // DIGE vid stream disable DIGE_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__DC_DIGE_VID_STRM_DISABLE 4 + +#define DCN_1_0__SRCID__DC_DIGF_VID_STRM_DISABLE 0xE // DIGF vid stream disable DIGF_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level +#define DCN_1_0__CTXID__DC_DIGF_VID_STRM_DISABLE 5 + +#define DCN_1_0__SRCID__DC_DIGG_VID_STRM_DISABLE 0xE // DIGF vid stream disable DIGG_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE19 Level +#define DCN_1_0__CTXID__DC_DIGG_VID_STRM_DISABLE 6 + +#define DCN_1_0__SRCID__DC_DIGH_VID_STRM_DISABLE 0xE // DIGH_DP_VID_STREAM_DISABLE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_DIGH_VID_STRM_DISABLE 7 + +#define DCN_1_0__SRCID__DC_DIGA_FAST_TRAINING_COMPLETE_INT 0xF // DIGA - Fast Training Complete DIGA_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_DIGA_FAST_TRAINING_COMPLETE_INT 0 + +#define DCN_1_0__SRCID__DC_DIGB_FAST_TRAINING_COMPLETE_INT 0xF // DIGB - Fast Training Complete DIGB_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level +#define DCN_1_0__CTXID__DC_DIGB_FAST_TRAINING_COMPLETE_INT 1 + +#define DCN_1_0__SRCID__DC_DIGC_FAST_TRAINING_COMPLETE_INT 0xF // DIGC - Fast Training Complete DIGC_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level +#define DCN_1_0__CTXID__DC_DIGC_FAST_TRAINING_COMPLETE_INT 2 + +#define DCN_1_0__SRCID__DC_DIGD_FAST_TRAINING_COMPLETE_INT 0xF // DIGD - Fast Training Complete DIGD_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__DC_DIGD_FAST_TRAINING_COMPLETE_INT 3 + +#define DCN_1_0__SRCID__DC_DIGE_FAST_TRAINING_COMPLETE_INT 0xF // DIGE - Fast Training Complete DIGE_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__DC_DIGE_FAST_TRAINING_COMPLETE_INT 4 + +#define DCN_1_0__SRCID__DC_DIGF_FAST_TRAINING_COMPLETE_INT 0xF // DIGF - Fast Training Complete DIGF_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level +#define DCN_1_0__CTXID__DC_DIGF_FAST_TRAINING_COMPLETE_INT 5 + +#define DCN_1_0__SRCID__DC_DIGG_FAST_TRAINING_COMPLETE_INT 0xF // DIGG_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE19 Level +#define DCN_1_0__CTXID__DC_DIGG_FAST_TRAINING_COMPLETE_INT 6 + +#define DCN_1_0__SRCID__DC_DIGH_FAST_TRAINING_COMPLETE_INT 0xF // DIGH_DP_FAST_TRAINING_COMPLETE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE21 Level +#define DCN_1_0__CTXID__DC_DIGH_FAST_TRAINING_COMPLETE_INT 7 + +#define DCN_1_0__SRCID__DC_AUX1_SW_DONE 0x10 // AUX1 sw done AUX1_SW_DONE_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_AUX1_SW_DONE 0 + +#define DCN_1_0__SRCID__DC_AUX1_LS_DONE 0x10 // AUX1 ls done AUX1_LS_DONE_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__DC_AUX1_LS_DONE 1 + +#define DCN_1_0__SRCID__DC_AUX2_SW_DONE 0x10 // AUX2 sw done AUX2_SW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level +#define DCN_1_0__CTXID__DC_AUX2_SW_DONE 2 + +#define DCN_1_0__SRCID__DC_AUX2_LS_DONE 0x10 // AUX2 ls done AUX2_LS_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level +#define DCN_1_0__CTXID__DC_AUX2_LS_DONE 3 + +#define DCN_1_0__SRCID__DC_AUX3_SW_DONE 0x10 // AUX3 sw done AUX3_SW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level +#define DCN_1_0__CTXID__DC_AUX3_SW_DONE 4 + +#define DCN_1_0__SRCID__DC_AUX3_LS_DONE 0x10 // AUX3 ls done AUX3_LS_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level +#define DCN_1_0__CTXID__DC_AUX3_LS_DONE 5 + +#define DCN_1_0__SRCID__DC_AUX4_SW_DONE 0x10 // AUX4 sw done AUX4_SW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__DC_AUX4_SW_DONE 6 + +#define DCN_1_0__SRCID__DC_AUX4_LS_DONE 0x10 // AUX4 ls done AUX4_LS_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__DC_AUX4_LS_DONE 7 + +#define DCN_1_0__SRCID__DC_AUX5_SW_DONE 0x10 // AUX5 sw done AUX5_SW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__DC_AUX5_SW_DONE 8 + +#define DCN_1_0__SRCID__DC_AUX5_LS_DONE 0x10 // AUX5 ls done AUX5_LS_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__DC_AUX5_LS_DONE 9 + +#define DCN_1_0__SRCID__DC_AUX6_SW_DONE 0x10 // AUX6 sw done AUX6_SW_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level +#define DCN_1_0__CTXID__DC_AUX6_SW_DONE 10 + +#define DCN_1_0__SRCID__DC_AUX6_LS_DONE 0x10 // AUX6 ls done AUX6_LS_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level +#define DCN_1_0__CTXID__DC_AUX6_LS_DONE 11 + +#define DCN_1_0__SRCID__VGA_CRT_INT 0x10 // VGA Vblank VGA_IHC_VGA_CRT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__VGA_CRT_INT 12 + +#define DCN_1_0__SRCID__DCCG_PERFCOUNTER2_INT0_STATUS 0x11 // DCCG perfmon2 counter0 interrupt DCCG_PERFMON2_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE10 Level / Pulse +#define DCN_1_0__CTXID__DCCG_PERFCOUNTER2_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DCCG_PERFCOUNTER2_INT1_STATUS 0x11 // DCCG perfmon2 counter1 interrupt DCCG_PERFMON2_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE10 Level +#define DCN_1_0__CTXID__DCCG_PERFCOUNTER2_INT1_STATUS 1 + +#define DCN_1_0__SRCID__BUFMGR_CWB0_IHIF_interrupt 0x12 // mcif_wb_client(buffer manager) MCIF_CWB0_IHIF_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__BUFMGR_CWB0_IHIF_interrupt 0 + +#define DCN_1_0__SRCID__BUFMGR_CWB1_IHIF_interrupt 0x12 // mcif_wb_client(buffer manager) MCIF_CWB1_IHIF_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__BUFMGR_CWB1_IHIF_interrupt 1 + +#define DCN_1_0__SRCID__MCIF0_BUFMGR_SW_CONTROL_MCIF_BUFMGR_SW_INT 0x12 // MCIF WB client(buffer manager) MCIF_DWB0_IHIF_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__MCIF0_BUFMGR_SW_CONTROL_MCIF_BUFMGR_SW_INT 2 + +#define DCN_1_0__SRCID__MCIF1_BUFMGR_SW_CONTROL_MCIF_BUFMGR_SW_INT 0x12 // MCIF WB client(buffer manager) MCIF_DWB1_IHIF_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__MCIF1_BUFMGR_SW_CONTROL_MCIF_BUFMGR_SW_INT 3 + +#define DCN_1_0__SRCID__SISCL0_COEF_RAM_CONFLICT_STATUS 0x12 // WB host conflict interrupt WBSCL0_HOST_CONFLICT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__SISCL0_COEF_RAM_CONFLICT_STATUS 4 + +#define DCN_1_0__SRCID__SISCL0_OVERFLOW_STATUS 0x12 // WB data overflow interrupt WBSCL0_DATA_OVERFLOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__SISCL0_OVERFLOW_STATUS 5 + +#define DCN_1_0__SRCID__SISCL1_COEF_RAM_CONFLICT_STATUS 0x12 // WB host conflict interrupt WBSCL1_HOST_CONFLICT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level +#define DCN_1_0__CTXID__SISCL1_COEF_RAM_CONFLICT_STATUS 6 + +#define DCN_1_0__SRCID__SISCL1_OVERFLOW_STATUS 0x12 // WB data overflow interrupt WBSCL1_DATA_OVERFLOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level +#define DCN_1_0__CTXID__SISCL1_OVERFLOW_STATUS 7 + +#define DCN_1_0__SRCID__DC_AUX4_GTC_SYNC_LOCK_DONE 0x13 // AUX4 GTC sync lock complete AUX4_GTC_SYNC_LOCK_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX4_GTC_SYNC_LOCK_DONE 0 + +#define DCN_1_0__SRCID__DC_AUX4_GTC_SYNC_ERROR 0x13 // AUX4 GTC sync error occurred AUX4_GTC_SYNC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX4_GTC_SYNC_ERROR 1 + +#define DCN_1_0__SRCID__DC_AUX5_GTC_SYNC_LOCK_DONE 0x13 // AUX5 GTC sync lock complete AUX5_GTC_SYNC_LOCK_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX5_GTC_SYNC_LOCK_DONE 2 + +#define DCN_1_0__SRCID__DC_AUX5_GTC_SYNC_ERROR 0x13 // AUX5 GTC sync error occurred AUX5_GTC_SYNC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX5_GTC_SYNC_ERROR 3 + +#define DCN_1_0__SRCID__DC_AUX6_GTC_SYNC_LOCK_DONE 0x13 // AUX6 GTC sync lock complete AUX6_GTC_SYNC_LOCK_DONE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX6_GTC_SYNC_LOCK_DONE 4 + +#define DCN_1_0__SRCID__DC_AUX6_GTC_SYNC_ERROR 0x13 // AUX6 GTC sync error occurred AUX6_GTC_SYNC_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE6 Level +#define DCN_1_0__CTXID__DC_AUX6_GTC_SYNC_ERROR 5 + +#define DCN_1_0__SRCID__DCPG_DCFE0_POWER_UP_INT 0x14 // Display pipe0 power up interrupt DCPG_IHC_DOMAIN0_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE0_POWER_UP_INT 0 + +#define DCN_1_0__SRCID__DCPG_DCFE1_POWER_UP_INT 0x14 // Display pipe1 power up interrupt DCPG_IHC_DOMAIN1_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE1_POWER_UP_INT 1 + +#define DCN_1_0__SRCID__DCPG_DCFE2_POWER_UP_INT 0x14 // Display pipe2 power up interrupt DCPG_IHC_DOMAIN2_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE2_POWER_UP_INT 2 + +#define DCN_1_0__SRCID__DCPG_DCFE3_POWER_UP_INT 0x14 // Display pipe3 power up interrupt DCPG_IHC_DOMAIN3_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE3_POWER_UP_INT 3 + +#define DCN_1_0__SRCID__DCPG_DCFE4_POWER_UP_INT 0x14 // Display pipe4 power up interrupt DCPG_IHC_DOMAIN4_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE4_POWER_UP_INT 4 + +#define DCN_1_0__SRCID__DCPG_DCFE5_POWER_UP_INT 0x14 // Display pipe5 power up interrupt DCPG_IHC_DOMAIN5_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE5_POWER_UP_INT 5 + +#define DCN_1_0__SRCID__DCPG_DCFE6_POWER_UP_INT 0x14 // Display pipe6 power up interrupt DCPG_IHC_DOMAIN6_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE6_POWER_UP_INT 6 + +#define DCN_1_0__SRCID__DCPG_DCFE7_POWER_UP_INT 0x14 // Display pipe7 power up interrupt DCPG_IHC_DOMAIN7_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__DCPG_DCFE7_POWER_UP_INT 7 + +#define DCN_1_0__SRCID__DCPG_DCFE0_POWER_DOWN_INT 0x14 // Display pipe0 power down interrupt DCPG_IHC_DOMAIN0_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE0_POWER_DOWN_INT 8 + +#define DCN_1_0__SRCID__DCPG_DCFE1_POWER_DOWN_INT 0x14 // Display pipe1 power down interrupt DCPG_IHC_DOMAIN1_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE1_POWER_DOWN_INT 9 + +#define DCN_1_0__SRCID__DCPG_DCFE2_POWER_DOWN_INT 0x14 // Display pipe2 power down interrupt DCPG_IHC_DOMAIN2_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE2_POWER_DOWN_INT 10 + +#define DCN_1_0__SRCID__DCPG_DCFE3_POWER_DOWN_INT 0x14 // Display pipe3 power down interrupt DCPG_IHC_DOMAIN3_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE3_POWER_DOWN_INT 11 + +#define DCN_1_0__SRCID__DCPG_DCFE4_POWER_DOWN_INT 0x14 // Display pipe4 power down interrupt DCPG_IHC_DOMAIN4_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE4_POWER_DOWN_INT 12 + +#define DCN_1_0__SRCID__DCPG_DCFE5_POWER_DOWN_INT 0x14 // Display pipe5 power down interrupt DCPG_IHC_DOMAIN5_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE5_POWER_DOWN_INT 13 + +#define DCN_1_0__SRCID__DCPG_DCFE6_POWER_DOWN_INT 0x14 // Display pipe6 power down interrupt DCPG_IHC_DOMAIN6_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE6_POWER_DOWN_INT 14 + +#define DCN_1_0__SRCID__DCPG_DCFE7_POWER_DOWN_INT 0x14 // Display pipe7 power down interrupt DCPG_IHC_DOMAIN7_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__DCPG_DCFE7_POWER_DOWN_INT 15 + +#define DCN_1_0__SRCID__DCCG_IHC_VSYNC_otg0_latch_int 0x15 // an interrupt that is triggered when the time(number of refclk cycles) of a programmable number of frames is counted.The counting starts / end at VSYNC rising edge or falling edge.DCCG_IHC_VSYNC_OTG0_LATCH_INT DISP_INTERRUPT_STATUS_CONTINUE10 Level +#define DCN_1_0__CTXID__DCCG_IHC_VSYNC_otg0_latch_int 0 + +#define DCN_1_0__SRCID__DCCG_IHC_VSYNC_otg1_latch_int 0x15 // an interrupt that is triggered when the time(number of refclk cycles) of a programmable number of frames is counted.The counting starts / end at VSYNC rising edge or falling edge.DCCG_IHC_VSYNC_OTG1_LATCH_INT DISP_INTERRUPT_STATUS_CONTINUE10 Level +#define DCN_1_0__CTXID__DCCG_IHC_VSYNC_otg1_latch_int 1 + +#define DCN_1_0__SRCID__DCCG_IHC_VSYNC_otg2_latch_int 0x15 // an interrupt that is triggered when the time(number of refclk cycles) of a programmable number of frames is counted.The counting starts / end at VSYNC rising edge or falling edge.DCCG_IHC_VSYNC_OTG2_LATCH_INT DISP_INTERRUPT_STATUS_CONTINUE10 Level +#define DCN_1_0__CTXID__DCCG_IHC_VSYNC_otg2_latch_int 2 + +#define DCN_1_0__SRCID__DCCG_IHC_VSYNC_otg3_latch_int 0x15 // an interrupt that is triggered when the time(number of refclk cycles) of a programmable number of frames is counted.The counting starts / end at VSYNC rising edge or falling edge.DCCG_IHC_VSYNC_OTG3_LATCH_INT DISP_INTERRUPT_STATUS_CONTINUE10 Level +#define DCN_1_0__CTXID__DCCG_IHC_VSYNC_otg3_latch_int 3 + +#define DCN_1_0__SRCID__DCCG_IHC_VSYNC_otg4_latch_int 0x15 // an interrupt that is triggered when the time(number of refclk cycles) of a programmable number of frames is counted.The counting starts / end at VSYNC rising edge or falling edge.DCCG_IHC_VSYNC_OTG4_LATCH_INT DISP_INTERRUPT_STATUS_CONTINUE10 Level +#define DCN_1_0__CTXID__DCCG_IHC_VSYNC_otg4_latch_int 4 + +#define DCN_1_0__SRCID__DCCG_IHC_VSYNC_otg5_latch_int 0x15 // an interrupt that is triggered when the time(number of refclk cycles) of a programmable number of frames is counted.The counting starts / end at VSYNC rising edge or falling edge.DCCG_IHC_VSYNC_OTG5_LATCH_INT DISP_INTERRUPT_STATUS_CONTINUE10 Level +#define DCN_1_0__CTXID__DCCG_IHC_VSYNC_otg5_latch_int 5 + +#define DCN_1_0__SRCID__OPTC0_DATA_UNDERFLOW_INT 0x15 // D0 ODM data underflow interrupt OPTC1_DATA_UNDERFLOW_INTERRUPT DISP_INTERRUPT_STATUS Level +#define DCN_1_0__CTXID__OPTC0_DATA_UNDERFLOW_INT 6 + +#define DCN_1_0__SRCID__OPTC1_DATA_UNDERFLOW_INT 0x15 // D0 ODM data underflow interrupt OPTC2_DATA_UNDERFLOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level +#define DCN_1_0__CTXID__OPTC1_DATA_UNDERFLOW_INT 7 + +#define DCN_1_0__SRCID__OPTC2_DATA_UNDERFLOW_INT 0x15 // D0 ODM data underflow interrupt OPTC3_DATA_UNDERFLOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level +#define DCN_1_0__CTXID__OPTC2_DATA_UNDERFLOW_INT 8 + +#define DCN_1_0__SRCID__OPTC3_DATA_UNDERFLOW_INT 0x15 // D0 ODM data underflow interrupt OPTC4_DATA_UNDERFLOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level +#define DCN_1_0__CTXID__OPTC3_DATA_UNDERFLOW_INT 9 + +#define DCN_1_0__SRCID__OPTC4_DATA_UNDERFLOW_INT 0x15 // D0 ODM data underflow interrupt OPTC5_DATA_UNDERFLOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__OPTC4_DATA_UNDERFLOW_INT 10 + +#define DCN_1_0__SRCID__OPTC5_DATA_UNDERFLOW_INT 0x15 // D0 ODM data underflow interrupt OPTC6_DATA_UNDERFLOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level +#define DCN_1_0__CTXID__OPTC5_DATA_UNDERFLOW_INT 11 + +#define DCN_1_0__SRCID__MPCC0_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC0_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC0_STALL_INTERRUPT 0 + +#define DCN_1_0__SRCID__MPCC1_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC1_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC1_STALL_INTERRUPT 1 + +#define DCN_1_0__SRCID__MPCC2_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC2_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC2_STALL_INTERRUPT 2 + +#define DCN_1_0__SRCID__MPCC3_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC3_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC3_STALL_INTERRUPT 3 + +#define DCN_1_0__SRCID__MPCC4_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC4_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC4_STALL_INTERRUPT 4 + +#define DCN_1_0__SRCID__MPCC5_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC5_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC5_STALL_INTERRUPT 5 + +#define DCN_1_0__SRCID__MPCC6_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC6_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC6_STALL_INTERRUPT 6 + +#define DCN_1_0__SRCID__MPCC7_STALL_INTERRUPT 0x16 // Indicate no pixel was available to be sent when OPP asked for MPCC7_STALL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__MPCC7_STALL_INTERRUPT 7 + +#define DCN_1_0__SRCID__OTG1_CPU_SS_INT 0x17 // D1: OTG Static Screen interrupt OTG1_IHC_CPU_SS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__OTG1_CPU_SS_INT 0 + +#define DCN_1_0__SRCID__OTG1_RANGE_TIMING_UPDATE 0x17 // D1 : OTG range timing OTG1_IHC_RANGE_TIMING_UPDATE DISP_INTERRUPT_STATUS_CONTINUE10 Level / Pulse +#define DCN_1_0__CTXID__OTG1_RANGE_TIMING_UPDATE 1 + +#define DCN_1_0__SRCID__OTG2_CPU_SS_INT 0x17 // D2 : OTG Static Screen interrupt OTG2_IHC_CPU_SS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__OTG2_CPU_SS_INT 2 + +#define DCN_1_0__SRCID__OTG2_RANGE_TIMING_UPDATE 0x17 // D2 : OTG range timing OTG2_IHC_RANGE_TIMING_UPDATE DISP_INTERRUPT_STATUS_CONTINUE10 Level / Pulse +#define DCN_1_0__CTXID__OTG2_RANGE_TIMING_UPDATE 3 + +#define DCN_1_0__SRCID__OTG3_CPU_SS_INT 0x17 // D3 : OTG Static Screen interrupt OTG3_IHC_CPU_SS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__OTG3_CPU_SS_INT 4 + +#define DCN_1_0__SRCID__OTG3_RANGE_TIMING_UPDATE 0x17 // D3 : OTG range timing OTG3_IHC_RANGE_TIMING_UPDATE DISP_INTERRUPT_STATUS_CONTINUE10 Level / Pulse +#define DCN_1_0__CTXID__OTG3_RANGE_TIMING_UPDATE 5 + +#define DCN_1_0__SRCID__OTG4_CPU_SS_INT 0x17 // D4 : OTG Static Screen interrupt OTG4_IHC_CPU_SS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__OTG4_CPU_SS_INT 6 + +#define DCN_1_0__SRCID__OTG4_RANGE_TIMING_UPDATE 0x17 // D4 : OTG range timing OTG4_IHC_RANGE_TIMING_UPDATE DISP_INTERRUPT_STATUS_CONTINUE10 Level / Pulse +#define DCN_1_0__CTXID__OTG4_RANGE_TIMING_UPDATE 7 + +#define DCN_1_0__SRCID__OTG5_CPU_SS_INT 0x17 // D5 : OTG Static Screen interrupt OTG5_IHC_CPU_SS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__OTG5_CPU_SS_INT 8 + +#define DCN_1_0__SRCID__OTG5_RANGE_TIMING_UPDATE 0x17 // D5 : OTG range timing OTG5_IHC_RANGE_TIMING_UPDATE DISP_INTERRUPT_STATUS_CONTINUE10 Level / Pulse +#define DCN_1_0__CTXID__OTG5_RANGE_TIMING_UPDATE 9 + +#define DCN_1_0__SRCID__OTG6_CPU_SS_INT 0x17 // D6 : OTG Static Screen interrupt OTG6_IHC_CPU_SS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__OTG6_CPU_SS_INT 10 + +#define DCN_1_0__SRCID__OTG6_RANGE_TIMING_UPDATE 0x17 // D6 : OTG range timing OTG6_IHC_RANGE_TIMING_UPDATE DISP_INTERRUPT_STATUS_CONTINUE10 Level / Pulse +#define DCN_1_0__CTXID__OTG6_RANGE_TIMING_UPDATE 11 + +#define DCN_1_0__SRCID__DC_D1_OTG_V_UPDATE 0x18 // D1 : OTG V_update OTG1_IHC_V_UPDATE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D2_OTG_V_UPDATE 0x19 // D2 : OTG V_update OTG2_IHC_V_UPDATE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D3_OTG_V_UPDATE 0x1A // D3 : OTG V_update OTG3_IHC_V_UPDATE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D4_OTG_V_UPDATE 0x1B // D4 : OTG V_update OTG4_IHC_V_UPDATE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D5_OTG_V_UPDATE 0x1C // D5 : OTG V_update OTG5_IHC_V_UPDATE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D6_OTG_V_UPDATE 0x1D // D6 : OTG V_update OTG6_IHC_V_UPDATE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse + +#define DCN_1_0__SRCID__DC_D1_OTG_SNAPSHOT 0x1E // D1 : OTG snapshot OTG1_IHC_SNAPSHOT_INTERRUPT DISP_INTERRUPT_STATUS Level / Pulse +#define DCN_1_0__CTXID__DC_D1_OTG_SNAPSHOT 0 + +#define DCN_1_0__SRCID__DC_D1_FORCE_CNT_W 0x1E // D1 : Force - count--w OTG1_IHC_FORCE_COUNT_NOW_INTERRUPT DISP_INTERRUPT_STATUS Level / Pulse +#define DCN_1_0__CTXID__DC_D1_FORCE_CNT_W 1 + +#define DCN_1_0__SRCID__DC_D1_FORCE_VSYNC_NXT_LINE 0x1E // D1 : Force - Vsync - next - line OTG1_IHC_FORCE_VSYNC_NEXT_LINE_INTERRUPT DISP_INTERRUPT_STATUS Level / Pulse +#define DCN_1_0__CTXID__DC_D1_FORCE_VSYNC_NXT_LINE 2 + +#define DCN_1_0__SRCID__DC_D1_OTG_EXTT_TRG_A 0x1E // D1 : OTG external trigger A OTG1_IHC_TRIGA_INTERRUPT DISP_INTERRUPT_STATUS Level / Pulse +#define DCN_1_0__CTXID__DC_D1_OTG_EXTT_TRG_A 3 + +#define DCN_1_0__SRCID__DC_D1_OTG_EXTT_TRG_B 0x1E // D1 : OTG external trigger B OTG1_IHC_TRIGB_INTERRUPT DISP_INTERRUPT_STATUS Level / Pulse +#define DCN_1_0__CTXID__DC_D1_OTG_EXTT_TRG_B 4 + +#define DCN_1_0__SRCID__DC_D1_OTG_GSL_VSYNC_GAP 0x1E // D1 : gsl_vsync_gap_interrupt_frame_delay OTG1_IHC_GSL_VSYNC_GAP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__DC_D1_OTG_GSL_VSYNC_GAP 5 + +#define DCN_1_0__SRCID__OTG1_VERTICAL_INTERRUPT0_CONTROL 0x1E // D1 : OTG vertical interrupt 0 OTG1_IHC_VERTICAL_INTERRUPT0 DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__OTG1_VERTICAL_INTERRUPT0_CONTROL 6 + +#define DCN_1_0__SRCID__OTG1_VERTICAL_INTERRUPT1_CONTROL 0x1E // D1 : OTG vertical interrupt 1 OTG1_IHC_VERTICAL_INTERRUPT1 DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__OTG1_VERTICAL_INTERRUPT1_CONTROL 7 + +#define DCN_1_0__SRCID__OTG1_VERTICAL_INTERRUPT2_CONTROL 0x1E // D1 : OTG vertical interrupt 2 OTG1_IHC_VERTICAL_INTERRUPT2 DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__OTG1_VERTICAL_INTERRUPT2_CONTROL 8 + +#define DCN_1_0__SRCID__OTG1_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 0x1E // D1 : OTG ext sync loss interrupt OTG1_IHC_EXT_TIMING_SYNC_LOSS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__OTG1_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 9 + +#define DCN_1_0__SRCID__OTG1_EXT_TIMING_SYNC_INTERRUPT_CONTROL 0x1E // D1 : OTG ext sync interrupt OTG1_IHC_EXT_TIMING_SYNC_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__OTG1_EXT_TIMING_SYNC_INTERRUPT_CONTROL 10 + +#define DCN_1_0__SRCID__OTG1_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 0x1E // D1 : OTG ext sync signal interrupt OTG1_IHC_EXT_TIMING_SYNC_SIGNAL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__OTG1_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 11 + +#define DCN_1_0__SRCID__OTG1_SET_VTOTAL_MIN_EVENT_INT 0x1E // D1 : OTG DRR event occurred interrupt OTG1_IHC_SET_V_TOTAL_MIN_EVENT_OCCURED_INT DISP_INTERRUPT_STATUS Level / Pulse +#define DCN_1_0__CTXID__OTG1_SET_VTOTAL_MIN_EVENT_INT 12 + +#define DCN_1_0__SRCID__DC_D2_OTG_SNAPSHOT 0x1F // D2 : OTG snapshot OTG2_IHC_SNAPSHOT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__DC_D2_OTG_SNAPSHOT 0 + +#define DCN_1_0__SRCID__DC_D2_FORCE_CNT_W 0x1F // D2 : Force - count--w OTG2_IHC_FORCE_COUNT_NOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__DC_D2_FORCE_CNT_W 1 + +#define DCN_1_0__SRCID__DC_D2_FORCE_VSYNC_NXT_LINE 0x1F // D2 : Force - Vsync - next - line OTG2_IHC_FORCE_VSYNC_NEXT_LINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__DC_D2_FORCE_VSYNC_NXT_LINE 2 + +#define DCN_1_0__SRCID__DC_D2_OTG_EXTT_TRG_A 0x1F // D2 : OTG external trigger A OTG2_IHC_TRIGA_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__DC_D2_OTG_EXTT_TRG_A 3 + +#define DCN_1_0__SRCID__DC_D2_OTG_EXTT_TRG_B 0x1F // D2 : OTG external trigger B OTG2_IHC_TRIGB_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__DC_D2_OTG_EXTT_TRG_B 4 + +#define DCN_1_0__SRCID__DC_D2_OTG_GSL_VSYNC_GAP 0x1F // D2 : gsl_vsync_gap_interrupt_frame_delay OTG2_IHC_GSL_VSYNC_GAP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__DC_D2_OTG_GSL_VSYNC_GAP 5 + +#define DCN_1_0__SRCID__OTG2_VERTICAL_INTERRUPT0_CONTROL 0x1F // D2 : OTG vertical interrupt 0 OTG2_IHC_VERTICAL_INTERRUPT0 DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__OTG2_VERTICAL_INTERRUPT0_CONTROL 6 + +#define DCN_1_0__SRCID__OTG2_VERTICAL_INTERRUPT1_CONTROL 0x1F // D2 : OTG vertical interrupt 1 OTG2_IHC_VERTICAL_INTERRUPT1 DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__OTG2_VERTICAL_INTERRUPT1_CONTROL 7 + +#define DCN_1_0__SRCID__OTG2_VERTICAL_INTERRUPT2_CONTROL 0x1F // D2 : OTG vertical interrupt 2 OTG2_IHC_VERTICAL_INTERRUPT2 DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__OTG2_VERTICAL_INTERRUPT2_CONTROL 8 + +#define DCN_1_0__SRCID__OTG2_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 0x1F // D2 : OTG ext sync loss interrupt OTG2_IHC_EXT_TIMING_SYNC_LOSS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__OTG2_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 9 + +#define DCN_1_0__SRCID__OTG2_EXT_TIMING_SYNC_INTERRUPT_CONTROL 0x1F // D2 : OTG ext sync interrupt OTG2_IHC_EXT_TIMING_SYNC_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__OTG2_EXT_TIMING_SYNC_INTERRUPT_CONTROL 10 + +#define DCN_1_0__SRCID__OTG2_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 0x1F // D2 : OTG ext sync signal interrupt OTG2_IHC_EXT_TIMING_SYNC_SIGNAL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__OTG2_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 11 + +#define DCN_1_0__SRCID__OTG2_SET_VTOTAL_MIN_EVENT_INT 0x1F // D2 : OTG DRR event occurred interrupt OTG2_IHC_SET_V_TOTAL_MIN_EVENT_OCCURED_INT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__CTXID__OTG2_SET_VTOTAL_MIN_EVENT_INT 12 + +#define DCN_1_0__SRCID__DC_D3_OTG_SNAPSHOT 0x20 // D3 : OTG snapshot OTG3_IHC_SNAPSHOT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_OTG_SNAPSHOT 0 + +#define DCN_1_0__SRCID__DC_D3_FORCE_CNT_W 0x20 // D3 : Force - count--w OTG3_IHC_FORCE_COUNT_NOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_FORCE_CNT_W 1 + +#define DCN_1_0__SRCID__DC_D3_FORCE_VSYNC_NXT_LINE 0x20 // D3 : Force - Vsync - next - line OTG3_IHC_FORCE_VSYNC_NEXT_LINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_FORCE_VSYNC_NXT_LINE 2 + +#define DCN_1_0__SRCID__DC_D3_OTG_EXTT_TRG_A 0x20 // D3 : OTG external trigger A OTG3_IHC_TRIGA_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_OTG_EXTT_TRG_A 3 + +#define DCN_1_0__SRCID__DC_D3_OTG_EXTT_TRG_B 0x20 // D3 : OTG external trigger B OTG3_IHC_TRIGB_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_OTG_EXTT_TRG_B 4 + +#define DCN_1_0__SRCID__DC_D3_OTG_GSL_VSYNC_GAP 0x20 // D3 : gsl_vsync_gap_interrupt_frame_delay OTG3_IHC_GSL_VSYNC_GAP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_OTG_GSL_VSYNC_GAP 5 + +#define DCN_1_0__SRCID__OTG3_VERTICAL_INTERRUPT0_CONTROL 0x20 // D3 : OTG vertical interrupt 0 OTG3_IHC_VERTICAL_INTERRUPT0 DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__OTG3_VERTICAL_INTERRUPT0_CONTROL 6 + +#define DCN_1_0__SRCID__OTG3_VERTICAL_INTERRUPT1_CONTROL 0x20 // D3 : OTG vertical interrupt 1 OTG3_IHC_VERTICAL_INTERRUPT1 DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__OTG3_VERTICAL_INTERRUPT1_CONTROL 7 + +#define DCN_1_0__SRCID__OTG3_VERTICAL_INTERRUPT2_CONTROL 0x20 // D3 : OTG vertical interrupt 2 OTG3_IHC_VERTICAL_INTERRUPT2 DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__OTG3_VERTICAL_INTERRUPT2_CONTROL 8 + +#define DCN_1_0__SRCID__OTG3_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 0x20 // D3 : OTG ext sync loss interrupt OTG3_IHC_EXT_TIMING_SYNC_LOSS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__OTG3_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 9 + +#define DCN_1_0__SRCID__OTG3_EXT_TIMING_SYNC_INTERRUPT_CONTROL 0x20 // D3 : OTG ext sync interrupt OTG3_IHC_EXT_TIMING_SYNC_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__OTG3_EXT_TIMING_SYNC_INTERRUPT_CONTROL 10 + +#define DCN_1_0__SRCID__OTG3_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 0x20 // D3 : OTG ext sync signal interrupt OTG3_IHC_EXT_TIMING_SYNC_SIGNAL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__OTG3_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 11 + +#define DCN_1_0__SRCID__OTG3_SET_VTOTAL_MIN_EVENT_INT 0x20 // D3 : OTG DRR event occurred interrupt OTG3_IHC_SET_V_TOTAL_MIN_EVENT_OCCURED_INT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__CTXID__OTG3_SET_VTOTAL_MIN_EVENT_INT 12 + +#define DCN_1_0__SRCID__DC_D4_OTG_SNAPSHOT 0x21 // D4 : OTG snapshot OTG4_IHC_SNAPSHOT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_OTG_SNAPSHOT 0 + +#define DCN_1_0__SRCID__DC_D4_FORCE_CNT_W 0x21 // D4 : Force - count--w OTG4_IHC_FORCE_COUNT_NOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_FORCE_CNT_W 1 + +#define DCN_1_0__SRCID__DC_D4_FORCE_VSYNC_NXT_LINE 0x21 // D4 : Force - Vsync - next - line OTG4_IHC_FORCE_VSYNC_NEXT_LINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_FORCE_VSYNC_NXT_LINE 2 + +#define DCN_1_0__SRCID__DC_D4_OTG_EXTT_TRG_A 0x21 // D4 : OTG external trigger A OTG4_IHC_TRIGA_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_OTG_EXTT_TRG_A 3 + +#define DCN_1_0__SRCID__DC_D4_OTG_EXTT_TRG_B 0x21 // D4 : OTG external trigger B OTG4_IHC_TRIGB_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_OTG_EXTT_TRG_B 4 + +#define DCN_1_0__SRCID__DC_D4_OTG_GSL_VSYNC_GAP 0x21 // D4 : gsl_vsync_gap_interrupt_frame_delay OTG4_IHC_GSL_VSYNC_GAP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_OTG_GSL_VSYNC_GAP 5 + +#define DCN_1_0__SRCID__OTG4_VERTICAL_INTERRUPT0_CONTROL 0x21 // D4 : OTG vertical interrupt 0 OTG4_IHC_VERTICAL_INTERRUPT0 DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG4_VERTICAL_INTERRUPT0_CONTROL 6 + +#define DCN_1_0__SRCID__OTG4_VERTICAL_INTERRUPT1_CONTROL 0x21 // D4 : OTG vertical interrupt 1 OTG4_IHC_VERTICAL_INTERRUPT1 DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG4_VERTICAL_INTERRUPT1_CONTROL 7 + +#define DCN_1_0__SRCID__OTG4_VERTICAL_INTERRUPT2_CONTROL 0x21 // D4 : OTG vertical interrupt 2 OTG4_IHC_VERTICAL_INTERRUPT2 DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG4_VERTICAL_INTERRUPT2_CONTROL 8 + +#define DCN_1_0__SRCID__OTG4_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 0x21 // D4 : OTG ext sync loss interrupt OTG4_IHC_EXT_TIMING_SYNC_LOSS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG4_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 9 + +#define DCN_1_0__SRCID__OTG4_EXT_TIMING_SYNC_INTERRUPT_CONTROL 0x21 // D4 : OTG ext sync interrupt OTG4_IHC_EXT_TIMING_SYNC_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG4_EXT_TIMING_SYNC_INTERRUPT_CONTROL 10 + +#define DCN_1_0__SRCID__OTG4_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 0x21 // D4 : OTG ext sync signal interrupt OTG4_IHC_EXT_TIMING_SYNC_SIGNAL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG4_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 11 + +#define DCN_1_0__SRCID__OTG4_SET_VTOTAL_MIN_EVENT_INT 0x21 // D4 : OTG DRR event occurred interrupt OTG4_IHC_SET_V_TOTAL_MIN_EVENT_OCCURED_INT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__CTXID__OTG4_SET_VTOTAL_MIN_EVENT_INT 12 + +#define DCN_1_0__SRCID__DC_D5_OTG_SNAPSHOT 0x22 // D5 : OTG snapshot OTG5_IHC_SNAPSHOT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_OTG_SNAPSHOT 0 + +#define DCN_1_0__SRCID__DC_D5_FORCE_CNT_W 0x22 // D5 : Force - count--w OTG5_IHC_FORCE_COUNT_NOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_FORCE_CNT_W 1 + +#define DCN_1_0__SRCID__DC_D5_FORCE_VSYNC_NXT_LINE 0x22 // D5 : Force - Vsync - next - line OTG5_IHC_FORCE_VSYNC_NEXT_LINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_FORCE_VSYNC_NXT_LINE 2 + +#define DCN_1_0__SRCID__DC_D5_OTG_EXTT_TRG_A 0x22 // D5 : OTG external trigger A OTG5_IHC_TRIGA_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_OTG_EXTT_TRG_A 3 + +#define DCN_1_0__SRCID__DC_D5_OTG_EXTT_TRG_B 0x22 // D5 : OTG external trigger B OTG5_IHC_TRIGB_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_OTG_EXTT_TRG_B 4 + +#define DCN_1_0__SRCID__DC_D5_OTG_GSL_VSYNC_GAP 0x22 // D5 : gsl_vsync_gap_interrupt_frame_delay OTG5_IHC_GSL_VSYNC_GAP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_OTG_GSL_VSYNC_GAP 5 + +#define DCN_1_0__SRCID__OTG5_VERTICAL_INTERRUPT0_CONTROL 0x22 // D5 : OTG vertical interrupt 0 OTG5_IHC_VERTICAL_INTERRUPT0 DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG5_VERTICAL_INTERRUPT0_CONTROL 6 + +#define DCN_1_0__SRCID__OTG5_VERTICAL_INTERRUPT1_CONTROL 0x22 // D5 : OTG vertical interrupt 1 OTG5_IHC_VERTICAL_INTERRUPT1 DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG5_VERTICAL_INTERRUPT1_CONTROL 7 + +#define DCN_1_0__SRCID__OTG5_VERTICAL_INTERRUPT2_CONTROL 0x22 // D5 : OTG vertical interrupt 2 OTG5_IHC_VERTICAL_INTERRUPT2 DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG5_VERTICAL_INTERRUPT2_CONTROL 8 + +#define DCN_1_0__SRCID__OTG5_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 0x22 // D5 : OTG ext sync loss interrupt OTG5_IHC_EXT_TIMING_SYNC_LOSS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG5_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 9 + +#define DCN_1_0__SRCID__OTG5_EXT_TIMING_SYNC_INTERRUPT_CONTROL 0x22 // D5 : OTG ext sync interrupt OTG5_IHC_EXT_TIMING_SYNC_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG5_EXT_TIMING_SYNC_INTERRUPT_CONTROL 10 + +#define DCN_1_0__SRCID__OTG5_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 0x22 // D5 : OTG ext sync signal interrupt OTG5_IHC_EXT_TIMING_SYNC_SIGNAL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG5_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 11 + +#define DCN_1_0__SRCID__OTG5_SET_VTOTAL_MIN_EVENT_INT 0x22 // D5 : OTG DRR event occurred interrupt OTG5_IHC_SET_V_TOTAL_MIN_EVENT_OCCURED_INT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__CTXID__OTG5_SET_VTOTAL_MIN_EVENT_INT 12 + +#define DCN_1_0__SRCID__DC_D1_VBLANK 0x23 // D1 : VBlank HUBP0_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level / Pulse +#define DCN_1_0__CTXID__DC_D1_VBLANK 0 + +#define DCN_1_0__SRCID__DC_D1_VLINE1 0x23 // D1 : Vline HUBP0_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level / Pulse +#define DCN_1_0__CTXID__DC_D1_VLINE1 1 + +#define DCN_1_0__SRCID__DC_D1_VLINE2 0x23 // D1 : Vline2 HUBP0_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level / Pulse +#define DCN_1_0__CTXID__DC_D1_VLINE2 2 + +#define DCN_1_0__SRCID__DC_D2_VBLANK 0x23 // D2 : Vblank HUBP1_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level / Pulse +#define DCN_1_0__CTXID__DC_D2_VBLANK 3 + +#define DCN_1_0__SRCID__DC_D2_VLINE1 0x23 // D2 : Vline HUBP1_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level / Pulse +#define DCN_1_0__CTXID__DC_D2_VLINE1 4 + +#define DCN_1_0__SRCID__DC_D2_VLINE2 0x23 // D2 : Vline2 HUBP1_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level / Pulse +#define DCN_1_0__CTXID__DC_D2_VLINE2 5 + +#define DCN_1_0__SRCID__HUBP0_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP0_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__HUBP0_IHC_VM_CONTEXT_ERROR 6 + +#define DCN_1_0__SRCID__HUBP1_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP1_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level +#define DCN_1_0__CTXID__HUBP1_IHC_VM_CONTEXT_ERROR 7 + +#define DCN_1_0__SRCID__HUBP2_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP2_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level +#define DCN_1_0__CTXID__HUBP2_IHC_VM_CONTEXT_ERROR 8 + +#define DCN_1_0__SRCID__HUBP3_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP3_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level +#define DCN_1_0__CTXID__HUBP3_IHC_VM_CONTEXT_ERROR 9 + +#define DCN_1_0__SRCID__HUBP4_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP4_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level +#define DCN_1_0__CTXID__HUBP4_IHC_VM_CONTEXT_ERROR 10 + +#define DCN_1_0__SRCID__HUBP5_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP5_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level +#define DCN_1_0__CTXID__HUBP5_IHC_VM_CONTEXT_ERROR 11 + +#define DCN_1_0__SRCID__HUBP6_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP6_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level +#define DCN_1_0__CTXID__HUBP6_IHC_VM_CONTEXT_ERROR 12 + +#define DCN_1_0__SRCID__HUBP7_IHC_VM_CONTEXT_ERROR 0x23 // "Reports three types of fault that may occur during memory address translation in HUBPREQ: HUBP7_IHC_VM_CONTEXT_ERROR_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level +#define DCN_1_0__CTXID__HUBP7_IHC_VM_CONTEXT_ERROR 13 + +#define DCN_1_0__SRCID__DPP0_PERFCOUNTER_INT0_STATUS 0x24 // DPP0 perfmon counter0 interrupt DPP0_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE8 Level / Pulse +#define DCN_1_0__CTXID__DPP0_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP0_PERFCOUNTER_INT1_STATUS 0x24 // DPP0 perfmon counter1 interrupt DPP0_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE8 Level +#define DCN_1_0__CTXID__DPP0_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DC_D3_VBLANK 0x24 // D3 : VBlank HUBP2_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_VBLANK 9 + +#define DCN_1_0__SRCID__DC_D3_VLINE1 0x24 // D3 : Vline HUBP2_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_VLINE1 10 + +#define DCN_1_0__SRCID__DC_D3_VLINE2 0x24 // D3 : Vline2 HUBP2_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level / Pulse +#define DCN_1_0__CTXID__DC_D3_VLINE2 11 + +#define DCN_1_0__SRCID__DC_D4_VBLANK 0x24 // D4 : Vblank HUBP3_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_VBLANK 12 + +#define DCN_1_0__SRCID__DC_D4_VLINE1 0x24 // D4 : Vline HUBP3_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_VLINE1 13 + +#define DCN_1_0__SRCID__DC_D4_VLINE2 0x24 // D4 : Vline2 HUBP3_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D4_VLINE2 14 + +#define DCN_1_0__SRCID__DPP1_PERFCOUNTER_INT0_STATUS 0x25 // DPP1 perfmon counter0 interrupt DPP1_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE8 Level / Pulse +#define DCN_1_0__CTXID__DPP1_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP1_PERFCOUNTER_INT1_STATUS 0x25 // DPP1 perfmon counter1 interrupt DPP1_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE8 Level +#define DCN_1_0__CTXID__DPP1_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DC_D5_VBLANK 0x25 // D5 : VBlank HUBP4_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_VBLANK 9 + +#define DCN_1_0__SRCID__DC_D5_VLINE1 0x25 // D5 : Vline HUBP4_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_VLINE1 10 + +#define DCN_1_0__SRCID__DC_D5_VLINE2 0x25 // D5 : Vline2 HUBP4_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D5_VLINE2 11 + +#define DCN_1_0__SRCID__DC_D6_VBLANK 0x25 // D6 : Vblank HUBP5_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_VBLANK 12 + +#define DCN_1_0__SRCID__DC_D6_VLINE1 0x25 // D6 : Vline HUBP5_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_VLINE1 13 + +#define DCN_1_0__SRCID__DC_D6_VLINE2 0x25 // D6 : Vline2 HUBP5_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_VLINE2 14 + +#define DCN_1_0__SRCID__DPP2_PERFCOUNTER_INT0_STATUS 0x26 // DPP2 perfmon counter0 interrupt DPP2_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE8 Level / Pulse +#define DCN_1_0__CTXID__DPP2_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP2_PERFCOUNTER_INT1_STATUS 0x26 // DPP2 perfmon counter1 interrupt DPP2_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE8 Level +#define DCN_1_0__CTXID__DPP2_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DC_D7_VBLANK 0x26 // D7 : VBlank HUBP6_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D7_VBLANK 9 + +#define DCN_1_0__SRCID__DC_D7_VLINE1 0x26 // D7 : Vline HUBP6_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D7_VLINE1 10 + +#define DCN_1_0__SRCID__DC_D7_VLINE2 0x26 // D7 : Vline2 HUBP6_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D7_VLINE2 11 + +#define DCN_1_0__SRCID__DC_D8_VBLANK 0x26 // D8 : Vblank HUBP7_IHC_VBLANK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D8_VBLANK 12 + +#define DCN_1_0__SRCID__DC_D8_VLINE1 0x26 // D8 : Vline HUBP7_IHC_VLINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D8_VLINE1 13 + +#define DCN_1_0__SRCID__DC_D8_VLINE2 0x26 // D8 : Vline2 HUBP7_IHC_VLINE2_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__DC_D8_VLINE2 14 + +#define DCN_1_0__SRCID__DPP3_PERFCOUNTER_INT0_STATUS 0x27 // DPP3 perfmon counter0 interrupt DPP3_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level / Pulse +#define DCN_1_0__CTXID__DPP3_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP3_PERFCOUNTER_INT1_STATUS 0x27 // DPP3 perfmon counter1 interrupt DPP3_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level +#define DCN_1_0__CTXID__DPP3_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DPP4_PERFCOUNTER_INT0_STATUS 0x28 // DPP4 perfmon counter0 interrupt DPP4_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level / Pulse +#define DCN_1_0__CTXID__DPP4_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP4_PERFCOUNTER_INT1_STATUS 0x28 // DPP4 perfmon counter1 interrupt DPP4_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level +#define DCN_1_0__CTXID__DPP4_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DPP5_PERFCOUNTER_INT0_STATUS 0x29 // DPP5 perfmon counter0 interrupt DPP5_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level / Pulse +#define DCN_1_0__CTXID__DPP5_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP5_PERFCOUNTER_INT1_STATUS 0x29 // DPP5 perfmon counter1 interrupt DPP5_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE9 Level +#define DCN_1_0__CTXID__DPP5_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DPP6_PERFCOUNTER_INT0_STATUS 0x2A // DPP6 perfmon counter0 interrupt DPP6_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE12 Level / Pulse +#define DCN_1_0__CTXID__DPP6_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP6_PERFCOUNTER_INT1_STATUS 0x2A // DPP6 perfmon counter1 interrupt DPP6_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE12 Level +#define DCN_1_0__CTXID__DPP6_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DPP7_PERFCOUNTER_INT0_STATUS 0x2B // DPP7 perfmon counter0 interrupt DPP7_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE12 Level / Pulse +#define DCN_1_0__CTXID__DPP7_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__DPP7_PERFCOUNTER_INT1_STATUS 0x2B // DPP7 perfmon counter1 interrupt DPP7_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE12 Level +#define DCN_1_0__CTXID__DPP7_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP0_PERFCOUNTER_INT0_STATUS 0x2C // HUBP0 perfmon counter0 interrupt HUBP0_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level / Pulse +#define DCN_1_0__CTXID__HUBP0_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP0_PERFCOUNTER_INT1_STATUS 0x2C // HUBP0 perfmon counter1 interrupt HUBP0_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__HUBP0_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP1_PERFCOUNTER_INT0_STATUS 0x2D // HUBP1 perfmon counter0 interrupt HUBP1_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level / Pulse +#define DCN_1_0__CTXID__HUBP1_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP1_PERFCOUNTER_INT1_STATUS 0x2D // HUBP1 perfmon counter1 interrupt HUBP1_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level +#define DCN_1_0__CTXID__HUBP1_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP2_PERFCOUNTER_INT0_STATUS 0x2E // HUBP2 perfmon counter0 interrupt HUBP2_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level / Pulse +#define DCN_1_0__CTXID__HUBP2_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP2_PERFCOUNTER_INT1_STATUS 0x2E // HUBP2 perfmon counter1 interrupt HUBP2_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level +#define DCN_1_0__CTXID__HUBP2_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP3_PERFCOUNTER_INT0_STATUS 0x2F // HUBP3 perfmon counter0 interrupt HUBP3_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level / Pulse +#define DCN_1_0__CTXID__HUBP3_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP3_PERFCOUNTER_INT1_STATUS 0x2F // HUBP3 perfmon counter1 interrupt HUBP3_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE14 Level +#define DCN_1_0__CTXID__HUBP3_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP4_PERFCOUNTER_INT0_STATUS 0x30 // HUBP4 perfmon counter0 interrupt HUBP4_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level / Pulse +#define DCN_1_0__CTXID__HUBP4_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP4_PERFCOUNTER_INT1_STATUS 0x30 // HUBP4 perfmon counter1 interrupt HUBP4_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level +#define DCN_1_0__CTXID__HUBP4_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP5_PERFCOUNTER_INT0_STATUS 0x31 // HUBP5 perfmon counter0 interrupt HUBP5_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level / Pulse +#define DCN_1_0__CTXID__HUBP5_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP5_PERFCOUNTER_INT1_STATUS 0x31 // HUBP5 perfmon counter1 interrupt HUBP5_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level +#define DCN_1_0__CTXID__HUBP5_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP6_PERFCOUNTER_INT0_STATUS 0x32 // HUBP6 perfmon counter0 interrupt HUBP6_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level / Pulse +#define DCN_1_0__CTXID__HUBP6_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP6_PERFCOUNTER_INT1_STATUS 0x32 // HUBP6 perfmon counter1 interrupt HUBP6_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE15 Level +#define DCN_1_0__CTXID__HUBP6_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBP7_PERFCOUNTER_INT0_STATUS 0x33 // HUBP7 perfmon counter0 interrupt HUBP7_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level / Pulse +#define DCN_1_0__CTXID__HUBP7_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBP7_PERFCOUNTER_INT1_STATUS 0x33 // HUBP7 perfmon counter1 interrupt HUBP7_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE16 Level +#define DCN_1_0__CTXID__HUBP7_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__WB1_PERFCOUNTER_INT0_STATUS 0x34 // WB1 perfmon counter0 interrupt WB1_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level / Pulse +#define DCN_1_0__CTXID__WB1_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__WB1_PERFCOUNTER_INT1_STATUS 0x34 // WB1 perfmon counter1 interrupt WB1_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE11 Level +#define DCN_1_0__CTXID__WB1_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__HUBBUB_PERFCOUNTER_INT0_STATUS 0x35 // HUBBUB perfmon counter0 interrupt HUBBUB_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level / Pulse +#define DCN_1_0__CTXID__HUBBUB_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__HUBBUB_PERFCOUNTER_INT1_STATUS 0x35 // HUBBUB perfmon counter1 interrupt HUBBUB_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE13 Level +#define DCN_1_0__CTXID__HUBBUB_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__MPC_PERFCOUNTER_INT0_STATUS 0x36 // MPC perfmon counter0 interrupt MPC_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE12 Level / Pulse +#define DCN_1_0__CTXID__MPC_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__MPC_PERFCOUNTER_INT1_STATUS 0x36 // MPC perfmon counter1 interrupt MPC_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE12 Level +#define DCN_1_0__CTXID__MPC_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__OPP_PERFCOUNTER_INT0_STATUS 0x37 // OPP perfmon counter0 interrupt OPP_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__CTXID__OPP_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__OPP_PERFCOUNTER_INT1_STATUS 0x37 // OPP perfmon counter1 interrupt OPP_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level +#define DCN_1_0__CTXID__OPP_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DC_D6_OTG_SNAPSHOT 0x38 // D6: OTG snapshot OTG6_IHC_SNAPSHOT_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_OTG_SNAPSHOT 0 + +#define DCN_1_0__SRCID__DC_D6_FORCE_CNT_W 0x38 // D6 : Force - count--w OTG6_IHC_FORCE_COUNT_NOW_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_FORCE_CNT_W 1 + +#define DCN_1_0__SRCID__DC_D6_FORCE_VSYNC_NXT_LINE 0x38 // D6 : Force - Vsync - next - line OTG6_IHC_FORCE_VSYNC_NEXT_LINE_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_FORCE_VSYNC_NXT_LINE 2 + +#define DCN_1_0__SRCID__DC_D6_OTG_EXTT_TRG_A 0x38 // D6 : OTG external trigger A OTG6_IHC_TRIGA_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_OTG_EXTT_TRG_A 3 + +#define DCN_1_0__SRCID__DC_D6_OTG_EXTT_TRG_B 0x38 // D6 : OTG external trigger B OTG6_IHC_TRIGB_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_OTG_EXTT_TRG_B 4 + +#define DCN_1_0__SRCID__DC_D6_OTG_GSL_VSYNC_GAP 0x38 // D6 : gsl_vsync_gap_interrupt_frame_delay OTG6_IHC_GSL_VSYNC_GAP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__CTXID__DC_D6_OTG_GSL_VSYNC_GAP 5 + +#define DCN_1_0__SRCID__OTG6_VERTICAL_INTERRUPT0_CONTROL 0x38 // D6 : OTG vertical interrupt 0 OTG6_IHC_VERTICAL_INTERRUPT0 DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG6_VERTICAL_INTERRUPT0_CONTROL 6 + +#define DCN_1_0__SRCID__OTG6_VERTICAL_INTERRUPT1_CONTROL 0x38 // D6 : OTG vertical interrupt 1 OTG6_IHC_VERTICAL_INTERRUPT1 DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG6_VERTICAL_INTERRUPT1_CONTROL 7 + +#define DCN_1_0__SRCID__OTG6_VERTICAL_INTERRUPT2_CONTROL 0x38 // D6 : OTG vertical interrupt 2 OTG6_IHC_VERTICAL_INTERRUPT2 DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG6_VERTICAL_INTERRUPT2_CONTROL 8 + +#define DCN_1_0__SRCID__OTG6_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 0x38 // D6 : OTG ext sync loss interrupt OTG6_IHC_EXT_TIMING_SYNC_LOSS_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG6_EXT_TIMING_SYNC_LOSS_INTERRUPT_CONTROL 9 + +#define DCN_1_0__SRCID__OTG6_EXT_TIMING_SYNC_INTERRUPT_CONTROL 0x38 // D6 : OTG ext sync interrupt OTG6_IHC_EXT_TIMING_SYNC_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG6_EXT_TIMING_SYNC_INTERRUPT_CONTROL 10 + +#define DCN_1_0__SRCID__OTG6_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 0x38 // D6 : OTG ext sync signal interrupt OTG6_IHC_EXT_TIMING_SYNC_SIGNAL_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG6_EXT_TIMING_SYNC_SIGNAL_INTERRUPT_CONTROL 11 + +#define DCN_1_0__SRCID__OTG6_SET_VTOTAL_MIN_EVENT_INT 0x38 // D : OTG DRR event occurred interrupt OTG6_IHC_SET_V_TOTAL_MIN_EVENT_OCCURED_INT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse +#define DCN_1_0__CTXID__OTG6_SET_VTOTAL_MIN_EVENT_INT 12 + +#define DCN_1_0__SRCID__OPTC_PERFCOUNTER_INT0_STATUS 0x39 // OPTC perfmon counter0 interrupt OPTC_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__CTXID__OPTC_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__OPTC_PERFCOUNTER_INT1_STATUS 0x39 // OPTC perfmon counter1 interrupt OPTC_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level +#define DCN_1_0__CTXID__OPTC_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__MMHUBBUB_PERFCOUNTER_INT0_STATUS 0x3A // MMHUBBUB perfmon counter0 interrupt MMHUBBUB_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__CTXID__MMHUBBUB_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__MMHUBBUB_PERFCOUNTER_INT1_STATUS 0x3A // MMHUBBUB perfmon counter1 interrupt MMHUBBUB_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level +#define DCN_1_0__CTXID__MMHUBBUB_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__AZ_PERFCOUNTER_INT0_STATUS 0x3B // AZ perfmon counter0 interrupt AZ_PERFMON_COUNTER0_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level / Pulse +#define DCN_1_0__CTXID__AZ_PERFCOUNTER_INT0_STATUS 0 + +#define DCN_1_0__SRCID__AZ_PERFCOUNTER_INT1_STATUS 0x3B // AZ perfmon counter1 interrupt AZ_PERFMON_COUNTER1_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE18 Level +#define DCN_1_0__CTXID__AZ_PERFCOUNTER_INT1_STATUS 1 + +#define DCN_1_0__SRCID__DC_D1_OTG_VSTARTUP 0x3C // "OTG0 VSTARTUP event occurred interrupt, VSTARTUP event indicates a start of new frame" OTG1_IHC_VSTARTUP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D2_OTG_VSTARTUP 0x3D // "OTG1 VSTARTUP event occurred interrupt, VSTARTUP event indicates a start of new frame" OTG2_IHC_VSTARTUP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D3_OTG_VSTARTUP 0x3E // "OTG2 VSTARTUP event occurred interrupt, VSTARTUP event indicates a start of new frame" OTG3_IHC_VSTARTUP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D4_OTG_VSTARTUP 0x3F // "OTG3 VSTARTUP event occurred interrupt, VSTARTUP event indicates a start of new frame" OTG4_IHC_VSTARTUP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D5_OTG_VSTARTUP 0x40 // "OTG4 VSTARTUP event occurred interrupt, VSTARTUP event indicates a start of new frame" OTG5_IHC_VSTARTUP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D6_OTG_VSTARTUP 0x41 // "OTG5 VSTARTUP event occurred interrupt, VSTARTUP event indicates a start of new frame" OTG6_IHC_VSTARTUP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse + +#define DCN_1_0__SRCID__DC_D1_OTG_VREADY 0x42 // "OTG0 VREADY event occurred interrupt, VREADY event, VREADY event indicates the time DCHUB can start to request data for new frame" OTG1_IHC_VREADY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D2_OTG_VREADY 0x43 // "OTG1 VREADY event occurred interrupt, VREADY event, VREADY event indicates the time DCHUB can start to request data for new frame" OTG2_IHC_VREADY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D3_OTG_VREADY 0x44 // "OTG2 VREADY event occurred interrupt, VREADY event, VREADY event indicates the time DCHUB can start to request data for new frame" OTG3_IHC_VREADY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D4_OTG_VREADY 0x45 // "OTG3 VREADY event occurred interrupt, VREADY event, VREADY event indicates the time DCHUB can start to request data for new frame" OTG4_IHC_VREADY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D5_OTG_VREADY 0x46 // "OTG4 VREADY event occurred interrupt, VREADY event, VREADY event indicates the time DCHUB can start to request data for new frame" OTG5_IHC_VREADY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse +#define DCN_1_0__SRCID__DC_D6_OTG_VREADY 0x47 // "OTG5 VREADY event occurred interrupt, VREADY event, VREADY event indicates the time DCHUB can start to request data for new frame" OTG6_IHC_VREADY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE20 Level / Pulse + +#define DCN_1_0__SRCID__OTG0_VSYNC_NOM 0x48 // OTG0 vsync nom interrupt OTG1_IHC_VSYNC_NOM_INTERRUPT DISP_INTERRUPT_STATUS Level / Pulse +#define DCN_1_0__SRCID__OTG1_VSYNC_NOM 0x49 // OTG1 vsync nom interrupt OTG2_IHC_VSYNC_NOM_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE Level / Pulse +#define DCN_1_0__SRCID__OTG2_VSYNC_NOM 0x4A // OTG2 vsync nom interrupt OTG3_IHC_VSYNC_NOM_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE2 Level / Pulse +#define DCN_1_0__SRCID__OTG3_VSYNC_NOM 0x4B // OTG3 vsync nom interrupt OTG4_IHC_VSYNC_NOM_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE3 Level / Pulse +#define DCN_1_0__SRCID__OTG4_VSYNC_NOM 0x4C // OTG4 vsync nom interrupt OTG5_IHC_VSYNC_NOM_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE4 Level / Pulse +#define DCN_1_0__SRCID__OTG5_VSYNC_NOM 0x4D // OTG5 vsync nom interrupt OTG6_IHC_VSYNC_NOM_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE5 Level / Pulse + +#define DCN_1_0__SRCID__DCPG_DCFE8_POWER_UP_INT 0x4E // Display pipe0 power up interrupt DCPG_IHC_DOMAIN8_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE8_POWER_UP_INT 0 + +#define DCN_1_0__SRCID__DCPG_DCFE9_POWER_UP_INT 0x4E // Display pipe1 power up interrupt DCPG_IHC_DOMAIN9_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE9_POWER_UP_INT 1 + +#define DCN_1_0__SRCID__DCPG_DCFE10_POWER_UP_INT 0x4E // Display pipe2 power up interrupt DCPG_IHC_DOMAIN10_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE10_POWER_UP_INT 2 + +#define DCN_1_0__SRCID__DCPG_DCFE11_POWER_UP_INT 0x4E // Display pipe3 power up interrupt DCPG_IHC_DOMAIN11_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE11_POWER_UP_INT 3 + +#define DCN_1_0__SRCID__DCPG_DCFE12_POWER_UP_INT 0x4E // Display pipe4 power up interrupt DCPG_IHC_DOMAIN12_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE12_POWER_UP_INT 4 + +#define DCN_1_0__SRCID__DCPG_DCFE13_POWER_UP_INT 0x4E // Display pipe5 power up interrupt DCPG_IHC_DOMAIN13_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE13_POWER_UP_INT 5 + +#define DCN_1_0__SRCID__DCPG_DCFE14_POWER_UP_INT 0x4E // Display pipe6 power up interrupt DCPG_IHC_DOMAIN14_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE14_POWER_UP_INT 6 + +#define DCN_1_0__SRCID__DCPG_DCFE15_POWER_UP_INT 0x4E // Display pipe7 power up interrupt DCPG_IHC_DOMAIN15_POWER_UP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE15_POWER_UP_INT 7 + +#define DCN_1_0__SRCID__DCPG_DCFE8_POWER_DOWN_INT 0x4E // Display pipe0 power down interrupt DCPG_IHC_DOMAIN8_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE8_POWER_DOWN_INT 8 + +#define DCN_1_0__SRCID__DCPG_DCFE9_POWER_DOWN_INT 0x4E // Display pipe1 power down interrupt DCPG_IHC_DOMAIN9_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE9_POWER_DOWN_INT 9 + +#define DCN_1_0__SRCID__DCPG_DCFE10_POWER_DOWN_INT 0x4E // Display pipe2 power down interrupt DCPG_IHC_DOMAIN10_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE10_POWER_DOWN_INT 10 + +#define DCN_1_0__SRCID__DCPG_DCFE11_POWER_DOWN_INT 0x4E // Display pipe3 power down interrupt DCPG_IHC_DOMAIN11_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE11_POWER_DOWN_INT 11 + +#define DCN_1_0__SRCID__DCPG_DCFE12_POWER_DOWN_INT 0x4E // Display pipe4 power down interrupt DCPG_IHC_DOMAIN12_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE12_POWER_DOWN_INT 12 + +#define DCN_1_0__SRCID__DCPG_DCFE13_POWER_DOWN_INT 0x4E // Display pipe5 power down interrupt DCPG_IHC_DOMAIN13_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE13_POWER_DOWN_INT 13 + +#define DCN_1_0__SRCID__DCPG_DCFE14_POWER_DOWN_INT 0x4E // Display pipe6 power down interrupt DCPG_IHC_DOMAIN14_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE14_POWER_DOWN_INT 14 + +#define DCN_1_0__SRCID__DCPG_DCFE15_POWER_DOWN_INT 0x4E // Display pipe7 power down interrupt DCPG_IHC_DOMAIN15_POWER_DOWN_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level +#define DCN_1_0__CTXID__DCPG_DCFE15_POWER_DOWN_INT 15 + +#define DCN_1_0__SRCID__HUBP0_FLIP_INTERRUPT 0x4F // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP0_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP1_FLIP_INTERRUPT 0x50 // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP1_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP2_FLIP_INTERRUPT 0x51 // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP2_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP3_FLIP_INTERRUPT 0x52 // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP3_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP4_FLIP_INTERRUPT 0x53 // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP4_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP5_FLIP_INTERRUPT 0x54 // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP5_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP6_FLIP_INTERRUPT 0x55 // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP6_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP7_FLIP_INTERRUPT 0x56 // Flip interrupt is generated when flip request is accepted by flip logic and surface is flipped from old surface to new surface.HUBP7_IHC_FLIP_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse + +#define DCN_1_0__SRCID__OTG0_IHC_V_UPDATE_NO_LOCK_INTERRUPT 0x57 // "OTG0 VUPDATE event without lock interrupt, VUPDATE is update event for double buffered registers" OTG0_IHC_V_UPDATE_NO_LOCK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level / Pulse +#define DCN_1_0__SRCID__OTG1_IHC_V_UPDATE_NO_LOCK_INTERRUPT 0x58 // "OTG1 VUPDATE event without lock interrupt, VUPDATE is update event for double buffered registers" OTG1_IHC_V_UPDATE_NO_LOCK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level / Pulse +#define DCN_1_0__SRCID__OTG2_IHC_V_UPDATE_NO_LOCK_INTERRUPT 0x59 // "OTG2 VUPDATE event without lock interrupt, VUPDATE is update event for double buffered registers" OTG2_IHC_V_UPDATE_NO_LOCK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level / Pulse +#define DCN_1_0__SRCID__OTG3_IHC_V_UPDATE_NO_LOCK_INTERRUPT 0x5A // "OTG3 VUPDATE event without lock interrupt, VUPDATE is update event for double buffered registers" OTG3_IHC_V_UPDATE_NO_LOCK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level / Pulse +#define DCN_1_0__SRCID__OTG4_IHC_V_UPDATE_NO_LOCK_INTERRUPT 0x5B // "OTG4 VUPDATE event without lock interrupt, VUPDATE is update event for double buffered registers" OTG4_IHC_V_UPDATE_NO_LOCK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level / Pulse +#define DCN_1_0__SRCID__OTG5_IHC_V_UPDATE_NO_LOCK_INTERRUPT 0x5C // "OTG5 VUPDATE event without lock interrupt, VUPDATE is update event for double buffered registers" OTG5_IHC_V_UPDATE_NO_LOCK_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE22 Level / Pulse + +#define DCN_1_0__SRCID__HUBP0_FLIP_AWAY_INTERRUPT 0x5D // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP0_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP1_FLIP_AWAY_INTERRUPT 0x5E // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP1_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP2_FLIP_AWAY_INTERRUPT 0x5F // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP2_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP3_FLIP_AWAY_INTERRUPT 0x60 // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP3_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP4_FLIP_AWAY_INTERRUPT 0x61 // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP4_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP5_FLIP_AWAY_INTERRUPT 0x62 // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP5_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP6_FLIP_AWAY_INTERRUPT 0x63 // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP6_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse +#define DCN_1_0__SRCID__HUBP7_FLIP_AWAY_INTERRUPT 0x64 // Flip_away interrupt is generated when all data for old surface is returned and old surface is not used again after the surface flip.HUBP7_IHC_FLIP_AWAY_INTERRUPT DISP_INTERRUPT_STATUS_CONTINUE17 Level / Pulse + + +#endif // __IRQSRCS_DCN_1_0_H__
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx