DC Patches Dec 7, 2020
Subsystems (3)
cover DC Patches Dec 7, 2020
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Fixes in MST, Compliance, HDCP, audio;
* Enhancements in VSIF;
* Improvements in seamless boot, DPG;
----------------------------
AMD\ramini (1):
drm/amd/display: Set FixRate bit in VSIF V3
Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.45
Aric Cyr (1):
drm/amd/display: 3.2.115
Charlene Liu (1):
drm/amd/display: Enable gpu_vm_support for dcn3.01
Chris Park (1):
drm/amd/display: Prevent bandwidth overflow
Dmytro Laktyushkin (1):
drm/amd/display: Expose clk_mgr functions for reuse
Jing Zhou (1):
drm/amd/display: Set default bits per channel
John Wu (1):
drm/amd/display: Don't check seamless boot in power down HW by timeout
Judy Cai (1):
drm/amd/display: Change to IMMEDIATE mode from FRAME mode
Michael Strauss (1):
drm/amd/display: Revert DCN2.1 dram_clock_change_latency update
Qingqing Zhuo (2):
drm/amd/display: NULL pointer error during compliance test drm/amd/display: Only one display lights up while using MST hub
Reza Amini (1):
drm/amd/display: Implement VSIF V3 extended refresh rate feature
Roy Chan (1):
drm/amd/display: Fixed the audio noise during mode switching with HDCP
mode on
Sung Lee (1):
drm/amd/display: Add wm table for Renoir
Wesley Chalmers (1):
drm/amd/display: Use provided offset for DPG generation
Wyatt Wood (1):
drm/amd/display: Add support for runtime feature detection command
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 +++++-- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 93 +++++++++++++++- .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 2 +- .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 8 +- .../display/dc/clk_mgr/dcn301/vg_clk_mgr.h | 10 ++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 18 ++- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 17 ++- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_link.h | 4 + .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 +- .../drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- .../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 2 +- .../gpu/drm/amd/display/dc/dcn30/dcn30_vpg.c | 62 +++++------ .../gpu/drm/amd/display/dc/dcn30/dcn30_vpg.h | 38 ++++++- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 6 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 17 ++- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 29 +++++ .../amd/display/modules/freesync/freesync.c | 104 +++++++++++++++--- 18 files changed, 367 insertions(+), 89 deletions(-)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/17 drm/amd/display: Implement VSIF V3 extended refresh rate feature
From: Reza Amini <[email protected]>
[Why]
Implement feature of VSIF V3
[How]
Set refresh rate MSB for extended range
--- .../amd/display/modules/freesync/freesync.c | 100 ++++++++++++++---- 1 file changed, 82 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +82 -18
@@ -569,6 +569,12 @@ static void build_vrr_infopacket_data_v1(const struct mod_vrr_params *vrr,static void build_vrr_infopacket_data_v3 (const struct mod_vrr_params *vrr,struct dc_info_packet *infopacket) { +unsigned int min_refresh; +unsigned int max_refresh; +unsigned int fixed_refresh; +unsigned int min_programmed; +unsigned int max_programmed; +/* PB1 = 0x1A (24bit AMD IEEE OUI (0x00001A) - Byte 0) */ infopacket->sb[1 ] =0x1A ;
@@ -598,23 +604,29 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr, vrr->state == VRR_STATE_ACTIVE_FIXED) infopacket->sb[6 ] |=0x04 ; -if (vrr->state ==VRR_STATE_ACTIVE_FIXED ) { -/* PB7 = FreeSync Minimum refresh rate (Hz) */ - infopacket->sb[7 ] = (unsigned char )((vrr->fixed_refresh_in_uhz +500000 ) /1000000 ); -/* PB8 = FreeSync Maximum refresh rate (Hz) */ - infopacket->sb[8 ] = (unsigned char )((vrr->fixed_refresh_in_uhz +500000 ) /1000000 ); - }else if (vrr->state ==VRR_STATE_ACTIVE_VARIABLE ) { -/* PB7 = FreeSync Minimum refresh rate (Hz) */ - infopacket->sb[7 ] = (unsigned char )((vrr->min_refresh_in_uhz +500000 ) /1000000 ); -/* PB8 = FreeSync Maximum refresh rate (Hz) */ - infopacket->sb[8 ] = (unsigned char )((vrr->max_refresh_in_uhz +500000 ) /1000000 ); - }else { -// Non-fs case, program nominal range -/* PB7 = FreeSync Minimum refresh rate (Hz) */ - infopacket->sb[7 ] = (unsigned char )((vrr->max_refresh_in_uhz +500000 ) /1000000 ); -/* PB8 = FreeSync Maximum refresh rate (Hz) */ - infopacket->sb[8 ] = (unsigned char )((vrr->max_refresh_in_uhz +500000 ) /1000000 ); - } + min_refresh = (vrr->min_refresh_in_uhz +500000 ) /1000000 ; + max_refresh = (vrr->max_refresh_in_uhz +500000 ) /1000000 ; + fixed_refresh = (vrr->fixed_refresh_in_uhz +500000 ) /1000000 ; + + min_programmed = (vrr->state ==VRR_STATE_ACTIVE_FIXED ) ? fixed_refresh : + (vrr->state ==VRR_STATE_ACTIVE_VARIABLE ) ? min_refresh : + max_refresh;// Non-fs case, program nominal range + + max_programmed = (vrr->state ==VRR_STATE_ACTIVE_FIXED ) ? fixed_refresh : + (vrr->state ==VRR_STATE_ACTIVE_VARIABLE ) ? max_refresh : + max_refresh;// Non-fs case, program nominal range + +/* PB7 = FreeSync Minimum refresh rate (Hz) */ + infopacket->sb[7 ] = min_programmed &0xFF ; + +/* PB8 = FreeSync Maximum refresh rate (Hz) */ + infopacket->sb[8 ] = max_programmed &0xFF ; + +/* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 15:8 */ + infopacket->sb[11 ] = (min_programmed >>8 ) &0xFF ; + +/* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 15:8 */ + infopacket->sb[12 ] = (max_programmed >>8 ) &0xFF ;//FreeSync HDR infopacket->sb[9 ] =0 ;
@@ -733,6 +745,58 @@ static void build_vrr_infopacket_header_v2(enum signal_type signal, } } +static void build_vrr_infopacket_header_v3 (enum signal_type signal, +struct dc_info_packet *infopacket, +unsigned int *payload_size) +{ +unsigned char version; + + version =3 ; +if (dc_is_hdmi_signal (signal)) { + +/* HEADER */ + +/* HB0 = Packet Type = 0x83 (Source Product +* Descriptor InfoFrame) +*/ + infopacket->hb0 =DC_HDMI_INFOFRAME_TYPE_SPD ; + +/* HB1 = Version = 0x03 */ + infopacket->hb1 = version; + +/* HB2 = [Bits 7:5 = 0] [Bits 4:0 = Length] */ + *payload_size =0x10 ; + infopacket->hb2 = *payload_size -1 ;//-1 for checksum + + }else if (dc_is_dp_signal (signal)) { + +/* HEADER */ + +/* HB0 = Secondary-data Packet ID = 0 - Only non-zero +* when used to associate audio related info packets +*/ + infopacket->hb0 =0x00 ; + +/* HB1 = Packet Type = 0x83 (Source Product +* Descriptor InfoFrame) +*/ + infopacket->hb1 =DC_HDMI_INFOFRAME_TYPE_SPD ; + +/* HB2 = [Bits 7:0 = Least significant eight bits - +* For INFOFRAME, the value must be 1Bh] +*/ + infopacket->hb2 =0x1B ; + +/* HB3 = [Bits 7:2 = INFOFRAME SDP Version Number = 0x2] +* [Bits 1:0 = Most significant two bits = 0x00] +*/ + + infopacket->hb3 = (version &0x3F ) <<2 ; + + *payload_size =0x1B ; + } +} +static void build_vrr_infopacket_checksum (unsigned int *payload_size,struct dc_info_packet *infopacket) {
@@ -818,7 +882,7 @@ static void build_vrr_infopacket_v3(enum signal_type signal, {unsigned int payload_size =0 ; -build_vrr_infopacket_header_v2 (signal, infopacket, &payload_size); +build_vrr_infopacket_header_v3 (signal, infopacket, &payload_size);build_vrr_infopacket_data_v3 (vrr, infopacket);build_vrr_infopacket_fs2_data (app_tf, infopacket);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/17 drm/amd/display: Set FixRate bit in VSIF V3
In reply to Eryk BrolFrom: "AMD\\ramini" <[email protected]>
[Why]
Signal FreeSync display that we are in Fixed Rate mode, and expand the FreeSync range to 1024.
[How]
Set the new bit in SB16:bit0, and augment the min and max refresh rate with 2 extra bits.
--- .../gpu/drm/amd/display/modules/freesync/freesync.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +8 -4
@@ -610,6 +610,7 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr, min_programmed = (vrr->state ==VRR_STATE_ACTIVE_FIXED ) ? fixed_refresh : (vrr->state ==VRR_STATE_ACTIVE_VARIABLE ) ? min_refresh : + (vrr->state ==VRR_STATE_INACTIVE ) ? min_refresh : max_refresh;// Non-fs case, program nominal range max_programmed = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? fixed_refresh :
@@ -622,11 +623,14 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr,/* PB8 = FreeSync Maximum refresh rate (Hz) */ infopacket->sb[8 ] = max_programmed &0xFF ; -/* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 15:8 */ - infopacket->sb[11 ] = (min_programmed >>8 ) &0xFF ; +/* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 9:8 */ + infopacket->sb[11 ] = (min_programmed >>8 ) &0x03 ; -/* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 15:8 */ - infopacket->sb[12 ] = (max_programmed >>8 ) &0xFF ; +/* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 9:8 */ + infopacket->sb[12 ] = (max_programmed >>8 ) &0x03 ; + +/* PB16 : Reserved bits 7:1, FixedRate bit 0 */ + infopacket->sb[16 ] = (vrr->state ==VRR_STATE_ACTIVE_FIXED ) ?1 :0 ;//FreeSync HDR infopacket->sb[9 ] =0 ;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/17 drm/amd/display: NULL pointer error during compliance test
In reply to Eryk BrolFrom: Qingqing Zhuo <[email protected]>
[Why]
Calls to disable/enable stream should be guarded with dc_lock.
[How]
Add dc_lock before calling into dc_link_handle_hpd_rx_irq.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -5
@@ -2563,10 +2563,11 @@ static void handle_hpd_rx_irq(void *param)struct drm_device *dev = connector->dev;struct dc_link *dc_link = aconnector->dc_link;bool is_mst_root_connector = aconnector->mst_mgr.mst_state; +bool result = false;enum dc_connection_type new_connection_type = dc_connection_none; +struct amdgpu_device *adev =drm_to_adev (dev);#ifdef CONFIG_DRM_AMD_DC_HDCP union hpd_irq_data hpd_irq_data; -struct amdgpu_device *adev =drm_to_adev (dev);memset (&hpd_irq_data,0 ,sizeof (hpd_irq_data));#endif
@@ -2579,13 +2580,15 @@ static void handle_hpd_rx_irq(void *param)if (dc_link->type != dc_connection_mst_branch)mutex_lock (&aconnector->hpd_lock); - +mutex_lock (&adev->dm.dc_lock);#ifdef CONFIG_DRM_AMD_DC_HDCP -if (dc_link_handle_hpd_rx_irq (dc_link, &hpd_irq_data,NULL ) && + result =dc_link_handle_hpd_rx_irq (dc_link, &hpd_irq_data,NULL );#else - if (dc_link_handle_hpd_rx_irq(dc_link, NULL, NULL) && + result =dc_link_handle_hpd_rx_irq (dc_link,NULL ,NULL );#endif - !is_mst_root_connector) { +mutex_unlock (&adev->dm.dc_lock); + +if (result && !is_mst_root_connector) {/* Downstream Port status changed. */ if (!dc_link_detect_sink (dc_link, &new_connection_type))DRM_ERROR ("KMS: Failed to detect connector\n" );
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/17 drm/amd/display: Expose clk_mgr functions for reuse
In reply to Eryk BrolFrom: Dmytro Laktyushkin <[email protected]>
[How & Why]
Allow clk_mgr functions to be reused by making then non-static
--- .../drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 2 +- .../gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 8 ++++---- .../gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.h | 10 ++++++++++ 3 files changed, 15 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +1 -1
@@ -499,7 +499,7 @@ static void dcn3_init_clocks_fpga(struct clk_mgr *clk_mgr)/* TODO: Implement the functions and remove the ifndef guard */ } -static struct clk_mgr_funcs dcn3_fpga_funcs = { +struct clk_mgr_funcs dcn3_fpga_funcs = { .get_dp_ref_clk_frequency = dce12_get_dp_ref_freq_khz, .update_clocks = dcn2_update_clocks_fpga, .init_clocks = dcn3_init_clocks_fpga,
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c +4 -4
@@ -32,9 +32,9 @@// For dcn20_update_clocks_update_dpp_dto #include "dcn20/dcn20_clk_mgr.h" -#include "vg_clk_mgr.h" -#include "dcn301_smu.h" + +#include "vg_clk_mgr.h" #include "reg_helper.h" #include "core_types.h" #include "dm_helpers.h"
@@ -631,7 +631,7 @@ static unsigned int find_dcfclk_for_voltage(const struct vg_dpm_clocks *clock_tareturn 0 ; } -static void vg_clk_mgr_helper_populate_bw_params ( +void vg_clk_mgr_helper_populate_bw_params (struct clk_mgr_internal *clk_mgr,struct integrated_info *bios_info,const struct vg_dpm_clocks *clock_table)
@@ -709,7 +709,7 @@ static struct vg_dpm_clocks dummy_clocks = {static struct watermarks dummy_wms = {0 }; -static void vg_get_dpm_table_from_smu (struct clk_mgr_internal *clk_mgr, +void vg_get_dpm_table_from_smu (struct clk_mgr_internal *clk_mgr,struct smu_dpm_clks *smu_dpm_clks) {struct vg_dpm_clocks *table = smu_dpm_clks->dpm_clks;
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.h +10 -0
@@ -39,5 +39,15 @@ void vg_clk_mgr_construct(struct dc_context *ctx,void vg_clk_mgr_destroy (struct clk_mgr_internal *clk_mgr); +#include "dcn301_smu.h" void vg_notify_wm_ranges (struct clk_mgr *clk_mgr_base); + +void vg_get_dpm_table_from_smu (struct clk_mgr_internal *clk_mgr, +struct smu_dpm_clks *smu_dpm_clks); + +void vg_clk_mgr_helper_populate_bw_params ( +struct clk_mgr_internal *clk_mgr, +struct integrated_info *bios_info, +const struct vg_dpm_clocks *clock_table); +#endif //__VG_CLK_MGR_H__
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/17 drm/amd/display: Add support for runtime feature detection command
In reply to Eryk BrolFrom: Wyatt Wood <[email protected]>
[Why]
Add support for new fw command for runtime feature detection.
[How]
Driver sends command through ring buffer, and fw returns data back through this command.
--- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 6 ++++ .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 29 +++++++++++++++++++ 2 files changed, 35 insertions(+)
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +6 -0
@@ -345,6 +345,9 @@ struct dmub_srv {uint64_t fb_base;uint64_t fb_offset;uint32_t psp_version; + +/* Feature capabilities reported by fw */ +struct dmub_feature_caps feature_caps; };/**
@@ -608,6 +611,9 @@ void dmub_flush_buffer_mem(const struct dmub_fb *fb);enum dmub_status dmub_srv_get_fw_boot_status (struct dmub_srv *dmub,union dmub_fw_boot_status *status); +enum dmub_status dmub_srv_cmd_with_reply_data (struct dmub_srv *dmub, +union dmub_rb_cmd *cmd); +#if defined(__cplusplus) }#endif
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +29 -0
@@ -648,3 +648,32 @@ enum dmub_status dmub_srv_get_fw_boot_status(struct dmub_srv *dmub,return DMUB_STATUS_OK ; } + +enum dmub_status dmub_srv_cmd_with_reply_data (struct dmub_srv *dmub, +union dmub_rb_cmd *cmd) +{ +enum dmub_status status =DMUB_STATUS_OK ; + +// Queue command + status =dmub_srv_cmd_queue (dmub, cmd); + +if (status !=DMUB_STATUS_OK ) +return status; + +// Execute command + status =dmub_srv_cmd_execute (dmub); + +if (status !=DMUB_STATUS_OK ) +return status; + +// Wait for DMUB to process command + status =dmub_srv_wait_for_idle (dmub,100000 ); + +if (status !=DMUB_STATUS_OK ) +return status; + +// Copy data back from ring buffer into command +dmub_rb_get_return_data (&dmub->inbox1_rb, cmd); + +return status; +}
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/17 drm/amd/display: Set default bits per channel
In reply to Eryk BrolFrom: Jing Zhou <[email protected]>
[Why]
Bump into calcReducedBlankingTiming because of mode query failed. In this function,
timing.displayColorDepth == DISPLAY_COLOR_DEPTH_UNDEFINED. Then req_bw == 0 because of bits_per_channel == 0.
So decide edp link settings, use default RBRx1 for special timing.
[How]
Set default bits_per_channel is 8.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -2
@@ -3471,11 +3471,11 @@ uint32_t dc_bandwidth_in_kbps_from_timing( bits_per_channel =16 ;break ;default : +ASSERT (bits_per_channel !=0 ); + bits_per_channel =8 ;break ; } -ASSERT (bits_per_channel !=0 ); - kbps = timing->pix_clk_100hz /10 ; kbps *= bits_per_channel;
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +12 -3
@@ -1410,15 +1410,24 @@ static void print_status_message(case LINK_RATE_LOW : link_rate ="RBR" ;break ; +case LINK_RATE_RATE_2 : + link_rate ="R2" ; +break ; +case LINK_RATE_RATE_3 : + link_rate ="R3" ; +break ;case LINK_RATE_HIGH : link_rate ="HBR" ;break ; -case LINK_RATE_HIGH2 : - link_rate ="HBR2" ; -break ;case LINK_RATE_RBR2 : link_rate ="RBR2" ;break ; +case LINK_RATE_RATE_6 : + link_rate ="R6" ; +break ; +case LINK_RATE_HIGH2 : + link_rate ="HBR2" ; +break ;case LINK_RATE_HIGH3 : link_rate ="HBR3" ;break ;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/17 drm/amd/display: Don't check seamless boot in power down HW by timeout
In reply to Eryk BrolFrom: John Wu <[email protected]>
[Why]power_down_on_boot is designed to power down HW when set mode is not called before timeout. It can happen in headless system or booting with the display is output by non-AMD GPU only.
The function will be executed only if it's not seamless boot. So in seamless boot, the HW is still on.
It's not necessary to check this since there's no display data in both cases.
[How]
Remove seamless boot checking in power_down_on_boot.
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +1 -4
@@ -1442,16 +1442,13 @@ void dcn10_init_hw(struct dc *dc)/* In headless boot cases, DIG may be turned * on which causes HW/SW discrepancies. * To avoid this, power down hardware on boot -* if DIG is turned on and seamless boot not enabled +* if DIG is turned on */ void dcn10_power_down_on_boot (struct dc *dc) {int i =0 ;struct dc_link *edp_link; -if (!dc->config.power_down_display_on_boot) -return ; - edp_link =get_edp_link (dc); if (edp_link && edp_link->link_enc->funcs->is_dig_enabled &&
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/17 drm/amd/display: Change to IMMEDIATE mode from FRAME mode
In reply to Eryk BrolFrom: Judy Cai <[email protected]>
[Why]
Change in DCN10 to use IMMEDIATE_UPDATE mode for AFMT is not reflected in DCN30 as it uses VPG.
[How]
Use IMMEDIATE_UPDATE mode for DCN30 in VPG.
--- .../gpu/drm/amd/display/dc/dcn30/dcn30_vpg.c | 62 +++++++++---------- .../gpu/drm/amd/display/dc/dcn30/dcn30_vpg.h | 38 +++++++++++- 2 files changed, 66 insertions(+), 34 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_vpg.c +31 -31
@@ -103,69 +103,69 @@ static void vpg3_update_generic_info_packet( } } -/* atomically update double-buffered GENERIC0 registers in frame mode +/* atomically update double-buffered GENERIC0 registers in immediate mode * (update at next block_update when block_update_lock == 0). */ switch (packet_index) {case 0 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC0_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC0_IMMEDIATE_UPDATE ,1 );break ;case 1 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC1_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC1_IMMEDIATE_UPDATE ,1 );break ;case 2 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC2_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC2_IMMEDIATE_UPDATE ,1 );break ;case 3 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC3_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC3_IMMEDIATE_UPDATE ,1 );break ;case 4 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC4_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC4_IMMEDIATE_UPDATE ,1 );break ;case 5 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC5_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC5_IMMEDIATE_UPDATE ,1 );break ;case 6 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC6_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC6_IMMEDIATE_UPDATE ,1 );break ;case 7 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC7_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC7_IMMEDIATE_UPDATE ,1 );break ;case 8 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC8_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC8_IMMEDIATE_UPDATE ,1 );break ;case 9 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC9_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC9_IMMEDIATE_UPDATE ,1 );break ;case 10 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC10_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC10_IMMEDIATE_UPDATE ,1 );break ;case 11 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC11_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC11_IMMEDIATE_UPDATE ,1 );break ;case 12 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC12_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC12_IMMEDIATE_UPDATE ,1 );break ;case 13 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC13_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC13_IMMEDIATE_UPDATE ,1 );break ;case 14 : -REG_UPDATE (VPG_GSP_FRAME_UPDATE_CTRL , -VPG_GENERIC14_FRAME_UPDATE ,1 ); +REG_UPDATE (VPG_GSP_IMMEDIATE_UPDATE_CTRL , +VPG_GENERIC14_IMMEDIATE_UPDATE ,1 );break ;default :break ;
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_vpg.h +35 -3
@@ -34,13 +34,15 @@SRI (VPG_GENERIC_STATUS ,VPG , id), \SRI (VPG_GENERIC_PACKET_ACCESS_CTRL ,VPG , id), \SRI (VPG_GENERIC_PACKET_DATA ,VPG , id), \ - SRI(VPG_GSP_FRAME_UPDATE_CTRL, VPG, id) +SRI (VPG_GSP_FRAME_UPDATE_CTRL ,VPG , id), \ + SRI(VPG_GSP_IMMEDIATE_UPDATE_CTRL, VPG, id)struct dcn30_vpg_registers {uint32_t VPG_GENERIC_STATUS;uint32_t VPG_GENERIC_PACKET_ACCESS_CTRL;uint32_t VPG_GENERIC_PACKET_DATA;uint32_t VPG_GSP_FRAME_UPDATE_CTRL; +uint32_t VPG_GSP_IMMEDIATE_UPDATE_CTRL; };#define DCN3_VPG_MASK_SH_LIST (mask_sh)\
@@ -65,7 +67,22 @@ struct dcn30_vpg_registers {SE_SF (VPG0_VPG_GSP_FRAME_UPDATE_CTRL ,VPG_GENERIC11_FRAME_UPDATE , mask_sh),\SE_SF (VPG0_VPG_GSP_FRAME_UPDATE_CTRL ,VPG_GENERIC12_FRAME_UPDATE , mask_sh),\SE_SF (VPG0_VPG_GSP_FRAME_UPDATE_CTRL ,VPG_GENERIC13_FRAME_UPDATE , mask_sh),\ - SE_SF(VPG0_VPG_GSP_FRAME_UPDATE_CTRL, VPG_GENERIC14_FRAME_UPDATE, mask_sh) +SE_SF (VPG0_VPG_GSP_FRAME_UPDATE_CTRL ,VPG_GENERIC14_FRAME_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC0_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC1_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC2_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC3_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC4_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC5_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC6_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC7_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC8_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC9_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC10_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC11_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC12_IMMEDIATE_UPDATE , mask_sh),\ +SE_SF (VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL ,VPG_GENERIC13_IMMEDIATE_UPDATE , mask_sh),\ + SE_SF(VPG0_VPG_GSP_IMMEDIATE_UPDATE_CTRL, VPG_GENERIC14_IMMEDIATE_UPDATE, mask_sh) #define VPG_DCN3_REG_FIELD_LIST(type) \ type VPG_GENERIC_CONFLICT_OCCURED;\
@@ -89,7 +106,22 @@ struct dcn30_vpg_registers {type VPG_GENERIC11_FRAME_UPDATE ;\type VPG_GENERIC12_FRAME_UPDATE ;\type VPG_GENERIC13_FRAME_UPDATE ;\ - type VPG_GENERIC14_FRAME_UPDATE +type VPG_GENERIC14_FRAME_UPDATE ;\ +type VPG_GENERIC0_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC1_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC2_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC3_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC4_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC5_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC6_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC7_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC8_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC9_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC10_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC11_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC12_IMMEDIATE_UPDATE ;\ +type VPG_GENERIC13_IMMEDIATE_UPDATE ;\ + type VPG_GENERIC14_IMMEDIATE_UPDATE struct dcn30_vpg_shift {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/17 drm/amd/display: Use provided offset for DPG generation
In reply to Eryk BrolFrom: Wesley Chalmers <[email protected]>
[Why]
Currently, the offset provided to dcn30_set_disp_pattern_generator is not forwarded to OPP for display pattern generation, resulting in misaligned patterns and test failures.
[How]
Use the provided offset.
--- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +1 -1
@@ -832,5 +832,5 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc, int width, int height, int offset) { pipe_ctx->stream_res.opp->funcs->opp_set_disp_pattern_generator(pipe_ctx->stream_res.opp, test_pattern, - color_space, color_depth, solid_color, width, height, 0); +color_space ,color_depth ,solid_color ,width ,height ,offset ); }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/17 drm/amd/display: Only one display lights up while using MST hub
In reply to Eryk BrolFrom: Qingqing Zhuo <[email protected]>
[Why]
With the addition of dc_lock acquire before dc_link_handle_hpd_rx_irq, there will be a deadlock situation where commit state sends a request for payload allocation on MST and wait for HPD to process DOWN_REP.
[How]
Move forward the MST message handling in handle_hpd_rx_irq so that it will not rely on call to dc_link_handle_hpd_rx_irq.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 21 ++++++++++++++----- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_link.h | 4 ++++ 3 files changed, 21 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +16 -5
@@ -2566,11 +2566,9 @@ static void handle_hpd_rx_irq(void *param)bool result = false;enum dc_connection_type new_connection_type = dc_connection_none;struct amdgpu_device *adev =drm_to_adev (dev); -#ifdef CONFIG_DRM_AMD_DC_HDCP union hpd_irq_data hpd_irq_data;memset (&hpd_irq_data,0 ,sizeof (hpd_irq_data)); -#endif /* * TODO:Temporary add mutex to protect hpd interrupt not have a gpio
@@ -2580,6 +2578,21 @@ static void handle_hpd_rx_irq(void *param)if (dc_link->type != dc_connection_mst_branch)mutex_lock (&aconnector->hpd_lock); +read_hpd_rx_irq_data (dc_link, &hpd_irq_data); + +if ((dc_link->cur_link_settings.lane_count !=LANE_COUNT_UNKNOWN ) || + (dc_link->type == dc_connection_mst_branch)) { +if (hpd_irq_data.bytes.device_service_irq.bits.UP_REQ_MSG_RDY) { + result = true; +dm_handle_hpd_rx_irq (aconnector); + goto out; + }else if (hpd_irq_data.bytes.device_service_irq.bits.DOWN_REP_MSG_RDY) { + result = false; +dm_handle_hpd_rx_irq (aconnector); + goto out; + } + } +mutex_lock (&adev->dm.dc_lock);#ifdef CONFIG_DRM_AMD_DC_HDCP result =dc_link_handle_hpd_rx_irq (dc_link, &hpd_irq_data,NULL );
@@ -2588,6 +2601,7 @@ static void handle_hpd_rx_irq(void *param)#endif mutex_unlock (&adev->dm.dc_lock); +out:if (result && !is_mst_root_connector) {/* Downstream Port status changed. */ if (!dc_link_detect_sink (dc_link, &new_connection_type))
@@ -2628,9 +2642,6 @@ static void handle_hpd_rx_irq(void *param) hdcp_handle_cpirq(adev->dm.hdcp_workqueue, aconnector->base.index); }#endif -if ((dc_link->cur_link_settings.lane_count !=LANE_COUNT_UNKNOWN ) || - (dc_link->type == dc_connection_mst_branch)) -dm_handle_hpd_rx_irq (aconnector);if (dc_link->type != dc_connection_mst_branch) {drm_dp_cec_irq (&aconnector->dm_dp_aux.aux);
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -1874,7 +1874,7 @@ static struct dc_link_settings get_max_link_cap(struct dc_link *link)return max_link_cap; } -static enum dc_status read_hpd_rx_irq_data ( +enum dc_status read_hpd_rx_irq_data (struct dc_link *link,union hpd_irq_data *irq_data) {
drivers/gpu/drm/amd/display/dc/dc_link.h +4 -0
@@ -259,6 +259,10 @@ enum dc_status dc_link_reallocate_mst_payload(struct dc_link *link);bool dc_link_handle_hpd_rx_irq (struct dc_link *dc_link,union hpd_irq_data *hpd_irq_dpcd_data,bool *out_link_loss); +enum dc_status read_hpd_rx_irq_data ( +struct dc_link *link, +union hpd_irq_data *irq_data); +struct dc_sink_init_data ; struct dc_sink *dc_link_add_remote_sink(
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/17 drm/amd/display: Prevent bandwidth overflow
In reply to Eryk BrolFrom: Chris Park <[email protected]>
[Why]
At very high pixel clock, bandwidth calculation exceeds 32 bit size and overflow value. This causes the resulting selection of link rate to be inaccurate.
[How]
Change order of operation and use fixed point to deal with integer accuracy. Also address bug found when forcing link rate.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +5 -2
@@ -3444,10 +3444,13 @@ uint32_t dc_bandwidth_in_kbps_from_timing( {uint32_t bits_per_channel =0 ;uint32_t kbps; +struct fixed31_32 link_bw_kbps;if (timing->flags.DSC) { - kbps = (timing->pix_clk_100hz * timing->dsc_cfg.bits_per_pixel); - kbps = kbps /160 + ((kbps %160 ) ?1 :0 ); + link_bw_kbps =dc_fixpt_from_int (timing->pix_clk_100hz); + link_bw_kbps =dc_fixpt_div_int (link_bw_kbps,160 ); + link_bw_kbps =dc_fixpt_mul_int (link_bw_kbps, timing->dsc_cfg.bits_per_pixel); + kbps =dc_fixpt_ceil (link_bw_kbps);return kbps; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/17 drm/amd/display: Add wm table for Renoir
In reply to Eryk BrolFrom: Sung Lee <[email protected]>
[Why]
Without additional HostVM Latency, Renoir takes 2us longer to exit self-refresh. This causes underflow in certain cases.
[How]
Add table for Renoir with updated sr exit latencies for WM set A.
--- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 93 ++++++++++++++++++- 1 file changed, 89 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +89 -4
@@ -621,7 +621,7 @@ static struct clk_bw_params rn_bw_params = { }; -static struct wm_table ddr4_wm_table = { +static struct wm_table ddr4_wm_table_gs = { .entries = { { .wm_inst =WM_A ,
@@ -658,7 +658,7 @@ static struct wm_table ddr4_wm_table = { } }; -static struct wm_table lpddr4_wm_table = { +static struct wm_table lpddr4_wm_table_gs = { .entries = { { .wm_inst =WM_A ,
@@ -732,6 +732,80 @@ static struct wm_table lpddr4_wm_table_with_disabled_ppt = { } }; +static struct wm_table ddr4_wm_table_rn = { + .entries = { + { + .wm_inst =WM_A , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =9.09 , + .sr_enter_plus_exit_time_us =10.14 , + .valid = true, + }, + { + .wm_inst =WM_B , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =10.12 , + .sr_enter_plus_exit_time_us =11.48 , + .valid = true, + }, + { + .wm_inst =WM_C , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =10.12 , + .sr_enter_plus_exit_time_us =11.48 , + .valid = true, + }, + { + .wm_inst =WM_D , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.72 , + .sr_exit_time_us =10.12 , + .sr_enter_plus_exit_time_us =11.48 , + .valid = true, + }, + } +}; + +static struct wm_table lpddr4_wm_table_rn = { + .entries = { + { + .wm_inst =WM_A , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.65333 , + .sr_exit_time_us =7.32 , + .sr_enter_plus_exit_time_us =8.38 , + .valid = true, + }, + { + .wm_inst =WM_B , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.65333 , + .sr_exit_time_us =9.82 , + .sr_enter_plus_exit_time_us =11.196 , + .valid = true, + }, + { + .wm_inst =WM_C , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.65333 , + .sr_exit_time_us =9.89 , + .sr_enter_plus_exit_time_us =11.24 , + .valid = true, + }, + { + .wm_inst =WM_D , + .wm_type =WM_TYPE_PSTATE_CHG , + .pstate_latency_us =11.65333 , + .sr_exit_time_us =9.748 , + .sr_enter_plus_exit_time_us =11.102 , + .valid = true, + }, + } +}; +static unsigned int find_dcfclk_for_voltage (struct dpm_clocks *clock_table,unsigned int voltage) {int i;
@@ -813,6 +887,11 @@ void rn_clk_mgr_construct(struct dc_debug_options *debug = &ctx->dc->debug;struct dpm_clocks clock_table = {0 };enum pp_smu_status status =0 ; +int is_green_sardine =0 ; + +#if defined(CONFIG_DRM_AMD_DC_DCN ) + is_green_sardine =ASICREV_IS_GREEN_SARDINE (ctx->asic_id.hw_internal_rev); +#endif clk_mgr->base.ctx = ctx; clk_mgr->base.funcs = &dcn21_funcs;
@@ -853,10 +932,16 @@ void rn_clk_mgr_construct(if (clk_mgr->periodic_retraining_disabled) { rn_bw_params.wm_table = lpddr4_wm_table_with_disabled_ppt; }else { - rn_bw_params.wm_table = lpddr4_wm_table; +if (is_green_sardine) + rn_bw_params.wm_table = lpddr4_wm_table_gs; +else + rn_bw_params.wm_table = lpddr4_wm_table_rn; } }else { - rn_bw_params.wm_table = ddr4_wm_table; +if (is_green_sardine) + rn_bw_params.wm_table = ddr4_wm_table_gs; +else + rn_bw_params.wm_table = ddr4_wm_table_rn; }/* Saved clocks configured at boot for debug purposes */ rn_dump_clk_registers (&clk_mgr->base.boot_snapshot, &clk_mgr->base, &log_info);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/17 drm/amd/display: Fixed the audio noise during mode switching with HDCP mode on
In reply to Eryk BrolFrom: Roy Chan <[email protected]>
[Why]
When HDCP is on, some display would introduce audio noise during HDCP handling.
[How]
Mute before HDCP handling when disabling core link. Unmute after HDCP when enabling core link.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +5 -2
@@ -3270,8 +3270,6 @@ void core_link_enable_stream(#if defined(CONFIG_DRM_AMD_DC_DCN3_0 )#endif - dc->hwss.enable_audio_stream (pipe_ctx); -/* turn off otg test pattern if enable */ if (pipe_ctx->stream_res.tg->funcs->set_test_pattern) pipe_ctx->stream_res.tg->funcs->set_test_pattern(pipe_ctx->stream_res.tg,
@@ -3310,6 +3308,9 @@ void core_link_enable_stream(#if defined(CONFIG_DRM_AMD_DC_HDCP )update_psp_stream_config (pipe_ctx, false);#endif + + dc->hwss.enable_audio_stream (pipe_ctx); + }else {// if (IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment)) if (dc_is_dp_signal (pipe_ctx->stream->signal) ||dc_is_virtual_signal (pipe_ctx->stream->signal))
@@ -3337,6 +3338,8 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx)core_link_set_avmute (pipe_ctx, true); } + dc->hwss.disable_audio_stream (pipe_ctx); +#if defined(CONFIG_DRM_AMD_DC_HDCP )update_psp_stream_config (pipe_ctx, true);#endif
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/17 drm/amd/display: Enable gpu_vm_support for dcn3.01
In reply to Eryk BrolFrom: Charlene Liu <[email protected]>
[Why]dcn3_01 supports gpu_vm, but this is not enabled in amdgpu_dm
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
@@ -1035,6 +1035,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (ASICREV_IS_GREEN_SARDINE (adev->external_rev_id)) init_data.flags.disable_dmcu = true;break ; +#if defined(CONFIG_DRM_AMD_DC_DCN3_01 ) +case CHIP_VANGOGH : + init_data.flags.gpu_vm_support = true; +break ; +#endif default :break ; }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 14/17] drm/amd/display: Enable gpu_vm_support for dcn3.01
[AMD Official Use Only - Internal Distribution Only]
We've dropped the CONFIG_DRM_AMD_DC_DCN3* kconfig options recently.
Alex
________________________________
From: amd-gfx <[email protected]> on behalf of Eryk Brol <[email protected]>
Sent: Friday, December 4, 2020 4:28 PM
To: [email protected] <[email protected]>
Cc: Liu, Charlene <[email protected]>; Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Sun, Yongqiang <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH 14/17] drm/amd/display: Enable gpu_vm_support for dcn3.01
From: Charlene Liu <[email protected]>
[Why]dcn3_01 supports gpu_vm, but this is not enabled in amdgpu_dm
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
@@ -1035,6 +1035,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (ASICREV_IS_GREEN_SARDINE (adev->external_rev_id)) init_data.flags.disable_dmcu = true;break ; +#if defined(CONFIG_DRM_AMD_DC_DCN3_01 ) +case CHIP_VANGOGH : + init_data.flags.gpu_vm_support = true; +break ; +#endif default :break ; }
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C93575bd3247e42f848bc08d8989bee3e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637427142787650359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wf2Tl4Qz9IzTZVvfBRYcFHZ8Cr464ZEZ%2B1Pb1GP5W9E%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 14/17] drm/amd/display: Enable gpu_vm_support for dcn3.01
[AMD Official Use Only - Internal Distribution Only]
Thanks for pointing that out!
Eryk
________________________________
From: Deucher, Alexander <[email protected]>
Sent: Monday, December 7, 2020 9:40 AM
To: Brol, Eryk <[email protected]>; [email protected] <[email protected]>
Cc: Liu, Charlene <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Sun, Yongqiang <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: Re: [PATCH 14/17] drm/amd/display: Enable gpu_vm_support for dcn3.01
[AMD Official Use Only - Internal Distribution Only]
We've dropped the CONFIG_DRM_AMD_DC_DCN3* kconfig options recently.
Alex
________________________________
From: amd-gfx <[email protected]> on behalf of Eryk Brol <[email protected]>
Sent: Friday, December 4, 2020 4:28 PM
To: [email protected] <[email protected]>
Cc: Liu, Charlene <[email protected]>; Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Pillai, Aurabindo <[email protected]>; Sun, Yongqiang <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH 14/17] drm/amd/display: Enable gpu_vm_support for dcn3.01
From: Charlene Liu <[email protected]>
[Why]dcn3_01 supports gpu_vm, but this is not enabled in amdgpu_dm
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -0
@@ -1035,6 +1035,11 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)if (ASICREV_IS_GREEN_SARDINE (adev->external_rev_id)) init_data.flags.disable_dmcu = true;break ; +#if defined(CONFIG_DRM_AMD_DC_DCN3_01 ) +case CHIP_VANGOGH : + init_data.flags.gpu_vm_support = true; +break ; +#endif default :break ; }
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C93575bd3247e42f848bc08d8989bee3e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637427142787650359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=wf2Tl4Qz9IzTZVvfBRYcFHZ8Cr464ZEZ%2B1Pb1GP5W9E%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/17 drm/amd/display: Revert DCN2.1 dram_clock_change_latency update
In reply to Eryk BrolFrom: Michael Strauss <[email protected]>
[Why]
New value breaks VSR on high refresh panels, reverting until a fix is developed
--- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +1 -1
@@ -296,7 +296,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = { .num_banks = 8, .num_chans = 4, .vmm_page_size_bytes = 4096, - .dram_clock_change_latency_us = 11.72, + .dram_clock_change_latency_us = 23.84, .return_bus_width_bytes = 64, .dispclk_dppclk_vco_speed_mhz = 3600, .xfc_bus_transport_time_us = 4,
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 16/17 drm/amd/display: [FW Promotion] Release 0.0.45
In reply to Eryk BrolFrom: Anthony Koo <[email protected]>
- Add define for __forceinline
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +15 -2
@@ -26,6 +26,15 @@#ifndef _DMUB_CMD_H_#define _DMUB_CMD_H_ +#if defined(_TEST_HARNESS) || defined(FPGA_USB4 ) +#include "dmub_fw_types.h" +#include "include_legacy/atomfirmware.h" + +#if defined(_TEST_HARNESS) +#include <string.h> +#endif +#else +#include <asm/byteorder.h> #include <linux/types.h> #include <linux/string.h>
@@ -34,12 +43,14 @@#include "atomfirmware.h" +#endif // defined(_TEST_HARNESS) || defined(FPGA_USB4) +/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x685065427 +#define DMUB_FW_VERSION_GIT_HASH 0x931573111#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 44 +#define DMUB_FW_VERSION_REVISION 45#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
@@ -55,6 +66,8 @@//<DMUB_TYPES>================================================================== /* Basic type definitions. */ +#define __forceinline inline +#define SET_ABM_PIPE_GRADUALLY_DISABLE 0#define SET_ABM_PIPE_IMMEDIATELY_DISABLE 255#define SET_ABM_PIPE_IMMEDIATE_KEEP_GAIN_DISABLE 254
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 17/17 drm/amd/display: 3.2.115
In reply to Eryk BrolFrom: Aric Cyr <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -42,7 +42,7 @@#include "inc/hw/dmcu.h" #include "dml/display_mode_lib.h" -#define DC_VER "3.2.114" +#define DC_VER "3.2.115"#define MAX_SURFACES 3#define MAX_PLANES 6
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Harry Wentland
maintainerQuoted 2 lines
AMD\ramini (1):
drm/amd/display: Set FixRate bit in VSIF V3
Please ask Reza to configure his git with his real name.
Harry
Quoted 70 lines · Eryk Brol
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Fixes in MST, Compliance, HDCP, audio;
* Enhancements in VSIF;
* Improvements in seamless boot, DPG;----------------------------
AMD\ramini (1):
drm/amd/display: Set FixRate bit in VSIF V3Anthony Koo (1):
drm/amd/display: [FW Promotion] Release 0.0.45Aric Cyr (1):
drm/amd/display: 3.2.115Charlene Liu (1):
drm/amd/display: Enablegpu_vm_supportfor dcn3.01Chris Park (1):
drm/amd/display: Prevent bandwidth overflowDmytro Laktyushkin (1):
drm/amd/display: Exposeclk_mgrfunctions for reuseJing Zhou (1):
drm/amd/display: Set default bits per channelJohn Wu (1):
drm/amd/display: Don't check seamless boot in power down HW by timeoutJudy Cai (1):
drm/amd/display: Change to IMMEDIATE mode from FRAME modeMichael Strauss (1):
drm/amd/display: Revert DCN2.1dram_clock_change_latencyupdateQingqing Zhuo (2):
drm/amd/display: NULL pointer error during compliance test drm/amd/display: Only one display lights up while using MST hubReza Amini (1):
drm/amd/display: Implement VSIF V3 extended refresh rate featureRoy Chan (1):
drm/amd/display: Fixed the audio noise during mode switching with HDCP
mode onSung Lee (1):
drm/amd/display: Add wm table for RenoirWesley Chalmers (1):
drm/amd/display: Use provided offset for DPG generationWyatt Wood (1):
drm/amd/display: Add support for runtime feature detection command.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 +++++-- .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 93 +++++++++++++++- .../display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 2 +- .../display/dc/clk_mgr/dcn301/vg_clk_mgr.c | 8 +- .../display/dc/clk_mgr/dcn301/vg_clk_mgr.h | 10 ++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 18 ++- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 17 ++- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- drivers/gpu/drm/amd/display/dc/dc_link.h | 4 + .../amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 +- .../drm/amd/display/dc/dcn21/dcn21_resource.c | 2 +-
Quoted 9 lines
.../drm/amd/display/dc/dcn30/dcn30_hwseq.c | 2 +- .../gpu/drm/amd/display/dc/dcn30/dcn30_vpg.c | 62 +++++------ .../gpu/drm/amd/display/dc/dcn30/dcn30_vpg.h | 38 ++++++- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 6 + .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 17 ++- .../gpu/drm/amd/display/dmub/src/dmub_srv.c | 29 +++++ .../amd/display/modules/freesync/freesync.c | 104 +++++++++++++++--- 18 files changed, 367 insertions(+), 89 deletions(-)
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx