Add DC support for Renoir
cover Add DC support for Renoir
This patch set adds initial DC display support for Renoir. Renoir is a new APU.
I have omitted the register patch due to size. The full tree is available here:
https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next-renoir-dc
Bhawanpreet Lakha (20):
drm/amd/display: Add Renoir registers (v3) drm/amd/display: Add Renoir clock registers list drm/amd/display: Add Renoir hw_seq register list drm/amd/display: Add pp_smu functions for Renoir drm/amd/display: Add Renoir irq_services drm/amd/display: Add hubp block for Renoir (v2) drm/amd/display: Add Renoir hubbub registers list drm/amd/display: Add Renoir Hubbub (v2) drm/amd/display: Add Renoir clock manager drm/amd/display: Add Renoir resource (v2) drm/amd/display: Add Renoir GPIO drm/amd/display: Add Renoir DML drm/amd/display: Fix register names drm/amd/display: Handle Renoir in DC drm/amd/display: Handle Renoir in amdgpu_dm (v2) drm/amd/display: call update_bw_bounding_box drm/amd/display: add dal_asic_id for renoir drm/amd/display: add dcn21 core DC changes drm/amd/display: build dcn21 blocks drm/amd/display: add Renoir to kconfig
Roman Li (3):
drm/amd/display: Correct order of RV family clk managers for Renoir drm/amd/display: Add DCN2.1 changes to DML
drm/amdgpu: Enable DC on Renoir
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 + drivers/gpu/drm/amd/amdgpu/soc15.c | 6 + drivers/gpu/drm/amd/display/Kconfig | 8 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 + drivers/gpu/drm/amd/display/dc/Makefile | 3 + .../display/dc/bios/command_table_helper2.c | 5 + .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 10 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 9 + .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 590 + .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 39 + .../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 200 + .../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h | 40 + drivers/gpu/drm/amd/display/dc/core/dc.c | 5 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 12 + drivers/gpu/drm/amd/display/dc/dc.h | 3 + .../drm/amd/display/dc/dce/dce_clock_source.h | 17 + .../gpu/drm/amd/display/dc/dce/dce_hwseq.h | 97 + .../drm/amd/display/dc/dcn10/dcn10_hubbub.h | 73 + .../drm/amd/display/dc/dcn20/dcn20_hubbub.h | 10 + .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 35 + drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 10 + .../drm/amd/display/dc/dcn21/dcn21_hubbub.c | 595 + .../drm/amd/display/dc/dcn21/dcn21_hubbub.h | 132 + .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 244 + .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h | 133 + .../drm/amd/display/dc/dcn21/dcn21_resource.c | 1680 + .../drm/amd/display/dc/dcn21/dcn21_resource.h | 45 + drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 47 + drivers/gpu/drm/amd/display/dc/dml/Makefile | 8 + .../dc/dml/dcn21/display_mode_vba_21.c | 6123 ++ .../dc/dml/dcn21/display_mode_vba_21.h | 32 + .../dc/dml/dcn21/display_rq_dlg_calc_21.c | 1823 + .../dc/dml/dcn21/display_rq_dlg_calc_21.h | 73 + .../drm/amd/display/dc/dml/display_mode_lib.c | 19 + .../drm/amd/display/dc/dml/display_mode_lib.h | 3 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 7 + .../display/dc/gpio/dcn21/hw_factory_dcn21.c | 210 + .../display/dc/gpio/dcn21/hw_factory_dcn21.h | 33 + .../dc/gpio/dcn21/hw_translate_dcn21.c | 386 + .../dc/gpio/dcn21/hw_translate_dcn21.h | 35 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 8 + .../drm/amd/display/dc/gpio/hw_translate.c | 8 + .../gpu/drm/amd/display/dc/inc/core_types.h | 8 + .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 125 + .../gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + .../display/dc/irq/dcn21/irq_service_dcn21.c | 372 + .../display/dc/irq/dcn21/irq_service_dcn21.h | 34 + .../gpu/drm/amd/display/include/dal_asic_id.h | 5 + .../gpu/drm/amd/display/include/dal_types.h | 3 + .../include/asic_reg/clk/clk_10_0_2_offset.h | 56 + .../include/asic_reg/clk/clk_10_0_2_sh_mask.h | 73 + .../include/asic_reg/dcn/dcn_2_1_0_offset.h | 13862 ++++ .../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h | 56638 ++++++++++++++++ .../include/asic_reg/dcn/dpcs_2_1_0_offset.h | 565 + .../include/asic_reg/dcn/dpcs_2_1_0_sh_mask.h | 3430 + .../gpu/drm/amd/include/renoir_ip_offset.h | 1364 + 58 files changed, 89383 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.h create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_10_0_2_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_10_0_2_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_1_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_1_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dpcs_2_1_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dpcs_2_1_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/renoir_ip_offset.h
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190828195622.28941-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/23 drm/amd/display: Add Renoir clock registers list
From: Bhawanpreet Lakha <[email protected]>
--- .../drm/amd/display/dc/dce/dce_clock_source.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.h +17 -0
@@ -78,6 +78,23 @@ SRII(PIXEL_RATE_CNTL, OTG, 5)#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#define CS_COMMON_REG_LIST_DCN2_1 (index, pllid) \ + SRI(PIXCLK_RESYNC_CNTL, PHYPLL, pllid),\ + SRII(PHASE, DP_DTO, 0),\ + SRII(PHASE, DP_DTO, 1),\ + SRII(PHASE, DP_DTO, 2),\ + SRII(PHASE, DP_DTO, 3),\ + SRII(MODULO, DP_DTO, 0),\ + SRII(MODULO, DP_DTO, 1),\ + SRII(MODULO, DP_DTO, 2),\ + SRII(MODULO, DP_DTO, 3),\ + SRII(PIXEL_RATE_CNTL, OTG, 0),\ + SRII(PIXEL_RATE_CNTL, OTG, 1),\ + SRII(PIXEL_RATE_CNTL, OTG, 2),\ + SRII(PIXEL_RATE_CNTL, OTG, 3) +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_0 )#define CS_COMMON_MASK_SH_LIST_DCN2_0 (mask_sh)\ CS_SF(DP_DTO0_PHASE, DP_DTO0_PHASE, mask_sh),\
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/23 drm/amd/display: Add Renoir hw_seq register list
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
--- .../gpu/drm/amd/display/dc/dce/dce_hwseq.h | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+)
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +97 -0
@@ -278,6 +278,59 @@ BL_REG_LIST()#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#define HWSEQ_DCN21_REG_LIST ()\ + HWSEQ_DCN_REG_LIST(), \ + HSWEQ_DCN_PIXEL_RATE_REG_LIST(OTG, 0), \ + HSWEQ_DCN_PIXEL_RATE_REG_LIST(OTG, 1), \ + HSWEQ_DCN_PIXEL_RATE_REG_LIST(OTG, 2), \ + HSWEQ_DCN_PIXEL_RATE_REG_LIST(OTG, 3), \ + MMHUB_DCN_REG_LIST(), \ + SR(MICROSECOND_TIME_BASE_DIV), \ + SR(MILLISECOND_TIME_BASE_DIV), \ + SR(DISPCLK_FREQ_CHANGE_CNTL), \ + SR(RBBMIF_TIMEOUT_DIS), \ + SR(RBBMIF_TIMEOUT_DIS_2), \ + SR(DCHUBBUB_CRC_CTRL), \ + SR(DPP_TOP0_DPP_CRC_CTRL), \ + SR(DPP_TOP0_DPP_CRC_VAL_B_A), \ + SR(DPP_TOP0_DPP_CRC_VAL_R_G), \ + SR(MPC_CRC_CTRL), \ + SR(MPC_CRC_RESULT_GB), \ + SR(MPC_CRC_RESULT_C), \ + SR(MPC_CRC_RESULT_AR), \ + SR(DOMAIN0_PG_CONFIG), \ + SR(DOMAIN1_PG_CONFIG), \ + SR(DOMAIN2_PG_CONFIG), \ + SR(DOMAIN3_PG_CONFIG), \ + SR(DOMAIN4_PG_CONFIG), \ + SR(DOMAIN5_PG_CONFIG), \ + SR(DOMAIN6_PG_CONFIG), \ + SR(DOMAIN7_PG_CONFIG), \ + SR(DOMAIN16_PG_CONFIG), \ + SR(DOMAIN17_PG_CONFIG), \ + SR(DOMAIN18_PG_CONFIG), \ + SR(DOMAIN0_PG_STATUS), \ + SR(DOMAIN1_PG_STATUS), \ + SR(DOMAIN2_PG_STATUS), \ + SR(DOMAIN3_PG_STATUS), \ + SR(DOMAIN4_PG_STATUS), \ + SR(DOMAIN5_PG_STATUS), \ + SR(DOMAIN6_PG_STATUS), \ + SR(DOMAIN7_PG_STATUS), \ + SR(DOMAIN16_PG_STATUS), \ + SR(DOMAIN17_PG_STATUS), \ + SR(DOMAIN18_PG_STATUS), \ + SR(D1VGA_CONTROL), \ + SR(D2VGA_CONTROL), \ + SR(D3VGA_CONTROL), \ + SR(D4VGA_CONTROL), \ + SR(D5VGA_CONTROL), \ + SR(D6VGA_CONTROL), \ + SR(DC_IP_REQUEST_CNTL), \ + BL_REG_LIST() +#endif +struct dce_hwseq_registers {/* Backlight registers */
@@ -586,6 +639,50 @@ struct dce_hwseq_registers { HWSEQ_LVTMA_MASK_SH_LIST(mask_sh)#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#define HWSEQ_DCN21_MASK_SH_LIST (mask_sh)\ + HWSEQ_DCN_MASK_SH_LIST(mask_sh), \ + HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL, DCHUBBUB_GLOBAL_TIMER_REFDIV, mask_sh), \ + HWS_SF(, VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32, PAGE_DIRECTORY_ENTRY_HI32, mask_sh),\ + HWS_SF(, VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, PAGE_DIRECTORY_ENTRY_LO32, mask_sh),\ + HWS_SF(, DOMAIN0_PG_CONFIG, DOMAIN0_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN0_PG_CONFIG, DOMAIN0_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN1_PG_CONFIG, DOMAIN1_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN1_PG_CONFIG, DOMAIN1_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN2_PG_CONFIG, DOMAIN2_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN2_PG_CONFIG, DOMAIN2_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN3_PG_CONFIG, DOMAIN3_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN3_PG_CONFIG, DOMAIN3_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN4_PG_CONFIG, DOMAIN4_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN4_PG_CONFIG, DOMAIN4_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN5_PG_CONFIG, DOMAIN5_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN5_PG_CONFIG, DOMAIN5_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN6_PG_CONFIG, DOMAIN6_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN6_PG_CONFIG, DOMAIN6_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN7_PG_CONFIG, DOMAIN7_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN7_PG_CONFIG, DOMAIN7_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN16_PG_CONFIG, DOMAIN16_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN16_PG_CONFIG, DOMAIN16_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN17_PG_CONFIG, DOMAIN17_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN17_PG_CONFIG, DOMAIN17_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN18_PG_CONFIG, DOMAIN18_POWER_FORCEON, mask_sh), \ + HWS_SF(, DOMAIN18_PG_CONFIG, DOMAIN18_POWER_GATE, mask_sh), \ + HWS_SF(, DOMAIN0_PG_STATUS, DOMAIN0_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN1_PG_STATUS, DOMAIN1_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN2_PG_STATUS, DOMAIN2_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN3_PG_STATUS, DOMAIN3_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN4_PG_STATUS, DOMAIN4_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN5_PG_STATUS, DOMAIN5_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN6_PG_STATUS, DOMAIN6_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN16_PG_STATUS, DOMAIN16_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN17_PG_STATUS, DOMAIN17_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DOMAIN18_PG_STATUS, DOMAIN18_PGFSM_PWR_STATUS, mask_sh), \ + HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \ + HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \ + HWS_SF(, LVTMA_PWRSEQ_STATE, LVTMA_PWRSEQ_TARGET_STATE_R, mask_sh) +#endif +#define HWSEQ_REG_FIELD_LIST (type) \ type DCFE_CLOCK_ENABLE; \ type DCFEV_CLOCK_ENABLE; \
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/23 drm/amd/display: Add pp_smu functions for Renoir
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
This defines the interface for communicating requirements between DC and powerplay.
--- drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+)
drivers/gpu/drm/amd/display/dc/dm_pp_smu.h +47 -0
@@ -44,6 +44,9 @@ enum pp_smu_ver {#ifndef CONFIG_TRIM_DRM_AMD_DC_DCN2_0 PP_SMU_VER_NV,#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +PP_SMU_VER_RN , +#endifPP_SMU_VER_MAX };
@@ -246,6 +249,47 @@ struct pp_smu_funcs_nv { };#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) + +#define PP_SMU_NUM_SOCCLK_DPM_LEVELS 8 +#define PP_SMU_NUM_DCFCLK_DPM_LEVELS 4 +#define PP_SMU_NUM_FCLK_DPM_LEVELS 4 +#define PP_SMU_NUM_MEMCLK_DPM_LEVELS 4 + +struct dpm_clock { +uint32_t Freq;// In MHz +uint32_t Vol;// Millivolts with 2 fractional bits +}; + + +/* this is a copy of the structure defined in smuxx_driver_if.h*/ +struct dpm_clocks { +struct dpm_clock DcfClocks[PP_SMU_NUM_DCFCLK_DPM_LEVELS ]; +struct dpm_clock SocClocks[PP_SMU_NUM_SOCCLK_DPM_LEVELS ]; +struct dpm_clock FClocks[PP_SMU_NUM_FCLK_DPM_LEVELS ]; +struct dpm_clock MemClocks[PP_SMU_NUM_MEMCLK_DPM_LEVELS ]; +}; + + +struct pp_smu_funcs_rn { +struct pp_smu pp_smu; + +/* +* reader and writer WM's are sent together as part of one table +* +* PPSMC_MSG_SetDriverDramAddrHigh +* PPSMC_MSG_SetDriverDramAddrLow +* PPSMC_MSG_TransferTableDram2Smu +* +*/ +enum pp_smu_status (*set_wm_ranges)(struct pp_smu *pp, +struct pp_smu_wm_range_sets *ranges); + +enum pp_smu_status (*get_dpm_clock_table) (struct pp_smu *pp, +struct dpm_clocks *clock_table); +}; +#endif +struct pp_smu_funcs {struct pp_smu ctx;union {
@@ -253,6 +297,9 @@ struct pp_smu_funcs {#ifndef CONFIG_TRIM_DRM_AMD_DC_DCN2_0 struct pp_smu_funcs_nv nv_funcs;#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +struct pp_smu_funcs_rn rn_funcs; +#endif }; };
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/23 drm/amd/display: Add Renoir irq_services
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Provides the interface to configure display interrrupts on renoir.
--- drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + .../display/dc/irq/dcn21/irq_service_dcn21.c | 372 ++++++++++++++++++ .../display/dc/irq/dcn21/irq_service_dcn21.h | 34 ++ 3 files changed, 416 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.h
drivers/gpu/drm/amd/display/dc/irq/Makefile +10 -0
@@ -77,3 +77,13 @@ AMD_DAL_IRQ_DCN2 = $(addprefix $(AMDDALPATH)/dc/irq/dcn20/,$(IRQ_DCN2)) AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCN2) endif +############################################################################### +# DCN 21 +############################################################################### +ifdef CONFIG_DRM_AMD_DC_DCN2_1 +IRQ_DCN21 = irq_service_dcn21.o + +AMD_DAL_IRQ_DCN21= $(addprefix $(AMDDALPATH)/dc/irq/dcn21/,$(IRQ_DCN21)) + +AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCN21) +endif
drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c new file +372 -0
372 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright 2018 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef __DAL_IRQ_SERVICE_DCN21_H__ +#define __DAL_IRQ_SERVICE_DCN21_H__ + +#include "../irq_service.h" + +struct irq_service *dal_irq_service_dcn21_create ( +struct irq_service_init_data *init_data); + +#endif
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/23 drm/amd/display: Add hubp block for Renoir (v2)
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
This provides the interface to memory for the display hw.
v2: minor cleanup (Alex)
--- drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 10 + .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 244 ++++++++++++++++++ .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h | 133 ++++++++++ 3 files changed, 387 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h
drivers/gpu/drm/amd/display/dc/dcn21/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# +# Makefile for DCN21. + +DCN21 = dcn21_hubp.o + +CFLAGS_dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4 + +AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21)) + +AMD_DISPLAY_FILES += $(AMD_DAL_DCN21)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c new file +244 -0
244 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h new file +133 -0
133 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/23 drm/amd/display: Add Renoir hubbub registers list
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
--- .../drm/amd/display/dc/dcn10/dcn10_hubbub.h | 73 +++++++++++++++++++ .../drm/amd/display/dc/dcn20/dcn20_hubbub.h | 10 +++ .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 35 +++++++++ 3 files changed, 118 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h +73 -0
@@ -121,6 +121,26 @@ struct dcn_hubbub_registers {uint32_t DCN_VM_AGP_BASE ;uint32_t DCN_VM_PROTECTION_FAULT_DEFAULT_ADDR_MSB ;uint32_t DCN_VM_PROTECTION_FAULT_DEFAULT_ADDR_LSB ; +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_NOM_A ; +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_NOM_B ; +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_NOM_C ; +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_NOM_D ; +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_FLIP_A ; +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_FLIP_B ; +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_FLIP_C ; +uint32_t DCHUBBUB_ARB_FRAC_URG_BW_FLIP_D ; +uint32_t DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_A ; +uint32_t DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_B ; +uint32_t DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_C ; +uint32_t DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_D ; +uint32_t DCHUBBUB_ARB_HOSTVM_CNTL ; +uint32_t DCHVM_CTRL0 ; +uint32_t DCHVM_MEM_CTRL ; +uint32_t DCHVM_CLK_CTRL ; +uint32_t DCHVM_RIOMMU_CTRL0 ; +uint32_t DCHVM_RIOMMU_STAT0 ; +#endif };/* set field name */
@@ -212,15 +232,68 @@ struct dcn_hubbub_registers {type DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_C ;\ type DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_D +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#define HUBBUB_HVM_REG_FIELD_LIST (type) \ + type DCHUBBUB_ARB_MIN_REQ_OUTSTAND_COMMIT_THRESHOLD;\ + type DCHUBBUB_ARB_VM_ROW_URGENCY_WATERMARK_A;\ + type DCHUBBUB_ARB_VM_ROW_URGENCY_WATERMARK_B;\ + type DCHUBBUB_ARB_VM_ROW_URGENCY_WATERMARK_C;\ + type DCHUBBUB_ARB_VM_ROW_URGENCY_WATERMARK_D;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_ENTER_WATERMARK_A;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_ENTER_WATERMARK_B;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_ENTER_WATERMARK_C;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_ENTER_WATERMARK_D;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_EXIT_WATERMARK_A;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_EXIT_WATERMARK_B;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_EXIT_WATERMARK_C;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_SR_EXIT_WATERMARK_D;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_DRAM_CLK_CHANGE_WATERMARK_A;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_DRAM_CLK_CHANGE_WATERMARK_B;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_DRAM_CLK_CHANGE_WATERMARK_C;\ + type DCHUBBUB_ARB_VM_ROW_ALLOW_DRAM_CLK_CHANGE_WATERMARK_D;\ + type DCHUBBUB_ARB_FRAC_URG_BW_NOM_A;\ + type DCHUBBUB_ARB_FRAC_URG_BW_NOM_B;\ + type DCHUBBUB_ARB_FRAC_URG_BW_NOM_C;\ + type DCHUBBUB_ARB_FRAC_URG_BW_NOM_D;\ + type DCHUBBUB_ARB_FRAC_URG_BW_FLIP_A;\ + type DCHUBBUB_ARB_FRAC_URG_BW_FLIP_B;\ + type DCHUBBUB_ARB_FRAC_URG_BW_FLIP_C;\ + type DCHUBBUB_ARB_FRAC_URG_BW_FLIP_D;\ + type DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_A;\ + type DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_B;\ + type DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_C;\ + type DCHUBBUB_ARB_REFCYC_PER_TRIP_TO_MEMORY_D;\ + type DCHUBBUB_ARB_MAX_QOS_COMMIT_THRESHOLD;\ + type HOSTVM_INIT_REQ; \ + type HVM_GPUVMRET_PWR_REQ_DIS; \ + type HVM_GPUVMRET_FORCE_REQ; \ + type HVM_GPUVMRET_POWER_STATUS; \ + type HVM_DISPCLK_R_GATE_DIS; \ + type HVM_DISPCLK_G_GATE_DIS; \ + type HVM_DCFCLK_R_GATE_DIS; \ + type HVM_DCFCLK_G_GATE_DIS; \ + type TR_REQ_REQCLKREQ_MODE; \ + type TW_RSP_COMPCLKREQ_MODE; \ + type HOSTVM_PREFETCH_REQ; \ + type HOSTVM_POWERSTATUS; \ + type RIOMMU_ACTIVE; \ + type HOSTVM_PREFETCH_DONE +#endif struct dcn_hubbub_shift {DCN_HUBBUB_REG_FIELD_LIST (uint8_t );HUBBUB_STUTTER_REG_FIELD_LIST (uint8_t ); +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +HUBBUB_HVM_REG_FIELD_LIST (uint8_t ); +#endif };struct dcn_hubbub_mask {DCN_HUBBUB_REG_FIELD_LIST (uint32_t );HUBBUB_STUTTER_REG_FIELD_LIST (uint32_t ); +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +HUBBUB_HVM_REG_FIELD_LIST (uint32_t ); +#endif };struct dc ;
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.h +10 -0
@@ -29,6 +29,16 @@#include "dcn10/dcn10_hubbub.h" #include "dcn20_vmid.h" +#define HUBBUB_REG_LIST_DCN20_COMMON ()\ + HUBBUB_REG_LIST_DCN_COMMON(), \ + SR(DCHUBBUB_CRC_CTRL), \ + SR(DCN_VM_FB_LOCATION_BASE),\ + SR(DCN_VM_FB_LOCATION_TOP),\ + SR(DCN_VM_FB_OFFSET),\ + SR(DCN_VM_AGP_BOT),\ + SR(DCN_VM_AGP_TOP),\ + SR(DCN_VM_AGP_BASE) +#define TO_DCN20_HUBBUB (hubbub)\ container_of(hubbub, struct dcn20_hubbub, base)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h +35 -0
@@ -148,6 +148,17 @@ uint32_t VMID_SETTINGS_0 +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#define DCN21_HUBP_REG_COMMON_VARIABLE_LIST \ + DCN2_HUBP_REG_COMMON_VARIABLE_LIST; \ + uint32_t FLIP_PARAMETERS_3;\ + uint32_t FLIP_PARAMETERS_4;\ + uint32_t FLIP_PARAMETERS_5;\ + uint32_t FLIP_PARAMETERS_6;\ + uint32_t VBLANK_PARAMETERS_5;\ + uint32_t VBLANK_PARAMETERS_6 +#endif +#define DCN2_HUBP_REG_FIELD_VARIABLE_LIST (type) \ DCN_HUBP_REG_FIELD_BASE_LIST(type); \ type DMDATA_ADDRESS_HIGH;\
@@ -173,17 +184,41 @@type SURFACE_TRIPLE_BUFFER_ENABLE ;\ type VMID +#ifdef CONFIG_DRM_AMD_DC_DCN2_1 +#define DCN21_HUBP_REG_FIELD_VARIABLE_LIST (type) \ + DCN2_HUBP_REG_FIELD_VARIABLE_LIST(type);\ + type REFCYC_PER_VM_GROUP_FLIP;\ + type REFCYC_PER_VM_REQ_FLIP;\ + type REFCYC_PER_VM_GROUP_VBLANK;\ + type REFCYC_PER_VM_REQ_VBLANK;\ + type REFCYC_PER_PTE_GROUP_FLIP_C; \ + type REFCYC_PER_META_CHUNK_FLIP_C; \ + type VM_GROUP_SIZE +#endif +struct dcn_hubp2_registers { +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +DCN21_HUBP_REG_COMMON_VARIABLE_LIST ; +#else DCN2_HUBP_REG_COMMON_VARIABLE_LIST ; +#endif };struct dcn_hubp2_shift { +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +DCN21_HUBP_REG_FIELD_VARIABLE_LIST (uint8_t ); +#else DCN2_HUBP_REG_FIELD_VARIABLE_LIST (uint8_t ); +#endif };struct dcn_hubp2_mask { +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +DCN21_HUBP_REG_FIELD_VARIABLE_LIST (uint32_t ); +#else DCN2_HUBP_REG_FIELD_VARIABLE_LIST (uint32_t ); +#endif };struct dcn20_hubp {
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/23 drm/amd/display: Add Renoir Hubbub (v2)
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Controls the display hw's interface to memory.
v2: rebase (Alex)
--- drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 2 +- .../drm/amd/display/dc/dcn21/dcn21_hubbub.c | 595 ++++++++++++++++++ .../drm/amd/display/dc/dcn21/dcn21_hubbub.h | 132 ++++ 3 files changed, 728 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.h
drivers/gpu/drm/amd/display/dc/dcn21/Makefile +1 -1
@@ -1,7 +1,7 @@ # # Makefile for DCN21. -DCN21 = dcn21_hubp.o +DCN21 = dcn21_hubp.o dcn21_hubbub.o CFLAGS_dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c new file +595 -0
595 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.h new file +132 -0
132 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/23 drm/amd/display: Add Renoir clock manager
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Controls display clocks and interfaces with powerplay for clock and power requirements.
--- .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 10 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 9 + .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 590 ++++++++++++++++++ .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 39 ++ .../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 200 ++++++ .../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h | 40 ++ .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 125 ++++ 7 files changed, 1013 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h
drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile +10 -0
@@ -85,3 +85,13 @@ AMD_DAL_CLK_MGR_DCN20 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn20/,$(CLK_MGR_DC AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN20) endif +ifdef CONFIG_DRM_AMD_DC_DCN2_1 +############################################################################### +# DCN21 +############################################################################### +CLK_MGR_DCN21 = rn_clk_mgr.o rn_clk_mgr_vbios_smu.o + +AMD_DAL_CLK_MGR_DCN21 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn21/,$(CLK_MGR_DCN21)) + +AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN21) +endif
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +9 -0
@@ -35,6 +35,9 @@#include "dcn10/rv1_clk_mgr.h" #include "dcn10/rv2_clk_mgr.h" #include "dcn20/dcn20_clk_mgr.h" +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#include "dcn21/rn_clk_mgr.h" +#endif int clk_mgr_helper_get_active_display_cnt(
@@ -115,6 +118,12 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *prv1_clk_mgr_construct (ctx, clk_mgr, pp_smu); break; } +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +if (ASICREV_IS_RENOIR (asic_id.hw_internal_rev)) { +rn_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); +break ; + } +#endif /* DCN2_1 */ break ;#endif /* Family RV */
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c new file +590 -0
590 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright 2018 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 __RN_CLK_MGR_H__ +#define __RN_CLK_MGR_H__ + +struct rn_clk_registers { +uint32_t CLK1_CLK0_CURRENT_CNT;/* DPREFCLK */ +}; + + +void rn_clk_mgr_construct (struct dc_context *ctx, +struct clk_mgr_internal *clk_mgr, +struct pp_smu_funcs *pp_smu, +struct dccg *dccg); + +#endif //__RN_CLK_MGR_H__
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c new file +200 -0
200 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright 2018 Advanced Micro Devices, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE. +* +* Authors: AMD +* +*/ + +#ifndef DAL_DC_RN_CLK_MGR_VBIOS_SMU_H_ +#define DAL_DC_RN_CLK_MGR_VBIOS_SMU_H_ + +int rn_vbios_smu_get_smu_version (struct clk_mgr_internal *clk_mgr); +int rn_vbios_smu_set_dispclk (struct clk_mgr_internal *clk_mgr,int requested_dispclk_khz); +int rn_vbios_smu_set_dprefclk (struct clk_mgr_internal *clk_mgr); +int rn_vbios_smu_set_hard_min_dcfclk (struct clk_mgr_internal *clk_mgr,int requested_dcfclk_khz); +int rn_vbios_smu_set_min_deep_sleep_dcfclk (struct clk_mgr_internal *clk_mgr,int requested_min_ds_dcfclk_khz); +void rn_vbios_smu_set_phyclk (struct clk_mgr_internal *clk_mgr,int requested_phyclk_khz); +int rn_vbios_smu_set_dppclk (struct clk_mgr_internal *clk_mgr,int requested_dpp_khz); +void rn_vbios_smu_set_display_count (struct clk_mgr_internal *clk_mgr,int display_count); +void rn_vbios_smu_enable_48mhz_tmdp_refclk_pwrdwn (struct clk_mgr_internal *clk_mgr); +void rn_vbios_smu_enable_pme_wa (struct clk_mgr_internal *clk_mgr); + +#endif /* DAL_DC_DCN10_RV1_CLK_MGR_VBIOS_SMU_H_ */
drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr.h +125 -0
137 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/23 drm/amd/display: Add Renoir resource (v2)
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Manages the renoir display resources (crtcs, phys, plls, etc.).
v2: rebase (Alex)
--- drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 2 +- .../drm/amd/display/dc/dcn21/dcn21_resource.c | 1680 +++++++++++++++++ .../drm/amd/display/dc/dcn21/dcn21_resource.h | 45 + 3 files changed, 1726 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.h
drivers/gpu/drm/amd/display/dc/dcn21/Makefile +1 -1
@@ -1,7 +1,7 @@ # # Makefile for DCN21. -DCN21 = dcn21_hubp.o dcn21_hubbub.o +DCN21 = dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o CFLAGS_dcn21_resource.o := -mhard-float -msse -mpreferred-stack-boundary=4
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c new file +1680 -0
1,680 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.h new file +45 -0
45 lines not on this page · raw message
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/23 drm/amd/display: Add Renoir GPIO
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Misc display related configuration details.
--- drivers/gpu/drm/amd/display/dc/gpio/Makefile | 7 + .../display/dc/gpio/dcn21/hw_factory_dcn21.c | 210 ++++++++++ .../display/dc/gpio/dcn21/hw_factory_dcn21.h | 33 ++ .../dc/gpio/dcn21/hw_translate_dcn21.c | 386 ++++++++++++++++++ .../dc/gpio/dcn21/hw_translate_dcn21.h | 35 ++ .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 8 + .../drm/amd/display/dc/gpio/hw_translate.c | 8 + 7 files changed, 687 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.h
drivers/gpu/drm/amd/display/dc/gpio/Makefile +7 -0
@@ -80,6 +80,13 @@ AMD_DAL_GPIO_DCN20 = $(addprefix $(AMDDALPATH)/dc/gpio/dcn20/,$(GPIO_DCN20)) AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCN20) endif +ifdef CONFIG_DRM_AMD_DC_DCN2_1 +GPIO_DCN21 = hw_translate_dcn21.o hw_factory_dcn21.o + +AMD_DAL_GPIO_DCN21 = $(addprefix $(AMDDALPATH)/dc/gpio/dcn21/,$(GPIO_DCN21)) + +AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCN21) +endif ############################################################################### # Diagnostics on FPGA ###############################################################################
drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c new file +210 -0
210 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright 2018 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 +* +*/ +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#ifndef __DAL_HW_FACTORY_DCN21_H__ +#define __DAL_HW_FACTORY_DCN21_H__ + +/* Initialize HW factory function pointers and pin info */ +void dal_hw_factory_dcn21_init (struct hw_factory *factory); + +#endif /* __DAL_HW_FACTORY_DCN20_H__ */ +#endif
drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c new file +386 -0
386 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright 2018 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 +* +*/ +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#ifndef __DAL_HW_TRANSLATE_DCN21_H__ +#define __DAL_HW_TRANSLATE_DCN21_H__ + +struct hw_translate ; + +/* Initialize Hw translate function pointers */ +void dal_hw_translate_dcn21_init (struct hw_translate *tr); + +#endif /* __DAL_HW_TRANSLATE_DCN21_H__ */ +#endif
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +8 -0
@@ -49,6 +49,9 @@#if defined(CONFIG_DRM_AMD_DC_DCN2_0 )#include "dcn20/hw_factory_dcn20.h" #endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#include "dcn21/hw_factory_dcn21.h" +#endif #include "diagnostics/hw_factory_diag.h"
@@ -97,6 +100,11 @@ bool dal_hw_factory_init(dal_hw_factory_dcn20_init (factory);return true;#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +case DCN_VERSION_2_1 : +dal_hw_factory_dcn21_init (factory); +return true; +#endif default :ASSERT_CRITICAL (false);
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +8 -0
@@ -49,6 +49,9 @@#if defined(CONFIG_DRM_AMD_DC_DCN2_0 )#include "dcn20/hw_translate_dcn20.h" #endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#include "dcn21/hw_translate_dcn21.h" +#endif #include "diagnostics/hw_translate_diag.h"
@@ -94,6 +97,11 @@ bool dal_hw_translate_init(dal_hw_translate_dcn20_init (translate);return true;#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +case DCN_VERSION_2_1 : +dal_hw_translate_dcn21_init (translate); +return true; +#endif default :BREAK_TO_DEBUGGER ();
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/23 drm/amd/display: Add Renoir DML
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
DML provides the display configuration validation as provided by the hw teams.
--- drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 + .../dc/dml/dcn21/display_mode_vba_21.c | 6123 +++++++++++++++++ .../dc/dml/dcn21/display_mode_vba_21.h | 32 + .../dc/dml/dcn21/display_rq_dlg_calc_21.c | 1823 +++++ .../dc/dml/dcn21/display_rq_dlg_calc_21.h | 73 + .../drm/amd/display/dc/dml/display_mode_lib.h | 3 + 6 files changed, 8058 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.h
drivers/gpu/drm/amd/display/dc/dml/Makefile +4 -0
@@ -45,6 +45,10 @@ CFLAGS_display_rq_dlg_calc_20.o := $(dml_ccflags) CFLAGS_display_mode_vba_20v2.o := $(dml_ccflags) CFLAGS_display_rq_dlg_calc_20v2.o := $(dml_ccflags) endif +ifdef CONFIG_DRM_AMD_DC_DCN2_1 +CFLAGS_display_mode_vba_21.o := $(dml_ccflags) +CFLAGS_display_rq_dlg_calc_21.o := $(dml_ccflags) +endif ifdef CONFIG_DRM_AMD_DCN3AG CFLAGS_display_mode_vba_3ag.o := $(dml_ccflags) endif
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c new file +6123 -0
2,990 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.h new file +32 -0
Lines of this file are not shown. View the raw message.
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c new file +1823 -0
1,823 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.h new file +73 -0
73 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Part of the diff is not shown here. View the raw message.
PATCH 13/23 drm/amd/display: Fix register names
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
rename VM_CONTEXT0 to MMVM_CONTEXT0 as that is the name defined in the register files
--- drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +2 -2
@@ -643,8 +643,8 @@ struct dce_hwseq_registers {#define HWSEQ_DCN21_MASK_SH_LIST (mask_sh)\ HWSEQ_DCN_MASK_SH_LIST(mask_sh), \ HWS_SF(, DCHUBBUB_GLOBAL_TIMER_CNTL, DCHUBBUB_GLOBAL_TIMER_REFDIV, mask_sh), \ - HWS_SF(, VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32, PAGE_DIRECTORY_ENTRY_HI32, mask_sh),\ - HWS_SF(, VM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, PAGE_DIRECTORY_ENTRY_LO32, mask_sh),\ + HWS_SF(, MMVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32, PAGE_DIRECTORY_ENTRY_HI32, mask_sh),\ + HWS_SF(, MMVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32, PAGE_DIRECTORY_ENTRY_LO32, mask_sh),\ HWS_SF(, DOMAIN0_PG_CONFIG, DOMAIN0_POWER_FORCEON, mask_sh), \ HWS_SF(, DOMAIN0_PG_CONFIG, DOMAIN0_POWER_GATE, mask_sh), \ HWS_SF(, DOMAIN1_PG_CONFIG, DOMAIN1_POWER_FORCEON, mask_sh), \
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/23 drm/amd/display: Handle Renoir in DC
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
add Renoir DCN version in DC and handle it
--- .../drm/amd/display/dc/bios/command_table_helper2.c | 5 +++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 12 ++++++++++++ drivers/gpu/drm/amd/display/include/dal_types.h | 3 +++ 3 files changed, 20 insertions(+)
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +5 -0
@@ -66,6 +66,11 @@ bool dal_bios_parser_init_cmd_tbl_helper2(case DCN_VERSION_2_0 : *h =dal_cmd_tbl_helper_dce112_get_table2 ();return true; +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +case DCN_VERSION_2_1 : + *h =dal_cmd_tbl_helper_dce112_get_table2 (); +return true;#endif case DCE_VERSION_12_0 :case DCE_VERSION_12_1 :
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +12 -0
@@ -49,6 +49,9 @@#if defined(CONFIG_DRM_AMD_DC_DCN2_0 )#include "dcn20/dcn20_resource.h" #endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#include "dcn21/dcn21_resource.h" +#endif #include "dce120/dce120_resource.h" #define DC_LOGGER_INIT (logger)
@@ -98,6 +101,10 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id) dc_version =DCN_VERSION_1_0 ;if (ASICREV_IS_RAVEN2 (asic_id.hw_internal_rev)) dc_version =DCN_VERSION_1_01 ; +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +if (ASICREV_IS_RENOIR (asic_id.hw_internal_rev)) + dc_version =DCN_VERSION_2_1 ; +#endif break ;#endif
@@ -165,6 +172,11 @@ struct resource_pool *dc_create_resource_pool(struct dc *dc, res_pool =dcn20_create_resource_pool (init_data, dc);break ;#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +case DCN_VERSION_2_1 : + res_pool =dcn21_create_resource_pool (init_data, dc); +break ; +#endif default :break ;
drivers/gpu/drm/amd/display/include/dal_types.h +3 -0
@@ -48,6 +48,9 @@ enum dce_version { DCN_VERSION_1_01,#if defined(CONFIG_DRM_AMD_DC_DCN2_0 ) DCN_VERSION_2_0, +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +DCN_VERSION_2_1 , #endifDCN_VERSION_MAX };
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/23 drm/amd/display: Handle Renoir in amdgpu_dm (v2)
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Hook up renoir support to KMS.
v2: squash in "Fixes for Renoir in amdgpu_dm"
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +14 -0
@@ -812,6 +812,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev)case CHIP_NAVI10 :case CHIP_NAVI14 :case CHIP_NAVI12 : +case CHIP_RENOIR :return 0 ;case CHIP_RAVEN :if (ASICREV_IS_PICASSO (adev->external_rev_id))
@@ -2364,6 +2365,9 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)case CHIP_NAVI12 :case CHIP_NAVI10 :case CHIP_NAVI14 : +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +case CHIP_RENOIR :#endif if (dcn10_register_irq_handlers (dm->adev)) {DRM_ERROR ("DM: Failed to initialize IRQ\n" );
@@ -2602,6 +2606,13 @@ static int dm_early_init(void *handle) adev->mode_info.num_hpd =5 ; adev->mode_info.num_dig =5 ;break ; +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +case CHIP_RENOIR : + adev->mode_info.num_crtc =4 ; + adev->mode_info.num_hpd =4 ; + adev->mode_info.num_dig =4 ; +break ;#endif default :DRM_ERROR ("Unsupported ASIC type: 0x%X\n" , adev->asic_type);
@@ -2899,6 +2910,9 @@ fill_plane_buffer_attributes(struct amdgpu_device *adev, adev->asic_type == CHIP_NAVI10 || adev->asic_type == CHIP_NAVI14 || adev->asic_type == CHIP_NAVI12 || +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) + adev->asic_type == CHIP_RENOIR || #endif adev->asic_type == CHIP_RAVEN) {/* Fill GFX9 params */
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/23 drm/amd/display: call update_bw_bounding_box
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
call update_bw_bounding_box in DC construct
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 5 +++++ 2 files changed, 10 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +5 -0
@@ -686,6 +686,11 @@ static bool construct(struct dc *dc,if (!dc->clk_mgr) goto fail; +#ifdef CONFIG_DRM_AMD_DC_DCN2_1 +if (dc->res_pool->funcs->update_bw_bounding_box) + dc->res_pool->funcs->update_bw_bounding_box (dc, dc->clk_mgr->bw_params); +#endif +/* Creation of current_state must occur after dc->dml * is initialized in dc_create_resource_pool because * on creation it copies the contents of dc->dml
drivers/gpu/drm/amd/display/dc/inc/core_types.h +5 -0
@@ -142,6 +142,11 @@ struct resource_funcs {display_e2e_pipe_params_st *pipes, int pipe_cnt);#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +void (*update_bw_bounding_box)( +struct dc *dc, +struct clk_bw_params *bw_params); +#endif };
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/23 drm/amd/display: add dal_asic_id for renoir
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
--- drivers/gpu/drm/amd/display/include/dal_asic_id.h | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/include/dal_asic_id.h +5 -0
@@ -162,6 +162,11 @@ enum {#define ASICREV_IS_NAVI12_P (eChipRev) ((eChipRev >= NV_NAVI12_P_A0) && (eChipRev < NV_NAVI14_M_A0))#define ASICREV_IS_NAVI14_M (eChipRev) ((eChipRev >= NV_NAVI14_M_A0) && (eChipRev < NV_UNKNOWN))#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +#define RENOIR_A0 0x91 +#define DEVICE_ID_RENOIR_1636 0x1636 // Renoir +#define ASICREV_IS_RENOIR (eChipRev) ((eChipRev >= RENOIR_A0) && (eChipRev < 0xFF)) +#endif /* * ASIC chip ID
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 18/23 drm/amd/display: add dcn21 core DC changes
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Add missing parameters, to make dcn21 compile
without errors
--- drivers/gpu/drm/amd/display/dc/dc.h | 3 +++ drivers/gpu/drm/amd/display/dc/inc/core_types.h | 3 +++ drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 ++++ drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + 4 files changed, 11 insertions(+)
drivers/gpu/drm/amd/display/dc/dc.h +3 -0
@@ -385,6 +385,9 @@ struct dc_debug_options {struct dc_bw_validation_profile bw_val_profile;#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT bool disable_fec; +#endif +#ifdef CONFIG_DRM_AMD_DC_DCN2_1 +bool disable_48mhz_pwrdwn;#endif /* This forces a hard min on the DCFCLK requested to SMU/PP * watermarks are not affected.
drivers/gpu/drm/amd/display/dc/inc/core_types.h +3 -0
@@ -87,6 +87,9 @@ void core_link_set_avmute(struct pipe_ctx *pipe_ctx, bool enable);struct resource_pool ;struct dc_state ;struct resource_context ; +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +struct clk_bw_params ; +#endif struct resource_funcs {void (*destroy)(struct resource_pool **pool);
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h +4 -0
@@ -40,6 +40,10 @@ struct cstate_pstate_watermarks_st {struct dcn_watermarks {uint32_t pte_meta_urgent_ns;uint32_t urgent_ns; +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +uint32_t frac_urg_bw_nom; +uint32_t frac_urg_bw_flip; +#endif struct cstate_pstate_watermarks_st cstate_pstate; };
drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +1 -0
@@ -48,6 +48,7 @@ struct dce_hwseq_wa {bool DEGVIDCN10_253 ;bool false_optc_underflow;bool DEGVIDCN10_254 ; +bool DEGVIDCN21 ; };struct hwseq_wa_state {
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 19/23 drm/amd/display: build dcn21 blocks
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Enable the building of dcn21 support.
--- drivers/gpu/drm/amd/display/dc/Makefile | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/Makefile +3 -0
@@ -37,6 +37,9 @@ endif ifdef CONFIG_DRM_AMD_DC_DCN1_0 DC_LIBS += dcn10 dml endif +ifdef CONFIG_DRM_AMD_DC_DCN2_1 +DC_LIBS += dcn21 +endif DC_LIBS += dce120
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 20/23 drm/amd/display: add Renoir to kconfig
In reply to a message not in the archiveFrom: Bhawanpreet Lakha <[email protected]>
Add a kconfig option to enable renoir.
--- drivers/gpu/drm/amd/display/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/display/Kconfig +8 -0
@@ -25,6 +25,14 @@ config DRM_AMD_DC_DCN2_0 Choose this option if you want to have Navi support for display engine +config DRM_AMD_DC_DCN2_1 + bool "DCN 2.1 family" + depends on DRM_AMD_DC && X86 + depends on DRM_AMD_DC_DCN2_0 + help + Choose this option if you want to have + Renoir support for display engine + config DRM_AMD_DC_DSC_SUPPORT bool "DSC support" default y
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 21/23 drm/amd/display: Correct order of RV family clk managers for Renoir
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
Need to check for renoir first.
--- drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c +6 -6
@@ -109,6 +109,12 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p#if defined(CONFIG_DRM_AMD_DC_DCN1_0 )case FAMILY_RV : +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +if (ASICREV_IS_RENOIR (asic_id.hw_internal_rev)) { +rn_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); +break ; + } +#endif /* DCN2_1 */ if (ASICREV_IS_RAVEN2 (asic_id.hw_internal_rev)) {rv2_clk_mgr_construct (ctx, clk_mgr, pp_smu);break ;
@@ -118,12 +124,6 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *prv1_clk_mgr_construct (ctx, clk_mgr, pp_smu); break; } -#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) -if (ASICREV_IS_RENOIR (asic_id.hw_internal_rev)) { -rn_clk_mgr_construct (ctx, clk_mgr, pp_smu, dccg); -break ; - } -#endif /* DCN2_1 */ break ;#endif /* Family RV */
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 22/23 drm/amd/display: Add DCN2.1 changes to DML
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
Hook up the DML changes for renoir.
--- drivers/gpu/drm/amd/display/dc/dml/Makefile | 4 ++++ .../drm/amd/display/dc/dml/display_mode_lib.c | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+)
drivers/gpu/drm/amd/display/dc/dml/Makefile +4 -0
@@ -63,6 +63,10 @@ ifdef CONFIG_DRM_AMD_DC_DCN2_0 DML += display_mode_vba.o dcn20/display_rq_dlg_calc_20.o dcn20/display_mode_vba_20.o DML += dcn20/display_rq_dlg_calc_20v2.o dcn20/display_mode_vba_20v2.o endif +ifdef CONFIG_DRM_AMD_DC_DCN2_1 +DML += dcn21/display_rq_dlg_calc_21.o dcn21/display_mode_vba_21.o +endif + AMD_DAL_DML = $(addprefix $(AMDDALPATH)/dc/dml/,$(DML))
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c +19 -0
@@ -31,6 +31,10 @@#include "dcn20/display_mode_vba_20v2.h" #include "dcn20/display_rq_dlg_calc_20v2.h" #endif +#ifdef CONFIG_DRM_AMD_DC_DCN2_1 +#include "dcn21/display_mode_vba_21.h" +#include "dcn21/display_rq_dlg_calc_21.h" +#endif #if defined(CONFIG_DRM_AMD_DC_DCN2_0 ) const struct dml_funcs dml20_funcs = {
@@ -48,6 +52,15 @@ const struct dml_funcs dml20v2_funcs = { };#endif +#ifdef CONFIG_DRM_AMD_DC_DCN2_1 +const struct dml_funcs dml21_funcs = { + .validate = dml21_ModeSupportAndSystemConfigurationFull, + .recalculate = dml21_recalculate, + .rq_dlg_get_dlg_reg = dml21_rq_dlg_get_dlg_reg, + .rq_dlg_get_rq_reg = dml21_rq_dlg_get_rq_reg +}; +#endif + void dml_init_instance(struct display_mode_lib *lib, const struct _vcs_dpi_soc_bounding_box_st *soc_bb, const struct _vcs_dpi_ip_params_st *ip_params,
@@ -65,6 +78,12 @@ void dml_init_instance(struct display_mode_lib *lib, lib->funcs = dml20v2_funcs;break ;#endif +#ifdef CONFIG_DRM_AMD_DC_DCN2_1 +case DML_PROJECT_DCN21 : + lib->funcs = dml21_funcs; +break ; +#endif +default :break ; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 23/23 drm/amdgpu: Enable DC on Renoir
In reply to a message not in the archiveFrom: Roman Li <[email protected]>
Enable DC support for renoir.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/soc15.c | 6 ++++++ 2 files changed, 9 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -2517,6 +2517,9 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)case CHIP_NAVI10 :case CHIP_NAVI14 :case CHIP_NAVI12 : +#endif +#if defined(CONFIG_DRM_AMD_DC_DCN2_1 ) +case CHIP_RENOIR :#endif return amdgpu_dc !=0 ;#endif
drivers/gpu/drm/amd/amdgpu/soc15.c +6 -0
@@ -767,6 +767,12 @@ int soc15_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &sdma_v4_0_ip_block);if (adev->enable_virtual_display ||amdgpu_sriov_vf (adev))amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block); +#if defined(CONFIG_DRM_AMD_DC ) + else if (amdgpu_device_has_dc_support(adev)) + amdgpu_device_ip_block_add(adev, &dm_ip_block); +#else +# warning "Enable CONFIG_DRM_AMD_DC for display support on SOC15." +#endif amdgpu_device_ip_block_add (adev, &vcn_v2_0_ip_block);break ;default :
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Harry Wentland
Acked-byPatches are
Harry
Quoted 114 lines · Alex Deucher
This patch set adds initial DC display support for Renoir. Renoir is a new APU.
I have omitted the register patch due to size. The full tree is available here:
https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next-renoir-dcBhawanpreet Lakha (20):
drm/amd/display: Add Renoir registers (v3) drm/amd/display: Add Renoir clock registers list drm/amd/display: Add Renoirhw_seqregister list drm/amd/display: Addpp_smufunctions for Renoir drm/amd/display: Add Renoirirq_servicesdrm/amd/display: Add hubp block for Renoir (v2) drm/amd/display: Add Renoir hubbub registers list drm/amd/display: Add Renoir Hubbub (v2) drm/amd/display: Add Renoir clock manager drm/amd/display: Add Renoir resource (v2) drm/amd/display: Add Renoir GPIO drm/amd/display: Add Renoir DML drm/amd/display: Fix register names drm/amd/display: Handle Renoir in DC drm/amd/display: Handle Renoir inamdgpu_dm(v2) drm/amd/display: callupdate_bw_bounding_boxdrm/amd/display: adddal_asic_idfor renoir drm/amd/display: add dcn21 core DC changes drm/amd/display: build dcn21 blocks drm/amd/display: add Renoir to kconfigRoman Li (3):
drm/amd/display: Correct order of RV family clk managers for Renoir drm/amd/display: Add DCN2.1 changes to DML
drm/amdgpu: Enable DC on Renoirdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 + drivers/gpu/drm/amd/amdgpu/soc15.c | 6 + drivers/gpu/drm/amd/display/Kconfig | 8 + .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 14 + drivers/gpu/drm/amd/display/dc/Makefile | 3 + .../display/dc/bios/command_table_helper2.c | 5 + .../gpu/drm/amd/display/dc/clk_mgr/Makefile | 10 + .../gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c | 9 + .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 590 + .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h | 39 + .../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 200 + .../dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h | 40 + drivers/gpu/drm/amd/display/dc/core/dc.c | 5 + .../gpu/drm/amd/display/dc/core/dc_resource.c | 12 + drivers/gpu/drm/amd/display/dc/dc.h | 3 + .../drm/amd/display/dc/dce/dce_clock_source.h | 17 + .../gpu/drm/amd/display/dc/dce/dce_hwseq.h | 97 + .../drm/amd/display/dc/dcn10/dcn10_hubbub.h | 73 + .../drm/amd/display/dc/dcn20/dcn20_hubbub.h | 10 + .../gpu/drm/amd/display/dc/dcn20/dcn20_hubp.h | 35 + drivers/gpu/drm/amd/display/dc/dcn21/Makefile | 10 + .../drm/amd/display/dc/dcn21/dcn21_hubbub.c | 595 + .../drm/amd/display/dc/dcn21/dcn21_hubbub.h | 132 + .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 244 + .../gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h | 133 + .../drm/amd/display/dc/dcn21/dcn21_resource.c | 1680 + .../drm/amd/display/dc/dcn21/dcn21_resource.h | 45 + drivers/gpu/drm/amd/display/dc/dm_pp_smu.h | 47 + drivers/gpu/drm/amd/display/dc/dml/Makefile | 8 + .../dc/dml/dcn21/display_mode_vba_21.c | 6123 ++ .../dc/dml/dcn21/display_mode_vba_21.h | 32 + .../dc/dml/dcn21/display_rq_dlg_calc_21.c | 1823 + .../dc/dml/dcn21/display_rq_dlg_calc_21.h | 73 + .../drm/amd/display/dc/dml/display_mode_lib.c | 19 + .../drm/amd/display/dc/dml/display_mode_lib.h | 3 + drivers/gpu/drm/amd/display/dc/gpio/Makefile | 7 + .../display/dc/gpio/dcn21/hw_factory_dcn21.c | 210 + .../display/dc/gpio/dcn21/hw_factory_dcn21.h | 33 + .../dc/gpio/dcn21/hw_translate_dcn21.c | 386 + .../dc/gpio/dcn21/hw_translate_dcn21.h | 35 + .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 8 + .../drm/amd/display/dc/gpio/hw_translate.c | 8 + .../gpu/drm/amd/display/dc/inc/core_types.h | 8 + .../gpu/drm/amd/display/dc/inc/hw/clk_mgr.h | 125 + .../gpu/drm/amd/display/dc/inc/hw/mem_input.h | 4 + .../gpu/drm/amd/display/dc/inc/hw_sequencer.h | 1 + drivers/gpu/drm/amd/display/dc/irq/Makefile | 10 + .../display/dc/irq/dcn21/irq_service_dcn21.c | 372 + .../display/dc/irq/dcn21/irq_service_dcn21.h | 34 + .../gpu/drm/amd/display/include/dal_asic_id.h | 5 + .../gpu/drm/amd/display/include/dal_types.h | 3 + .../include/asic_reg/clk/clk_10_0_2_offset.h | 56 + .../include/asic_reg/clk/clk_10_0_2_sh_mask.h | 73 + .../include/asic_reg/dcn/dcn_2_1_0_offset.h | 13862 ++++ .../include/asic_reg/dcn/dcn_2_1_0_sh_mask.h | 56638 ++++++++++++++++ .../include/asic_reg/dcn/dpcs_2_1_0_offset.h | 565 + .../include/asic_reg/dcn/dpcs_2_1_0_sh_mask.h | 3430 + .../gpu/drm/amd/include/renoir_ip_offset.h | 1364 + 58 files changed, 89383 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c create mode 100644 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubbub.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.h create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.h create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c create mode 100644 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_factory_dcn21.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dcn21/hw_translate_dcn21.h create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c
Quoted 9 lines
create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_10_0_2_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/clk/clk_10_0_2_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_1_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dcn_2_1_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dpcs_2_1_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/dcn/dpcs_2_1_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/renoir_ip_offset.h
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx