DC Patches April 12, 2021
Subsystems (3)
cover DC Patches April 12, 2021
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Enhancement for multiple eDP BL control.
* Add debug flag to enable eDP ILR by default and debugfs to repress HPD/HPR_RX IRQ.
* Connect clock optimization,Set LTTPR mode to non-LTTPR, Fix DML validation of simple vs native.
* Fixes for DSC enable sequence,Force vsync flip,hang when psr is enabled etc.
* Firmware releases:
0.0.60
0.0.61
Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.60
drm/amd/display: [FW Promotion] Release 0.0.61
Anthony Wang (1):
drm/amd/display: Force vsync flip when reconfiguring MPCC
Aric Cyr (1):
drm/amd/display: 3.2.131
Harry Wentland (1):
drm/amd/display: Add debugfs to repress HPD and HPR_RX IRQs
Jake Wang (1):
drm/amd/display: Added support for multiple eDP BL control
Lewis Huang (1):
drm/amd/display: wait vblank when stream enabled and update dpp clock
Michael Strauss (3):
drm/amd/display: Add debug flag to enable eDP ILR by default drm/amd/display: Disable boot optimizations if ILR optimzation is
required
drm/amd/display: Remove static property from decide_edp_link_settings
Mike Hsieh (1):
drm/amd/display: Fix DSC enable sequence
Mikita Lipski (2):
drm/amd/display: Remove unused flag from stream state drm/amd/display: Connect clock optimization function to dcn301
Nicholas Kazlauskas (1):
drm/amd/display: Fix DML validation of simple vs native 422 modes
Roman Li (1):
drm/amd/display: Fix hangs with psr enabled on dcn3.xx
Wesley Chalmers (1):
drm/amd/display: Set LTTPR mode to non-LTTPR if no repeaters found
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 35 +++++++++++++ .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 10 +++- drivers/gpu/drm/amd/display/dc/core/dc.c | 22 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 15 +++--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 49 ++++++++++++++++++- .../drm/amd/display/dc/core/dc_link_hwss.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 9 +++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 - drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 + .../display/dc/dce110/dce110_hw_sequencer.c | 6 ++- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 7 +-- .../drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 + .../drm/amd/display/dc/dcn301/dcn301_init.c | 2 + .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 8 +++ .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 31 +++++++++++- 17 files changed, 191 insertions(+), 24 deletions(-)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 1/16 drm/amd/display: Add debug flag to enable eDP ILR by default
From: Michael Strauss <[email protected]>
[Why & How]
Allow per-asic enablement of ILR feature with debug flag
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/dc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -3892,7 +3892,7 @@ void detect_edp_sink_caps(struct dc_link *link)memset (supported_link_rates,0 ,sizeof (supported_link_rates));if (link->dpcd_caps.dpcd_rev.raw >=DPCD_REV_14 && - (link->dc->config.optimize_edp_link_rate || + (link->dc->debug.optimize_edp_link_rate || link->reported_link_cap.link_rate ==LINK_RATE_UNKNOWN )) {// Read DPCD 00010h - 0001Fh 16 bytes at one shot core_link_read_dpcd(link, DP_SUPPORTED_LINK_RATES,
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -293,7 +293,6 @@ struct dc_config {bool gpu_vm_support;bool disable_disp_pll_sharing;bool fbc_support; -bool optimize_edp_link_rate;bool disable_fractional_pwm;bool allow_seamless_boot_optimization;bool power_down_display_on_boot;
@@ -541,6 +540,7 @@ struct dc_debug_options {/* Enable dmub aux for legacy ddc */ bool enable_dmub_aux_for_legacy_ddc; +bool optimize_edp_link_rate;/* eDP ILR */ };struct dc_debug_data {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/16 drm/amd/display: Disable boot optimizations if ILR optimzation is required
In reply to Bindu RamamurthyFrom: Michael Strauss <[email protected]>
[Why]
VBIOS currently sets the max link rate found in eDP 1.4 SUPPORTED_LINK_RATES table If eDP fastboot optimizations are enabled, the link rate remains at max after init
[How]
Determine optimal link rate during boot, disable seamless boot and eDP fastboot optimizations if link rate optimization is required
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++ .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 43 +++++++++++++++++++ .../display/dc/dce110/dce110_hw_sequencer.c | 6 ++- .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 + 4 files changed, 54 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +5 -0
@@ -55,6 +55,7 @@#include "link_encoder.h" #include "link_enc_cfg.h" +#include "dc_link.h" #include "dc_link_ddc.h" #include "dm_helpers.h" #include "mem_input.h"
@@ -1429,6 +1430,10 @@ bool dc_validate_seamless_boot_timing(const struct dc *dc,return false; } +if (is_edp_ilr_optimization_required (link, crtc_timing)) { +return false; + } +return true; }
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +43 -0
46 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +4 -2
@@ -48,6 +48,7 @@#include "stream_encoder.h" #include "link_encoder.h" #include "link_hwss.h" +#include "dc_link_dp.h" #include "clock_source.h" #include "clk_mgr.h" #include "abm.h"
@@ -1714,8 +1715,9 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)/* Set optimization flag on eDP stream*/ if (edp_stream_num && edp_link->link_status.link_active) { edp_stream = edp_streams[0 ]; - edp_stream->apply_edp_fast_boot_optimization = true; - can_apply_edp_fast_boot = true; + can_apply_edp_fast_boot = !is_edp_ilr_optimization_required (edp_stream->link, &edp_stream->timing); + edp_stream->apply_edp_fast_boot_optimization = can_apply_edp_fast_boot; +break ; } }
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +2 -0
@@ -71,6 +71,8 @@ void detect_edp_sink_caps(struct dc_link *link);bool is_dp_active_dongle (const struct dc_link *link); +bool is_edp_ilr_optimization_required (struct dc_link *link,struct dc_crtc_timing *crtc_timing); +void dp_enable_mst_on_sink (struct dc_link *link,bool enable);enum dp_panel_mode dp_get_panel_mode (struct dc_link *link);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/16 drm/amd/display: Fix DSC enable sequence
In reply to Bindu RamamurthyFrom: Mike Hsieh <[email protected]>
[Why]
DSC is enabled before reset link and potentially cause DSC enable fail problem. [How]
Enable DSC after link is reseted
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 10 +++++++--- drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dc.h | 4 ++++ drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 ++ drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 2 ++ 5 files changed, 17 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +7 -3
@@ -3296,7 +3296,8 @@ void core_link_enable_stream(/* eDP lit up by bios already, no need to enable again. */ if (pipe_ctx->stream->signal ==SIGNAL_TYPE_EDP && - apply_edp_fast_boot_optimization) { + apply_edp_fast_boot_optimization && + !pipe_ctx->stream->timing.flags.DSC) { pipe_ctx->stream->dpms_off = false;#if defined(CONFIG_DRM_AMD_DC_HDCP )update_psp_stream_config (pipe_ctx, false);
@@ -3358,8 +3359,10 @@ void core_link_enable_stream(/* Set DPS PPS SDP (AKA "info frames") */ if (pipe_ctx->stream->timing.flags.DSC) {if (dc_is_dp_signal (pipe_ctx->stream->signal) || -dc_is_virtual_signal (pipe_ctx->stream->signal)) +dc_is_virtual_signal (pipe_ctx->stream->signal)) { +dp_set_dsc_on_rx (pipe_ctx, true);dp_set_dsc_pps_sdp (pipe_ctx, true); + } }if (pipe_ctx->stream->signal ==SIGNAL_TYPE_DISPLAY_PORT_MST )
@@ -3754,7 +3757,8 @@ bool dc_link_should_enable_fec(const struct dc_link *link)if ((link->connector_signal !=SIGNAL_TYPE_DISPLAY_PORT_MST && link->local_sink && link->local_sink->edid_caps.panel_patch.disable_fec) || - link->connector_signal ==SIGNAL_TYPE_EDP )// Disable FEC for eDP + (link->connector_signal ==SIGNAL_TYPE_EDP && + link->dc->debug.force_enable_edp_fec == false))// Disable FEC for eDP is_fec_disable = true;if (dc_link_is_fec_supported (link) && !link->dc->debug.disable_fec && !is_fec_disable)
drivers/gpu/drm/amd/display/dc/core/dc_link_hwss.c +2 -2
@@ -431,7 +431,7 @@ static void dsc_optc_config_log(struct display_stream_compressor *dsc,DC_LOG_DSC ("\tslice_width %d" , config->slice_width); } -static bool dp_set_dsc_on_rx (struct pipe_ctx *pipe_ctx,bool enable) +bool dp_set_dsc_on_rx (struct pipe_ctx *pipe_ctx,bool enable) {struct dc *dc = pipe_ctx->stream->ctx->dc;struct dc_stream_state *stream = pipe_ctx->stream;
@@ -541,7 +541,7 @@ bool dp_set_dsc_enable(struct pipe_ctx *pipe_ctx, bool enable) goto out;if (enable) { -if (dp_set_dsc_on_rx (pipe_ctx, true)) { + {dp_set_dsc_on_stream (pipe_ctx, true); result = true; }
drivers/gpu/drm/amd/display/dc/dc.h +4 -0
@@ -541,6 +541,10 @@ struct dc_debug_options {/* Enable dmub aux for legacy ddc */ bool enable_dmub_aux_for_legacy_ddc;bool optimize_edp_link_rate;/* eDP ILR */ +/* force enable edp FEC */ +bool force_enable_edp_fec; +/* FEC/PSR1 sequence enable delay in 100us */ +uint8_t fec_enable_delay_in100us; };struct dc_debug_data {
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +2 -0
@@ -284,6 +284,8 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub, copy_settings_data->debug.u32All =0 ; copy_settings_data->debug.bitfields.visual_confirm = dc->dc->debug.visual_confirm ==VISUAL_CONFIRM_PSR ; copy_settings_data->debug.bitfields.use_hw_lock_mgr =1 ; + copy_settings_data->fec_enable_status = (link->fec_state == dc_link_fec_enabled); + copy_settings_data->fec_enable_delay_in100us = link->dc->debug.fec_enable_delay_in100us;dc_dmub_srv_cmd_queue (dc->dmub_srv, &cmd);dc_dmub_srv_cmd_execute (dc->dmub_srv);
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +2 -0
@@ -88,5 +88,7 @@ bool dp_set_dsc_enable(struct pipe_ctx *pipe_ctx, bool enable);bool dp_set_dsc_pps_sdp (struct pipe_ctx *pipe_ctx,bool enable);void dp_set_dsc_on_stream (struct pipe_ctx *pipe_ctx,bool enable);bool dp_update_dsc_config (struct pipe_ctx *pipe_ctx); +bool dp_set_dsc_on_rx (struct pipe_ctx *pipe_ctx,bool enable); +#endif /* __DC_LINK_DP_H__ */
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/16 drm/amd/display: Remove static property from decide_edp_link_settings
In reply to Bindu RamamurthyFrom: Michael Strauss <[email protected]>
[Why & How]
Static cleanup for eDP ILR Support.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +1 -1
@@ -2490,7 +2490,7 @@ static bool decide_dp_link_settings(struct dc_link *link, struct dc_link_settingreturn false; } -static bool decide_edp_link_settings (struct dc_link *link,struct dc_link_settings *link_setting,uint32_t req_bw) +bool decide_edp_link_settings (struct dc_link *link,struct dc_link_settings *link_setting,uint32_t req_bw) {struct dc_link_settings initial_link_setting;struct dc_link_settings current_link_setting;
drivers/gpu/drm/amd/display/dc/inc/dc_link_dp.h +4 -0
@@ -52,6 +52,10 @@ bool dp_validate_mode_timing(struct dc_link *link, const struct dc_crtc_timing *timing); +bool decide_edp_link_settings (struct dc_link *link, +struct dc_link_settings *link_setting, +uint32_t req_bw); +void decide_link_settings (struct dc_stream_state *stream,struct dc_link_settings *link_setting);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/16 drm/amd/display: Fix DML validation of simple vs native 422 modes
In reply to Bindu RamamurthyFrom: Nicholas Kazlauskas <[email protected]>
[Why]
We're always validating DML with simple 422 DSC even if native 422 DSC is in use.
[How]
Use the mode configuration from the timing.
--- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +4 -3
@@ -2201,10 +2201,11 @@ int dcn20_populate_dml_pipes_from_context( pipes[pipe_cnt].dout.output_bpp = (output_bpc *3.0 ) /2 ;break ;case PIXEL_ENCODING_YCBCR422 : -if (true)/* todo */ - pipes[pipe_cnt].dout.output_format = dm_s422; -else +if (res_ctx->pipe_ctx[i].stream->timing.flags.DSC && + !res_ctx->pipe_ctx[i].stream->timing.dsc_cfg.ycbcr422_simple) pipes[pipe_cnt].dout.output_format = dm_n422; +else + pipes[pipe_cnt].dout.output_format = dm_s422; pipes[pipe_cnt].dout.output_bpp = output_bpc *2 ;break ;default :
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/16 drm/amd/display: Set LTTPR mode to non-LTTPR if no repeaters found
In reply to Bindu RamamurthyFrom: Wesley Chalmers <[email protected]>
[WHY]
If no repeaters are found, we do not need or want to attempt to link-train repeaters, as this could cause bugs.
--- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +2 -0
@@ -3582,6 +3582,8 @@ static bool retrieve_link_cap(struct dc_link *link) link->dpcd_caps.lttpr_caps.revision.raw >= 0x14);if (is_lttpr_present)CONN_DATA_DETECT (link, lttpr_dpcd_data,sizeof (lttpr_dpcd_data),"LTTPR Caps: " ); +else + link->lttpr_mode =LTTPR_MODE_NON_LTTPR ; }if (!is_lttpr_present)
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/16 drm/amd/display: Force vsync flip when reconfiguring MPCC
In reply to Bindu RamamurthyFrom: Anthony Wang <[email protected]>
[Why]
Underflow observed when disabling PIP overlay in-game when vsync is disabled, due to OTC master lock not working with game pipe which is immediate flip.
[How]
When performing a full update, override flip_immediate value to false for all planes, so that flip occurs on vsync.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
@@ -2683,6 +2683,10 @@ static void commit_planes_for_stream(struct dc *dc, plane_state->triplebuffer_flips = true; } } +if (update_type ==UPDATE_TYPE_FULL ) { +/* force vsync flip when reconfiguring pipes to prevent underflow */ + plane_state->flip_immediate = false; + } } }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/16 drm/amd/display: Remove unused flag from stream state
In reply to Bindu RamamurthyFrom: Mikita Lipski <[email protected]>
[why & how]
Removing unused DSC flag which is incorrect and is not used. We are only using stream->timing.flags.DSC for DSC's current state. Stream state as an input parameter and should not contain any past status flags.
--- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc_stream.h +0 -1
@@ -238,7 +238,6 @@ struct dc_stream_state {bool apply_seamless_boot_optimization;uint32_t stream_id; -bool is_dsc_enabled;struct test_pattern test_pattern;union stream_update_flags update_flags;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/16 drm/amd/display: Connect clock optimization function to dcn301
In reply to Bindu RamamurthyFrom: Mikita Lipski <[email protected]>
[why/how]
Connecting clock optimization functions to dcn301 HWSS to enable power state enter/exit optimization
--- drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c +2 -0
@@ -99,6 +99,8 @@ static const struct hw_sequencer_funcs dcn301_funcs = { .set_pipe = dcn21_set_pipe, .set_disp_pattern_generator = dcn30_set_disp_pattern_generator, .get_dcc_en_bits = dcn10_get_dcc_en_bits, + .optimize_pwr_state = dcn21_optimize_pwr_state, + .exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state, };static const struct hwseq_private_funcs dcn301_private_funcs = {
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/16 drm/amd/display: Add debugfs to repress HPD and HPR_RX IRQs
In reply to Bindu RamamurthyFrom: Harry Wentland <[email protected]>
[Why]
For debugging reasons it can be beneficial to disable any hotplug and DP shortpulse interrupt handling.
[How]
Expose a debugfs to set a flag to bypass HPD IRQ handling and skip IRQ handling if flag is set.
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 35 +++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +8 -1
@@ -2553,11 +2553,14 @@ static void handle_hpd_irq(void *param)struct drm_connector *connector = &aconnector->base;struct drm_device *dev = connector->dev;enum dc_connection_type new_connection_type = dc_connection_none; -#ifdef CONFIG_DRM_AMD_DC_HDCP struct amdgpu_device *adev =drm_to_adev (dev); +#ifdef CONFIG_DRM_AMD_DC_HDCP struct dm_connector_state *dm_con_state =to_dm_connector_state (connector->state);#endif +if (adev->dm.disable_hpd_irq) +return ; +/* * In case of failure or MST no need to update connector status or notify the OS * since (for MST case) MST does this in its own context.
@@ -2697,6 +2700,10 @@ static void handle_hpd_rx_irq(void *param)memset (&hpd_irq_data,0 ,sizeof (hpd_irq_data)); +if (adev->dm.disable_hpd_irq) +return ; + +/* * TODO:Temporary add mutex to protect hpd interrupt not have a gpio * conflict, after implement i2c helper, this mutex should be
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +2 -1
@@ -1,5 +1,5 @@/* -* Copyright 2015 Advanced Micro Devices, Inc. +* Copyright (C) 2015-2020 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"),
@@ -410,6 +410,7 @@ struct amdgpu_display_manager {*/ struct amdgpu_encoder mst_encoders[AMDGPU_DM_MAX_CRTC ];bool force_timing_sync; +bool disable_hpd_irq;bool dmcub_trace_event_en;/** * @da_list:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +35 -0
@@ -3077,6 +3077,37 @@ static int force_timing_sync_get(void *data, u64 *val)DEFINE_DEBUGFS_ATTRIBUTE (force_timing_sync_ops, force_timing_sync_get, force_timing_sync_set,"%llu\n" ); + +/* +* Disables all HPD and HPD RX interrupt handling in the +* driver when set to 1. Default is 0. +*/ +static int disable_hpd_set (void *data,u64 val) +{ +struct amdgpu_device *adev = data; + + adev->dm.disable_hpd_irq = (bool )val; + +return 0 ; +} + + +/* +* Returns 1 if HPD and HPRX interrupt handling is disabled, +* 0 otherwise. +*/ +static int disable_hpd_get (void *data,u64 *val) +{ +struct amdgpu_device *adev = data; + + *val = adev->dm.disable_hpd_irq; + +return 0 ; +} + +DEFINE_DEBUGFS_ATTRIBUTE (disable_hpd_ops, disable_hpd_get, + disable_hpd_set,"%llu\n" ); +/* * Sets the DC visual confirm debug option from the given string. * Example usage: echo 1 > /sys/kernel/debug/dri/0/amdgpu_visual_confirm
@@ -3213,4 +3244,8 @@ void dtn_debugfs_init(struct amdgpu_device *adev)debugfs_create_file_unsafe ("amdgpu_dm_dcc_en" ,0644 , root, adev, &dcc_en_bits_fops); + +debugfs_create_file_unsafe ("amdgpu_dm_disable_hpd" ,0644 , root, adev, + &disable_hpd_ops); + }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 11/16 drm/amd/display: wait vblank when stream enabled and update dpp clock
In reply to Bindu RamamurthyFrom: Lewis Huang <[email protected]>
[Why]
When boot into OS, seamless boot device won't blank stream. Driver update dpp clock when scanline position in vactive will show garbage on screen.
[How]
Wait for vblank for seamless boot edp display when driver update dpp clock. The apply seamless boot flag will be clear when OS call SetVisibility on. Therefore we only wait for vblank once after boot into OS.
--- .../drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 10 +++++++++- drivers/gpu/drm/amd/display/dc/core/dc.c | 13 +++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 1 + 3 files changed, 23 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c +9 -1
@@ -128,7 +128,7 @@ void rn_update_clocks(struct clk_mgr *clk_mgr_base,struct clk_mgr_internal *clk_mgr =TO_CLK_MGR_INTERNAL (clk_mgr_base);struct dc_clocks *new_clocks = &context->bw_ctx.bw.dcn.clk;struct dc *dc = clk_mgr_base->ctx->dc; -int display_count; +int display_count, i;bool update_dppclk = false;bool update_dispclk = false;bool dpp_clock_lowered = false;
@@ -210,6 +210,14 @@ void rn_update_clocks(struct clk_mgr *clk_mgr_base, clk_mgr_base->clks.dppclk_khz, safe_to_lower); +for (i =0 ; i < context->stream_count; i++) { +if (context->streams[i]->signal ==SIGNAL_TYPE_EDP && + context->streams[i]->apply_seamless_boot_optimization) { +dc_wait_for_vblank (dc, context->streams[i]); +break ; + } + } + clk_mgr_base->clks.actual_dppclk_khz =rn_vbios_smu_set_dppclk (clk_mgr, clk_mgr_base->clks.dppclk_khz);
drivers/gpu/drm/amd/display/dc/core/dc.c +13 -0
@@ -3214,6 +3214,19 @@ void dc_link_remove_remote_sink(struct dc_link *link, struct dc_sink *sink) } } +void dc_wait_for_vblank (struct dc *dc,struct dc_stream_state *stream) +{ +int i; + +for (i =0 ; i < dc->res_pool->pipe_count; i++) +if (dc->current_state->res_ctx.pipe_ctx[i].stream == stream) { +struct timing_generator *tg = + dc->current_state->res_ctx.pipe_ctx[i].stream_res.tg; + tg->funcs->wait_for_state (tg,CRTC_STATE_VBLANK ); +break ; + } +} +void get_clock_requirements_for_state (struct dc_state *state,struct AsicStateEx *info) { info->displayClock = (unsigned int )state->bw_ctx.bw.dcn.clk.dispclk_khz;
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -717,6 +717,7 @@ void dc_init_callbacks(struct dc *dc,void dc_deinit_callbacks (struct dc *dc);void dc_destroy (struct dc **dc); +void dc_wait_for_vblank (struct dc *dc,struct dc_stream_state *stream);/******************************************************************************* * Surface Interfaces ******************************************************************************/
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 12/16 drm/amd/display: [FW Promotion] Release 0.0.60
In reply to Bindu RamamurthyFrom: Anthony Koo <[email protected]>
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 -2
@@ -47,10 +47,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x7f2db1846 +#define DMUB_FW_VERSION_GIT_HASH 0x2abb8f41f#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 59 +#define DMUB_FW_VERSION_REVISION 60#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 13/16 drm/amd/display: Added support for multiple eDP BL control
In reply to Bindu RamamurthyFrom: Jake Wang <[email protected]>
[WHY & HOW]
Driver currently assumes only 1 eDP is connected. Added support for multiple eDP BL control.
--- .../drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 ++ .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+)
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c +2 -0
@@ -218,6 +218,8 @@ bool dcn21_set_backlight_level(struct pipe_ctx *pipe_ctx, cmd.abm_set_backlight.header.sub_type =DMUB_CMD__ABM_SET_BACKLIGHT ; cmd.abm_set_backlight.abm_set_backlight_data.frame_ramp = frame_ramp; cmd.abm_set_backlight.abm_set_backlight_data.backlight_user_level = backlight_pwm_u16_16; + cmd.abm_set_backlight.abm_set_backlight_data.version =DMUB_CMD_ABM_SET_BACKLIGHT_VERSION_1 ; + cmd.abm_set_backlight.abm_set_backlight_data.panel_mask = (0x01 << panel_cntl->inst); cmd.abm_set_backlight.header.payload_bytes =sizeof (struct dmub_cmd_abm_set_backlight_data );dc_dmub_srv_cmd_queue (dc->dmub_srv, &cmd);
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +27 -0
@@ -120,6 +120,16 @@/* Trace buffer offset for entry */ #define TRACE_BUFFER_ENTRY_OFFSET 16 +/** +* ABM backlight control version legacy +*/ +#define DMUB_CMD_ABM_SET_BACKLIGHT_VERSION_UNKNOWN 0x0 + +/** +* ABM backlight control version with multi edp support +*/ +#define DMUB_CMD_ABM_SET_BACKLIGHT_VERSION_1 0x1 +/** * Physical framebuffer address location, 64-bit. */
@@ -1625,6 +1635,23 @@ struct dmub_cmd_abm_set_backlight_data {* Requested backlight level from user. */ uint32_t backlight_user_level; + +/** +* Backlight data version. +*/ +uint8_t version; + +/** +* Panel Control HW instance mask. +* Bit 0 is Panel Control HW instance 0. +* Bit 1 is Panel Control HW instance 1. +*/ +uint8_t panel_mask; + +/** +* Explicit padding to 4 byte boundary. +*/ +uint8_t pad[2 ]; };/**
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 14/16 drm/amd/display: Fix hangs with psr enabled on dcn3.xx
In reply to Bindu RamamurthyFrom: Roman Li <[email protected]>
[Why]SKIP_CRTC_DISABLE bit should be applicable to all dcn asics not only Raven.
[How]
Replace check for Raven only with check for all DCNs.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -4
@@ -2813,12 +2813,9 @@ bool dc_link_setup_psr(struct dc_link *link, psr_context->psr_level.u32all =0 ; -#if defined(CONFIG_DRM_AMD_DC_DCN )/*skip power down the single pipe since it blocks the cstate*/ -if ((link->ctx->asic_id.chip_family ==FAMILY_RV ) && -ASICREV_IS_RAVEN (link->ctx->asic_id.hw_internal_rev)) +if (link->ctx->asic_id.chip_family >=FAMILY_RV ) psr_context->psr_level.bits.SKIP_CRTC_DISABLE = true; -#endif /* SMU will perform additional powerdown sequence. * For unsupported ASICs, set psr_level flag to skip PSR
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 15/16 drm/amd/display: 3.2.131
In reply to Bindu RamamurthyFrom: Aric Cyr <[email protected]>
DC version 3.2.131 brings improvements in multiple areas.
In summary, we highlight:
-Enhancement for multiple eDP BL control.
-Add debug flag to enable eDP ILR by default and debugfs to repress HPD/HPR_RX IRQ. -Fixes for DSC enable sequence,Force vsync flip,hang when psr is enabled etc. -Firmware releases:
0.0.60
0.0.61
--- 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
@@ -45,7 +45,7 @@/* forward declaration */ struct aux_payload ; -#define DC_VER "3.2.130" +#define DC_VER "3.2.131"#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
PATCH 16/16 drm/amd/display: [FW Promotion] Release 0.0.61
In reply to Bindu RamamurthyFrom: Anthony Koo <[email protected]>
--- drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +2 -2
@@ -47,10 +47,10 @@/* Firmware versioning. */ #ifdef DMUB_EXPOSE_VERSION -#define DMUB_FW_VERSION_GIT_HASH 0x2abb8f41f +#define DMUB_FW_VERSION_GIT_HASH 0xcf6f1711c#define DMUB_FW_VERSION_MAJOR 0#define DMUB_FW_VERSION_MINOR 0 -#define DMUB_FW_VERSION_REVISION 60 +#define DMUB_FW_VERSION_REVISION 61#define DMUB_FW_VERSION_TEST 0#define DMUB_FW_VERSION_VBIOS 0#define DMUB_FW_VERSION_HOTFIX 0
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Hi all,
This week this patchset was tested on a HP Envy 360, with Ryzen 5 4500U, on the following display types (via usb-c to dp/dvi/hdmi/vga):
4k 60z, 1440p 144hz, 1680*1050 60hz, internal eDP 1080p 60hz
Tested on a Sapphire Pulse RX5700XT on the following display types (via DP):
4k60 60hz, 1440p 144hz, 1680x1050 60hz.
Also tested on a Reference AMD RX6800 on the following display types (via DP):
4k60 60hz, 1440p 144hz.
Tested using a MST hub at 2x 4k 30hz on all systems.
Tested by Dan Wheeler <[email protected]>
Thank you,
Dan Wheeler
Technologist | AMD
SW Display
O +(1) 905-882-2600 ext. 74665
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
Facebook | Twitter | amd.com
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Bindu Ramamurthy
Sent: April 9, 2021 10:04 PM
To: [email protected]
Cc: Brol, Eryk <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Wentland, Harry <[email protected]>; Zhuo, Qingqing <[email protected]>; Siqueira, Rodrigo <[email protected]>; Jacob, Anson <[email protected]>; Pillai, Aurabindo <[email protected]>; Lakha, Bhawanpreet <[email protected]>; R, Bindu <[email protected]>
Subject: [PATCH 00/16] DC Patches April 12, 2021
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Enhancement for multiple eDP BL control.
* Add debug flag to enable eDP ILR by default and debugfs to repress HPD/HPR_RX IRQ.
* Connect clock optimization,Set LTTPR mode to non-LTTPR, Fix DML validation of simple vs native.
* Fixes for DSC enable sequence,Force vsync flip,hang when psr is enabled etc.
* Firmware releases:
0.0.60
0.0.61
Anthony Koo (2):
drm/amd/display: [FW Promotion] Release 0.0.60
drm/amd/display: [FW Promotion] Release 0.0.61
Anthony Wang (1):
drm/amd/display: Force vsync flip when reconfiguring MPCC
Aric Cyr (1):
drm/amd/display: 3.2.131
Harry Wentland (1):
drm/amd/display: Add debugfs to repress HPD and HPR_RX IRQs
Jake Wang (1):
drm/amd/display: Added support for multiple eDP BL control
Lewis Huang (1):
drm/amd/display: wait vblank when stream enabled and update dpp clock
Michael Strauss (3):
drm/amd/display: Add debug flag to enable eDP ILR by default drm/amd/display: Disable boot optimizations if ILR optimzation is
required
drm/amd/display: Remove static property from decide_edp_link_settings
Mike Hsieh (1):
drm/amd/display: Fix DSC enable sequence
Mikita Lipski (2):
drm/amd/display: Remove unused flag from stream state drm/amd/display: Connect clock optimization function to dcn301
Nicholas Kazlauskas (1):
drm/amd/display: Fix DML validation of simple vs native 422 modes
Roman Li (1):
drm/amd/display: Fix hangs with psr enabled on dcn3.xx
Wesley Chalmers (1):
drm/amd/display: Set LTTPR mode to non-LTTPR if no repeaters found
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +++- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 3 +- .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 35 +++++++++++++ .../amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 10 +++- drivers/gpu/drm/amd/display/dc/core/dc.c | 22 +++++++++ drivers/gpu/drm/amd/display/dc/core/dc_link.c | 15 +++--- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 49 ++++++++++++++++++- .../drm/amd/display/dc/core/dc_link_hwss.c | 4 +- drivers/gpu/drm/amd/display/dc/dc.h | 9 +++- drivers/gpu/drm/amd/display/dc/dc_stream.h | 1 - drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 2 + .../display/dc/dce110/dce110_hw_sequencer.c | 6 ++- .../drm/amd/display/dc/dcn20/dcn20_resource.c | 7 +-- .../drm/amd/display/dc/dcn21/dcn21_hwseq.c | 2 + .../drm/amd/display/dc/dcn301/dcn301_init.c | 2 + .../gpu/drm/amd/display/dc/inc/dc_link_dp.h | 8 +++ .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 31 +++++++++++- 17 files changed, 191 insertions(+), 24 deletions(-)
--
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%7Cdaniel.wheeler%40amd.com%7C940651c3982240d580ff08d8fbc4fc31%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637536170760794734%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dlLDih3WE%2FGw8Kfjob4jvY%2FABxZ5NWzFbUiIRvsMqRw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx