DC Patches November 26, 2025
Subsystems (3)
PATCH 3/14 drm/amd/display: Move RGB-type check for audio sync to DCE HW sequence
In reply to [email protected]From: Ivan Lipski <[email protected]>
[Why&How]
DVI-A & VGA connectors are applicable to DCE ASICs, so move them to dce110_hwseq.c to block audio sync on SIGNAL_TYPE_RGB for DCE ASICs.
--- drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 3 +++ drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +3 -0
@@ -1103,6 +1103,9 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)if (!pipe_ctx->stream)return ; +if (dc_is_rgb_signal (pipe_ctx->stream->signal)) +return ; + dc = pipe_ctx->stream->ctx->dc; clk_mgr = dc->clk_mgr; link_hwss =get_link_hwss (pipe_ctx->stream->link, &pipe_ctx->link_res);
drivers/gpu/drm/amd/display/dc/link/link_dpms.c +1 -2
@@ -2664,8 +2664,7 @@ void link_set_dpms_on(enable_stream_features (pipe_ctx);update_psp_stream_config (pipe_ctx, false); -if (!dc_is_rgb_signal (pipe_ctx->stream->signal)) - dc->hwss.enable_audio_stream (pipe_ctx); + dc->hwss.enable_audio_stream (pipe_ctx);if (dc_is_hdmi_signal (pipe_ctx->stream->signal)) {set_avmute (pipe_ctx, false);
Signature · 1 line
2.34.1
cover DC Patches November 26, 2025
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Add configurable SPL namespace prefix.
* Add register definitions in dcn_hubbub_registers.
* Add additional info from DML.
* Add dc interface for query QoS information.
* Fix wrong x_pos and y_pos for cursor offload.
* Fix Smart Power OLED not working after S4.
* Fix double cursor when switching between hw and sw cursor.
* Refactor HPD to increase flexibility.
* Remove unused encoder types.
Charlene Liu (1):
drm/amd/display: add register definitions in dcn_hubbub_registers
Dillon Varone (1):
drm/amd/display: Guard FAMS2 configuration updates
Dmytro Laktyushkin (1):
drm/amd/display: refactor HPD to increase flexibility
Ian Chen (1):
drm/amd/display: fix Smart Power OLED not working after S4
Ivan Lipski (3):
drm/amd/display: Remove unused encoder types drm/amd/display: Use local variable for analog_engine initialization drm/amd/display: Move RGB-type check for audio sync to DCE HW sequence
Jing Zhou (1):
drm/amd/display: Correct FIXED_VS Link Rate Toggle Condition
Navid Assadian (1):
drm/amd/display - dc: Add configurable SPL namespace prefix
Nevenko Stupar (1):
drm/amd/display: Add additional info from DML
Nicholas Kazlauskas (2):
drm/amd/display: Fix wrong x_pos and y_pos for cursor offload drm/amd/display: Reset pipe mask at beginning of cursor offload
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.361
Wenjing Liu (1):
drm/amd/display: add dc interface for query QoS information
drivers/gpu/drm/amd/display/dc/core/dc.c | 30 +++ drivers/gpu/drm/amd/display/dc/dc.h | 39 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 18 +- .../drm/amd/display/dc/dce/dce_link_encoder.c | 47 +++- .../drm/amd/display/dc/dce/dce_link_encoder.h | 8 +- .../display/dc/dcn201/dcn201_link_encoder.c | 3 + .../amd/display/dc/dcn21/dcn21_link_encoder.c | 3 + .../display/dc/dio/dcn10/dcn10_link_encoder.c | 43 ++++ .../display/dc/dio/dcn10/dcn10_link_encoder.h | 11 +- .../display/dc/dio/dcn20/dcn20_link_encoder.c | 3 + .../dc/dio/dcn30/dcn30_dio_link_encoder.c | 3 + .../dc/dio/dcn301/dcn301_dio_link_encoder.c | 3 + .../dc/dio/dcn31/dcn31_dio_link_encoder.c | 3 + .../dc/dio/dcn32/dcn32_dio_link_encoder.c | 3 + .../dc/dio/dcn321/dcn321_dio_link_encoder.c | 3 + .../dc/dio/dcn35/dcn35_dio_link_encoder.c | 3 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 3 + .../display/dc/hubbub/dcn10/dcn10_hubbub.h | 6 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 14 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 25 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 17 +- .../drm/amd/display/dc/hwss/hw_sequencer.h | 37 +++ .../drm/amd/display/dc/inc/hw/link_encoder.h | 4 + .../gpu/drm/amd/display/dc/inc/link_service.h | 3 - .../drm/amd/display/dc/link/link_detection.c | 10 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 3 +- .../drm/amd/display/dc/link/link_factory.c | 240 +++++++++--------- .../link_dp_training_fixed_vs_pe_retimer.c | 2 +- .../amd/display/dc/link/protocols/link_hpd.c | 165 ++++-------- .../amd/display/dc/link/protocols/link_hpd.h | 1 - .../dc/resource/dcn32/dcn32_resource.h | 5 +- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 186 +++++++------- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h | 8 - .../drm/amd/display/dc/sspl/dc_spl_filters.c | 4 +- .../drm/amd/display/dc/sspl/dc_spl_filters.h | 4 +- .../display/dc/sspl/dc_spl_isharp_filters.c | 31 +-- .../display/dc/sspl/dc_spl_isharp_filters.h | 16 +- .../display/dc/sspl/dc_spl_scl_easf_filters.c | 155 +++++------ .../display/dc/sspl/dc_spl_scl_easf_filters.h | 37 +-- .../amd/display/dc/sspl/dc_spl_scl_filters.c | 27 +- .../amd/display/dc/sspl/dc_spl_scl_filters.h | 3 +- .../amd/display/dc/sspl/spl_custom_float.c | 11 +- .../amd/display/dc/sspl/spl_custom_float.h | 4 +- .../drm/amd/display/dc/sspl/spl_fixpt31_32.c | 78 +++--- .../drm/amd/display/dc/sspl/spl_fixpt31_32.h | 56 ++-- .../drm/amd/display/dc/sspl/spl_os_types.h | 9 + 47 files changed, 777 insertions(+), 611 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/14 drm/amd/display: Remove unused encoder types
From: Ivan Lipski <[email protected]>
[Why&How]
We only support ENCODER_ID_INTERNAL_UNIPHY encoders now, so NUTMEG & TRAVIS can be removed from translate_encoder_to_transmitter.
Also refactor to use local variables of transmitter to exit early.
V2: Fix construct_phy check for TRANSMITTER_UKNOWN
--- .../drm/amd/display/dc/link/link_factory.c | 47 +++++-------------- 1 file changed, 12 insertions(+), 35 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_factory.c +12 -35
@@ -354,24 +354,6 @@ static enum transmitter translate_encoder_to_transmitter(return TRANSMITTER_UNKNOWN ; }break ; -case ENCODER_ID_EXTERNAL_NUTMEG : -switch (encoder.enum_id) { -case ENUM_ID_1 : -return TRANSMITTER_NUTMEG_CRT ; -default : -return TRANSMITTER_UNKNOWN ; - } -break ; -case ENCODER_ID_EXTERNAL_TRAVIS : -switch (encoder.enum_id) { -case ENUM_ID_1 : -return TRANSMITTER_TRAVIS_CRT ; -case ENUM_ID_2 : -return TRANSMITTER_TRAVIS_LCD ; -default : -return TRANSMITTER_UNKNOWN ; - } -break ;default :return TRANSMITTER_UNKNOWN ; }
@@ -481,14 +463,6 @@ static enum engine_id find_analog_engine(struct dc_link *link)return ENGINE_ID_UNKNOWN ; } -static bool transmitter_supported (const enum transmitter transmitter) -{ -return transmitter !=TRANSMITTER_UNKNOWN && - transmitter !=TRANSMITTER_NUTMEG_CRT && - transmitter !=TRANSMITTER_TRAVIS_CRT && - transmitter !=TRANSMITTER_TRAVIS_LCD ; -} -static bool analog_engine_supported (const enum engine_id engine_id) { return engine_id == ENGINE_ID_DACA ||
@@ -506,6 +480,8 @@ static bool construct_phy(struct dc_link *link,struct dc_bios *bios = init_params->dc->ctx->dc_bios;const struct dc_vbios_funcs *bp_funcs = bios->funcs;struct bp_disp_connector_caps_info disp_connect_caps_info = {0 }; +struct graphics_object_id link_encoder = {0 }; +enum transmitter transmitter_from_encoder;DC_LOGGER_INIT (dc_ctx->logger);
@@ -526,21 +502,21 @@ static bool construct_phy(struct dc_link *link, link->link_id = bios->funcs->get_connector_id (bios, init_params->connector_index); + link->ep_type =DISPLAY_ENDPOINT_PHY ; + +DC_LOG_DC ("BIOS object table - link_id: %d" , link->link_id.id); +/* Determine early if the link has any supported encoders, * so that we avoid initializing DDC and HPD, etc. */ - bp_funcs->get_src_obj (bios, link->link_id,0 , &enc_init_data.encoder); - enc_init_data.transmitter =translate_encoder_to_transmitter (enc_init_data.encoder); + bp_funcs->get_src_obj (bios, link->link_id,0 , &link_encoder); + transmitter_from_encoder =translate_encoder_to_transmitter (link_encoder); enc_init_data.analog_engine =find_analog_engine (link); - link->ep_type =DISPLAY_ENDPOINT_PHY ; - -DC_LOG_DC ("BIOS object table - link_id: %d" , link->link_id.id); - -if (!transmitter_supported (enc_init_data.transmitter) && +if (transmitter_from_encoder ==TRANSMITTER_UNKNOWN && !analog_engine_supported (enc_init_data.analog_engine)) {DC_LOG_WARNING ("link_id %d has unsupported encoder\n" , link->link_id.id); - goto unsupported_fail; + goto create_fail; }if (bios->funcs->get_disp_connector_caps_info) {
@@ -674,6 +650,8 @@ static bool construct_phy(struct dc_link *link, enc_init_data.connector = link->link_id; enc_init_data.channel =get_ddc_line (link); enc_init_data.hpd_source =get_hpd_line (link); + enc_init_data.transmitter = transmitter_from_encoder; + enc_init_data.encoder = link_encoder; link->hpd_src = enc_init_data.hpd_source;
@@ -810,7 +788,6 @@ static bool construct_phy(struct dc_link *link, link->hpd_gpio =NULL ; } -unsupported_fail:DC_LOG_DC ("BIOS object table - %s failed.\n" , __func__);return false; }
Signature · 1 line
2.34.1
PATCH 2/14 drm/amd/display: Use local variable for analog_engine initialization
In reply to [email protected]From: Ivan Lipski <[email protected]>
[Why&How]
Use local variable for analog_engine retrieval and check if it is supported instead of the struct parameter.
--- drivers/gpu/drm/amd/display/dc/link/link_factory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_factory.c +4 -2
@@ -482,6 +482,7 @@ static bool construct_phy(struct dc_link *link,struct bp_disp_connector_caps_info disp_connect_caps_info = {0 };struct graphics_object_id link_encoder = {0 };enum transmitter transmitter_from_encoder; +enum engine_id link_analog_engine;DC_LOGGER_INIT (dc_ctx->logger);
@@ -511,10 +512,10 @@ static bool construct_phy(struct dc_link *link,*/ bp_funcs->get_src_obj (bios, link->link_id,0 , &link_encoder); transmitter_from_encoder =translate_encoder_to_transmitter (link_encoder); - enc_init_data.analog_engine =find_analog_engine (link); + link_analog_engine =find_analog_engine (link);if (transmitter_from_encoder ==TRANSMITTER_UNKNOWN && - !analog_engine_supported (enc_init_data.analog_engine)) { + !analog_engine_supported (link_analog_engine)) {DC_LOG_WARNING ("link_id %d has unsupported encoder\n" , link->link_id.id); goto create_fail; }
@@ -652,6 +653,7 @@ static bool construct_phy(struct dc_link *link, enc_init_data.hpd_source =get_hpd_line (link); enc_init_data.transmitter = transmitter_from_encoder; enc_init_data.encoder = link_encoder; + enc_init_data.analog_engine = link_analog_engine; link->hpd_src = enc_init_data.hpd_source;
Signature · 1 line
2.34.1
PATCH 4/14 drm/amd/display: fix Smart Power OLED not working after S4
In reply to [email protected]From: Ian Chen <[email protected]>
[HOW]
Before enable smart power OLED, we need to call set pipe to let DMUB get correct ABM config.
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +6 -0
@@ -6012,6 +6012,12 @@ bool dc_smart_power_oled_enable(const struct dc_link *link, bool enable, uint16_if (pipe_ctx) otg_inst = pipe_ctx->stream_res.tg->inst; +// before enable smart power OLED, we need to call set pipe for DMUB to set ABM config +if (enable) { +if (dc->hwss.set_pipe && pipe_ctx) + dc->hwss.set_pipe (pipe_ctx); + } +// fill in cmd memset (&cmd,0 ,sizeof (cmd));
Signature · 1 line
2.34.1
PATCH 7/14 drm/amd/display: add dc interface for query QoS information
In reply to [email protected]From: Wenjing Liu <[email protected]>
[why]
Add support for retrieving Quality of Service (QoS) metrics from dc to enable performance analysis and bottleneck identification. This provides benchmark tools with real-time bandwidth and latency measurements from hardware performance counters, helping diagnose display system performance issues.
[how]
- Add dc_get_qos_info() function to DC layer for unified QoS data retrieval
- Implement hardware sequencer interface with function pointers for QoS measurements
- Integrate QoS metrics: peak/average bandwidth (Mbps) and max/average latency (ns)
--- drivers/gpu/drm/amd/display/dc/core/dc.c | 24 ++++++++++++ drivers/gpu/drm/amd/display/dc/dc.h | 36 ++++++++++++++++++ .../drm/amd/display/dc/hwss/hw_sequencer.h | 37 +++++++++++++++++++ 3 files changed, 97 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +24 -0
@@ -7091,3 +7091,27 @@ void dc_log_preos_dmcub_info(const struct dc *dc) {dc_dmub_srv_log_preos_dmcub_info (dc->ctx->dmub_srv); } + +bool dc_get_qos_info (struct dc *dc,struct dc_qos_info *info) +{ +const struct dc_clocks *clk = &dc->current_state->bw_ctx.bw.dcn.clk; + +memset (info,0 ,sizeof (*info)); + +// Check if all measurement functions are available +if (!dc->hwss.measure_peak_bw_mbps || + !dc->hwss.measure_avg_bw_mbps || + !dc->hwss.measure_max_latency_ns || + !dc->hwss.measure_avg_latency_ns) { +return false; + } + +// Call measurement functions to get actual values + info->actual_peak_bw_in_mbps = dc->hwss.measure_peak_bw_mbps (dc); + info->actual_avg_bw_in_mbps = dc->hwss.measure_avg_bw_mbps (dc); + info->actual_max_latency_in_ns = dc->hwss.measure_max_latency_ns (dc); + info->actual_avg_latency_in_ns = dc->hwss.measure_avg_latency_ns (dc); + info->dcn_bandwidth_ub_in_mbps = (uint32_t )(clk->fclk_khz /1000 *64 ); + +return true; +}
drivers/gpu/drm/amd/display/dc/dc.h +36 -0
@@ -951,6 +951,18 @@ struct dc_bounding_box_overrides {int min_dcfclk_mhz; }; +struct dc_qos_info { +uint32_t actual_peak_bw_in_mbps; +uint32_t qos_bandwidth_lb_in_mbps; +uint32_t actual_avg_bw_in_mbps; +uint32_t calculated_avg_bw_in_mbps; +uint32_t actual_max_latency_in_ns; +uint32_t qos_max_latency_ub_in_ns; +uint32_t actual_avg_latency_in_ns; +uint32_t qos_avg_latency_ub_in_ns; +uint32_t dcn_bandwidth_ub_in_mbps; +}; +struct dc_state ;struct resource_pool ;struct dce_hwseq ;
@@ -3322,4 +3334,28 @@ struct dc_register_software_state {*/ bool dc_capture_register_software_state (struct dc *dc,struct dc_register_software_state *state); +/** +* dc_get_qos_info() - Retrieve Quality of Service (QoS) information from display core +* @dc: DC context containing current display configuration +* @info: Pointer to dc_qos_info structure to populate with QoS metrics +* +* This function retrieves QoS metrics from the display core that can be used by +* benchmark tools to analyze display system performance. The function may take +* several milliseconds to execute due to hardware measurement requirements. +* +* QoS information includes: +* - Bandwidth bounds (lower limits in Mbps) +* - Latency bounds (upper limits in nanoseconds) +* - Hardware-measured bandwidth metrics (peak/average in Mbps) +* - Hardware-measured latency metrics (maximum/average in nanoseconds) +* +* The function will populate the provided dc_qos_info structure with current +* QoS measurements. If hardware measurement functions are not available for +* the current DCN version, the function returns false with zero'd info structure. +* +* Return: true if QoS information was successfully retrieved, false if measurement +* functions are unavailable or hardware measurements cannot be performed +*/ +bool dc_get_qos_info (struct dc *dc,struct dc_qos_info *info); +#endif /* DC_INTERFACE_H_ */
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +37 -0
@@ -1287,6 +1287,43 @@ struct hw_sequencer_funcs {void (*get_underflow_debug_data)(const struct dc *dc,struct timing_generator *tg,struct dc_underflow_debug_data *out_data); + +/** +* measure_peak_bw_mbps - Measure actual peak bandwidth in Mbps +* @dc: DC structure +* +* Returns the measured peak bandwidth value in Mbps from hardware +* performance counters or registers. +*/ +uint32_t (*measure_peak_bw_mbps)(struct dc *dc); + +/** +* measure_avg_bw_mbps - Measure actual average bandwidth in Mbps +* @dc: DC structure +* +* Returns the measured average bandwidth value in Mbps from hardware +* performance counters or registers. +*/ +uint32_t (*measure_avg_bw_mbps)(struct dc *dc); + +/** +* measure_max_latency_ns - Measure actual maximum latency in nanoseconds +* @dc: DC structure +* +* Returns the measured maximum latency value in nanoseconds from hardware +* performance counters or registers. +*/ +uint32_t (*measure_max_latency_ns)(struct dc *dc); + +/** +* measure_avg_latency_ns - Measure actual average latency in nanoseconds +* @dc: DC structure +* +* Returns the measured average latency value in nanoseconds from hardware +* performance counters or registers. +*/ +uint32_t (*measure_avg_latency_ns)(struct dc *dc); + }; void color_space_to_black_color(
Signature · 1 line
2.34.1
PATCH 5/14 drm/amd/display: refactor HPD to increase flexibility
In reply to [email protected]From: Dmytro Laktyushkin <[email protected]>
Currently all dcn revisions have to follow the same codepath for hotplug detection. This change allows per dcn hpd handling consolidating hpd code in link_encoder.
--- drivers/gpu/drm/amd/display/dc/dc.h | 1 - .../drm/amd/display/dc/dce/dce_link_encoder.c | 47 ++++- .../drm/amd/display/dc/dce/dce_link_encoder.h | 8 +- .../display/dc/dcn201/dcn201_link_encoder.c | 3 + .../amd/display/dc/dcn21/dcn21_link_encoder.c | 3 + .../display/dc/dio/dcn10/dcn10_link_encoder.c | 43 ++++ .../display/dc/dio/dcn10/dcn10_link_encoder.h | 11 +- .../display/dc/dio/dcn20/dcn20_link_encoder.c | 3 + .../dc/dio/dcn30/dcn30_dio_link_encoder.c | 3 + .../dc/dio/dcn301/dcn301_dio_link_encoder.c | 3 + .../dc/dio/dcn31/dcn31_dio_link_encoder.c | 3 + .../dc/dio/dcn32/dcn32_dio_link_encoder.c | 3 + .../dc/dio/dcn321/dcn321_dio_link_encoder.c | 3 + .../dc/dio/dcn35/dcn35_dio_link_encoder.c | 3 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 3 + .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 22 +- .../drm/amd/display/dc/inc/hw/link_encoder.h | 4 + .../gpu/drm/amd/display/dc/inc/link_service.h | 3 - .../drm/amd/display/dc/link/link_detection.c | 10 +- .../drm/amd/display/dc/link/link_factory.c | 193 ++++++++++-------- .../amd/display/dc/link/protocols/link_hpd.c | 165 +++++---------- .../amd/display/dc/link/protocols/link_hpd.h | 1 - .../dc/resource/dcn32/dcn32_resource.h | 5 +- 23 files changed, 293 insertions(+), 250 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +0 -1
@@ -1708,7 +1708,6 @@ struct dc_scratch_space {struct dc_link_status link_status;struct dprx_states dprx_states; -struct gpio *hpd_gpio;enum dc_link_fec_state fec_state;bool is_dds;bool is_display_mux_present;
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +46 -1
83 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.h +3 -5
@@ -130,11 +130,6 @@SRI (DP_DPHY_HBR2_PATTERN_CONTROL ,DP , id), \ SR(DCI_MEM_PWR_STATUS) -#define LE_DCN10_REG_LIST (id)\ - LE_COMMON_REG_LIST_BASE(id), \ - SRI(DP_DPHY_BS_SR_SWAP_CNTL, DP, id), \ - SRI(DP_DPHY_INTERNAL_CTRL, DP, id), \ - SRI(DP_DPHY_HBR2_PATTERN_CONTROL, DP, id)struct dce110_link_enc_aux_registers {uint32_t AUX_CONTROL;
@@ -319,4 +314,7 @@ bool dce110_is_dig_enabled(struct link_encoder *enc);void dce110_link_encoder_get_max_link_cap (struct link_encoder *enc,struct dc_link_settings *link_settings); +bool dce110_get_hpd_state (struct link_encoder *enc); +bool dce110_program_hpd_filter (struct link_encoder *enc,int delay_on_connect_in_ms,int delay_on_disconnect_in_ms); +#endif /* __DC_LINK_ENCODER__DCE110_H__ */
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_link_encoder.c +3 -0
@@ -104,6 +104,8 @@ static const struct link_encoder_funcs dcn201_link_enc_funcs = { .fec_is_active = enc2_fec_is_active, .is_in_alt_mode = dcn201_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn201_link_encoder_get_max_link_cap, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn201_link_encoder_construct(
@@ -125,6 +127,7 @@ void dcn201_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_link_encoder.c +3 -0
@@ -325,6 +325,8 @@ static const struct link_encoder_funcs dcn21_link_enc_funcs = { .get_dig_frontend = dcn10_get_dig_frontend, .is_in_alt_mode = dcn20_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn20_link_encoder_get_max_link_cap, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn21_link_encoder_construct(
@@ -346,6 +348,7 @@ void dcn21_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c +43 -0
66 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.h +10 -1
@@ -79,6 +79,8 @@ struct dcn10_link_enc_aux_registers {struct dcn10_link_enc_hpd_registers {uint32_t DC_HPD_CONTROL; +uint32_t DC_HPD_INT_STATUS; +uint32_t DC_HPD_TOGGLE_FILT_CNTL; };struct dcn10_link_enc_registers {
@@ -274,7 +276,10 @@ struct dcn10_link_enc_registers {type TMDS_CTL0 ;\type AUX_HPD_SEL ;\type AUX_LS_READ_EN ;\ - type AUX_RX_RECEIVE_WINDOW +type AUX_RX_RECEIVE_WINDOW ;\ +type DC_HPD_SENSE ;\ +type DC_HPD_CONNECT_INT_DELAY ;\ + type DC_HPD_DISCONNECT_INT_DELAY#define DCN20_LINK_ENCODER_DPCS_REG_FIELD_LIST (type) \
@@ -656,4 +661,8 @@ enum signal_type dcn10_get_dig_mode(void dcn10_link_encoder_get_max_link_cap (struct link_encoder *enc,struct dc_link_settings *link_settings); + +bool dcn10_get_hpd_state (struct link_encoder *enc); +bool dcn10_program_hpd_filter (struct link_encoder *enc,int delay_on_connect_in_ms,int delay_on_disconnect_in_ms); +#endif /* __DC_LINK_ENCODER__DCN10_H__ */
drivers/gpu/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c +3 -0
@@ -384,6 +384,8 @@ static const struct link_encoder_funcs dcn20_link_enc_funcs = { .get_dig_frontend = dcn10_get_dig_frontend, .is_in_alt_mode = dcn20_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn20_link_encoder_get_max_link_cap, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn20_link_encoder_construct(
@@ -405,6 +407,7 @@ void dcn20_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn30/dcn30_dio_link_encoder.c +3 -0
@@ -84,6 +84,8 @@ static const struct link_encoder_funcs dcn30_link_enc_funcs = { .get_dig_mode = dcn10_get_dig_mode, .is_in_alt_mode = dcn20_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn20_link_encoder_get_max_link_cap, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn30_link_encoder_construct(
@@ -105,6 +107,7 @@ void dcn30_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn301/dcn301_dio_link_encoder.c +3 -0
@@ -73,6 +73,8 @@ static const struct link_encoder_funcs dcn301_link_enc_funcs = { .get_dig_mode = dcn10_get_dig_mode, .is_in_alt_mode = dcn20_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn20_link_encoder_get_max_link_cap, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn301_link_encoder_construct(
@@ -94,6 +96,7 @@ void dcn301_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c +3 -0
@@ -276,6 +276,8 @@ static const struct link_encoder_funcs dcn31_link_enc_funcs = { .is_in_alt_mode = dcn31_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn31_link_encoder_get_max_link_cap, .set_dio_phy_mux = dcn31_link_encoder_set_dio_phy_mux, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn31_link_encoder_construct(
@@ -297,6 +299,7 @@ void dcn31_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c +3 -0
@@ -224,6 +224,8 @@ static const struct link_encoder_funcs dcn32_link_enc_funcs = { .is_in_alt_mode = dcn32_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn32_link_encoder_get_max_link_cap, .set_dio_phy_mux = dcn31_link_encoder_set_dio_phy_mux, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn32_link_encoder_construct(
@@ -245,6 +247,7 @@ void dcn32_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn321/dcn321_dio_link_encoder.c +3 -0
@@ -89,6 +89,8 @@ static const struct link_encoder_funcs dcn321_link_enc_funcs = { .is_in_alt_mode = dcn20_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn20_link_encoder_get_max_link_cap, .set_dio_phy_mux = dcn31_link_encoder_set_dio_phy_mux, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn321_link_encoder_construct(
@@ -110,6 +112,7 @@ void dcn321_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c +3 -0
@@ -162,6 +162,8 @@ static const struct link_encoder_funcs dcn35_link_enc_funcs = { .set_dio_phy_mux = dcn31_link_encoder_set_dio_phy_mux, .enable_dpia_output = dcn35_link_encoder_enable_dpia_output, .disable_dpia_output = dcn35_link_encoder_disable_dpia_output, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn35_link_encoder_construct(
@@ -183,6 +185,7 @@ void dcn35_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c +3 -0
@@ -215,6 +215,8 @@ static const struct link_encoder_funcs dcn401_link_enc_funcs = { .is_in_alt_mode = dcn32_link_encoder_is_in_alt_mode, .get_max_link_cap = dcn32_link_encoder_get_max_link_cap, .set_dio_phy_mux = dcn31_link_encoder_set_dio_phy_mux, + .get_hpd_state = dcn10_get_hpd_state, + .program_hpd_filter = dcn10_program_hpd_filter, }; void dcn401_link_encoder_construct(
@@ -236,6 +238,7 @@ void dcn401_link_encoder_construct( enc10->base.ctx = init_data->ctx; enc10->base.id = init_data->encoder; + enc10->base.hpd_gpio = init_data->hpd_gpio; enc10->base.hpd_source = init_data->hpd_source; enc10->base.connector = init_data->connector;
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +1 -21
@@ -729,7 +729,6 @@ void dce110_edp_wait_for_hpd_ready( {struct dc_context *ctx = link->ctx;struct graphics_object_id connector = link->link_enc->connector; -struct gpio *hpd;bool edp_hpd_high = false;uint32_t time_elapsed =0 ; uint32_t timeout = power_up ?
@@ -753,31 +752,16 @@ void dce110_edp_wait_for_hpd_ready(* we need to wait until SENSE bit is high/low. */ -/* obtain HPD */ -/* TODO what to do with this? */ - hpd = ctx->dc->link_srv->get_hpd_gpio (ctx->dc_bios, connector, ctx->gpio_service); - -if (!hpd) { -BREAK_TO_DEBUGGER (); -return ; - } -if (link->panel_config.pps.extra_t3_ms >0 ) {int extra_t3_in_ms = link->panel_config.pps.extra_t3_ms;msleep (extra_t3_in_ms); } -dal_gpio_open (hpd,GPIO_MODE_INTERRUPT ); -/* wait until timeout or panel detected */ do { - uint32_t detected = 0; - - dal_gpio_get_value(hpd, &detected); - - if (!(detected ^ power_up)) { + if (!(link->dc->link_srv->get_hpd_state(link) ^ power_up)) { edp_hpd_high = true; break; }
@@ -787,10 +771,6 @@ void dce110_edp_wait_for_hpd_ready( time_elapsed +=HPD_CHECK_INTERVAL ; }while (time_elapsed < timeout); -dal_gpio_close (hpd); - -dal_gpio_destroy_irq (&hpd); -/* ensure that the panel is detected */ if (!edp_hpd_high)DC_LOG_DC ("%s: wait timed out!\n" , __func__);
drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h +4 -0
@@ -44,6 +44,7 @@ struct pipe_ctx;struct encoder_init_data {enum channel_id channel;struct graphics_object_id connector; +struct gpio *hpd_gpio;enum hpd_source_id hpd_source;/* TODO: in DAL2, here was pointer to EventManagerInterface */ struct graphics_object_id encoder;
@@ -87,6 +88,7 @@ struct link_encoder {enum engine_id analog_engine;struct encoder_feature_support features;enum transmitter transmitter; +struct gpio *hpd_gpio;enum hpd_source_id hpd_source;bool usbc_combo_phy; };
@@ -178,6 +180,8 @@ struct link_encoder_funcs {void (*disable_dpia_output)(struct link_encoder *link_enc,uint8_t dpia_id,uint8_t digmode); +bool (*get_hpd_state)(struct link_encoder *enc); +bool (*program_hpd_filter)(struct link_encoder *enc,int delay_on_connect_in_ms,int delay_on_disconnect_in_ms); };/*
drivers/gpu/drm/amd/display/dc/inc/link_service.h +0 -3
@@ -114,9 +114,6 @@ struct link_service { struct dc_sink_init_data *init_data);void (*remove_remote_sink)(struct dc_link *link,struct dc_sink *sink);bool (*get_hpd_state)(struct dc_link *link); -struct gpio *(*get_hpd_gpio)(struct dc_bios *dcb, -struct graphics_object_id link_id, -struct gpio_service *gpio_service);void (*enable_hpd)(const struct dc_link *link);void (*disable_hpd)(const struct dc_link *link);void (*enable_hpd_filter)(struct dc_link *link,bool enable);
drivers/gpu/drm/amd/display/dc/link/link_detection.c +1 -9
@@ -1400,8 +1400,6 @@ static bool link_detect_analog(struct dc_link *link, enum dc_connection_type *ty*/ bool link_detect_connection_type (struct dc_link *link,enum dc_connection_type *type) { -uint32_t is_hpd_high =0 ; -if (link->connector_signal ==SIGNAL_TYPE_LVDS ) { *type = dc_connection_single;return true;
@@ -1436,10 +1434,7 @@ bool link_detect_connection_type(struct dc_link *link, enum dc_connection_type * } -if (!query_hpd_status (link, &is_hpd_high)) - goto hpd_gpio_failure; - -if (is_hpd_high) { +if (link_get_hpd_state (link)) { *type = dc_connection_single;/* TODO: need to do the actual detection */ }else {
@@ -1452,9 +1447,6 @@ bool link_detect_connection_type(struct dc_link *link, enum dc_connection_type * }return true; - -hpd_gpio_failure: -return false; }bool link_detect (struct dc_link *link,enum dc_detect_reason reason)
drivers/gpu/drm/amd/display/dc/link/link_factory.c +103 -90
256 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c +48 -117
207 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.h +0 -1
@@ -43,7 +43,6 @@ bool program_hpd_filter(const struct dc_link *link);* Returns true if HPD high. */ bool dpia_query_hpd_status (struct dc_link *link); -bool query_hpd_status (struct dc_link *link,uint32_t *is_hpd_high);bool link_get_hpd_state (struct dc_link *link); struct gpio *link_get_hpd_gpio(struct dc_bios *dcb, struct graphics_object_id link_id,
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.h +4 -1
@@ -317,7 +317,10 @@ unsigned int dcn32_get_max_hw_cursor_size(const struct dc *dc,AUX_REG_LIST_RI (id),SRI_ARR (AUX_DPHY_TX_CONTROL ,DP_AUX , id) /* HDP */ -#define HPD_REG_LIST_RI (id) SRI_ARR(DC_HPD_CONTROL, HPD, id) +#define HPD_REG_LIST_RI (id) \ + SRI_ARR(DC_HPD_CONTROL, HPD, id), \ + SRI_ARR(DC_HPD_INT_STATUS, HPD, id), \ + SRI_ARR(DC_HPD_TOGGLE_FILT_CNTL, HPD, id)/* Link encoder */ #define LE_DCN3_REG_LIST_RI (id) \
Signature · 1 line
2.34.1
PATCH 10/14 drm/amd/display: Correct FIXED_VS Link Rate Toggle Condition
In reply to [email protected]From: Jing Zhou <[email protected]>
[WHY&HOW]
The condition is only perform toggle if FIXED_VS LTTPR reports no IEEE OUI.
The literal "\x0,\x0,\x0" contains commas changes the bytes being compared to {0x00,0x2C,0X00}.
The correct literal should be "\x00\x00\x00" without commas.
--- .../dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c +1 -1
@@ -271,7 +271,7 @@ enum link_training_result dp_perform_fixed_vs_pe_training_sequence( rate =get_dpcd_link_rate (<_settings->link_settings);// Only perform toggle if FIXED_VS LTTPR reports no IEEE OUI -if (memcmp ("\x0,\x0,\x0" , &link->dpcd_caps.lttpr_caps.lttpr_ieee_oui[0 ],3 ) ==0 ) { +if (memcmp ("\x00\x00\x00" , &link->dpcd_caps.lttpr_caps.lttpr_ieee_oui[0 ],3 ) ==0 ) {/* Vendor specific: Toggle link rate */ toggle_rate = (rate ==0x6 ) ?0xA :0x6 ;
Signature · 1 line
2.34.1
PATCH 9/14 drm/amd/display: Add additional info from DML
In reply to [email protected]From: Nevenko Stupar <[email protected]>
for DMU when applicable on future platforms.
--- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 18 ++++++++++-------- .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 7 ++++--- 2 files changed, 14 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +10 -8
@@ -1833,9 +1833,10 @@ static void dc_dmub_srv_rb_based_fams2_update_config(struct dc *dc,/* apply feature configuration based on current driver state */ global_cmd->config.global.features.bits.enable_visual_confirm = dc->debug.visual_confirm ==VISUAL_CONFIRM_FAMS2 ; - global_cmd->config.global.features.bits.enable = enable; + global_cmd->config.global.features.bits.enable = enable && context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable; + global_cmd->config.global.features.bits.enable_ppt_check = dc->debug.fams2_config.bits.enable_ppt_check; -if (enable && context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable) { +if (enable) {/* set multi pending for global, and unset for last stream cmd */ global_cmd->header.multi_cmd_pending =1 ; cmd[2 * context->bw_ctx.bw.dcn.fams2_global_config.num_streams].fams2_config.header.multi_cmd_pending =0 ;
@@ -1862,16 +1863,16 @@ static void dc_dmub_srv_ib_based_fams2_update_config(struct dc *dc, cmd.ib_fams2_config.ib_data.src.quad_part = dc->ctx->dmub_srv->dmub->ib_mem_gart.gpu_addr; cmd.ib_fams2_config.ib_data.size =sizeof (*config); -if (enable && context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable) { +if (enable) { +/* send global configuration parameters */ +memcpy (&config->global, &context->bw_ctx.bw.dcn.fams2_global_config, +sizeof (struct dmub_cmd_fams2_global_config )); +/* copy static feature configuration overrides */ config->global.features.bits.enable_stall_recovery = dc->debug.fams2_config.bits.enable_stall_recovery; config->global.features.bits.enable_offload_flip = dc->debug.fams2_config.bits.enable_offload_flip; config->global.features.bits.enable_debug = dc->debug.fams2_config.bits.enable_debug; -/* send global configuration parameters */ -memcpy (&config->global, &context->bw_ctx.bw.dcn.fams2_global_config, -sizeof (struct dmub_cmd_fams2_global_config )); -/* construct per-stream configs */ for (i =0 ; i < context->bw_ctx.bw.dcn.fams2_global_config.num_streams; i++) {/* copy stream static base state */
@@ -1887,7 +1888,8 @@ static void dc_dmub_srv_ib_based_fams2_update_config(struct dc *dc, } config->global.features.bits.enable_visual_confirm = dc->debug.visual_confirm ==VISUAL_CONFIRM_FAMS2 ; - config->global.features.bits.enable = enable; + config->global.features.bits.enable = enable && context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable; + config->global.features.bits.enable_ppt_check = dc->debug.fams2_config.bits.enable_ppt_check;dm_execute_dmub_cmd_list (dc->ctx,1 , &cmd,DM_DMUB_WAIT_TYPE_WAIT ); }
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +4 -3
@@ -1513,14 +1513,15 @@ void dcn401_dmub_hw_control_lock_fast(union block_sequence_params *params)void dcn401_fams2_update_config (struct dc *dc,struct dc_state *context,bool enable) { -bool fams2_required; +bool fams2_info_required;if (!dc->ctx || !dc->ctx->dmub_srv || !dc->debug.fams2_config.bits.enable)return ; - fams2_required = context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable; + fams2_info_required = context->bw_ctx.bw.dcn.fams2_global_config.features.bits.enable; + fams2_info_required |= context->bw_ctx.bw.dcn.fams2_global_config.features.bits.legacy_method_no_fams2; -dc_dmub_srv_fams2_update_config (dc, context, enable && fams2_required); +dc_dmub_srv_fams2_update_config (dc, context, enable && fams2_info_required); } static void update_dsc_for_odm_change(struct dc *dc, struct dc_state *context,
Signature · 1 line
2.34.1
PATCH 6/14 drm/amd/display: Fix wrong x_pos and y_pos for cursor offload
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
The hubp401_cursor_set_position function programs a different value than it stores for use with cursor offload.
This can cause a desync when switching between cursor programming paths.
[How]
We do the translation to destination space currently twice: once in the HWSS layer, and then again in the HUBP layer since we never store the translated result.
HUBP expects to program the pos->x and pos->y directly for other ASIC, so follow that pattern here as well.
--- .../drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c | 14 ++++++-------- .../drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 3 +++ 2 files changed, 9 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +6 -8
@@ -733,10 +733,8 @@ void hubp401_cursor_set_position( const struct dc_cursor_mi_param *param) {struct dcn20_hubp *hubp2 =TO_DCN20_HUBP (hubp); -int x_pos = pos->x - param->recout.x; -int y_pos = pos->y - param->recout.y; -int rec_x_offset = x_pos - pos->x_hotspot; -int rec_y_offset = y_pos - pos->y_hotspot; +int rec_x_offset = pos->x - pos->x_hotspot; +int rec_y_offset = pos->y - pos->y_hotspot;int dst_x_offset;int x_pos_viewport =0 ;int x_hot_viewport =0 ;
@@ -748,10 +746,10 @@ void hubp401_cursor_set_position(* within preceeding ODM slices. */ if (param->recout.width) { - x_pos_viewport = x_pos * param->viewport.width / param->recout.width; + x_pos_viewport = pos->x * param->viewport.width / param->recout.width; x_hot_viewport = pos->x_hotspot * param->viewport.width / param->recout.width; }else { -ASSERT (!cur_en || x_pos ==0 ); +ASSERT (!cur_en || pos->x ==0 );ASSERT (!cur_en || pos->x_hotspot ==0 ); }
@@ -790,8 +788,8 @@ void hubp401_cursor_set_position(if (!hubp->cursor_offload) {REG_SET_2 (CURSOR_POSITION ,0 , -CURSOR_X_POSITION , x_pos, -CURSOR_Y_POSITION , y_pos); +CURSOR_X_POSITION , pos->x, +CURSOR_Y_POSITION , pos->y); REG_SET_2(CURSOR_HOT_SPOT, 0, CURSOR_HOT_SPOT_X, pos->x_hotspot,
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +3 -0
@@ -1215,6 +1215,9 @@ void dcn401_set_cursor_position(struct pipe_ctx *pipe_ctx)if (recout_y_pos + (int )hubp->curs_attr.height <=0 ) pos_cpy.enable = false;/* not visible beyond top edge*/ + pos_cpy.x = x_pos; + pos_cpy.y = y_pos; + hubp->funcs->set_cursor_position (hubp, &pos_cpy, ¶m); dpp->funcs->set_cursor_position (dpp, &pos_cpy, ¶m, hubp->curs_attr.width, hubp->curs_attr.height); }
Signature · 1 line
2.34.1
PATCH 11/14 drm/amd/display: add register definitions in dcn_hubbub_registers
In reply to [email protected]From: Charlene Liu <[email protected]>
--- drivers/gpu/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.h +5 -1
@@ -437,7 +437,9 @@ struct dcn_hubbub_registers {type DCHUBBUB_ARB_REFCYC_PER_META_TRIP_A ;\type DCHUBBUB_ARB_REFCYC_PER_META_TRIP_B ;\type DCHUBBUB_ARB_FRAC_URG_BW_MALL_A ;\ - type DCHUBBUB_ARB_FRAC_URG_BW_MALL_B +type DCHUBBUB_ARB_FRAC_URG_BW_MALL_B ;\ +type DCHUBBUB_ARB_ALLOW_DCFCLK_DEEP_SLEEP_FORCE_VALUE ;\ + type DCHUBBUB_ARB_ALLOW_DCFCLK_DEEP_SLEEP_FORCE_ENABLEstruct dcn_hubbub_shift {DCN_HUBBUB_REG_FIELD_LIST (uint8_t );
@@ -447,6 +449,7 @@ struct dcn_hubbub_shift {HUBBUB_REG_FIELD_LIST_DCN32 (uint8_t);HUBBUB_REG_FIELD_LIST_DCN35 (uint8_t);HUBBUB_REG_FIELD_LIST_DCN4_01 (uint8_t); + };struct dcn_hubbub_mask {
@@ -457,6 +460,7 @@ struct dcn_hubbub_mask {HUBBUB_REG_FIELD_LIST_DCN32 (uint32_t);HUBBUB_REG_FIELD_LIST_DCN35 (uint32_t);HUBBUB_REG_FIELD_LIST_DCN4_01 (uint32_t); + };struct dc ;
Signature · 1 line
2.34.1
PATCH 8/14 drm/amd/display: Guard FAMS2 configuration updates
In reply to [email protected]From: Dillon Varone <[email protected]>
[WHY&HOW]
If DMCUB is not initialized or FAMS2 is not supported, the interface should not be called.
--- drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +5 -2
@@ -1774,7 +1774,8 @@ void dcn401_unblank_stream(struct pipe_ctx *pipe_ctx,void dcn401_hardware_release (struct dc *dc) {if (!dc->debug.disable_force_pstate_allow_on_hw_release) { -dc_dmub_srv_fams2_update_config (dc, dc->current_state, false); +if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable) +dc_dmub_srv_fams2_update_config (dc, dc->current_state, false);/* If pstate unsupported, or still supported * by firmware, force it supported by dcn
@@ -1794,7 +1795,9 @@ void dcn401_hardware_release(struct dc *dc) dc->clk_mgr->clks.p_state_change_support = false; dc->clk_mgr->funcs->update_clocks (dc->clk_mgr, dc->current_state, true); } -dc_dmub_srv_fams2_update_config (dc, dc->current_state, false); + +if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable) +dc_dmub_srv_fams2_update_config (dc, dc->current_state, false); } }
Signature · 1 line
2.34.1
PATCH 14/14 drm/amd/display: Promote DC to 3.2.361
In reply to [email protected]From: Taimur Hassan <[email protected]>
This version brings along the following updates:
- Fix wrong x_pos and y_pos for cursor offload.
- Fix Smart Power OLED not working after S4.
- Fix double cursor when switching between hw and sw cursor.
- Add configurable SPL namespace prefix.
- Add register definitions in dcn_hubbub_registers.
- Add additional info from DML.
- Add dc interface for query QoS information.
- Refactor HPD to increase flexibility.
- Remove unused encoder types.
--- 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
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;struct dcn_optc_reg_state ;struct dcn_dccg_reg_state ; -#define DC_VER "3.2.360" +#define DC_VER "3.2.361"/** * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.34.1
PATCH 12/14 drm/amd/display: Reset pipe mask at beginning of cursor offload
In reply to [email protected]From: Nicholas Kazlauskas <[email protected]>
[Why]
Double cursor when switching between hardware and software cursor when dragging an MPO window can occur with cursor offload enabled.
The abort cursor update in the full programming path is responsible for this issue since it does not reset the pipe mask when attempting to submit an empty update.
The firmware programs the payload as requested which may contain invalid or stale data for the previously enabled pipes, resulting in an offset or double cursor.
[How]
For performance we don't want to memset the entire payload structure due to its size, so just reset the pipe mask which will indicate the payload data is empty.
--- drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +1 -0
@@ -1631,6 +1631,7 @@ void dcn35_begin_cursor_offload_update(struct dc *dc, const struct pipe_ctx *pip payload_idx = write_idx %ARRAY_SIZE (cs->offload_streams[stream_idx].payloads); cs->offload_streams[stream_idx].payloads[payload_idx].write_idx_start = write_idx; + cs->offload_streams[stream_idx].payloads[payload_idx].pipe_mask =0 ;if (pipe->plane_res.hubp) pipe->plane_res.hubp->cursor_offload = true;
Signature · 1 line
2.34.1
PATCH 13/14 drm/amd/display - dc: Add configurable SPL namespace prefix
In reply to [email protected]From: Navid Assadian <[email protected]>
[WHY]
SPL is a shared library that is used both in kernel and userspace. When multiple libraries use SPL as statically linked, namespace collision occur.
[HOW]
Create a configurable namespace prefix.
Add the prefix to all the public functions of the library to distinguish between the SPL functions in each library.
--- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 186 +++++++++--------- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h | 8 - .../drm/amd/display/dc/sspl/dc_spl_filters.c | 4 +- .../drm/amd/display/dc/sspl/dc_spl_filters.h | 4 +- .../display/dc/sspl/dc_spl_isharp_filters.c | 31 +-- .../display/dc/sspl/dc_spl_isharp_filters.h | 16 +- .../display/dc/sspl/dc_spl_scl_easf_filters.c | 155 ++++++++------- .../display/dc/sspl/dc_spl_scl_easf_filters.h | 37 ++-- .../amd/display/dc/sspl/dc_spl_scl_filters.c | 27 +-- .../amd/display/dc/sspl/dc_spl_scl_filters.h | 3 +- .../amd/display/dc/sspl/spl_custom_float.c | 11 +- .../amd/display/dc/sspl/spl_custom_float.h | 4 +- .../drm/amd/display/dc/sspl/spl_fixpt31_32.c | 78 ++++---- .../drm/amd/display/dc/sspl/spl_fixpt31_32.h | 56 +++--- .../drm/amd/display/dc/sspl/spl_os_types.h | 9 + 15 files changed, 328 insertions(+), 301 deletions(-)
drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c +97 -89
@@ -7,7 +7,7 @@#include "dc_spl_isharp_filters.h" #include "spl_debug.h" -#define IDENTITY_RATIO (ratio) (spl_fixpt_u3d19(ratio) == (1 << 19)) +#define IDENTITY_RATIO (ratio) (SPL_NAMESPACE(spl_fixpt_u3d19(ratio)) == (1 << 19))#define MIN_VIEWPORT_SIZE 12static bool spl_is_yuv420 (enum spl_pixel_format format)
@@ -161,22 +161,24 @@ static struct spl_rect calculate_plane_rec_in_timing_active(struct spl_fixed31_32 temp; - temp =spl_fixpt_from_fraction (rec_in->x * (long long )stream_dst->width, - stream_src->width); + temp =SPL_NAMESPACE (spl_fixpt_from_fraction ( + rec_in->x * (long long )stream_dst->width, + stream_src->width)); rec_out.x = stream_dst->x +spl_fixpt_round (temp); - temp =spl_fixpt_from_fraction ( + temp =SPL_NAMESPACE (spl_fixpt_from_fraction ( (rec_in->x + rec_in->width) * (long long )stream_dst->width, - stream_src->width); + stream_src->width)); rec_out.width = stream_dst->x +spl_fixpt_round (temp) - rec_out.x; - temp =spl_fixpt_from_fraction (rec_in->y * (long long )stream_dst->height, - stream_src->height); + temp =SPL_NAMESPACE (spl_fixpt_from_fraction ( + rec_in->y * (long long )stream_dst->height, + stream_src->height)); rec_out.y = stream_dst->y +spl_fixpt_round (temp); - temp =spl_fixpt_from_fraction ( + temp =SPL_NAMESPACE (spl_fixpt_from_fraction ( (rec_in->y + rec_in->height) * (long long )stream_dst->height, - stream_src->height); + stream_src->height)); rec_out.height = stream_dst->y +spl_fixpt_round (temp) - rec_out.y;return rec_out;
@@ -442,12 +444,12 @@ static void spl_calculate_scaling_ratios(struct spl_in *spl_in, spl_in->basic_in.rotation == SPL_ROTATION_ANGLE_270)spl_swap (surf_src.height, surf_src.width); - spl_scratch->scl_data.ratios.horz =spl_fixpt_from_fraction ( + spl_scratch->scl_data.ratios.horz =SPL_NAMESPACE (spl_fixpt_from_fraction ( surf_src.width, - spl_in->basic_in.dst_rect.width); - spl_scratch->scl_data.ratios.vert =spl_fixpt_from_fraction ( + spl_in->basic_in.dst_rect.width)); + spl_scratch->scl_data.ratios.vert =SPL_NAMESPACE (spl_fixpt_from_fraction ( surf_src.height, - spl_in->basic_in.dst_rect.height); + spl_in->basic_in.dst_rect.height));if (spl_in->basic_out.view_format ==SPL_VIEW_3D_SIDE_BY_SIDE ) spl_scratch->scl_data.ratios.horz.value *=2 ;
@@ -480,14 +482,14 @@ static void spl_calculate_scaling_ratios(struct spl_in *spl_in,* that is output/input. Currently we calculate input/output * Store 1/ratio in recip_ratio for those lookups */ - spl_scratch->scl_data.recip_ratios.horz =spl_fixpt_recip ( - spl_scratch->scl_data.ratios.horz); - spl_scratch->scl_data.recip_ratios.vert =spl_fixpt_recip ( - spl_scratch->scl_data.ratios.vert); - spl_scratch->scl_data.recip_ratios.horz_c =spl_fixpt_recip ( - spl_scratch->scl_data.ratios.horz_c); - spl_scratch->scl_data.recip_ratios.vert_c =spl_fixpt_recip ( - spl_scratch->scl_data.ratios.vert_c); + spl_scratch->scl_data.recip_ratios.horz =SPL_NAMESPACE (spl_fixpt_recip ( + spl_scratch->scl_data.ratios.horz)); + spl_scratch->scl_data.recip_ratios.vert =SPL_NAMESPACE (spl_fixpt_recip ( + spl_scratch->scl_data.ratios.vert)); + spl_scratch->scl_data.recip_ratios.horz_c =SPL_NAMESPACE (spl_fixpt_recip ( + spl_scratch->scl_data.ratios.horz_c)); + spl_scratch->scl_data.recip_ratios.vert_c =SPL_NAMESPACE (spl_fixpt_recip ( + spl_scratch->scl_data.ratios.vert_c)); }/* Calculate Viewport size */
@@ -646,11 +648,11 @@ static void spl_calculate_inits_and_viewports(struct spl_in *spl_in,switch (spl_in->basic_in.cositing) {case CHROMA_COSITING_TOPLEFT : - init_adj_h =spl_fixpt_from_fraction (h_sign,4 ); - init_adj_v =spl_fixpt_from_fraction (v_sign,4 ); + init_adj_h =SPL_NAMESPACE (spl_fixpt_from_fraction (h_sign,4 )); + init_adj_v =SPL_NAMESPACE (spl_fixpt_from_fraction (v_sign,4 ));break ;case CHROMA_COSITING_LEFT : - init_adj_h =spl_fixpt_from_fraction (h_sign,4 ); + init_adj_h =SPL_NAMESPACE (spl_fixpt_from_fraction (h_sign,4 )); init_adj_v = spl_fixpt_zero;break ;case CHROMA_COSITING_NONE :
@@ -939,16 +941,16 @@ static void spl_get_taps_non_adaptive_scaler(* Max downscale supported is 6.0x. Add ASSERT to catch if go beyond that */ check_max_downscale =spl_fixpt_le (spl_scratch->scl_data.ratios.horz, -spl_fixpt_from_fraction (6 ,1 )); +SPL_NAMESPACE (spl_fixpt_from_fraction (6 ,1 )));SPL_ASSERT (check_max_downscale); check_max_downscale =spl_fixpt_le (spl_scratch->scl_data.ratios.vert, -spl_fixpt_from_fraction (6 ,1 )); +SPL_NAMESPACE (spl_fixpt_from_fraction (6 ,1 )));SPL_ASSERT (check_max_downscale); check_max_downscale =spl_fixpt_le (spl_scratch->scl_data.ratios.horz_c, -spl_fixpt_from_fraction (6 ,1 )); +SPL_NAMESPACE (spl_fixpt_from_fraction (6 ,1 )));SPL_ASSERT (check_max_downscale); check_max_downscale =spl_fixpt_le (spl_scratch->scl_data.ratios.vert_c, -spl_fixpt_from_fraction (6 ,1 )); +SPL_NAMESPACE (spl_fixpt_from_fraction (6 ,1 )));SPL_ASSERT (check_max_downscale);
@@ -1194,35 +1196,39 @@ static void spl_set_manual_ratio_init_data(struct dscl_prog_data *dscl_prog_data {struct spl_fixed31_32 bot; - dscl_prog_data->ratios.h_scale_ratio =spl_fixpt_u3d19 (scl_data->ratios.horz) <<5 ; - dscl_prog_data->ratios.v_scale_ratio =spl_fixpt_u3d19 (scl_data->ratios.vert) <<5 ; - dscl_prog_data->ratios.h_scale_ratio_c =spl_fixpt_u3d19 (scl_data->ratios.horz_c) <<5 ; - dscl_prog_data->ratios.v_scale_ratio_c =spl_fixpt_u3d19 (scl_data->ratios.vert_c) <<5 ; + dscl_prog_data->ratios.h_scale_ratio =SPL_NAMESPACE (spl_fixpt_u3d19 ( + scl_data->ratios.horz)) <<5 ; + dscl_prog_data->ratios.v_scale_ratio =SPL_NAMESPACE (spl_fixpt_u3d19 ( + scl_data->ratios.vert)) <<5 ; + dscl_prog_data->ratios.h_scale_ratio_c =SPL_NAMESPACE (spl_fixpt_u3d19 ( + scl_data->ratios.horz_c)) <<5 ; + dscl_prog_data->ratios.v_scale_ratio_c =SPL_NAMESPACE (spl_fixpt_u3d19 ( + scl_data->ratios.vert_c)) <<5 ;/* * 0.24 format for fraction, first five bits zeroed */ dscl_prog_data->init.h_filter_init_frac = -spl_fixpt_u0d19 (scl_data->inits.h) <<5 ; +SPL_NAMESPACE (spl_fixpt_u0d19 (scl_data->inits.h)) <<5 ; dscl_prog_data->init.h_filter_init_int =spl_fixpt_floor (scl_data->inits.h); dscl_prog_data->init.h_filter_init_frac_c = -spl_fixpt_u0d19 (scl_data->inits.h_c) <<5 ; +SPL_NAMESPACE (spl_fixpt_u0d19 (scl_data->inits.h_c)) <<5 ; dscl_prog_data->init.h_filter_init_int_c =spl_fixpt_floor (scl_data->inits.h_c); dscl_prog_data->init.v_filter_init_frac = -spl_fixpt_u0d19 (scl_data->inits.v) <<5 ; +SPL_NAMESPACE (spl_fixpt_u0d19 (scl_data->inits.v)) <<5 ; dscl_prog_data->init.v_filter_init_int =spl_fixpt_floor (scl_data->inits.v); dscl_prog_data->init.v_filter_init_frac_c = -spl_fixpt_u0d19 (scl_data->inits.v_c) <<5 ; +SPL_NAMESPACE (spl_fixpt_u0d19 (scl_data->inits.v_c)) <<5 ; dscl_prog_data->init.v_filter_init_int_c =spl_fixpt_floor (scl_data->inits.v_c); bot =spl_fixpt_add (scl_data->inits.v, scl_data->ratios.vert); - dscl_prog_data->init.v_filter_init_bot_frac =spl_fixpt_u0d19 (bot) <<5 ; + dscl_prog_data->init.v_filter_init_bot_frac =SPL_NAMESPACE (spl_fixpt_u0d19 (bot)) <<5 ; dscl_prog_data->init.v_filter_init_bot_int =spl_fixpt_floor (bot); bot =spl_fixpt_add (scl_data->inits.v_c, scl_data->ratios.vert_c); - dscl_prog_data->init.v_filter_init_bot_frac_c =spl_fixpt_u0d19 (bot) <<5 ; + dscl_prog_data->init.v_filter_init_bot_frac_c =SPL_NAMESPACE (spl_fixpt_u0d19 (bot)) <<5 ; dscl_prog_data->init.v_filter_init_bot_int_c =spl_fixpt_floor (bot); }
@@ -1270,7 +1276,7 @@ static void spl_set_dscl_prog_data(struct spl_in *spl_in, struct spl_scratch *sp// Set viewport_c dscl_prog_data->viewport_c = spl_scratch->scl_data.viewport_c;// Set filters data -spl_set_filters_data (dscl_prog_data, data, enable_easf_v, enable_easf_h); +SPL_NAMESPACE (spl_set_filters_data (dscl_prog_data, data, enable_easf_v, enable_easf_h)); }/* Calculate C0-C3 coefficients based on HDR_mult */
@@ -1286,28 +1292,31 @@ static void spl_calculate_c0_c3_hdr(struct dscl_prog_data *dscl_prog_data, uint3else hdr_multx100_int =100 ;/* default for 80 nits otherwise */ - hdr_mult =spl_fixpt_from_fraction ((long long )hdr_multx100_int,100LL ); - c0_mult =spl_fixpt_from_fraction (2126LL ,10000LL ); - c1_mult =spl_fixpt_from_fraction (7152LL ,10000LL ); - c2_mult =spl_fixpt_from_fraction (722LL ,10000LL ); + hdr_mult =SPL_NAMESPACE (spl_fixpt_from_fraction ((long long )hdr_multx100_int,100LL )); + c0_mult =SPL_NAMESPACE (spl_fixpt_from_fraction (2126LL ,10000LL )); + c1_mult =SPL_NAMESPACE (spl_fixpt_from_fraction (7152LL ,10000LL )); + c2_mult =SPL_NAMESPACE (spl_fixpt_from_fraction (722LL ,10000LL )); - c0_calc =spl_fixpt_mul (hdr_mult,spl_fixpt_mul (c0_mult,spl_fixpt_from_fraction ( -16384LL ,125LL ))); - c1_calc =spl_fixpt_mul (hdr_mult,spl_fixpt_mul (c1_mult,spl_fixpt_from_fraction ( -16384LL ,125LL ))); - c2_calc =spl_fixpt_mul (hdr_mult,spl_fixpt_mul (c2_mult,spl_fixpt_from_fraction ( -16384LL ,125LL ))); + c0_calc =SPL_NAMESPACE (spl_fixpt_mul (hdr_mult,SPL_NAMESPACE (spl_fixpt_mul (c0_mult, +SPL_NAMESPACE (spl_fixpt_from_fraction (16384LL ,125LL )))))); + c1_calc =SPL_NAMESPACE (spl_fixpt_mul (hdr_mult,SPL_NAMESPACE (spl_fixpt_mul (c1_mult, +SPL_NAMESPACE (spl_fixpt_from_fraction (16384LL ,125LL )))))); + c2_calc =SPL_NAMESPACE (spl_fixpt_mul (hdr_mult,SPL_NAMESPACE (spl_fixpt_mul (c2_mult, +SPL_NAMESPACE (spl_fixpt_from_fraction (16384LL ,125LL )))))); fmt.exponenta_bits =5 ; fmt.mantissa_bits =10 ; fmt.sign = true;// fp1.5.10, C0 coefficient (LN_rec709: HDR_MULT * 0.212600 * 2^14/125) -spl_convert_to_custom_float_format (c0_calc, &fmt, &dscl_prog_data->easf_matrix_c0); +SPL_NAMESPACE (spl_convert_to_custom_float_format (c0_calc, &fmt, + &dscl_prog_data->easf_matrix_c0));// fp1.5.10, C1 coefficient (LN_rec709: HDR_MULT * 0.715200 * 2^14/125) -spl_convert_to_custom_float_format (c1_calc, &fmt, &dscl_prog_data->easf_matrix_c1); +SPL_NAMESPACE (spl_convert_to_custom_float_format (c1_calc, &fmt, + &dscl_prog_data->easf_matrix_c1));// fp1.5.10, C2 coefficient (LN_rec709: HDR_MULT * 0.072200 * 2^14/125) -spl_convert_to_custom_float_format (c2_calc, &fmt, &dscl_prog_data->easf_matrix_c2); +SPL_NAMESPACE (spl_convert_to_custom_float_format (c2_calc, &fmt, + &dscl_prog_data->easf_matrix_c2)); dscl_prog_data->easf_matrix_c3 =0x0 ;// fp1.5.10, C3 coefficient }
@@ -1325,48 +1334,48 @@ static void spl_set_easf_data(struct spl_scratch *spl_scratch, struct spl_out *s dscl_prog_data->easf_v_bf1_en =1 ;// 1-bit, BF1 calculation enable, 0=disable, 1=enable dscl_prog_data->easf_v_bf2_mode =0xF ;// 4-bit, BF2 calculation mode /* 2-bit, BF3 chroma mode correction calculation mode */ - dscl_prog_data->easf_v_bf3_mode =spl_get_v_bf3_mode ( - spl_scratch->scl_data.recip_ratios.vert); + dscl_prog_data->easf_v_bf3_mode =SPL_NAMESPACE (spl_get_v_bf3_mode ( + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10 [ minCoef ]*/ dscl_prog_data->easf_v_ringest_3tap_dntilt_uptilt = -spl_get_3tap_dntilt_uptilt_offset (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_3tap_dntilt_uptilt_offset (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10 [ upTiltMaxVal ]*/ dscl_prog_data->easf_v_ringest_3tap_uptilt_max = -spl_get_3tap_uptilt_maxval (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_3tap_uptilt_maxval (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10 [ dnTiltSlope ]*/ dscl_prog_data->easf_v_ringest_3tap_dntilt_slope = -spl_get_3tap_dntilt_slope (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_3tap_dntilt_slope (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10 [ upTilt1Slope ]*/ dscl_prog_data->easf_v_ringest_3tap_uptilt1_slope = -spl_get_3tap_uptilt1_slope (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_3tap_uptilt1_slope (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10 [ upTilt2Slope ]*/ dscl_prog_data->easf_v_ringest_3tap_uptilt2_slope = -spl_get_3tap_uptilt2_slope (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_3tap_uptilt2_slope (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10 [ upTilt2Offset ]*/ dscl_prog_data->easf_v_ringest_3tap_uptilt2_offset = -spl_get_3tap_uptilt2_offset (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_3tap_uptilt2_offset (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10; (2.0) Ring reducer gain for 4 or 6-tap mode [H_REDUCER_GAIN4] */ dscl_prog_data->easf_v_ringest_eventap_reduceg1 = -spl_get_reducer_gain4 (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_reducer_gain4 (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10; (2.5) Ring reducer gain for 6-tap mode [V_REDUCER_GAIN6] */ dscl_prog_data->easf_v_ringest_eventap_reduceg2 = -spl_get_reducer_gain6 (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_reducer_gain6 (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10; (-0.135742) Ring gain for 6-tap set to -139/1024 */ dscl_prog_data->easf_v_ringest_eventap_gain1 = -spl_get_gainRing4 (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_gainRing4 (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert));/* FP1.5.10; (-0.024414) Ring gain for 6-tap set to -25/1024 */ dscl_prog_data->easf_v_ringest_eventap_gain2 = -spl_get_gainRing6 (spl_scratch->scl_data.taps.v_taps, - spl_scratch->scl_data.recip_ratios.vert); +SPL_NAMESPACE (spl_get_gainRing6 (spl_scratch->scl_data.taps.v_taps, + spl_scratch->scl_data.recip_ratios.vert)); dscl_prog_data->easf_v_bf_maxa =63 ;//Vertical Max BF value A in U0.6 format.Selected if V_FCNTL == 0 dscl_prog_data->easf_v_bf_maxb =63 ;//Vertical Max BF value A in U0.6 format.Selected if V_FCNTL == 1 dscl_prog_data->easf_v_bf_mina =0 ;//Vertical Min BF value A in U0.6 format.Selected if V_FCNTL == 0
@@ -1491,24 +1500,24 @@ static void spl_set_easf_data(struct spl_scratch *spl_scratch, struct spl_out *s dscl_prog_data->easf_h_bf2_mode =0xF ;// 4-bit, BF2 calculation mode /* 2-bit, BF3 chroma mode correction calculation mode */ - dscl_prog_data->easf_h_bf3_mode =spl_get_h_bf3_mode ( - spl_scratch->scl_data.recip_ratios.horz); + dscl_prog_data->easf_h_bf3_mode =SPL_NAMESPACE (spl_get_h_bf3_mode ( + spl_scratch->scl_data.recip_ratios.horz));/* FP1.5.10; (2.0) Ring reducer gain for 4 or 6-tap mode [H_REDUCER_GAIN4] */ dscl_prog_data->easf_h_ringest_eventap_reduceg1 = -spl_get_reducer_gain4 (spl_scratch->scl_data.taps.h_taps, - spl_scratch->scl_data.recip_ratios.horz); +SPL_NAMESPACE (spl_get_reducer_gain4 (spl_scratch->scl_data.taps.h_taps, + spl_scratch->scl_data.recip_ratios.horz));/* FP1.5.10; (2.5) Ring reducer gain for 6-tap mode [V_REDUCER_GAIN6] */ dscl_prog_data->easf_h_ringest_eventap_reduceg2 = -spl_get_reducer_gain6 (spl_scratch->scl_data.taps.h_taps, - spl_scratch->scl_data.recip_ratios.horz); +SPL_NAMESPACE (spl_get_reducer_gain6 (spl_scratch->scl_data.taps.h_taps, + spl_scratch->scl_data.recip_ratios.horz));/* FP1.5.10; (-0.135742) Ring gain for 6-tap set to -139/1024 */ dscl_prog_data->easf_h_ringest_eventap_gain1 = -spl_get_gainRing4 (spl_scratch->scl_data.taps.h_taps, - spl_scratch->scl_data.recip_ratios.horz); +SPL_NAMESPACE (spl_get_gainRing4 (spl_scratch->scl_data.taps.h_taps, + spl_scratch->scl_data.recip_ratios.horz));/* FP1.5.10; (-0.024414) Ring gain for 6-tap set to -25/1024 */ dscl_prog_data->easf_h_ringest_eventap_gain2 = -spl_get_gainRing6 (spl_scratch->scl_data.taps.h_taps, - spl_scratch->scl_data.recip_ratios.horz); +SPL_NAMESPACE (spl_get_gainRing6 (spl_scratch->scl_data.taps.h_taps, + spl_scratch->scl_data.recip_ratios.horz)); dscl_prog_data->easf_h_bf_maxa =63 ;//Horz Max BF value A in U0.6 format.Selected if H_FCNTL==0 dscl_prog_data->easf_h_bf_maxb =63 ;//Horz Max BF value B in U0.6 format.Selected if H_FCNTL==1 dscl_prog_data->easf_h_bf_mina =0 ;//Horz Min BF value B in U0.6 format.Selected if H_FCNTL==0
@@ -1689,9 +1698,9 @@ static void spl_set_isharp_data(struct dscl_prog_data *dscl_prog_data,return ; } -spl_build_isharp_1dlut_from_reference_curve (ratio, setup, adp_sharpness, - scale_to_sharpness_policy); -memcpy (dscl_prog_data->isharp_delta,spl_get_pregen_filter_isharp_1D_lut (setup), +SPL_NAMESPACE (spl_build_isharp_1dlut_from_reference_curve (ratio, setup, adp_sharpness, + scale_to_sharpness_policy)); +memcpy (dscl_prog_data->isharp_delta,SPL_NAMESPACE (spl_get_pregen_filter_isharp_1D_lut (setup)),sizeof (uint32_t ) *ISHARP_LUT_TABLE_SIZE ); dscl_prog_data->sharpness_level = adp_sharpness.sharpness_level;
@@ -1810,7 +1819,7 @@ static void spl_set_isharp_data(struct dscl_prog_data *dscl_prog_data, }// Set the values as per lookup table -spl_set_blur_scale_data (dscl_prog_data, data); +SPL_NAMESPACE (spl_set_blur_scale_data (dscl_prog_data, data)); }/* Calculate recout, scaling ratio, and viewport, then get optimal number of taps */
@@ -1922,4 +1931,3 @@ bool SPL_NAMESPACE(spl_get_number_of_taps(struct spl_in *spl_in, struct spl_outspl_set_taps_data (dscl_prog_data, data);return res; } -
drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h +0 -8
@@ -9,14 +9,6 @@#define BLACK_OFFSET_RGB_Y 0x0#define BLACK_OFFSET_CBCR 0x8000 -#ifndef SPL_PFX_ -#define SPL_PFX_ -#endif - -#define SPL_EXPAND2 (a, b) a##b -#define SPL_EXPAND (a, b) SPL_EXPAND2(a, b) -#define SPL_NAMESPACE (symbol) SPL_EXPAND(SPL_PFX_, symbol) -/* SPL interfaces */
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_filters.c +2 -2
@@ -4,8 +4,8 @@#include "dc_spl_filters.h" -void convert_filter_s1_10_to_s1_12 (const uint16_t *s1_10_filter, -uint16_t *s1_12_filter,int num_taps) +void SPL_NAMESPACE (convert_filter_s1_10_to_s1_12 (const uint16_t *s1_10_filter, +uint16_t *s1_12_filter,int num_taps)) {int num_entries =NUM_PHASES_COEFF * num_taps;int i;
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_filters.h +2 -2
@@ -9,7 +9,7 @@#define NUM_PHASES_COEFF 33 -void convert_filter_s1_10_to_s1_12 (const uint16_t *s1_10_filter, -uint16_t *s1_12_filter,int num_taps); +void SPL_NAMESPACE (convert_filter_s1_10_to_s1_12 (const uint16_t *s1_10_filter, +uint16_t *s1_12_filter,int num_taps));#endif /* __DC_SPL_FILTERS_H__ */
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_isharp_filters.c +16 -15
@@ -367,8 +367,8 @@ static unsigned int spl_calculate_sharpness_level_adj(struct spl_fixed31_32 rati sharpness_level_down_adj =0 ; lookup_ptr = sharpness_level_adj;while (j <NUM_SHARPNESS_ADJ_LEVELS ) { - ratio_level =spl_fixpt_from_fraction (lookup_ptr->ratio_numer, - lookup_ptr->ratio_denom); + ratio_level =SPL_NAMESPACE (spl_fixpt_from_fraction (lookup_ptr->ratio_numer, + lookup_ptr->ratio_denom));if (ratio.value >= ratio_level.value) { sharpness_level_down_adj = lookup_ptr->level_down_adj;break ;
@@ -447,8 +447,9 @@ static unsigned int spl_calculate_sharpness_level(struct spl_fixed31_32 ratio,return sharpness_level; } -void spl_build_isharp_1dlut_from_reference_curve (struct spl_fixed31_32 ratio,enum system_setup setup, -struct adaptive_sharpness sharpness,enum scale_to_sharpness_policy scale_to_sharpness_policy) +void SPL_NAMESPACE (spl_build_isharp_1dlut_from_reference_curve ( +struct spl_fixed31_32 ratio,enum system_setup setup, +struct adaptive_sharpness sharpness,enum scale_to_sharpness_policy scale_to_sharpness_policy)) {uint8_t *byte_ptr_1dlut_src, *byte_ptr_1dlut_dst;struct spl_fixed31_32 sharp_base, sharp_calc, sharp_level;
@@ -461,7 +462,7 @@ void spl_build_isharp_1dlut_from_reference_curve(struct spl_fixed31_32 ratio, enunsigned int sharpnessX1000 =spl_calculate_sharpness_level (ratio, sharpness.sharpness_level, setup, sharpness.sharpness_range, scale_to_sharpness_policy); - sharp_level =spl_fixpt_from_fraction (sharpnessX1000,1000 ); + sharp_level =SPL_NAMESPACE (spl_fixpt_from_fraction (sharpnessX1000,1000 ));/* * Check if pregen 1dlut table is already precalculated
@@ -486,10 +487,11 @@ void spl_build_isharp_1dlut_from_reference_curve(struct spl_fixed31_32 ratio, enmemset (byte_ptr_1dlut_dst,0 , size_1dlut);for (j =0 ; j < size_1dlut; j++) { sharp_base =spl_fixpt_from_int ((int )*byte_ptr_1dlut_src); - sharp_calc =spl_fixpt_mul (sharp_base, sharp_level); + sharp_calc =SPL_NAMESPACE (spl_fixpt_mul (sharp_base, sharp_level)); sharp_calc =spl_fixpt_div (sharp_calc,spl_fixpt_from_int (3 )); sharp_calc =spl_fixpt_min (spl_fixpt_from_int (255 ), sharp_calc); - sharp_calc =spl_fixpt_add (sharp_calc,spl_fixpt_from_fraction (1 ,2 )); + sharp_calc =spl_fixpt_add (sharp_calc, +SPL_NAMESPACE (spl_fixpt_from_fraction (1 ,2 ))); sharp_calc_int =spl_fixpt_floor (sharp_calc);/* Clamp it at 0x7F so it doesn't wrap */ if (sharp_calc_int >127 )
@@ -506,12 +508,12 @@ void spl_build_isharp_1dlut_from_reference_curve(struct spl_fixed31_32 ratio, en filter_isharp_1D_lut_pregen[setup].sharpness_denom =1000 ; } -uint32_t *spl_get_pregen_filter_isharp_1D_lut (enum system_setup setup) +uint32_t *SPL_NAMESPACE (spl_get_pregen_filter_isharp_1D_lut (enum system_setup setup)) {return filter_isharp_1D_lut_pregen[setup].value; } -const uint16_t *spl_dscl_get_blur_scale_coeffs_64p (int taps) +const uint16_t *SPL_NAMESPACE (spl_dscl_get_blur_scale_coeffs_64p (int taps)) {if (taps ==3 )return filter_isharp_bs_3tap_64p_s1_12;
@@ -526,7 +528,7 @@ const uint16_t *spl_dscl_get_blur_scale_coeffs_64p(int taps) } } -const uint16_t *spl_dscl_get_blur_scale_coeffs_64p_s1_10 (int taps) +const uint16_t *SPL_NAMESPACE (spl_dscl_get_blur_scale_coeffs_64p_s1_10 (int taps)) {if (taps ==3 )return filter_isharp_bs_3tap_64p;
@@ -541,13 +543,12 @@ const uint16_t *spl_dscl_get_blur_scale_coeffs_64p_s1_10(int taps) } } -void spl_set_blur_scale_data (struct dscl_prog_data *dscl_prog_data, -const struct spl_scaler_data *data) +void SPL_NAMESPACE (spl_set_blur_scale_data (struct dscl_prog_data *dscl_prog_data, +const struct spl_scaler_data *data)) { dscl_prog_data->filter_blur_scale_h = -spl_dscl_get_blur_scale_coeffs_64p (data->taps.h_taps); +SPL_NAMESPACE (spl_dscl_get_blur_scale_coeffs_64p (data->taps.h_taps)); dscl_prog_data->filter_blur_scale_v = -spl_dscl_get_blur_scale_coeffs_64p (data->taps.v_taps); +SPL_NAMESPACE (spl_dscl_get_blur_scale_coeffs_64p (data->taps.v_taps)); } -
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_isharp_filters.h +9 -7
@@ -28,15 +28,17 @@ enum system_setup {NUM_SHARPNESS_SETUPS }; -void spl_set_blur_scale_data (struct dscl_prog_data *dscl_prog_data, -const struct spl_scaler_data *data); +void SPL_NAMESPACE (spl_set_blur_scale_data (struct dscl_prog_data *dscl_prog_data, +const struct spl_scaler_data *data)); -void spl_build_isharp_1dlut_from_reference_curve (struct spl_fixed31_32 ratio,enum system_setup setup, -struct adaptive_sharpness sharpness,enum scale_to_sharpness_policy scale_to_sharpness_policy); -uint32_t *spl_get_pregen_filter_isharp_1D_lut (enum system_setup setup); +void SPL_NAMESPACE (spl_build_isharp_1dlut_from_reference_curve ( +struct spl_fixed31_32 ratio,enum system_setup setup, +struct adaptive_sharpness sharpness, +enum scale_to_sharpness_policy scale_to_sharpness_policy)); +uint32_t *SPL_NAMESPACE (spl_get_pregen_filter_isharp_1D_lut (enum system_setup setup));// public API -const uint16_t *spl_dscl_get_blur_scale_coeffs_64p (int taps); -const uint16_t *spl_dscl_get_blur_scale_coeffs_64p_s1_10 (int taps); +const uint16_t *SPL_NAMESPACE (spl_dscl_get_blur_scale_coeffs_64p (int taps)); +const uint16_t *SPL_NAMESPACE (spl_dscl_get_blur_scale_coeffs_64p_s1_10 (int taps));#endif /* __DC_SPL_ISHARP_FILTERS_H__ */
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_easf_filters.c +79 -76
337 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_easf_filters.h +20 -17
@@ -13,25 +13,28 @@ struct scale_ratio_to_reg_value_lookup {const uint32_t reg_value; }; -void spl_set_filters_data (struct dscl_prog_data *dscl_prog_data, +void SPL_NAMESPACE (spl_set_filters_data (struct dscl_prog_data *dscl_prog_data,const struct spl_scaler_data *data,bool enable_easf_v, -bool enable_easf_h); - -uint32_t spl_get_v_bf3_mode (struct spl_fixed31_32 ratio); -uint32_t spl_get_h_bf3_mode (struct spl_fixed31_32 ratio); -uint32_t spl_get_reducer_gain6 (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_reducer_gain4 (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_gainRing6 (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_gainRing4 (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_3tap_dntilt_uptilt_offset (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_3tap_uptilt_maxval (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_3tap_dntilt_slope (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_3tap_uptilt1_slope (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_3tap_uptilt2_slope (int taps,struct spl_fixed31_32 ratio); -uint32_t spl_get_3tap_uptilt2_offset (int taps,struct spl_fixed31_32 ratio); +bool enable_easf_h)); + +uint32_t SPL_NAMESPACE (spl_get_v_bf3_mode (struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_h_bf3_mode (struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_reducer_gain6 (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_reducer_gain4 (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_gainRing6 (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_gainRing4 (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_3tap_dntilt_uptilt_offset ( +int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_3tap_uptilt_maxval (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_3tap_dntilt_slope (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_3tap_uptilt1_slope (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_3tap_uptilt2_slope (int taps,struct spl_fixed31_32 ratio)); +uint32_t SPL_NAMESPACE (spl_get_3tap_uptilt2_offset (int taps,struct spl_fixed31_32 ratio));/* public API */ -const uint16_t *spl_dscl_get_easf_filter_coeffs_64p (int taps,struct spl_fixed31_32 ratio); -const uint16_t *spl_dscl_get_easf_filter_coeffs_64p_s1_10 (int taps,struct spl_fixed31_32 ratio); +const uint16_t *SPL_NAMESPACE (spl_dscl_get_easf_filter_coeffs_64p ( +int taps,struct spl_fixed31_32 ratio)); +const uint16_t *SPL_NAMESPACE (spl_dscl_get_easf_filter_coeffs_64p_s1_10 ( +int taps,struct spl_fixed31_32 ratio));#endif /* __DC_SPL_SCL_EASF_FILTERS_H__ */
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_filters.c +14 -13
@@ -1134,9 +1134,9 @@ static const uint16_t *spl_get_filter_3tap_64p(struct spl_fixed31_32 ratio) {if (ratio.value < spl_fixpt_one.value)return filter_3tap_64p_upscale; -else if (ratio.value <spl_fixpt_from_fraction (4 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (4 ,3 )).value)return filter_3tap_64p_116; -else if (ratio.value <spl_fixpt_from_fraction (5 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (5 ,3 )).value)return filter_3tap_64p_149;else return filter_3tap_64p_183;
@@ -1146,9 +1146,9 @@ static const uint16_t *spl_get_filter_4tap_64p(struct spl_fixed31_32 ratio) {if (ratio.value < spl_fixpt_one.value)return filter_4tap_64p_upscale; -else if (ratio.value <spl_fixpt_from_fraction (4 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (4 ,3 )).value)return filter_4tap_64p_116; -else if (ratio.value <spl_fixpt_from_fraction (5 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (5 ,3 )).value)return filter_4tap_64p_149;else return filter_4tap_64p_183;
@@ -1158,9 +1158,9 @@ static const uint16_t *spl_get_filter_5tap_64p(struct spl_fixed31_32 ratio) {if (ratio.value < spl_fixpt_one.value)return filter_5tap_64p_upscale; -else if (ratio.value <spl_fixpt_from_fraction (4 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (4 ,3 )).value)return filter_5tap_64p_116; -else if (ratio.value <spl_fixpt_from_fraction (5 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (5 ,3 )).value)return filter_5tap_64p_149;else return filter_5tap_64p_183;
@@ -1170,9 +1170,9 @@ static const uint16_t *spl_get_filter_6tap_64p(struct spl_fixed31_32 ratio) {if (ratio.value < spl_fixpt_one.value)return filter_6tap_64p_upscale; -else if (ratio.value <spl_fixpt_from_fraction (4 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (4 ,3 )).value)return filter_6tap_64p_116; -else if (ratio.value <spl_fixpt_from_fraction (5 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (5 ,3 )).value)return filter_6tap_64p_149;else return filter_6tap_64p_183;
@@ -1182,9 +1182,9 @@ static const uint16_t *spl_get_filter_7tap_64p(struct spl_fixed31_32 ratio) {if (ratio.value < spl_fixpt_one.value)return filter_7tap_64p_upscale; -else if (ratio.value <spl_fixpt_from_fraction (4 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (4 ,3 )).value)return filter_7tap_64p_116; -else if (ratio.value <spl_fixpt_from_fraction (5 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (5 ,3 )).value)return filter_7tap_64p_149;else return filter_7tap_64p_183;
@@ -1194,9 +1194,9 @@ static const uint16_t *spl_get_filter_8tap_64p(struct spl_fixed31_32 ratio) {if (ratio.value < spl_fixpt_one.value)return filter_8tap_64p_upscale; -else if (ratio.value <spl_fixpt_from_fraction (4 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (4 ,3 )).value)return filter_8tap_64p_116; -else if (ratio.value <spl_fixpt_from_fraction (5 ,3 ).value) +else if (ratio.value <SPL_NAMESPACE (spl_fixpt_from_fraction (5 ,3 )).value)return filter_8tap_64p_149;else return filter_8tap_64p_183;
@@ -1207,7 +1207,8 @@ static const uint16_t *spl_get_filter_2tap_64p(void)return filter_2tap_64p; } -const uint16_t *spl_dscl_get_filter_coeffs_64p (int taps,struct spl_fixed31_32 ratio) +const uint16_t *SPL_NAMESPACE (spl_dscl_get_filter_coeffs_64p ( +int taps,struct spl_fixed31_32 ratio)) {if (taps ==8 )return spl_get_filter_8tap_64p (ratio);
drivers/gpu/drm/amd/display/dc/sspl/dc_spl_scl_filters.h +2 -1
@@ -8,6 +8,7 @@#include "dc_spl_types.h" /* public API */ -const uint16_t *spl_dscl_get_filter_coeffs_64p (int taps,struct spl_fixed31_32 ratio); +const uint16_t *SPL_NAMESPACE (spl_dscl_get_filter_coeffs_64p ( +int taps,struct spl_fixed31_32 ratio));#endif /* __DC_SPL_SCL_FILTERS_H__ */
drivers/gpu/drm/amd/display/dc/sspl/spl_custom_float.c +6 -5
@@ -14,8 +14,8 @@ static bool spl_build_custom_float(struct spl_fixed31_32 value,uint32_t exp_offset = (1 << (format->exponenta_bits -1 )) -1 ;const struct spl_fixed31_32 mantissa_constant_plus_max_fraction = -spl_fixpt_from_fraction ((1LL << (format->mantissa_bits +1 )) -1 , -1LL << format->mantissa_bits); +SPL_NAMESPACE (spl_fixpt_from_fraction ((1LL << (format->mantissa_bits +1 )) -1 , +1LL << format->mantissa_bits));struct spl_fixed31_32 mantiss;
@@ -134,9 +134,10 @@ static bool spl_setup_custom_float(const struct spl_custom_float_format *format,return true; } -bool spl_convert_to_custom_float_format (struct spl_fixed31_32 value, -const struct spl_custom_float_format *format, -uint32_t *result) +bool SPL_NAMESPACE (spl_convert_to_custom_float_format ( +struct spl_fixed31_32 value, +const struct spl_custom_float_format *format, +uint32_t *result)) {uint32_t mantissa;uint32_t exponenta;
drivers/gpu/drm/amd/display/dc/sspl/spl_custom_float.h +2 -2
@@ -21,9 +21,9 @@ struct spl_custom_float_value { bool negative; }; -bool spl_convert_to_custom_float_format ( +bool SPL_NAMESPACE (spl_convert_to_custom_float_format (struct spl_fixed31_32 value,const struct spl_custom_float_format *format, -uint32_t *result); +uint32_t *result));#endif //SPL_CUSTOM_FLOAT_H_
drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.c +40 -38
227 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/sspl/spl_fixpt31_32.h +30 -26
153 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/sspl/spl_os_types.h +9 -0
@@ -53,4 +53,13 @@ static inline int64_t spl_div64_s64(int64_t dividend, int64_t divisor)#define spl_min (a, b) (((a) < (b)) ? (a):(b))#endif +/* SPL namespace macros */ +#ifndef SPL_PFX_ +#define SPL_PFX_ +#endif + +#define SPL_EXPAND2 (a, b) a##b +#define SPL_EXPAND (a, b) SPL_EXPAND2(a, b) +#define SPL_NAMESPACE (symbol) SPL_EXPAND(SPL_PFX_, symbol) +#endif /* _SPL_OS_TYPES_H_ */
Signature · 1 line
2.34.1
[Public]
Hi all,
This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.
APU
* Single Display eDP -> 1080p 60hz, 1920x1200 165hz, 3840x2400 60hz
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* MST DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 2x 4k60hz displays
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* SST PCON -> Club3D CAC-1085 + 1x 4k 144hz, FRL3, at a max resolution supported by the dongle of 4k 120hz YUV420 12bpc.
* MST PCON -> 1x 4k 144hz, FRL3, at a max resolution supported by the adapter of 4k 120hz RGB 8bpc.
DGPU
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* MST DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)
The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)
Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing
The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* Samsung ATNA60YV02-0 3840x2400 60Hz OLED eDP
The patchset consists of the amd-staging-drm-next branch (Head commit - 0ffcd28fcd5447b83449cdecfa4260c6fa967df1 -> drm/amdgpu: create pm4 header for gc v12_1) with new patches added on top of it.
Tested on Ubuntu 24.04.3, on Wayland and X11, using Gnome.
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Wednesday, November 26, 2025 6:06 PM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>; Li, Roman <[email protected]>
Subject: [PATCH 00/14] DC Patches November 26, 2025
From: Roman Li <[email protected]>
This DC patchset brings improvements in multiple areas. In summary, we highlight:
* Add configurable SPL namespace prefix.
* Add register definitions in dcn_hubbub_registers.
* Add additional info from DML.
* Add dc interface for query QoS information.
* Fix wrong x_pos and y_pos for cursor offload.
* Fix Smart Power OLED not working after S4.
* Fix double cursor when switching between hw and sw cursor.
* Refactor HPD to increase flexibility.
* Remove unused encoder types.
Charlene Liu (1):
drm/amd/display: add register definitions in dcn_hubbub_registers
Dillon Varone (1):
drm/amd/display: Guard FAMS2 configuration updates
Dmytro Laktyushkin (1):
drm/amd/display: refactor HPD to increase flexibility
Ian Chen (1):
drm/amd/display: fix Smart Power OLED not working after S4
Ivan Lipski (3):
drm/amd/display: Remove unused encoder types drm/amd/display: Use local variable for analog_engine initialization drm/amd/display: Move RGB-type check for audio sync to DCE HW sequence
Jing Zhou (1):
drm/amd/display: Correct FIXED_VS Link Rate Toggle Condition
Navid Assadian (1):
drm/amd/display - dc: Add configurable SPL namespace prefix
Nevenko Stupar (1):
drm/amd/display: Add additional info from DML
Nicholas Kazlauskas (2):
drm/amd/display: Fix wrong x_pos and y_pos for cursor offload drm/amd/display: Reset pipe mask at beginning of cursor offload
Taimur Hassan (1):
drm/amd/display: Promote DC to 3.2.361
Wenjing Liu (1):
drm/amd/display: add dc interface for query QoS information
drivers/gpu/drm/amd/display/dc/core/dc.c | 30 +++ drivers/gpu/drm/amd/display/dc/dc.h | 39 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 18 +- .../drm/amd/display/dc/dce/dce_link_encoder.c | 47 +++- .../drm/amd/display/dc/dce/dce_link_encoder.h | 8 +- .../display/dc/dcn201/dcn201_link_encoder.c | 3 + .../amd/display/dc/dcn21/dcn21_link_encoder.c | 3 + .../display/dc/dio/dcn10/dcn10_link_encoder.c | 43 ++++ .../display/dc/dio/dcn10/dcn10_link_encoder.h | 11 +- .../display/dc/dio/dcn20/dcn20_link_encoder.c | 3 + .../dc/dio/dcn30/dcn30_dio_link_encoder.c | 3 + .../dc/dio/dcn301/dcn301_dio_link_encoder.c | 3 + .../dc/dio/dcn31/dcn31_dio_link_encoder.c | 3 + .../dc/dio/dcn32/dcn32_dio_link_encoder.c | 3 + .../dc/dio/dcn321/dcn321_dio_link_encoder.c | 3 + .../dc/dio/dcn35/dcn35_dio_link_encoder.c | 3 + .../dc/dio/dcn401/dcn401_dio_link_encoder.c | 3 + .../display/dc/hubbub/dcn10/dcn10_hubbub.h | 6 +- .../amd/display/dc/hubp/dcn401/dcn401_hubp.c | 14 +- .../amd/display/dc/hwss/dce110/dce110_hwseq.c | 25 +- .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 1 + .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c | 17 +- .../drm/amd/display/dc/hwss/hw_sequencer.h | 37 +++ .../drm/amd/display/dc/inc/hw/link_encoder.h | 4 + .../gpu/drm/amd/display/dc/inc/link_service.h | 3 - .../drm/amd/display/dc/link/link_detection.c | 10 +- .../gpu/drm/amd/display/dc/link/link_dpms.c | 3 +- .../drm/amd/display/dc/link/link_factory.c | 240 +++++++++--------- .../link_dp_training_fixed_vs_pe_retimer.c | 2 +- .../amd/display/dc/link/protocols/link_hpd.c | 165 ++++-------- .../amd/display/dc/link/protocols/link_hpd.h | 1 - .../dc/resource/dcn32/dcn32_resource.h | 5 +- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 186 +++++++------- drivers/gpu/drm/amd/display/dc/sspl/dc_spl.h | 8 - .../drm/amd/display/dc/sspl/dc_spl_filters.c | 4 +- .../drm/amd/display/dc/sspl/dc_spl_filters.h | 4 +- .../display/dc/sspl/dc_spl_isharp_filters.c | 31 +-- .../display/dc/sspl/dc_spl_isharp_filters.h | 16 +- .../display/dc/sspl/dc_spl_scl_easf_filters.c | 155 +++++------ .../display/dc/sspl/dc_spl_scl_easf_filters.h | 37 +-- .../amd/display/dc/sspl/dc_spl_scl_filters.c | 27 +- .../amd/display/dc/sspl/dc_spl_scl_filters.h | 3 +- .../amd/display/dc/sspl/spl_custom_float.c | 11 +- .../amd/display/dc/sspl/spl_custom_float.h | 4 +- .../drm/amd/display/dc/sspl/spl_fixpt31_32.c | 78 +++--- .../drm/amd/display/dc/sspl/spl_fixpt31_32.h | 56 ++-- .../drm/amd/display/dc/sspl/spl_os_types.h | 9 + 47 files changed, 777 insertions(+), 611 deletions(-)
--
2.34.1