Skip to contentSkip to conversation

DC Patches Nov 30 2026

PATCH New Chenyu Chen 1 participant 28 messages Nov 25

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover DC Patches Nov 30 2026

This DC patchset brings improvements in multiple areas. In summary, we highlight:

- Avoid per-entry long division in __drm_lut32_to_dc_gamma
- Add more diagnostic logging, a debug option to force the DP link rate and per-CRTC pstate method in connector debugfs
- Reject Replay activation on an inactive link
- Decouple PROGRAM_CURSOR_UPDATE_NOW from dc and pipe_ctx
- Add DPMS-v2 init and tx init, and implement link_set_dpms_off_v2
- Derive DCN6 DSCCLK range from DISPCLK
- Carry stream and plane update bits in update_flags and add vsync and immediate flips to the DC2 seamless update
- Preserve bandwidth floors in overrides
- Set HDMI bypass earlier
- Add DMUB timer reference clock to ref_clocks
- Guard connector I2C transfer without DDC pin
- Refactor ABM_SET_PIPE and ABM_SET_IMMEDIATE_DISABLE
- Add amdgpu_dm_dmub tests for alt-ch apertures, SET_CONFIG sync wait, AUX transfer timeout and fused IO replies
- Use Z8 enter plus exit for vblank reserve
- Fix two streams sharing one OTG
- Count planes, not pipes, in the surface check
- Promote DMUB firmware to release 0.1.86.0

Cc Daniel Wheeler <[email protected]>

Alan Liu (1):
drm/amd/display: Avoid per-entry long division in

    __drm_lut32_to_dc_gamma

Alex Hung (4):
drm/amd/display: Test amdgpu_dm_dmub alt-ch apertures drm/amd/display: Test amdgpu_dm_dmub SET_CONFIG sync wait drm/amd/display: Test amdgpu_dm_dmub AUX transfer timeout drm/amd/display: Test amdgpu_dm_dmub fused IO replies

Allen Pan (1):
drm/amd/display: Add debug option to force DP link rate

Alvin Lee (1):
drm/amd/display: Add DMUB timer reference clock to ref_clocks

Charlene Liu (1):
drm/amd/display: Set HDMI bypass earlier

Dillon Varone (1):
drm/amd/display: Capture more diagnostic register state

Dominik Kowalski (3):
drm/amd/display: Add DPMS-v2 init
drm/amd/display: Add DPMS-v2 tx init
drm/amd/display: Implement link_set_dpms_off_v2

Gabe Teeger (1):
drm/amd/display: Fix two streams sharing one OTG

Harry VanZyllDeJong (1):
drm/amd/display: Reject Replay activation on an inactive link

Ivan Lipski (2):
drm/amd/display: Expose per-CRTC pstate method in connector debugfs drm/amd/display: Derive DCN6 DSCCLK range from DISPCLK

James Lin (1):
drm/amd/display: Guard connector I2C transfer without DDC pin

Ovidiu Bunea (1):
drm/amd/display: Use Z8 enter plus exit for vblank reserve

Piotr Maziarz (1):
drm/amd/display: Decouple PROGRAM_CURSOR_UPDATE_NOW from dc and
pipe_ctx

Rafal Ostrowski (1):
drm/amd/display: Refactor ABM_SET_PIPE and ABM_SET_IMMEDIATE_DISABLE

Taimur Hassan (2):
drm/amd/display: [FW Promotion] Release 0.1.86.0 drm/amd/display: Promote DC to 3.2.409

Tony Cheng (4):
drm/amd/display: Carry the stream and plane update bits in
update_flags
drm/amd/display: Add the vsync flip to the DC2 seamless update drm/amd/display: Add the immediate flip to the DC2 seamless update drm/amd/display: Count planes, not pipes, in the surface check

Wenjing Liu (1):
drm/amd/display: Preserve bandwidth floors in overrides

 .../amd/display/amdgpu_dm/amdgpu_dm_color.c   |  21 +-
 .../display/amdgpu_dm/amdgpu_dm_connector.c   |   6 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c |  34 ++
 .../amd/display/amdgpu_dm/amdgpu_dm_dmub.c    |   1 +
 .../amdgpu_dm/tests/amdgpu_dm_dmub_test.c     | 283 ++++++++++
 .../bls_builder/bls_builder_private_types.h   |  12 +
 .../dc/bls_builder/dcn401_builder_internal.h  |  14 +
 .../dc/bls_builder/dcn401_seamless_builder.c  | 482 +++++++++++++++---
 .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c  |  18 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      |   5 +-
 .../drm/amd/display/dc/core/dc_hw_sequencer.c | 192 +++++--
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  64 ++-
 .../gpu/drm/amd/display/dc/core/dc_state.c    |   4 +
 .../gpu/drm/amd/display/dc/core2/dc_core2.c   |  76 ++-
 drivers/gpu/drm/amd/display/dc/dc.h           |   4 +-
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  |  11 +-
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h  |   8 +-
 .../gpu/drm/amd/display/dc/dc_state_priv.h    |   8 +-
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c |  66 ++-
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.h |   2 +
 .../dc/dio/dcn401/dcn401_dio_stream_encoder.c |  15 +
 .../dc/dio/dcn401/dcn401_dio_stream_encoder.h |   4 +
 .../dc/dio/dcn42/dcn42_dio_link_encoder.c     |  12 +-
 .../dc/dio/dcn42/dcn42_dio_stream_encoder.c   |   2 +-
 .../dc/dio/dcn60/dcn60_dio_stream_encoder.c   |   2 +-
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  |  35 +-
 .../src/inc/dml2_internal_shared_types.h      |   1 +
 .../display/dc/hubbub/dcn10/dcn10_hubbub.h    |   1 +
 .../display/dc/hubbub/dcn20/dcn20_hubbub.c    |   6 +
 .../display/dc/hubbub/dcn35/dcn35_hubbub.h    |   1 +
 .../display/dc/hubbub/dcn42/dcn42_hubbub.h    |   3 +-
 .../amd/display/dc/hwss/dcn21/dcn21_hwseq.c   | 108 ++--
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |   2 +
 .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c   |   2 +
 .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c   |   2 +
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |   6 +-
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.h   |   2 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |   8 +-
 .../amd/display/dc/hwss/dcn42/dcn42_hwseq.c   |   2 +
 .../amd/display/dc/hwss/dcn50/dcn50_hwseq.c   |   2 +
 .../drm/amd/display/dc/hwss/hw_sequencer.h    |  59 ++-
 .../gpu/drm/amd/display/dc/inc/core_types.h   |   1 +
 drivers/gpu/drm/amd/display/dc/inc/hw/abm.h   |  10 +-
 .../gpu/drm/amd/display/dc/inc/hw/dchubbub.h  |   2 +
 drivers/gpu/drm/amd/display/dc/link/Makefile  |  11 +
 .../drm/amd/display/dc/link/link_dpms_v1.c    |  84 +++
 .../drm/amd/display/dc/link/link_dpms_v1.h    |  29 ++
 .../drm/amd/display/dc/link/link_dpms_v2.c    | 250 ++++++++-
 .../drm/amd/display/dc/link/link_factory.c    |  90 +++-
 .../link/protocols/link_edp_panel_control.c   |   6 +
 .../drm/amd/display/dc/link/tx/link_tx_v1.c   |  55 ++
 .../drm/amd/display/dc/link/tx/link_tx_v1.h   |  34 ++
 .../drm/amd/display/dc/link/tx/link_tx_v2.c   |  83 +++
 .../drm/amd/display/dc/link/tx/link_tx_v2.h   |  38 ++
 .../dc/resource/dcn401/dcn401_resource.h      |   1 +
 .../dc/resource/dcn42b/dcn42b_resource.c      |  82 ++-
 .../dc/resource/dcn42b/dcn42b_resource.h      |   6 +
 .../dc/resource/dcn60/dcn60_resource.c        |   4 +
 .../dc/resource/dcn60/dcn60_resource.h        |   1 +
 .../dcn60/dcn60_soc_and_ip_translator.c       |  15 +
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   |  12 +
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   |   1 +
 .../drm/amd/display/dmub/src/dmub_dcn401.c    |  40 ++
 .../drm/amd/display/dmub/src/dmub_dcn401.h    |  39 +-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.c |  37 ++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.h |  36 +-
 .../drm/amd/display/dmub/src/dmub_dcn42b.c    |   1 +
 .../gpu/drm/amd/display/dmub/src/dmub_dcn60.c |  38 ++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn60.h |  36 +-
 69 files changed, 2331 insertions(+), 297 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v1.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v1.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v2.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v2.h
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/27 drm/amd/display: Avoid per-entry long division in __drm_lut32_to_dc_gamma

From: Alan Liu <[email protected]>

[Why]
__drm_lut32_to_dc_gamma() converts each entry of a 4096-entry 32-bit LUT with dc_fixpt_from_fraction(v, 0xFFFFFFFF). That helper does a 64-bit division followed by a 32-iteration bit-by-bit long division, so one LUT costs 12288 such calls.

When a plane with a 32-bit LUT colorop is recreated in atomic check (for example on every plane size change), this conversion accounts for ~97% of amdgpu_dm_update_plane_color_mgmt() time, and it runs for TEST_ONLY commits as well.

[How]
The denominator is constant, so the result has a closed form:
v * 2^32 / (2^32 - 1) = v + v / (2^32 - 1). The fractional term is below 1 and rounds up exactly when v >= 2^31, so the result is v + (v >= 2^31).

This is bit-exact with the previous dc_fixpt_from_fraction() result for all 2^32 inputs (checked exhaustively in userspace), so there is no functional change.

With this change __drm_lut32_to_dc_gamma() takes >99% less time, and amdgpu_dm_update_plane_color_mgmt() takes ~95% less time per recreated plane. KUnit amdgpu_dm_color results are unchanged.

---
 .../amd/display/amdgpu_dm/amdgpu_dm_color.c   | 21 ++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +18 -3
index 45cea72111c7..e09a8a686ec9 100644
@@ -534,6 +534,21 @@ void __drm_lut_to_dc_gamma(const struct drm_color_lut *lut,
 }
 EXPORT_IF_KUNIT(__drm_lut_to_dc_gamma);
 
+/*
+ * Convert a 32-bit DRM LUT value to S31.32 fixed point, i.e. v / 0xFFFFFFFF.
+ *
+ * Bit-exact replacement for dc_fixpt_from_fraction(v, MAX_DRM_LUT32_VALUE),
+ * which does a 64-bit division plus a 32-iteration long division per value.
+ * With d = 2^32 - 1:  v * 2^32 / d = v + v / d,  and v / d is in [0, 1], so
+ * the rounded result is v + 1 when v / d >= 1/2, i.e. when v >= 2^31.
+ */
+static inline struct fixed31_32 __drm_lut32_value_to_fixpt(u32 v)
+{
+	struct fixed31_32 res = { .value = (long long)v + (v >= 0x80000000u) };
+
+	return res;
+}
+
 /**
  * __drm_lut32_to_dc_gamma - convert the drm_color_lut to dc_gamma.
  * @lut: DRM lookup table for color conversion
@@ -547,9 +562,9 @@ void __drm_lut32_to_dc_gamma(const struct drm_color_lut32 *lut, struct dc_gamma
 	int i;
 
 	for (i = 0; i < MAX_COLOR_LUT_ENTRIES; i++) {
-		gamma->entries.red[i] = dc_fixpt_from_fraction(lut[i].red, MAX_DRM_LUT32_VALUE);
-		gamma->entries.green[i] = dc_fixpt_from_fraction(lut[i].green, MAX_DRM_LUT32_VALUE);
-		gamma->entries.blue[i] = dc_fixpt_from_fraction(lut[i].blue, MAX_DRM_LUT32_VALUE);
+		gamma->entries.red[i] = __drm_lut32_value_to_fixpt(lut[i].red);
+		gamma->entries.green[i] = __drm_lut32_value_to_fixpt(lut[i].green);
+		gamma->entries.blue[i] = __drm_lut32_value_to_fixpt(lut[i].blue);
 	}
 }
 EXPORT_IF_KUNIT(__drm_lut32_to_dc_gamma);
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/27 drm/amd/display: Capture more diagnostic register state

In reply to Chenyu Chen

From: Dillon Varone <[email protected]>

[WHY&HOW]
Captures more register state for diagnosing potential FW and interrupt related issues. The values are only stored in the diagnostic data structures; this patch does not print them.
- IHC interrupt status (DISP_INTERRUPT_STATUS and its CONTINUE registers), per ASIC through DMUB_DCN401_IHC_REGS, DMUB_DCN42_IHC_REGS and DMUB_DCN60_IHC_REGS. DCN42B uses the DCN42 list.
- DCHUBBUB timeout detection control 2 (DCHUBBUB_TIMEOUT_DETECTION_CTRL2)
- DCHUBBUB timeout interrupt status (DCHUBBUB_TIMEOUT_INTERRUPT_STATUS), added to the hubbub register lists and read into hubbub_state->timeout_interrupt_status
- DMCUB interrupt status (DMCUB_INTERRUPT_STATUS)
- DMCUB external interrupt context and status (DMCUB_EXT_INTERRUPT_CTXID and DMCUB_EXT_INTERRUPT_STATUS), read into ext_int_ctx_id and ext_int_id. DMUB_DCN401, DMUB_DCN42 and DMUB_DCN60 also add the DMCUB_EXT_INTERRUPT_ID field.

Reserved placeholders, not used yet: the client_debug array (MAX_IHC_CLIENT_DEBUG_REG entries) in the IHC diagnostic data and the empty DMUB_DCN401_IHC_DEBUG_REGS() macro, which is expanded in the DCN401 IHC register list. They are reserved for IHC client debug registers in a later change. Nothing reads or fills them in this patch.

---
 .../display/dc/hubbub/dcn10/dcn10_hubbub.h    |  1 +
 .../display/dc/hubbub/dcn20/dcn20_hubbub.c    |  6 +++
 .../display/dc/hubbub/dcn35/dcn35_hubbub.h    |  1 +
 .../display/dc/hubbub/dcn42/dcn42_hubbub.h    |  3 +-
 .../gpu/drm/amd/display/dc/inc/hw/dchubbub.h  |  2 +
 .../dc/resource/dcn401/dcn401_resource.h      |  1 +
 .../dc/resource/dcn60/dcn60_resource.h        |  1 +
 drivers/gpu/drm/amd/display/dmub/dmub_srv.h   | 12 ++++++
 .../drm/amd/display/dmub/src/dmub_dcn401.c    | 40 +++++++++++++++++++
 .../drm/amd/display/dmub/src/dmub_dcn401.h    | 39 +++++++++++++++++-
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.c | 37 +++++++++++++++++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn42.h | 36 ++++++++++++++++-
 .../drm/amd/display/dmub/src/dmub_dcn42b.c    |  1 +
 .../gpu/drm/amd/display/dmub/src/dmub_dcn60.c | 38 ++++++++++++++++++
 .../gpu/drm/amd/display/dmub/src/dmub_dcn60.h | 36 ++++++++++++++++-
 15 files changed, 247 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.h +1 -0
index 581e2c1578b5..69316b284e5d 100644
@@ -201,6 +201,7 @@ struct dcn_hubbub_registers {
 	uint32_t DCHUBBUB_ARB_FRAC_URG_BW_MALL_B;
 	uint32_t DCHUBBUB_TIMEOUT_DETECTION_CTRL1;
 	uint32_t DCHUBBUB_TIMEOUT_DETECTION_CTRL2;
+	uint32_t DCHUBBUB_TIMEOUT_INTERRUPT_STATUS;
 	uint32_t DCHUBBUB_CTRL_STATUS;
 	uint32_t DCHUBBUB_ARB_BUFFER_FULLNESS_WATERMARK_A;
 	uint32_t DCHUBBUB_ARB_BUFFER_FULLNESS_WATERMARK_B;
drivers/gpu/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c +6 -0
index 6cfcce7bb48f..a145c3692f1b 100644
@@ -656,6 +656,12 @@ void hubbub2_read_state(struct hubbub *hubbub, struct dcn_hubbub_state *hubbub_s
 
 	if (REG(DCHUBBUB_ARB_DRAM_STATE_CNTL))
 		hubbub_state->dram_state_cntl = REG_READ(DCHUBBUB_ARB_DRAM_STATE_CNTL);
+
+	if (REG(DCHUBBUB_TIMEOUT_DETECTION_CTRL2))
+		hubbub_state->timeout_detection_ctrl2 = REG_READ(DCHUBBUB_TIMEOUT_DETECTION_CTRL2);
+
+	if (REG(DCHUBBUB_TIMEOUT_INTERRUPT_STATUS))
+		hubbub_state->timeout_interrupt_status = REG_READ(DCHUBBUB_TIMEOUT_INTERRUPT_STATUS);
 }
 
 static const struct hubbub_funcs hubbub2_funcs = {
drivers/gpu/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.h +1 -0
index 831b9888c831..08d4897a0e95 100644
@@ -189,6 +189,7 @@
 	SR(DCHUBBUB_CTRL_STATUS),\
 	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL1),\
 	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL2),\
+	SR(DCHUBBUB_TIMEOUT_INTERRUPT_STATUS),\
 	SR(DCHUBBUB_ARB_QOS_FORCE)
 
 
drivers/gpu/drm/amd/display/dc/hubbub/dcn42/dcn42_hubbub.h +2 -1
index f74d5690c89d..9b673512b80e 100644
@@ -119,7 +119,8 @@
 	SR(DCHUBBUB_TEST_DEBUG_DATA),\
 	SR(DCHUBBUB_CTRL_STATUS),\
 	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL1),\
-	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL2)\
+	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL2),\
+	SR(DCHUBBUB_TIMEOUT_INTERRUPT_STATUS)
 
 #define HUBBUB_MASK_SH_LIST_DCN4_2(mask_sh)\
 	HUBBUB_MASK_SH_LIST_DCN32(mask_sh), \
drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h +2 -0
index 0b5fe1ca04e0..71658a4c775a 100644
@@ -153,6 +153,8 @@ struct dcn_hubbub_state {
 	uint32_t test_debug_data;
 	uint32_t watermark_change_cntl;
 	uint32_t dram_state_cntl;
+	uint32_t timeout_detection_ctrl2;
+	uint32_t timeout_interrupt_status;
 };
 
 struct dcn_hubbub_reg_state {
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.h +1 -0
index 3cfc1a39a103..065c9fffee3e 100644
@@ -633,6 +633,7 @@ int dcn401_get_power_profile(const struct dc_state *context);
 	SR(DCHUBBUB_MEM_PWR_MODE_CTRL),                                          \
 	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL1),                                    \
 	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL2),									 \
+	SR(DCHUBBUB_TIMEOUT_INTERRUPT_STATUS),                                 \
 	SR(DCHUBBUB_CTRL_STATUS),                                                \
 	SR(DCHUBBUB_ARB_MALL_CNTL)
 
drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.h +1 -0
index 34cfdc6eb8e5..b73f9616b3ee 100644
@@ -133,6 +133,7 @@ bool dcn50_program_mcache_pipe_config(struct dc_state *context,
 	SR(DCHUBBUB_MEM_PWR_MODE_CTRL),                                          \
 	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL1),                                    \
 	SR(DCHUBBUB_TIMEOUT_DETECTION_CTRL2),                                    \
+	SR(DCHUBBUB_TIMEOUT_INTERRUPT_STATUS),                                  \
 	SR(DCHUBBUB_CTRL_STATUS),                                                \
 	SR(DCHUBBUB_PERFORMANCE_MEASUREMENT_CNTL),                               \
 	SR(DCHUBBUB_PERFORMANCE_MEASUREMENT_CNTL2),                              \
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +12 -0
index 84f825c924bc..eb3b34aec745 100644
@@ -79,6 +79,9 @@
 #define PSP_FOOTER_BYTES_512 0x200 // 512 bytes
 #define PSP_FOOTER_BYTES_1932 0x78C // 1932 bytes
 
+#define MAX_IHC_INT_REG 32
+#define MAX_IHC_CLIENT_DEBUG_REG 5
+
 /* Forward declarations */
 struct dmub_srv;
 struct dmub_srv_common_regs;
@@ -394,10 +397,16 @@ struct dmub_timeout_info {
 	struct dmub_trace_snapshot trace_snapshot;
 };
 
+struct dmub_ihc_diagnostic_data {
+	uint32_t int_status[MAX_IHC_INT_REG];
+	uint32_t client_debug[MAX_IHC_CLIENT_DEBUG_REG];
+};
+
 /**
  * struct dmub_hw_diagnostic_data - Hardware diagnostic data for the DMUB
  */
 struct dmub_hw_diagnostic_data {
+	struct dmub_ihc_diagnostic_data ihc;
 	uint32_t dmcub_version;
 	uint32_t scratch[17];
 	uint32_t pc[DMUB_PC_SNAPSHOT_COUNT];
@@ -414,6 +423,9 @@ struct dmub_hw_diagnostic_data {
 	uint32_t outbox1_wptr;
 	uint32_t outbox1_size;
 	uint32_t gpint_datain0;
+	uint32_t int_status;
+	uint32_t ext_int_ctx_id;
+	uint32_t ext_int_id;
 	uint8_t is_dmcub_enabled : 1;
 	uint8_t is_dmcub_soft_reset : 1;
 	uint8_t is_dmcub_secure_reset : 1;
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.c +40 -0
index 02ab26516584..ffe6ce231ae4 100644
@@ -20,6 +20,8 @@ const struct dmub_srv_dcn401_regs dmub_srv_dcn401_regs = {
 #define DMUB_SR(reg) REG_OFFSET_EXP(reg),
 	{
 		DMUB_DCN401_REGS()
+		DMUB_DCN401_IHC_REGS()
+		DMUB_DCN401_IHC_DEBUG_REGS()
 		DMCUB_INTERNAL_REGS()
 	},
 #undef DMUB_SR
@@ -423,6 +425,37 @@ uint32_t dmub_dcn401_get_current_time(struct dmub_srv *dmub)
 	return REG_READ(DMCUB_TIMER_CURRENT);
 }
 
+static void dmub_dcn401_get_ihc_diagnostic_data(struct dmub_srv *dmub, struct dmub_ihc_diagnostic_data *ihc_data)
+{
+	ihc_data->int_status[0] = REG_READ(DISP_INTERRUPT_STATUS);
+	ihc_data->int_status[1] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE);
+	ihc_data->int_status[2] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE2);
+	ihc_data->int_status[3] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE3);
+	ihc_data->int_status[4] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE4);
+	ihc_data->int_status[5] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE5);
+	ihc_data->int_status[6] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE6);
+	ihc_data->int_status[7] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE7);
+	ihc_data->int_status[8] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE8);
+	ihc_data->int_status[9] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE9);
+	ihc_data->int_status[10] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE10);
+	ihc_data->int_status[11] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE11);
+	ihc_data->int_status[12] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE12);
+	ihc_data->int_status[13] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE13);
+	ihc_data->int_status[14] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE14);
+	ihc_data->int_status[15] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE15);
+	ihc_data->int_status[16] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE16);
+	ihc_data->int_status[17] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE17);
+	ihc_data->int_status[18] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE18);
+	ihc_data->int_status[19] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE19);
+	ihc_data->int_status[20] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE20);
+	ihc_data->int_status[21] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE21);
+	ihc_data->int_status[22] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE22);
+	ihc_data->int_status[23] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE23);
+	ihc_data->int_status[24] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE24);
+	ihc_data->int_status[25] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE25);
+
+}
+
 void dmub_dcn401_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_hw_diagnostic_data *hw_data)
 {
 	uint32_t is_dmub_enabled, is_soft_reset, is_sec_reset, is_pwait;
@@ -498,7 +531,14 @@ void dmub_dcn401_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_hw_diagn
 	hw_data->is_cw6_enabled = (uint8_t)is_cw6_enabled;
 
 	hw_data->gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
+
+	hw_data->int_status = REG_READ(DMCUB_INTERRUPT_STATUS);
+	hw_data->ext_int_ctx_id = REG_READ(DMCUB_EXT_INTERRUPT_CTXID);
+	hw_data->ext_int_id = REG_READ(DMCUB_EXT_INTERRUPT_STATUS);
+
+	dmub_dcn401_get_ihc_diagnostic_data(dmub, &hw_data->ihc);
 }
+
 void dmub_dcn401_configure_dmub_in_system_memory(struct dmub_srv *dmub)
 {
 	/* DMCUB_REGION3_TMR_AXI_SPACE values:
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn401.h +37 -2
index de7840d93592..c90c0478e56b 100644
@@ -124,7 +124,39 @@ struct dmub_srv;
 	DMUB_SR(DMCUB_REG_OUTBOX0_RDY) \
 	DMUB_SR(DMCUB_REG_OUTBOX0_MSG0) \
 	DMUB_SR(DMCUB_REG_OUTBOX0_RSP) \
-	DMUB_SR(HOST_INTERRUPT_CSR)
+	DMUB_SR(HOST_INTERRUPT_CSR) \
+	DMUB_SR(DMCUB_EXT_INTERRUPT_CTXID) \
+	DMUB_SR(DMCUB_EXT_INTERRUPT_STATUS)
+
+#define DMUB_DCN401_IHC_REGS() \
+	DMUB_SR(DISP_INTERRUPT_STATUS) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE2) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE3) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE4) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE5) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE6) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE7) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE8) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE9) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE10) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE11) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE12) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE13) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE14) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE15) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE16) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE17) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE18) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE19) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE20) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE21) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE22) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE23) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE24) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE25)
+
+#define DMUB_DCN401_IHC_DEBUG_REGS()
 
 #define DMUB_DCN401_FIELDS() \
 	DMUB_SF(DMCUB_CNTL, DMCUB_ENABLE) \
@@ -170,11 +202,14 @@ struct dmub_srv;
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_ACK) \
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_STAT) \
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_EN) \
-	DMUB_SF(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS)
+	DMUB_SF(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS) \
+	DMUB_SF(DMCUB_EXT_INTERRUPT_STATUS, DMCUB_EXT_INTERRUPT_ID)
 
 struct dmub_srv_dcn401_reg_offset {
 #define DMUB_SR(reg) uint32_t reg;
 	DMUB_DCN401_REGS()
+	DMUB_DCN401_IHC_REGS()
+	DMUB_DCN401_IHC_DEBUG_REGS()
 	DMCUB_INTERNAL_REGS()
 #undef DMUB_SR
 };
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c +37 -0
index 8ebd3d948567..17b3a2304ac7 100644
@@ -23,6 +23,7 @@ void dmub_srv_dcn42_regs_init(struct dmub_srv *dmub, struct dc_context *ctx)
 
 #define DMUB_SR(reg) REG_STRUCT->offset.reg = REG_OFFSET_EXP(reg);
 	DMUB_DCN42_REGS()
+	DMUB_DCN42_IHC_REGS()
 	DMCUB_INTERNAL_REGS()
 #undef DMUB_SR
 
@@ -633,6 +634,36 @@ uint32_t dmub_dcn42_get_current_time(struct dmub_srv *dmub)
 	return REG_READ(DMCUB_TIMER_CURRENT);
 }
 
+static void dmub_dcn42_get_ihc_diagnostic_data(struct dmub_srv *dmub, struct dmub_ihc_diagnostic_data *ihc_data)
+{
+	ihc_data->int_status[0] = REG_READ(DISP_INTERRUPT_STATUS);
+	ihc_data->int_status[1] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE);
+	ihc_data->int_status[2] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE2);
+	ihc_data->int_status[3] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE3);
+	ihc_data->int_status[4] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE4);
+	ihc_data->int_status[5] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE5);
+	ihc_data->int_status[6] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE6);
+	ihc_data->int_status[7] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE7);
+	ihc_data->int_status[8] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE8);
+	ihc_data->int_status[9] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE9);
+	ihc_data->int_status[10] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE10);
+	ihc_data->int_status[11] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE11);
+	ihc_data->int_status[12] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE12);
+	ihc_data->int_status[13] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE13);
+	ihc_data->int_status[14] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE14);
+	ihc_data->int_status[15] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE15);
+	ihc_data->int_status[16] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE16);
+	ihc_data->int_status[17] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE17);
+	ihc_data->int_status[18] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE18);
+	ihc_data->int_status[19] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE19);
+	ihc_data->int_status[20] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE20);
+	ihc_data->int_status[21] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE21);
+	ihc_data->int_status[22] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE22);
+	ihc_data->int_status[23] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE23);
+	ihc_data->int_status[24] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE24);
+	ihc_data->int_status[25] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE25);
+}
+
 void dmub_dcn42_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_hw_diagnostic_data *hw_data)
 {
 	uint32_t is_dmub_enabled, is_soft_reset, is_sec_reset, is_pwait;
@@ -708,6 +739,12 @@ void dmub_dcn42_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_hw_diagno
 	hw_data->is_cw6_enabled = (uint8_t)is_cw6_enabled;
 
 	hw_data->gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
+
+	hw_data->int_status = REG_READ(DMCUB_INTERRUPT_STATUS);
+	hw_data->ext_int_ctx_id = REG_READ(DMCUB_EXT_INTERRUPT_CTXID);
+	hw_data->ext_int_id = REG_READ(DMCUB_EXT_INTERRUPT_STATUS);
+
+	dmub_dcn42_get_ihc_diagnostic_data(dmub, &hw_data->ihc);
 }
 
 bool dmub_dcn42_get_preos_fw_info(struct dmub_srv *dmub)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.h +34 -2
index c879e94272d7..cf901715ec36 100644
@@ -150,7 +150,37 @@ struct dmub_srv;
 	DMUB_SR(DMCUB_REG_OUTBOX0_RDY) \
 	DMUB_SR(DMCUB_REG_OUTBOX0_MSG0) \
 	DMUB_SR(DMCUB_REG_OUTBOX0_RSP) \
-	DMUB_SR(HOST_INTERRUPT_CSR)
+	DMUB_SR(HOST_INTERRUPT_CSR) \
+	DMUB_SR(DMCUB_EXT_INTERRUPT_CTXID) \
+	DMUB_SR(DMCUB_EXT_INTERRUPT_STATUS)
+
+#define DMUB_DCN42_IHC_REGS() \
+	DMUB_SR(DISP_INTERRUPT_STATUS) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE2) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE3) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE4) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE5) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE6) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE7) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE8) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE9) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE10) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE11) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE12) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE13) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE14) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE15) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE16) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE17) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE18) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE19) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE20) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE21) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE22) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE23) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE24) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE25)
 
 #define DMUB_DCN42_FIELDS() \
 	DMUB_SF(DMCUB_CNTL, DMCUB_ENABLE) \
@@ -198,11 +228,13 @@ struct dmub_srv;
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_INBOX0_RSP_INT_EN) \
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_ACK) \
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_STAT) \
-	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_EN)
+	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_EN) \
+	DMUB_SF(DMCUB_EXT_INTERRUPT_STATUS, DMCUB_EXT_INTERRUPT_ID)
 
 struct dmub_srv_dcn42_reg_offset {
 #define DMUB_SR(reg) uint32_t reg;
 	DMUB_DCN42_REGS()
+	DMUB_DCN42_IHC_REGS()
 	DMCUB_INTERNAL_REGS()
 #undef DMUB_SR
 };
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42b.c +1 -0
index 97eb022b837b..25fde94df2ca 100644
@@ -20,6 +20,7 @@ void dmub_srv_dcn42b_regs_init(struct dmub_srv *dmub, struct dc_context *ctx)
 
 #define DMUB_SR(reg) REG_STRUCT->offset.reg = REG_OFFSET_EXP(reg);
 	DMUB_DCN42_REGS()
+	DMUB_DCN42_IHC_REGS()
 	DMCUB_INTERNAL_REGS()
 #undef DMUB_SR
 
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.c +38 -0
index 8c3cc51c07a3..384bdb0410f1 100644
@@ -30,6 +30,7 @@ const struct dmub_srv_dcn60_regs dmub_srv_dcn60_regs = {
 #define MMHUB_SR(reg) .reg = MMHUB_REG_OFFSET(reg),
 	.offset = {
 		DMUB_DCN60_REGS()
+		DMUB_DCN60_IHC_REGS()
 		DMCUB_INTERNAL_REGS()
 		DCN60_EXTERNAL_MMHUB_REGS()
 	},
@@ -469,6 +470,36 @@ uint32_t dmub_dcn60_get_current_time(struct dmub_srv *dmub)
 	return REG_READ(DMCUB_TIMER_CURRENT);
 }
 
+static void dmub_dcn60_get_ihc_diagnostic_data(struct dmub_srv *dmub, struct dmub_ihc_diagnostic_data *ihc_data)
+{
+	ihc_data->int_status[0] = REG_READ(DISP_INTERRUPT_STATUS);
+	ihc_data->int_status[1] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE);
+	ihc_data->int_status[2] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE2);
+	ihc_data->int_status[3] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE3);
+	ihc_data->int_status[4] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE4);
+	ihc_data->int_status[5] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE5);
+	ihc_data->int_status[6] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE6);
+	ihc_data->int_status[7] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE7);
+	ihc_data->int_status[8] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE8);
+	ihc_data->int_status[9] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE9);
+	ihc_data->int_status[10] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE10);
+	ihc_data->int_status[11] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE11);
+	ihc_data->int_status[12] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE12);
+	ihc_data->int_status[13] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE13);
+	ihc_data->int_status[14] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE14);
+	ihc_data->int_status[15] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE15);
+	ihc_data->int_status[16] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE16);
+	ihc_data->int_status[17] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE17);
+	ihc_data->int_status[18] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE18);
+	ihc_data->int_status[19] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE19);
+	ihc_data->int_status[20] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE20);
+	ihc_data->int_status[21] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE21);
+	ihc_data->int_status[22] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE22);
+	ihc_data->int_status[23] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE23);
+	ihc_data->int_status[24] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE24);
+	ihc_data->int_status[25] = REG_READ(DISP_INTERRUPT_STATUS_CONTINUE25);
+}
+
 void dmub_dcn60_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_hw_diagnostic_data *hw_data)
 {
 	uint32_t is_dmub_enabled, is_soft_reset, is_sec_reset, is_pwait;
@@ -544,7 +575,14 @@ void dmub_dcn60_get_diagnostic_data(struct dmub_srv *dmub, struct dmub_hw_diagno
 	hw_data->is_cw6_enabled = (uint8_t)is_cw6_enabled;
 
 	hw_data->gpint_datain0 = REG_READ(DMCUB_GPINT_DATAIN0);
+
+	hw_data->int_status = REG_READ(DMCUB_INTERRUPT_STATUS);
+	hw_data->ext_int_ctx_id = REG_READ(DMCUB_EXT_INTERRUPT_CTXID);
+	hw_data->ext_int_id = REG_READ(DMCUB_EXT_INTERRUPT_STATUS);
+
+	dmub_dcn60_get_ihc_diagnostic_data(dmub, &hw_data->ihc);
 }
+
 void dmub_dcn60_configure_dmub_in_system_memory(struct dmub_srv *dmub)
 {
 	/* DMCUB_REGION3_TMR_AXI_SPACE values:
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn60.h +34 -2
index 238cba46d366..7e8bae49baee 100644
@@ -124,7 +124,37 @@ struct dmub_srv;
 	DMUB_SR(DMCUB_REG_OUTBOX0_RDY) \
 	DMUB_SR(DMCUB_REG_OUTBOX0_MSG0) \
 	DMUB_SR(DMCUB_REG_OUTBOX0_RSP) \
-	DMUB_SR(HOST_INTERRUPT_CSR)
+	DMUB_SR(HOST_INTERRUPT_CSR) \
+	DMUB_SR(DMCUB_EXT_INTERRUPT_CTXID) \
+	DMUB_SR(DMCUB_EXT_INTERRUPT_STATUS)
+
+#define DMUB_DCN60_IHC_REGS() \
+	DMUB_SR(DISP_INTERRUPT_STATUS) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE2) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE3) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE4) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE5) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE6) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE7) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE8) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE9) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE10) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE11) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE12) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE13) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE14) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE15) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE16) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE17) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE18) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE19) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE20) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE21) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE22) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE23) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE24) \
+	DMUB_SR(DISP_INTERRUPT_STATUS_CONTINUE25)
 
 #define DMUB_DCN60_FIELDS() \
 	DMUB_SF(DMCUB_CNTL, DMCUB_ENABLE) \
@@ -170,7 +200,8 @@ struct dmub_srv;
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_ACK) \
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_STAT) \
 	DMUB_SF(HOST_INTERRUPT_CSR, HOST_REG_OUTBOX0_RDY_INT_EN) \
-	DMUB_SF(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS)
+	DMUB_SF(DMCUB_CNTL, DMCUB_PWAIT_MODE_STATUS) \
+	DMUB_SF(DMCUB_EXT_INTERRUPT_STATUS, DMCUB_EXT_INTERRUPT_ID)
 
 #define DCN60_EXTERNAL_MMHUB_REGS() \
 	MMHUB_SR(MMMC_VM_FB_LOCATION_BASE) \
@@ -184,6 +215,7 @@ struct dmub_srv_dcn60_reg_offset {
 #define DMUB_SR(reg) uint32_t reg;
 #define MMHUB_SR(reg) uint32_t reg;
 	DMUB_DCN60_REGS()
+	DMUB_DCN60_IHC_REGS()
 	DMCUB_INTERNAL_REGS()
 	DCN60_EXTERNAL_MMHUB_REGS()
 #undef MMHUB_SR
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/27 drm/amd/display: Add debug option to force DP link rate

In reply to Chenyu Chen

From: Allen Pan <[email protected]>

[Why]
Link rate testing needs a way to override the max DP link rate that VBIOS reports for the link encoder, including rates above it.

[How]
Add force_dp_link_rate to dc_debug_options. When set, the DCN4.2 link encoder reports it as its max link rate instead of the rate VBIOS reports. dp_get_max_link_cap() still lowers it to the sink's DPCD max link rate and the cable ID and LTTPR caps, and link settings are decided as before.

---
 drivers/gpu/drm/amd/display/dc/dc.h                  |  1 +
 .../display/dc/dio/dcn42/dcn42_dio_link_encoder.c    | 12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
index 58e443672411..75d1ede366c7 100644
@@ -1269,6 +1269,7 @@ struct dc_debug_options {
 	bool enable_dp_dig_pixel_rate_div_policy;
 	bool using_dml21;
 	enum lttpr_mode lttpr_mode_override;
+	enum dc_link_rate force_dp_link_rate;
 	unsigned int dsc_delay_factor_wa_x1000;
 	unsigned int min_prefetch_in_strobe_ns;
 	bool disable_unbounded_requesting;
drivers/gpu/drm/amd/display/dc/dio/dcn42/dcn42_dio_link_encoder.c +11 -1
index 3b11be9991c3..687df8cb4b60 100644
@@ -64,6 +64,16 @@ bool dcn42_program_hpd_filter(struct link_encoder *enc, int delay_on_connect_in_
 	return true;
 }
 
+/* DMs load debug options after link encoders are constructed */
+static void dcn42_link_encoder_get_max_link_cap(struct link_encoder *enc,
+	struct dc_link_settings *link_settings)
+{
+	dcn32_link_encoder_get_max_link_cap(enc, link_settings);
+
+	if (enc->ctx->dc->debug.force_dp_link_rate != LINK_RATE_UNKNOWN)
+		link_settings->link_rate = enc->ctx->dc->debug.force_dp_link_rate;
+}
+
 static const struct link_encoder_funcs dcn42_link_enc_funcs = {
 	.read_state = link_enc2_read_state,
 	.validate_output_with_stream =
@@ -92,7 +102,7 @@ static const struct link_encoder_funcs dcn42_link_enc_funcs = {
 	.get_dig_frontend = dcn10_get_dig_frontend,
 	.get_dig_mode = dcn401_get_dig_mode,
 	.is_in_alt_mode = dcn32_link_encoder_is_in_alt_mode,
-	.get_max_link_cap = dcn32_link_encoder_get_max_link_cap,
+	.get_max_link_cap = dcn42_link_encoder_get_max_link_cap,
 	.dpcstx_set_order_invert_18_bit = NULL,
 	.set_phy_source = NULL,
 	.dpcs_initialize_phy = NULL,
Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/27 drm/amd/display: Reject Replay activation on an inactive link

In reply to Chenyu Chen

From: Harry VanZyllDeJong <[email protected]>

[Why]
Replay can attempt PHY power management on an untrained link with no frontend connected to its backend. The resulting ALPM handshake can stall firmware and block display recovery.

[How]
Reject Replay enable requests while the link is inactive without blocking disable requests.

---
 .../amd/display/dc/link/protocols/link_edp_panel_control.c  | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +6 -0
index 0e9b2b675eac..3f8063f6f06c 100644
@@ -956,6 +956,12 @@ bool edp_set_replay_allow_active(struct dc_link *link, const bool *allow_active,
 		}
 	}
 
+	/* Replay drives the PHY/ALPM and hangs DMCUB if the link was never trained,
+	 * e.g. on the GPU that does not own the panel after a mux switch.
+	 */
+	if (allow_active && *allow_active && !link->link_status.link_active)
+		return false;
+
 	/* Activate or deactivate Replay */
 	if (allow_active && link->replay_settings.replay_allow_active != *allow_active) {
 		// TODO: Handle mux change case if force_static is set
Signature · 1 line
2.43.0
#6 lore raw

PATCH 6/27 drm/amd/display: Add DPMS-v2 init

In reply to Chenyu Chen

From: Dominik Kowalski <[email protected]>

[Why & How]
Add allocation, deallocation and initialization of DPMS-v2 context.

---
 .../drm/amd/display/dc/link/link_dpms_v2.c    | 25 ++++++++-
 .../drm/amd/display/dc/link/link_factory.c    | 55 ++++++++++++++++++-
 2 files changed, 76 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_dpms_v2.c +23 -2
index 43c3f7dfa343..14f5bf4f53b1 100644
@@ -25,10 +25,28 @@
 
 #include "dc/link/link_dpms_v2.h"
 
+#include "dc/inc/core_types.h"
+#include "dc/inc/link_tx.h"
+
+// TODO: This should be moved to dc_update_state_prepare
+static void link_dpms_ctx_init(struct link_dpms_ctx *dpms_ctx,
+			  struct pipe_ctx *pipe_ctx)
+{
+	dpms_ctx->link_config = pipe_ctx->link_config;
+
+	// TODO: Implement
+	dpms_ctx->stream_descriptor = (struct link_dpms_stream_descriptor){
+		.dummy = 0,
+	};
+}
+
 enum dc_status link_set_dpms_off_v2(struct pipe_ctx *pipe_ctx)
 {
+	struct dc_link *link = pipe_ctx->stream->link;
+
+	link_dpms_ctx_init(link->dpms_ctx, pipe_ctx);
+
 	// TODO: Implement
-	(void)pipe_ctx;
 	ASSERT(false);
 	return DC_ERROR_UNEXPECTED;
 }
@@ -36,9 +54,12 @@ enum dc_status link_set_dpms_off_v2(struct pipe_ctx *pipe_ctx)
 enum dc_status link_set_dpms_on_v2(struct dc_state *state,
 				   struct pipe_ctx *pipe_ctx)
 {
+	struct dc_link *link = pipe_ctx->stream->link;
+
+	link_dpms_ctx_init(link->dpms_ctx, pipe_ctx);
+
 	// TODO: Implement
 	(void)state;
-	(void)pipe_ctx;
 	ASSERT(false);
 	return DC_ERROR_UNEXPECTED;
 }
drivers/gpu/drm/amd/display/dc/link/link_factory.c +53 -2

97 lines not on this page · raw message

Signature · 1 line
2.43.0
#7 lore raw

PATCH 7/27 drm/amd/display: Expose per-CRTC pstate method in connector debugfs

In reply to Chenyu Chen

From: Ivan Lipski <[email protected]>

[Why&How]
Other than visualconfirm, which is not always accurate, there is no reliable way to get the currently used pstate switch method in runtime.

Expand debugfs to output the current pstate switch method per connector. Resolve the connector's current CRTC stream and report the matching pipe's p_state_type, or P_STATE_UNKNOWN if inactive.

---
 .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +34 -0
index 68356cb8e4de..dc7d5c19eb6c 100644
@@ -3739,6 +3739,37 @@ DEFINE_SHOW_ATTRIBUTE(cacp_ace_curve_area);
 DEFINE_SHOW_ATTRIBUTE(ips_status);
 DEFINE_SHOW_ATTRIBUTE(ips_residency);
 
+/* Reports the pstate method of this connector's active CRTC. */
+static int pstate_switch_method_show(struct seq_file *m, void *unused)
+{
+	struct amdgpu_dm_connector *connector = to_amdgpu_dm_connector(m->private);
+	struct amdgpu_device *adev = drm_to_adev(connector->base.dev);
+	struct dm_crtc_state *crtc_state;
+	struct dc_state *context;
+	unsigned int i;
+	int method = P_STATE_UNKNOWN;
+
+	if (connector->base.state && connector->base.state->crtc) {
+		crtc_state = to_dm_crtc_state(connector->base.state->crtc->state);
+		mutex_lock(&adev->dm.dc_lock);
+		context = adev->dm.dc->current_state;
+		for (i = 0; i < adev->dm.dc->res_pool->pipe_count; i++) {
+			struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
+
+			if (pipe->stream == crtc_state->stream && pipe->plane_state) {
+				method = pipe->p_state_type;
+				break;
+			}
+		}
+		mutex_unlock(&adev->dm.dc_lock);
+	}
+
+	seq_printf(m, "%d\n", method);
+
+	return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(pstate_switch_method);
+
 static const struct {
 	char *name;
 	const struct file_operations *fops;
@@ -3907,6 +3938,9 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
 	int i;
 	struct dentry *dir = connector->base.debugfs_entry;
 
+	debugfs_create_file("pstate_switch_method", 0444, dir, connector,
+			    &pstate_switch_method_fops);
+
 	if (connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
 	    connector->base.connector_type == DRM_MODE_CONNECTOR_eDP) {
 		for (i = 0; i < ARRAY_SIZE(dp_debugfs_entries); i++) {
Signature · 1 line
2.43.0
#8 lore raw

PATCH 8/27 drm/amd/display: Add DPMS-v2 tx init

In reply to Chenyu Chen

From: Dominik Kowalski <[email protected]>

[Why & How]
Add allocation, deallocation and initialization of DPMS-v2 tx structs. When enable_dpms_v2 is set, link_factory creates a v2 tx; otherwise it creates a v1 tx, so every link gets a tx. The tx is stored in a new tx_inst field of dc_link and passed to the dpms_ctx. Link construction fails if the tx cannot be created.

---
 drivers/gpu/drm/amd/display/dc/dc.h           |  1 +
 drivers/gpu/drm/amd/display/dc/link/Makefile  | 11 +++
 .../drm/amd/display/dc/link/link_factory.c    | 39 ++++++++-
 .../drm/amd/display/dc/link/tx/link_tx_v1.c   | 55 ++++++++++++
 .../drm/amd/display/dc/link/tx/link_tx_v1.h   | 34 ++++++++
 .../drm/amd/display/dc/link/tx/link_tx_v2.c   | 83 +++++++++++++++++++
 .../drm/amd/display/dc/link/tx/link_tx_v2.h   | 38 +++++++++
 7 files changed, 259 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v1.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v1.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v2.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v2.h
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
index 75d1ede366c7..69d6eed1df41 100644
@@ -1935,6 +1935,7 @@ struct dc_scratch_space {
 
 	struct ddc_service *ddc;
 	struct link_dpms_ctx *dpms_ctx;
+	struct link_tx *tx_inst;
 
 	enum dp_panel_mode panel_mode;
 	bool panel_mode_initialized;
drivers/gpu/drm/amd/display/dc/link/Makefile +11 -0
index ea08f1b1e60e..2d9bbf33ed97 100644
@@ -70,3 +70,14 @@ AMD_DAL_LINK_PROTOCOLS = $(addprefix $(AMDDALPATH)/dc/link/protocols/, \
 $(LINK_PROTOCOLS))
 
 AMD_DISPLAY_FILES += $(AMD_DAL_LINK_PROTOCOLS)
+
+###############################################################################
+# tx
+###############################################################################
+LINK_TX = link_tx_v1.o
+LINK_TX += link_tx_v2.o
+
+AMD_DAL_LINK_TX = $(addprefix $(AMDDALPATH)/dc/link/tx/, \
+$(LINK_TX))
+
+AMD_DISPLAY_FILES += $(AMD_DAL_LINK_TX)
drivers/gpu/drm/amd/display/dc/link/link_factory.c +37 -2
index 1e32f96348b7..e5a5bc70e7d3 100644
@@ -47,6 +47,9 @@
 #include "protocols/link_hpd.h"
 #include "gpio_service_interface.h"
 #include "atomfirmware.h"
+#include "dc/inc/link_tx.h"
+#include "dc/link/tx/link_tx_v1.h"
+#include "dc/link/tx/link_tx_v2.h"
 
 #define DC_LOGGER \
 	dc_ctx->logger
@@ -434,11 +437,18 @@ static struct link_dpms_ctx *link_create_dpms_ctx(struct dc_link *link)
 
 	*ctx = (struct link_dpms_ctx){
 		.link = link,
+		.tx = link->tx_inst,
 	};
 
 	return ctx;
 }
 
+static void link_destroy_tx(struct link_tx *tx)
+{
+	if (tx && tx->funcs && tx->funcs->destroy)
+		tx->funcs->destroy(tx);
+}
+
 static void link_destruct(struct dc_link *link)
 {
 	unsigned int i;
@@ -471,6 +481,9 @@ static void link_destruct(struct dc_link *link)
 
 	if (link->dpms_ctx)
 		link_destroy_dpms_ctx(link->dpms_ctx);
+
+	if (link->tx_inst)
+		link_destroy_tx(link->tx_inst);
 }
 
 static enum channel_id get_ddc_line(struct dc_link *link)
@@ -922,7 +935,11 @@ static bool construct_phy(struct dc_link *link,
 		}
 	}
 
-	if (init_params->dc->config.enable_dpms_v2) {
+	if (!init_params->dc->config.enable_dpms_v2) {
+		link->tx_inst = link_tx_create_v1(link);
+	} else {
+		link->tx_inst = link_tx_create_v2(link);
+
 		link->dpms_ctx = link_create_dpms_ctx(link);
 		if (!link->dpms_ctx) {
 			DC_ERROR("Failed to create dpms_ctx!\n");
@@ -930,6 +947,11 @@ static bool construct_phy(struct dc_link *link,
 		}
 	}
 
+	if (!link->tx_inst) {
+		DC_ERROR("Failed to create tx!\n");
+		goto fail;
+	}
+
 	link->psr_settings.psr_vtotal_control_support = false;
 	link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
 	link->replay_settings.config.replay_version = DC_REPLAY_VERSION_UNSUPPORTED;
@@ -952,6 +974,8 @@ static bool construct_phy(struct dc_link *link,
 		link->link_enc->funcs->destroy(&link->link_enc);
 	if (link->dpms_ctx)
 		link_destroy_dpms_ctx(link->dpms_ctx);
+	if (link->tx_inst)
+		link_destroy_tx(link->tx_inst);
 
 	DC_LOG_DC("BIOS object table - %s failed.\n", __func__);
 	return false;
@@ -1006,7 +1030,11 @@ static bool construct_dpia(struct dc_link *link,
 		goto fail;
 	}
 
-	if (init_params->dc->config.enable_dpms_v2) {
+	if (!init_params->dc->config.enable_dpms_v2) {
+		link->tx_inst = link_tx_create_v1(link);
+	} else {
+		link->tx_inst = link_tx_create_v2(link);
+
 		link->dpms_ctx = link_create_dpms_ctx(link);
 		if (!link->dpms_ctx) {
 			DC_ERROR("Failed to create dpms_ctx!\n");
@@ -1014,6 +1042,11 @@ static bool construct_dpia(struct dc_link *link,
 		}
 	}
 
+	if (!link->tx_inst) {
+		DC_ERROR("Failed to create tx!\n");
+		goto fail;
+	}
+
 	/* Set dpia port index : 0 to number of dpia ports */
 	link->ddc_hw_inst = (uint8_t)init_params->connector_index;
 
@@ -1033,6 +1066,8 @@ static bool construct_dpia(struct dc_link *link,
 		link_destroy_ddc_service(&link->ddc);
 	if (link->dpms_ctx)
 		link_destroy_dpms_ctx(link->dpms_ctx);
+	if (link->tx_inst)
+		link_destroy_tx(link->tx_inst);
 
 	return false;
 }
drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v1.c new file +55 -0

55 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v1.h new file +34 -0
new file mode 100644
index 000000000000..11211f3955cf
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright 2026 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef LINK_TX_V1_H
+#define LINK_TX_V1_H
+
+#include "dc/inc/link_tx.h"
+
+struct link_tx *link_tx_create_v1(struct dc_link *link);
+
+#endif
drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v2.c new file +83 -0

83 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/link/tx/link_tx_v2.h new file +38 -0
new file mode 100644
index 000000000000..151a6173b2a7
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright 2026 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef LINK_TX_V2_H
+#define LINK_TX_V2_H
+
+#include "dc/inc/link_tx.h"
+
+struct link_tx_v2_ctx {
+	int dummy;
+};
+
+struct link_tx *link_tx_create_v2(struct dc_link *link);
+
+#endif
Signature · 1 line
2.43.0
#9 lore raw

PATCH 9/27 drm/amd/display: Derive DCN6 DSCCLK range from DISPCLK

In reply to Chenyu Chen

From: Ivan Lipski <[email protected]>

[Why&How]
DSCCLK limit should be derived from the real DISPCLK instead of static soc_bb values.
Set the min to 0 and the max to max_dispclk / 6.

---
 .../dcn60/dcn60_soc_and_ip_translator.c           | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/gpu/drm/amd/display/dc/soc_and_ip_translator/dcn60/dcn60_soc_and_ip_translator.c +15 -0
index f33e818d1b1e..9c92c5bf7a0f 100644
@@ -129,6 +129,20 @@ static void dcn60_update_soc_bb_with_values_from_software_policy(struct dml2_soc
 				dc->bb_overrides.sr_lp_enter_plus_exit_time_ns / 1000.0;
 }
 
+/* Derive DSCCLK range from the final dispclk table. */
+static void dcn60_update_soc_bb_dscclk_from_dispclk(struct dml2_soc_bb *soc_bb)
+{
+	const struct dml2_clk_table *dispclk = &soc_bb->clk_table.dispclk;
+
+	if (dispclk->num_clk_values == 0)
+		return;
+
+	soc_bb->clk_table.dscclk.clk_values_khz[0] = 0;
+	soc_bb->clk_table.dscclk.clk_values_khz[1] =
+			dispclk->clk_values_khz[dispclk->num_clk_values - 1] / 6;
+	soc_bb->clk_table.dscclk.num_clk_values = 2;
+}
+
 static void apply_soc_bb_updates(struct dml2_soc_bb *soc_bb, const struct dc *dc, const struct dml2_configuration_options *config)
 {
 	/* Individual modification can be overwritten even if it was obtained by a previous function.
@@ -140,6 +154,7 @@ static void apply_soc_bb_updates(struct dml2_soc_bb *soc_bb, const struct dc *dc
 	dcn401_update_soc_bb_with_values_from_clk_mgr(soc_bb, dc, config);
 	dcn401_update_soc_bb_with_values_from_vbios(soc_bb, dc);
 	dcn60_update_soc_bb_with_values_from_software_policy(soc_bb, dc);
+	dcn60_update_soc_bb_dscclk_from_dispclk(soc_bb);
 }
 
 static void dcn60_get_soc_bb(struct dml2_soc_bb *soc_bb, const struct dc *dc, const struct dml2_configuration_options *config)
Signature · 1 line
2.43.0
#10 lore raw

PATCH 10/27 drm/amd/display: Carry the stream and plane update bits in update_flags

In reply to Chenyu Chen

From: Tony Cheng <[email protected]>

[Why]
A BLS builder should read what dc_core changed from the update flags instead of comparing the current and new states itself.

[How]
dc_state_compute_update_flags copies the update flags of each stream into streams[], and the update bits of the plane on each pipe into the plane field of its pipe flags. No builder reads them yet.

---
 drivers/gpu/drm/amd/display/dc/core/dc_state.c | 4 ++++
 drivers/gpu/drm/amd/display/dc/dc_state_priv.h | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_state.c +4 -0
index 961c3c1ea51f..7eadf802c3e9 100644
@@ -1174,6 +1174,8 @@ static void pipe_flags(const struct pipe_ctx *pipe,
 			pipe->plane_res.hubp && pipe->plane_res.dpp &&
 			pipe->stream_res.opp;
 	flags->det_size = pipe->hubp_regs.det_size;
+	if (pipe->plane_state)
+		flags->plane = pipe->plane_state->update_bits;
 }
 
 enum dc_status dc_state_compute_update_flags(const struct dc_state *cur_state,
@@ -1191,5 +1193,7 @@ enum dc_status dc_state_compute_update_flags(const struct dc_state *cur_state,
 		pipe_flags(&target_state->res_ctx.pipe_ctx[i],
 				&out_flags->new_pipes[i]);
 	}
+	for (i = 0; i < target_state->stream_count && i < MAX_STREAMS; i++)
+		out_flags->streams[i] = target_state->streams[i]->update_flags;
 	return DC_OK;
 }
drivers/gpu/drm/amd/display/dc/dc_state_priv.h +7 -1
index 0415e45d438e..c73c08989bd9 100644
@@ -136,12 +136,18 @@ struct dc_state_pipe_flags {
 	bool has_plane;
 	/* The DET size from hubp_regs. */
 	uint32_t det_size;
+	/* What dc_core changed on the plane of the pipe. */
+	struct pipe_update_bits plane;
 };
 
-/* The facts of pipe i in the current and in the target state. */
+/*
+ * The facts of pipe i in the current and in the target state, and what
+ * dc_core changed on stream i of the target state.
+ */
 struct dc_state_update_flags {
 	struct dc_state_pipe_flags cur_pipes[MAX_PIPES];
 	struct dc_state_pipe_flags new_pipes[MAX_PIPES];
+	union stream_update_flags streams[MAX_STREAMS];
 };
 
 /* Pure: reads both states and writes only out_flags. */
Signature · 1 line
2.43.0
#11 lore raw

PATCH 11/27 drm/amd/display: Add the vsync flip to the DC2 seamless update

In reply to Chenyu Chen

From: Tony Cheng <[email protected]>

[Why]
With DC2 selected, Core2 rejects every fast update. A flip on the one virtual plane falls back to DC1.

[How]
Split enable_plane into named stages: ungate_hw, setup_pipe_1, reconfigure_mpc, setup_pipe_2, program_flip and setup_pipe_3. A per-DPP-pipe sub-sequence can hold stages, and each pipe runs every stage before the next pipe, so the emitted order does not change.

program_flip holds the plane address and the GSL and triple buffer of the fast flip. The update chooses its steps from the update flags only. dcn401_is_hardware_remapped compares the enabled, plane and DET facts of each pipe of the stream in both states. dcn401_are_pipe_configs_changed reports a stream flag, or a plane bit other than the address, on a pipe of the stream. A new only_if meta holds the necessary conditions of a step, next to skip_if, which holds the sufficient conditions for a skip. The GSL and triple buffer steps are emitted only if the hardware is not remapped and no pipe config changed, so a new or reconfigured plane programs only the address. A new skip_if.only_addresses_changed skips each step that only a full update needs, so a flip emits the lock, program_flip, the unlock and the trigger.

The DCC meta wait and the cursor update are not emitted. The wait is 0 without an immediate flip, and the cursor update does nothing without cursor offload, which the dc check rejects.

The flip check uses the shared dc and stream checks and reads only the state, not the hwss. It rejects each state that makes DC1 send a DMUB command, take a DMUB lock, or add a call: SubVP, PSR, Replay, an ABM level, a stream update flag, ODM, more than one plane, an immediate flip, triple-buffer flips, an MCM LUT and any plane update bit other than the address. A kept state that does not flip is rejected.

Core2 takes the context-fast flow on the kept context in the same support and execute path as the full update, when each surface is a plane of the stream and there is no stream update. A fast update skips the mcache programming and the bandwidth bookkeeping. After the update, Core2 marks the VMID, records the requested address and clears the stream update flags.

Before the build, core2_update_state_execute also calls set_p_state_switch_method on every DPP pipe of the stream, for both full and fast updates, unless dc->debug.using_dml2 is set.

---
 .../bls_builder/bls_builder_private_types.h   |  12 +
 .../dc/bls_builder/dcn401_builder_internal.h  |  14 +
 .../dc/bls_builder/dcn401_seamless_builder.c  | 462 +++++++++++++++---
 .../gpu/drm/amd/display/dc/core2/dc_core2.c   |  71 ++-
 4 files changed, 487 insertions(+), 72 deletions(-)
drivers/gpu/drm/amd/display/dc/bls_builder/bls_builder_private_types.h +12 -0
index 11e452b36e05..2fdac8415f31 100644
@@ -150,7 +150,19 @@ struct dcn401_commit_step_meta {
 		bool scaling_unchanged;
 		/* funcs.pg_needs_ip_request() is false: no PG hook can gate. */
 		bool no_ip_request;
+		/* update_flags has no address update for the plane of the pipe. */
+		bool no_addr_update;
+		/*
+		 * update_flags change only plane addresses: the hardware is not
+		 * remapped and no pipe config changed.
+		 */
+		bool only_addresses_changed;
 	} skip_if;
+	/* Necessary conditions: the step is emitted only if each holds. */
+	struct {
+		bool hardware_not_remapped;
+		bool pipe_configs_not_changed;
+	} only_if;
 };
 
 struct dcn401_commit_step {
drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_builder_internal.h +14 -0
index 4af30178b42b..ee829acb3c78 100644
@@ -125,6 +125,10 @@ struct dcn401_commit_step_args {
 	const struct dc_state_update_flags *update_flags;
 	/* stream is in both states on the same pipes, planes and blocks. */
 	bool stream_unchanged;
+	/* update_flags: a pipe of stream changes its blocks, plane or DET. */
+	bool hardware_remapped;
+	/* update_flags: a stream change or a non-address plane change. */
+	bool pipe_configs_changed;
 };
 
 /*
@@ -133,6 +137,9 @@ struct dcn401_commit_step_args {
  * of that state, the OTG master first. A builder lists its sub-sequences
  * in emission order. A sequence longer than DC2_BLS_MAX_STEPS keeps its
  * count and only the first entries; Core rejects it.
+ *
+ * A per-DPP-pipe sub-sequence can hold a group of named stages instead of
+ * steps. Each pipe then emits every stage before the next pipe starts.
  */
 #define DCN401_CURRENT_STATE			(1u << 0)
 #define DCN401_NEW_STATE			(1u << 1)
@@ -140,10 +147,17 @@ struct dcn401_commit_step_args {
 #define DCN401_PER_STREAM_PER_OPP_HEAD		(1u << 3)
 #define DCN401_PER_STREAM_PER_DPP_PIPE		(1u << 4)
 
+struct dcn401_stage {
+	const struct dcn401_commit_step *steps;
+	unsigned int count;
+};
+
 struct dcn401_sub_sequence {
 	uint32_t flags;
 	const struct dcn401_commit_step *steps;
 	unsigned int count;
+	const struct dcn401_stage *stages;
+	unsigned int stage_count;
 };
 
 /* The support check found an OTG master for each stream it expands. */
drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_seamless_builder.c +403 -59

820 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/core2/dc_core2.c +58 -13

125 lines not on this page · raw message

Signature · 1 line
2.43.0
#12 lore raw

PATCH 12/27 drm/amd/display: Preserve bandwidth floors in overrides

In reply to Chenyu Chen

From: Wenjing Liu <[email protected]>

[Why]
Bandwidth overrides must respect each current-state requirement while allowing descending requests to release previous peak votes.

[How]
Recompute nominal and urgent requests from their corresponding current-state floors and the capped input on every call. Restore the state values when the request is zero.

---
 .../display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c   | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn60/dcn60_clk_mgr.c +11 -7
index f801f3337e5d..9556da79cdce 100644
@@ -1614,23 +1614,27 @@ static unsigned int dcn60_override_memory_bandwidth_request(
 	struct dc_clocks new_clocks;
 	unsigned int max_bw_kbps;
 	unsigned int capped_bw_kbps;
+	unsigned int original_nominal_bw_kbps = dc->current_state->bw_ctx.bw.dcn.clk.utm_nominal_bandwidth_lb_KBps;
+	unsigned int original_urgent_bw_kbps = dc->current_state->bw_ctx.bw.dcn.clk.utm_urgent_bandwidth_lb_KBps;
 	int num_steps;
 
 	memcpy(&new_clocks, &clk_mgr_base->clks, sizeof(struct dc_clocks));
 
 	if (bw_kbps == 0) {
-		/* Clearing the override restores the request of the committed mode. */
-		new_clocks.utm_nominal_bandwidth_lb_KBps =
-				dc->current_state->bw_ctx.bw.dcn.clk.utm_nominal_bandwidth_lb_KBps;
-		new_clocks.utm_urgent_bandwidth_lb_KBps =
-				dc->current_state->bw_ctx.bw.dcn.clk.utm_urgent_bandwidth_lb_KBps;
+		new_clocks.utm_nominal_bandwidth_lb_KBps = original_nominal_bw_kbps;
+		new_clocks.utm_urgent_bandwidth_lb_KBps = original_urgent_bw_kbps;
 	} else {
 		max_bw_kbps    = dcn60_get_max_active_utm_bandwidth_kbps(clk_mgr_base);
 		capped_bw_kbps = (bw_kbps > max_bw_kbps) ? max_bw_kbps : bw_kbps;
 
-		new_clocks.utm_nominal_bandwidth_lb_KBps = capped_bw_kbps;
-		if (new_clocks.utm_urgent_bandwidth_lb_KBps < capped_bw_kbps)
+		if (capped_bw_kbps > original_nominal_bw_kbps)
+			new_clocks.utm_nominal_bandwidth_lb_KBps = capped_bw_kbps;
+		else
+			new_clocks.utm_nominal_bandwidth_lb_KBps = original_nominal_bw_kbps;
+		if (capped_bw_kbps > original_urgent_bw_kbps)
 			new_clocks.utm_urgent_bandwidth_lb_KBps = capped_bw_kbps;
+		else
+			new_clocks.utm_urgent_bandwidth_lb_KBps = original_urgent_bw_kbps;
 	}
 
 	num_steps = dcn60_build_update_bandwidth_clocks_sequence(clk_mgr_base,
Signature · 1 line
2.43.0
#13 lore raw

PATCH 13/27 drm/amd/display: Set HDMI bypass earlier

In reply to Chenyu Chen

From: Charlene Liu <[email protected]>

[Why]
This is a HW-required change.

[How]
Enable the existing TMDS double-buffer bypass before the first metadata packet-enable write. FRL behavior remains unchanged.

This mitigates lost updates but does not prevent V_UPDATE collisions.

Only update DCN42 or later for now.

---
 .../dc/dio/dcn401/dcn401_dio_stream_encoder.c     | 15 +++++++++++++++
 .../dc/dio/dcn401/dcn401_dio_stream_encoder.h     |  4 ++++
 .../dc/dio/dcn42/dcn42_dio_stream_encoder.c       |  2 +-
 .../dc/dio/dcn60/dcn60_dio_stream_encoder.c       |  2 +-
 4 files changed, 21 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c +15 -0
index 4616b6f76aeb..86111cebc944 100644
@@ -436,6 +436,21 @@ void enc401_stream_encoder_enable(
 	}
 }
 
+void enc401_stream_encoder_enable_with_hdmi_db_bypass(
+	struct stream_encoder *enc,
+	enum signal_type signal,
+	bool enable)
+{
+	struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
+
+	if (enable && signal == SIGNAL_TYPE_HDMI_TYPE_A) {
+		/* Bypass HDMI double buffering before enabling the stream. */
+		REG_UPDATE(HDMI_DB_CONTROL, HDMI_DB_DISABLE, 1);
+	}
+
+	enc401_stream_encoder_enable(enc, signal, enable);
+}
+
 void enc401_stream_encoder_dp_set_stream_attribute(
 	struct stream_encoder *enc,
 	struct dc_crtc_timing *crtc_timing,
drivers/gpu/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.h +4 -0
index d6b00cd246b1..dea7f941675d 100644
@@ -226,6 +226,10 @@ void enc401_stream_encoder_enable(
 	struct stream_encoder *enc,
 	enum signal_type signal,
 	bool enable);
+void enc401_stream_encoder_enable_with_hdmi_db_bypass(
+	struct stream_encoder *enc,
+	enum signal_type signal,
+	bool enable);
 void enc401_set_dig_input_mode(struct stream_encoder *enc, unsigned int pix_per_container);
 void enc401_stream_encoder_map_to_link(
 		struct stream_encoder *enc,
drivers/gpu/drm/amd/display/dc/dio/dcn42/dcn42_dio_stream_encoder.c +1 -1
index b7671d41ea24..98dc158e7094 100644
@@ -552,7 +552,7 @@ static const struct stream_encoder_funcs dcn42_str_enc_funcs = {
 	.dp_set_dsc_pps_info_packet = enc42_dp_set_dsc_pps_info_packet,
 	.set_dynamic_metadata = enc401_set_dynamic_metadata,
 	.hdmi_reset_stream_attribute = enc42_reset_hdmi_stream_attribute,
-	.enable_stream = enc401_stream_encoder_enable,
+	.enable_stream = enc401_stream_encoder_enable_with_hdmi_db_bypass,
 
 	.set_input_mode = enc401_set_dig_input_mode,
 	.enable_fifo = enc35_enable_fifo,
drivers/gpu/drm/amd/display/dc/dio/dcn60/dcn60_dio_stream_encoder.c +1 -1
index b645914c1c71..3fc503681177 100644
@@ -506,7 +506,7 @@ static const struct stream_encoder_funcs dcn60_str_enc_funcs = {
 	.dp_set_dsc_pps_info_packet = enc60_dp_set_dsc_pps_info_packet,
 	.set_dynamic_metadata = enc401_set_dynamic_metadata,
 	.hdmi_reset_stream_attribute = enc60_reset_hdmi_stream_attribute,
-	.enable_stream = enc401_stream_encoder_enable,
+	.enable_stream = enc401_stream_encoder_enable_with_hdmi_db_bypass,
 
 	.set_input_mode = enc401_set_dig_input_mode,
 	.enable_fifo = enc35_enable_fifo,
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/27 drm/amd/display: Decouple PROGRAM_CURSOR_UPDATE_NOW from dc and pipe_ctx

In reply to Chenyu Chen

From: Piotr Maziarz <[email protected]>

[WHY]
PROGRAM_CURSOR_UPDATE_NOW carried dc and pipe_ctx, and its executor read the OTG instance and the cursor offload state through them at run time, against the BLS contract.

[HOW]
Carry the DMUB service handle and the OTG instance instead, filled by the new hwss_add_program_cursor_update_now(). The executor passes them through the program_cursor_offload_now hook to dc_dmub_srv_program_cursor_now(), which checks the service itself for cursor offload. The non-BLS path in commit_planes_for_stream uses the same hook signature.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  3 +-
 .../drm/amd/display/dc/core/dc_hw_sequencer.c | 28 +++++++++++++------
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c  | 11 +++-----
 drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h  |  8 +++---
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |  4 +--
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.h   |  2 +-
 .../drm/amd/display/dc/hwss/hw_sequencer.h    | 10 +++++--
 7 files changed, 40 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -1
index 92cb123e459b..584eb3e0f4c6 100644
@@ -5435,7 +5435,8 @@ static void commit_planes_for_stream(struct dc *dc,
 			continue;
 
 		if (dc->hwss.program_cursor_offload_now)
-			dc->hwss.program_cursor_offload_now(dc, pipe_ctx);
+			dc->hwss.program_cursor_offload_now(dc->ctx->dmub_srv,
+					pipe_ctx->stream_res.tg->inst);
 		if (pipe_ctx->stream_res.tg->funcs->program_manual_trigger)
 			pipe_ctx->stream_res.tg->funcs->program_manual_trigger(pipe_ctx->stream_res.tg);
 	}
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +20 -8
index 241cbe19056d..079a9ee8c5f5 100644
@@ -1715,12 +1715,9 @@ void hwss_build_fast_sequence(struct dc *dc,
 					current_mpc_pipe->stream && current_mpc_pipe->plane_state &&
 					current_mpc_pipe->plane_state->update_bits.addr_update &&
 					!current_mpc_pipe->plane_state->skip_manual_trigger) {
-				if (dc->hwss.program_cursor_offload_now) {
-					block_sequence[*num_steps].params.program_cursor_update_now_params.dc = dc;
-					block_sequence[*num_steps].params.program_cursor_update_now_params.pipe_ctx = current_mpc_pipe;
-					block_sequence[*num_steps].func = PROGRAM_CURSOR_UPDATE_NOW;
-					(*num_steps)++;
-				}
+				if (dc->hwss.program_cursor_offload_now)
+					hwss_add_program_cursor_update_now(&seq_state, dc->ctx->dmub_srv,
+							current_mpc_pipe->stream_res.tg->inst);
 
 				hwss_add_optc_program_manual_trigger(&seq_state, current_mpc_pipe->stream_res.tg);
 			}
@@ -1849,8 +1846,8 @@ void hwss_execute_sequence(struct dc *dc,
 			break;
 		case PROGRAM_CURSOR_UPDATE_NOW:
 			dc->hwss.program_cursor_offload_now(
-				params->program_cursor_update_now_params.dc,
-				params->program_cursor_update_now_params.pipe_ctx);
+				params->program_cursor_update_now_params.dmub_srv,
+				params->program_cursor_update_now_params.otg_inst);
 			break;
 		case HUBP_WAIT_PIPE_READ_START:
 			params->hubp_wait_pipe_read_start_params.hubp->funcs->hubp_wait_pipe_read_start(
@@ -6439,6 +6436,21 @@ void hwss_add_abort_cursor_offload_update(struct block_sequence_state *seq_state
 	}
 }
 
+void hwss_add_program_cursor_update_now(struct block_sequence_state *seq_state,
+		struct dc_dmub_srv *dmub_srv,
+		uint32_t otg_inst)
+{
+	struct program_cursor_update_now_params *p;
+
+	if (*seq_state->num_steps < MAX_HWSS_BLOCK_SEQUENCE_SIZE) {
+		seq_state->steps[*seq_state->num_steps].func = PROGRAM_CURSOR_UPDATE_NOW;
+		p = &seq_state->steps[*seq_state->num_steps].params.program_cursor_update_now_params;
+		p->dmub_srv = dmub_srv;
+		p->otg_inst = otg_inst;
+		(*seq_state->num_steps)++;
+	}
+}
+
 void hwss_add_stream_enc_update_hdmi_info_packets(struct block_sequence_state *seq_state,
 		struct pipe_ctx *pipe_ctx)
 {
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +4 -7
index 323e8bec23dc..220e3fc34f3f 100644
@@ -1328,15 +1328,12 @@ void dc_dmub_srv_control_cursor_offload(struct dc *dc, struct dc_state *context,
 				     enable ? DM_DMUB_WAIT_TYPE_NO_WAIT : DM_DMUB_WAIT_TYPE_WAIT);
 }
 
-void dc_dmub_srv_program_cursor_now(struct dc *dc, const struct pipe_ctx *pipe)
+void dc_dmub_srv_program_cursor_now(struct dc_dmub_srv *dc_dmub_srv, uint32_t otg_inst)
 {
 	struct dmub_rb_cmd_cursor_offload_stream_cntl *cntl;
 	union dmub_rb_cmd cmd;
 
-	if (!dc_dmub_srv_is_cursor_offload_enabled(dc))
-		return;
-
-	if (!pipe || !pipe->stream || !pipe->stream_res.tg)
+	if (!dc_dmub_srv || !dc_dmub_srv->cursor_offload_enabled)
 		return;
 
 	memset(&cmd, 0, sizeof(cmd));
@@ -1345,9 +1342,9 @@ void dc_dmub_srv_program_cursor_now(struct dc *dc, const struct pipe_ctx *pipe)
 	cntl->header.type = DMUB_CMD__CURSOR_OFFLOAD;
 	cntl->header.sub_type = DMUB_CMD__CURSOR_OFFLOAD_STREAM_PROGRAM;
 	cntl->header.payload_bytes = sizeof(cntl->data);
-	cntl->data.otg_inst = pipe->stream_res.tg->inst;
+	cntl->data.otg_inst = otg_inst;
 
-	dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
+	dc_wake_and_execute_dmub_cmd(dc_dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
 }
 
 bool dc_dmub_srv_is_hw_pwr_up(struct dc_dmub_srv *dc_dmub_srv, bool wait)
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +4 -4
index b3d6279cbc15..6c1e1b8f6d9b 100644
@@ -397,12 +397,12 @@ void dc_dmub_srv_control_cursor_offload(struct dc *dc, struct dc_state *context,
 					const struct dc_stream_state *stream, bool enable);
 
 /**
- * dc_dmub_srv_program_cursor_now() - Requests immediate cursor programming for a given pipe.
+ * dc_dmub_srv_program_cursor_now() - Requests immediate cursor programming for a given OTG.
  *
- * @dc: pointer to DC object
- * @pipe: top-most pipe for a stream.
+ * @dc_dmub_srv: DMUB service handle
+ * @otg_inst: OTG instance of the stream
  */
-void dc_dmub_srv_program_cursor_now(struct dc *dc, const struct pipe_ctx *pipe);
+void dc_dmub_srv_program_cursor_now(struct dc_dmub_srv *dc_dmub_srv, uint32_t otg_inst);
 
 /**
  * dc_dmub_srv_is_cursor_offload_enabled() - Checks if cursor offload is supported.
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +2 -2
index aa047b5b4939..564ffd61f391 100644
@@ -1806,9 +1806,9 @@ void dcn35_notify_cursor_offload_drr_update(struct dc *dc, struct dc_state *cont
 	dc_dmub_srv_control_cursor_offload(dc, context, stream, true);
 }
 
-void dcn35_program_cursor_offload_now(struct dc *dc, const struct pipe_ctx *pipe)
+void dcn35_program_cursor_offload_now(struct dc_dmub_srv *dc_dmub_srv, uint32_t otg_inst)
 {
-	dc_dmub_srv_program_cursor_now(dc, pipe);
+	dc_dmub_srv_program_cursor_now(dc_dmub_srv, otg_inst);
 }
 
 static void disable_link_output_symclk_on_tx_off(struct dc_link *link, enum dp_link_encoding link_encoding)
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.h +1 -1
index 0ae2f44cfb9f..2bc210d5fcc4 100644
@@ -117,7 +117,7 @@ void dcn35_update_cursor_offload_pipe(struct dmub_srv *dmub, uint32_t stream_idx
 		uint8_t pipe_idx, const struct dpp *dpp, const struct hubp *hubp);
 void dcn35_notify_cursor_offload_drr_update(struct dc *dc, struct dc_state *context,
 					    const struct dc_stream_state *stream);
-void dcn35_program_cursor_offload_now(struct dc *dc, const struct pipe_ctx *pipe);
+void dcn35_program_cursor_offload_now(struct dc_dmub_srv *dc_dmub_srv, uint32_t otg_inst);
 void dcn35_disable_link_output(struct dc_link *link,
 		const struct link_resource *link_res,
 		enum signal_type signal);
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +7 -3
index 6e009ba37ff9..4769c71f05fb 100644
@@ -597,8 +597,8 @@ struct control_cm_hist_params {
 };
 
 struct program_cursor_update_now_params {
-	struct dc *dc;
-	struct pipe_ctx *pipe_ctx;
+	struct dc_dmub_srv *dmub_srv;
+	uint32_t otg_inst;
 };
 
 struct hubp_wait_pipe_read_start_params {
@@ -2050,7 +2050,7 @@ struct hw_sequencer_funcs {
 			const struct hubp *hubp);
 	void (*notify_cursor_offload_drr_update)(struct dc *dc, struct dc_state *context,
 						 const struct dc_stream_state *stream);
-	void (*program_cursor_offload_now)(struct dc *dc, const struct pipe_ctx *pipe);
+	void (*program_cursor_offload_now)(struct dc_dmub_srv *dc_dmub_srv, uint32_t otg_inst);
 
 	/* Colour Related */
 	void (*program_gamut_remap)(struct program_gamut_remap_params *params);
@@ -3226,6 +3226,10 @@ void hwss_add_commit_cursor_offload_update(struct block_sequence_state *seq_stat
 		struct dc *dc,
 		struct pipe_ctx *pipe_ctx);
 
+void hwss_add_program_cursor_update_now(struct block_sequence_state *seq_state,
+		struct dc_dmub_srv *dmub_srv,
+		uint32_t otg_inst);
+
 void hwss_add_stream_enc_update_hdmi_info_packets(struct block_sequence_state *seq_state,
 		struct pipe_ctx *pipe_ctx);
 
Signature · 1 line
2.43.0
#14 lore raw

PATCH 14/27 drm/amd/display: Add DMUB timer reference clock to ref_clocks

In reply to Chenyu Chen

From: Alvin Lee <[email protected]>

[Why]
The DMUB timer reference clock can differ from the crystal frequency, so it should be tracked separately from the other reference clocks.

[How]
Add dmub_timer_refclk_khz to resource_pool ref_clocks. DCN3.0, 3.1, 3.2, 3.5, 4.01, 4.2 and 5.0 set it in init_hw from the crystal frequency, next to xtalin_clock_inKhz, so their behavior does not change. DCN6.0 sets it to a fixed 100 MHz (DCN60_DMUB_TIMER_REFCLK_KHZ) in dcn60_resource_construct instead of using the crystal frequency. Other init paths, such as DCN1.0, DCN2.01, DCN6.0 init_hw and the core and bls_builder init, are not changed by this patch and leave the field unset.

---
 drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c       | 2 ++
 drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c       | 2 ++
 drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c       | 2 ++
 drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c       | 2 ++
 drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c     | 2 ++
 drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c       | 2 ++
 drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.c       | 2 ++
 drivers/gpu/drm/amd/display/dc/inc/core_types.h               | 1 +
 .../gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c    | 4 ++++
 9 files changed, 19 insertions(+)
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +2 -0
index 35d5cce0a791..c4500617dc85 100644
@@ -686,6 +686,8 @@ void dcn30_init_hw(struct dc *dc)
 	if (dc->ctx->dc_bios->fw_info_valid) {
 		res_pool->ref_clocks.xtalin_clock_inKhz =
 				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
+		res_pool->ref_clocks.dmub_timer_refclk_khz =
+				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
 
 		if (res_pool->hubbub) {
 
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +2 -0
index 7acf6af7e472..e90afdd6f1c9 100644
@@ -138,6 +138,8 @@ void dcn31_init_hw(struct dc *dc)
 	if (dc->ctx->dc_bios->fw_info_valid) {
 		res_pool->ref_clocks.xtalin_clock_inKhz =
 				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
+		res_pool->ref_clocks.dmub_timer_refclk_khz =
+				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
 
 		if (res_pool->hubbub) {
 
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +2 -0
index b78041ba94e9..945052b1808f 100644
@@ -848,6 +848,8 @@ void dcn32_init_hw(struct dc *dc)
 	if (dc->ctx->dc_bios->fw_info_valid) {
 		res_pool->ref_clocks.xtalin_clock_inKhz =
 				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
+		res_pool->ref_clocks.dmub_timer_refclk_khz =
+				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
 
 		if (res_pool->hubbub) {
 			(res_pool->dccg->funcs->get_dccg_ref_freq)(res_pool->dccg,
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +2 -0
index 564ffd61f391..d24569870a2d 100644
@@ -171,6 +171,8 @@ void dcn35_init_hw(struct dc *dc)
 	if (dc->ctx->dc_bios->fw_info_valid) {
 		res_pool->ref_clocks.xtalin_clock_inKhz =
 				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
+		res_pool->ref_clocks.dmub_timer_refclk_khz =
+				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
 
 		if (res_pool->hubbub) {
 
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +2 -0
index c39189deb244..7b1eca0e2b57 100644
@@ -178,6 +178,8 @@ void dcn401_init_hw(struct dc *dc)
 	if (dc->ctx->dc_bios->fw_info_valid) {
 		res_pool->ref_clocks.xtalin_clock_inKhz =
 				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
+		res_pool->ref_clocks.dmub_timer_refclk_khz =
+				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
 
 		if (res_pool->hubbub) {
 			(res_pool->dccg->funcs->get_dccg_ref_freq)(res_pool->dccg,
drivers/gpu/drm/amd/display/dc/hwss/dcn42/dcn42_hwseq.c +2 -0
index b1cc09df5e63..62876d489b8e 100644
@@ -103,6 +103,8 @@ void dcn42_init_hw(struct dc *dc)
 	if (dc->ctx->dc_bios->fw_info_valid) {
 		res_pool->ref_clocks.xtalin_clock_inKhz =
 				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
+		res_pool->ref_clocks.dmub_timer_refclk_khz =
+				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
 
 		if (res_pool->hubbub) {
 			(res_pool->dccg->funcs->get_dccg_ref_freq)(res_pool->dccg,
drivers/gpu/drm/amd/display/dc/hwss/dcn50/dcn50_hwseq.c +2 -0
index 151ec838f613..2986eaa73eae 100644
@@ -582,6 +582,8 @@ void dcn50_init_hw(struct dc *dc)
 	if (dc->ctx->dc_bios->fw_info_valid) {
 		res_pool->ref_clocks.xtalin_clock_inKhz =
 				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
+		res_pool->ref_clocks.dmub_timer_refclk_khz =
+				dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
 
 		if (res_pool->hubbub) {
 			(res_pool->dccg->funcs->get_dccg_ref_freq)(res_pool->dccg,
drivers/gpu/drm/amd/display/dc/inc/core_types.h +1 -0
index f1b6053fa5c6..09395f5d4e13 100644
@@ -317,6 +317,7 @@ struct resource_pool {
 		unsigned int xtalin_clock_inKhz;
 		unsigned int dccg_ref_clock_inKhz;
 		unsigned int dchub_ref_clock_inKhz;
+		unsigned int dmub_timer_refclk_khz;
 	} ref_clocks;
 	unsigned int timing_generator_count;
 	unsigned int mpcc_count;
drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c +4 -0
index 1d7074451ac1..7fa1bcbd00ef 100644
@@ -107,6 +107,8 @@ enum dcn60_clk_src_array_id {
 static const uint32_t MCACHE_ID_UNASSIGNED = 0xF;
 static const uint32_t SPLIT_LOCATION_UNDEFINED = 0xFFFF;
 
+#define DCN60_DMUB_TIMER_REFCLK_KHZ 100000
+
 /* DCN */
 #define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
 
@@ -2010,6 +2012,8 @@ static bool dcn60_resource_construct(
 
 	pool->base.res_cap = &res_cap_dcn6_0;
 
+	pool->base.ref_clocks.dmub_timer_refclk_khz = DCN60_DMUB_TIMER_REFCLK_KHZ;
+
 	/* max number of pipes for ASIC before checking for pipe fuses */
 	num_pipes  = pool->base.res_cap->num_timing_generator;
 	pipe_fuses = read_pipe_fuses(ctx);
Signature · 1 line
2.43.0
#15 lore raw

PATCH 15/27 drm/amd/display: Guard connector I2C transfer without DDC pin

In reply to Chenyu Chen

From: James Lin <[email protected]>

[Why]
amdgpu_dm_i2c_xfer() checks for a missing DDC pin only after considering the native DP AUX transfer path. A connector without a DDC pin can therefore reach that path before the check.

[How]
Move the DDC pin check to the beginning of amdgpu_dm_i2c_xfer() and return -EIO before selecting an I2C transfer path.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c +3 -3
index 41fc641b1b60..1acc2b44c968 100644
@@ -3442,6 +3442,9 @@ STATIC_IFN_KUNIT int amdgpu_dm_i2c_xfer(struct i2c_adapter *i2c_adap,
 	int i;
 	int result = -EIO;
 
+	if (!ddc_service->ddc_pin)
+		return result;
+
 	if (!i2c->oem) {
 		struct dc_link *link = ddc_service->link;
 		struct amdgpu_dm_connector *aconnector = link->priv;
@@ -3458,9 +3461,6 @@ STATIC_IFN_KUNIT int amdgpu_dm_i2c_xfer(struct i2c_adapter *i2c_adap,
 			return i2c_transfer(&aconnector->dm_dp_aux.aux.ddc, msgs, num);
 	}
 
-	if (!ddc_service->ddc_pin)
-		return result;
-
 	cmd.payloads = kzalloc_objs(struct i2c_payload, num);
 
 	if (!cmd.payloads)
Signature · 1 line
2.43.0
#17 lore raw

PATCH 17/27 drm/amd/display: Implement link_set_dpms_off_v2

In reply to Chenyu Chen

From: Dominik Kowalski <[email protected]>

[Why & How]
Initial implementation of link_set_dpms_off_v2 in terms of new step architecture, using temporarily exposed internals of v1. Will be reworked in future work to remove use of pipe_ctx wherever possible.

---
 .../drm/amd/display/dc/link/link_dpms_v1.c    |  84 +++++++
 .../drm/amd/display/dc/link/link_dpms_v1.h    |  29 +++
 .../drm/amd/display/dc/link/link_dpms_v2.c    | 229 +++++++++++++++++-
 3 files changed, 337 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_dpms_v1.c +84 -0
index 1a6fe2e12c06..4677ad4a2cd0 100644
@@ -206,6 +206,12 @@ static bool is_master_pipe_for_link(const struct dc_link *link,
 			pipe->stream->link == link;
 }
 
+bool link_dpms_impl_is_master_pipe_for_link(const struct dc_link *link,
+		const struct pipe_ctx *pipe)
+{
+	return is_master_pipe_for_link(link, pipe);
+}
+
 /*
  * This function finds all master pipes feeding to a given link with dpms set to
  * on in given dc state.
@@ -329,6 +335,13 @@ static bool get_ext_hdmi_settings(
 	return true;
 }
 
+bool link_dpms_impl_get_ext_hdmi_settings(const struct integrated_info *info,
+					  enum engine_id eng_id,
+					  struct ext_hdmi_settings *settings)
+{
+	return get_ext_hdmi_settings(info, eng_id, settings);
+}
+
 static bool write_i2c(
 		const struct dc_link *link,
 		uint8_t address,
@@ -472,6 +485,14 @@ static bool write_i2c_retimer_setting(
 	return true;
 }
 
+bool link_dpms_impl_write_i2c_retimer_setting(
+	const struct dc_link *link, bool is_vga_mode, bool is_over_340mhz,
+	struct ext_hdmi_settings *settings)
+{
+	return write_i2c_retimer_setting(link, is_vga_mode, is_over_340mhz,
+					 settings);
+}
+
 static bool write_i2c_default_retimer_setting(
 		const struct dc_link *link,
 		bool is_vga_mode,
@@ -503,6 +524,13 @@ static bool write_i2c_default_retimer_setting(
 	return true;
 }
 
+bool link_dpms_impl_write_i2c_default_retimer_setting(
+	const struct dc_link *link, bool is_vga_mode, bool is_over_340mhz)
+{
+	return write_i2c_default_retimer_setting(link, is_vga_mode,
+						 is_over_340mhz);
+}
+
 static bool write_i2c_redriver_setting(
 		const struct dc_link *link,
 		bool is_over_340mhz)
@@ -528,6 +556,12 @@ static bool write_i2c_redriver_setting(
 	return success;
 }
 
+bool link_dpms_impl_write_i2c_redriver_setting(const struct dc_link *link,
+					       bool is_over_340mhz)
+{
+	return write_i2c_redriver_setting(link, is_over_340mhz);
+}
+
 static struct link_encoder *get_link_encoder(struct pipe_ctx *pipe_ctx)
 {
 	struct link_encoder *link_enc
@@ -611,6 +645,12 @@ static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off)
 	cp_psp->funcs.update_stream_config(cp_psp->handle, &config);
 }
 
+void link_dpms_impl_update_psp_stream_config(struct pipe_ctx *pipe_ctx,
+					     bool dpms_off)
+{
+	update_psp_stream_config(pipe_ctx, dpms_off);
+}
+
 void link_wait_for_unlocked(struct dc_link *link)
 {
 	unsigned long long enter_timestamp;
@@ -656,6 +696,11 @@ static void set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
 	dc->hwss.set_avmute(pipe_ctx, enable);
 }
 
+void link_dpms_impl_set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
+{
+	set_avmute(pipe_ctx, enable);
+}
+
 static void enable_mst_on_sink(struct dc_link *link, bool enable)
 {
 	unsigned char mstmCntl = 0;
@@ -1387,6 +1432,11 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
 	return DC_OK;
 }
 
+enum dc_status link_dpms_impl_deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
+{
+	return deallocate_mst_payload(pipe_ctx);
+}
+
 /* convert link_mst_stream_alloc_table to dm dp_mst_stream_alloc_table
  * because stream_encoder is not exposed to dm
  */
@@ -1468,6 +1518,11 @@ static enum dc_status allocate_mst_payload(struct pipe_ctx *pipe_ctx)
 	return DC_OK;
 }
 
+enum dc_status link_dpms_impl_allocate_mst_payload(struct pipe_ctx *pipe_ctx)
+{
+	return allocate_mst_payload(pipe_ctx);
+}
+
 struct fixed31_32 link_calculate_sst_avg_time_slots_per_mtp(
 		const struct dc_stream_state *stream,
 		const struct dc_link *link)
@@ -1679,6 +1734,12 @@ static enum dc_status update_sst_payload(struct pipe_ctx *pipe_ctx,
 	return DC_OK;
 }
 
+enum dc_status link_dpms_impl_update_sst_payload(struct pipe_ctx *pipe_ctx,
+						 bool allocate)
+{
+	return update_sst_payload(pipe_ctx, allocate);
+}
+
 enum dc_status link_reduce_mst_payload(struct pipe_ctx *pipe_ctx, uint32_t bw_in_kbps)
 {
 	struct dc_stream_state *stream = pipe_ctx->stream;
@@ -1863,6 +1924,13 @@ static void disable_link(struct dc_link *link,
 	}
 }
 
+void link_dpms_impl_disable_link(struct dc_link *link,
+				 const struct link_resource *link_res,
+				 enum signal_type signal)
+{
+	disable_link(link, link_res, signal);
+}
+
 static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
 {
 	struct dc_stream_state *stream = pipe_ctx->stream;
@@ -2366,6 +2434,12 @@ static bool allocate_usb4_bandwidth_for_stream(struct dc_stream_state *stream, i
 	return true;
 }
 
+bool link_dpms_impl_allocate_usb4_bandwidth_for_stream(
+	struct dc_stream_state *stream, int stream_bw)
+{
+	return allocate_usb4_bandwidth_for_stream(stream, stream_bw);
+}
+
 static bool allocate_usb4_bandwidth(struct dc_stream_state *stream)
 {
 	ASSERT(stream->sink);
@@ -2393,6 +2467,11 @@ static bool deallocate_usb4_bandwidth(struct dc_stream_state *stream)
 	return ret;
 }
 
+bool link_dpms_impl_deallocate_usb4_bandwidth(struct dc_stream_state *stream)
+{
+	return deallocate_usb4_bandwidth(stream);
+}
+
 static struct vpg *get_vpg(struct pipe_ctx *pipe_ctx)
 {
 	if (dc_is_hdmi_frl_signal(pipe_ctx->stream->signal))
@@ -2403,6 +2482,11 @@ static struct vpg *get_vpg(struct pipe_ctx *pipe_ctx)
 		return pipe_ctx->stream_res.stream_enc->vpg;
 }
 
+struct vpg *link_dpms_impl_get_vpg(struct pipe_ctx *pipe_ctx)
+{
+	return get_vpg(pipe_ctx);
+}
+
 enum dc_status link_set_dpms_off_v1(struct pipe_ctx *pipe_ctx)
 {
 	DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
drivers/gpu/drm/amd/display/dc/link/link_dpms_v1.h +29 -0
index b170c9a8622d..439372484f79 100644
@@ -51,4 +51,33 @@ void link_set_dsc_on_stream(struct pipe_ctx *pipe_ctx, bool enable);
 bool link_set_dsc_enable(struct pipe_ctx *pipe_ctx, bool enable);
 bool link_update_dsc_config(struct pipe_ctx *pipe_ctx);
 void link_wait_for_unlocked(struct dc_link *link);
+
+// Temporarily exposed function during migration v1 -> v2, not public API
+enum dc_status link_dpms_impl_allocate_mst_payload(struct pipe_ctx *pipe_ctx);
+bool link_dpms_impl_allocate_usb4_bandwidth_for_stream(
+	struct dc_stream_state *stream, int stream_bw);
+enum dc_status link_dpms_impl_deallocate_mst_payload(struct pipe_ctx *pipe_ctx);
+bool link_dpms_impl_deallocate_usb4_bandwidth(struct dc_stream_state *stream);
+void link_dpms_impl_disable_link(struct dc_link *link,
+				 const struct link_resource *link_res,
+				 enum signal_type signal);
+bool link_dpms_impl_get_ext_hdmi_settings(const struct integrated_info *info,
+					  enum engine_id eng_id,
+					  struct ext_hdmi_settings *settings);
+struct vpg *link_dpms_impl_get_vpg(struct pipe_ctx *pipe_ctx);
+bool link_dpms_impl_is_master_pipe_for_link(const struct dc_link *link,
+					    const struct pipe_ctx *pipe);
+void link_dpms_impl_set_avmute(struct pipe_ctx *pipe_ctx, bool enable);
+void link_dpms_impl_update_psp_stream_config(struct pipe_ctx *pipe_ctx,
+					     bool dpms_off);
+enum dc_status link_dpms_impl_update_sst_payload(struct pipe_ctx *pipe_ctx,
+						 bool allocate);
+bool link_dpms_impl_write_i2c_default_retimer_setting(
+	const struct dc_link *link, bool is_vga_mode, bool is_over_340mhz);
+bool link_dpms_impl_write_i2c_redriver_setting(const struct dc_link *link,
+					       bool is_over_340mhz);
+bool link_dpms_impl_write_i2c_retimer_setting(
+	const struct dc_link *link, bool is_vga_mode, bool is_over_340mhz,
+	struct ext_hdmi_settings *settings);
+
 #endif
drivers/gpu/drm/amd/display/dc/link/link_dpms_v2.c +224 -5

250 lines not on this page · raw message

Signature · 1 line
2.43.0
#16 lore raw

PATCH 16/27 drm/amd/display: Refactor ABM_SET_PIPE and ABM_SET_IMMEDIATE_DISABLE

In reply to Chenyu Chen

From: Rafal Ostrowski <[email protected]>

[Why]
- Both steps carried dc and pipe_ctx, which breaks the block sequence rules on flat params and instance specification.
- ABM_SET_IMMEDIATE_DISABLE also stored the panel backlight level, which belongs to a different HW block (panel_cntl).

[How]
- Both steps share set_abm_pipe_params: the ABM handle, otg, panel and pwrseq instances and the ABM type of the panel. The builder resolves them with hwss_prepare_abm_set_pipe(), which the legacy dcn21 path uses too.
- Add a sixth parameter, feature_support, to abm_funcs.set_pipe_ex so the executor needs no dc lookup. The type is the new enum abm_feature_support in abm.h.
- Rename abm_feature_support() in dmub_abm.c to dmub_abm_feature_support(), declare it in dmub_abm.h and make it return the new enum. It looks the panel up by panel_inst, so the ABM type is unchanged.
hwss_prepare_abm_set_pipe() uses it, like the other dmub_abm hooks.
- Adders return bool and hold all null and hook checks. Both adders require set_pipe_ex: no ASIC that runs the block sequence creates a DMCU, so the DMCU branch is gone from the BLS path. The level 0/255 skip for non-CACP panels applies as in dcn21_set_abm_immediate_disable.
- Add PANEL_CNTL_STORE_BACKLIGHT_LEVEL. The callers add it with hwss_add_abm_immediate_disable_and_store_backlight(), which checks both free slots and the store hook first, so the ABM is never disabled without storing the backlight level.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |   2 +-
 .../drm/amd/display/dc/core/dc_hw_sequencer.c | 164 ++++++++++++++----
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c |  66 ++++---
 drivers/gpu/drm/amd/display/dc/dce/dmub_abm.h |   2 +
 .../amd/display/dc/hwss/dcn21/dcn21_hwseq.c   | 108 ++++++------
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |   6 +-
 .../drm/amd/display/dc/hwss/hw_sequencer.h    |  49 ++++--
 drivers/gpu/drm/amd/display/dc/inc/hw/abm.h   |  10 +-
 8 files changed, 267 insertions(+), 140 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index 584eb3e0f4c6..032ce62c810e 100644
@@ -4471,7 +4471,7 @@ static void commit_planes_do_stream_update_sequence(struct dc *dc,
 
 				if (should_program_abm) {
 					if (*stream_update->abm_level == ABM_LEVEL_IMMEDIATE_DISABLE) {
-						hwss_add_abm_set_immediate_disable(&seq_state, dc, pipe_ctx);
+						hwss_add_abm_immediate_disable_and_store_backlight(&seq_state, pipe_ctx);
 					} else {
 						hwss_add_abm_set_level(&seq_state, pipe_ctx->stream_res.abm, stream->abm_level);
 					}
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c +135 -29

216 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dce/dmub_abm.c +29 -37

133 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dce/dmub_abm.h +2 -0
index 3a5d5ac7a86e..eef2fa803aed 100644
@@ -37,4 +37,6 @@ struct abm *dmub_abm_create(
 
 void dmub_abm_destroy(struct abm **abm);
 
+enum abm_feature_support dmub_abm_feature_support(struct abm *abm, unsigned int panel_inst);
+
 #endif
drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c +52 -56

174 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +3 -3
index 7b1eca0e2b57..26b9137dc017 100644
@@ -2553,7 +2553,7 @@ void dcn401_program_pipe_sequence(
 	/* Set ABM pipe after other pipe configurations done */
 	if ((pipe_ctx->plane_state && pipe_ctx->plane_state->visible)) {
 		if (pipe_ctx->stream_res.abm) {
-			hwss_add_abm_set_pipe(seq_state, dc, pipe_ctx);
+			hwss_add_abm_set_pipe(seq_state, pipe_ctx);
 
 			hwss_add_abm_set_level(seq_state, pipe_ctx->stream_res.abm, pipe_ctx->stream->abm_level);
 		}
@@ -3382,7 +3382,7 @@ void dcn401_blank_pixel_data_sequence(
 
 	if (blank) {
 		/* Set ABM immediate disable */
-		hwss_add_abm_set_immediate_disable(seq_state, dc, pipe_ctx);
+		hwss_add_abm_immediate_disable_and_store_backlight(seq_state, pipe_ctx);
 
 		if (dc->debug.visual_confirm != VISUAL_CONFIRM_DISABLE) {
 			test_pattern = CONTROLLER_DP_TEST_PATTERN_COLORSQUARES;
@@ -3432,7 +3432,7 @@ void dcn401_blank_pixel_data_sequence(
 	if (!blank) {
 		if (stream_res->abm) {
 			/* Set pipe for ABM */
-			hwss_add_abm_set_pipe(seq_state, dc, pipe_ctx);
+			hwss_add_abm_set_pipe(seq_state, pipe_ctx);
 
 			/* Set ABM level */
 			hwss_add_abm_set_level(seq_state, stream_res->abm, stream->abm_level);
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h +36 -13

100 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/inc/hw/abm.h +9 -1
index e3fa987304da..925d80d956d8 100644
@@ -27,6 +27,13 @@
 
 #include "dm_services_types.h"
 
+/* ABM engine type a panel is driven by. */
+enum abm_feature_support {
+	ABM_FEATURE_NO_SUPPORT = 0,
+	ABM_LCD_SUPPORT = 1,
+	ABM_CACP_SUPPORT = 2,
+};
+
 struct abm_save_restore;
 
 struct abm {
@@ -66,7 +73,8 @@ struct abm_funcs {
 			unsigned int otg_inst,
 			unsigned int option,
 			unsigned int panel_inst,
-			unsigned int pwrseq_inst);
+			unsigned int pwrseq_inst,
+			enum abm_feature_support feature_support);
 	bool (*set_abm_event)(struct abm *abm, unsigned int full_screen, unsigned int trans_info,
 			unsigned int hdr_mode, unsigned int scaling_enable, unsigned int scaling_strength_map,
 			unsigned int panel_inst);
Signature · 1 line
2.43.0
#18 lore raw

PATCH 18/27 drm/amd/display: Add the immediate flip to the DC2 seamless update

In reply to Chenyu Chen

From: Tony Cheng <[email protected]>

[Why]
With DC2 selected, Core2 rejects an immediate flip. The flip falls back to DC1, although DC1 programs it in the same order as the vsync flip.

[How]
Let the flip on the kept context run when the plane flips immediately. The order stays lock, GSL, triple buffer, the address, unlock and the manual trigger. GSL now takes flip_immediate from the plane, as the address already did.

After the flip, Core2 sets the current address of an immediate flip, as dcn20_prepare_plane_addr_update does.

Reject an immediate flip of a DCC surface. For it, DC1 waits for the DCC meta data to propagate, and the flip does not emit that wait.

---
 .../dc/bls_builder/dcn401_seamless_builder.c  | 22 ++++++++++++++++++-
 .../gpu/drm/amd/display/dc/core2/dc_core2.c   |  2 ++
 2 files changed, 23 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/bls_builder/dcn401_seamless_builder.c +21 -1
index 850b5d8c96d4..bc7dd933e35e 100644
@@ -824,6 +824,24 @@ static bool check_no_immediate_flip(const struct dc *dc,
 			DC_TRAIT_MATCH(DC_PLANE_TRAIT_FLIP_IMMEDIATE, 0));
 }
 
+/*
+ * DC1 waits for the DCC meta data to propagate before an immediate flip of
+ * a DCC surface. The flip does not emit that wait.
+ */
+static bool check_no_immediate_dcc_flip(const struct dc *dc,
+		const struct dc_state *current_state,
+		const struct dc_state *new_state, unsigned int i)
+{
+	struct dc_state_facts facts;
+
+	(void)current_state;
+	(void)dc;
+	dc_state_facts_derive(new_state, &facts);
+	return !dc_state_facts_any_plane(&facts, (uint8_t)i,
+			DC_TRAIT_MATCH(DC_PLANE_TRAIT_FLIP_IMMEDIATE |
+			DC_PLANE_TRAIT_DCC, 0));
+}
+
 /*
  * DC1 translates a distributed-points curve into a LUT while it programs
  * the plane. The update programs only the predefined and bypass curves.
@@ -1081,7 +1099,7 @@ static enum bls_builder_result dcn401_check_flip(const struct dc *dc,
 	CHECK_UPDATE(one_address_only_plane,
 			"stream has odm, or not one plane with an address-only update");
 	CHECK_CONDITION(triple_buffer, "triple buffer is disabled");
-	CHECK_UPDATE(no_immediate_flip, "flip is immediate");
+	CHECK_UPDATE(no_immediate_dcc_flip, "immediate flip of a dcc surface");
 	CHECK_UPDATE(no_mcm_luts, "an mcm lut is enabled");
 	return BLS_BUILD_SUCCESS;
 }
@@ -2318,6 +2336,8 @@ static void dcn401_add_step(struct block_sequence_state *sequence,
 		break;
 	case HUBP_SET_FLIP_CONTROL_GSL:
 		p->set_flip_control_gsl_params.hubp = pipe->plane_res.hubp;
+		p->set_flip_control_gsl_params.flip_immediate =
+				plane->flip_immediate;
 		break;
 	case HUBP_CLK_CNTL:
 		p->hubp_clk_cntl_params.hubp = pipe->plane_res.hubp;
drivers/gpu/drm/amd/display/dc/core2/dc_core2.c +2 -0
index 245ebd8e01d0..ce2d4f0c89d6 100644
@@ -417,6 +417,8 @@ static void core2_update_done(struct dc *dc, struct dc_state *context,
 		vm_helper_mark_vmid_used(dc->vm_helper, plane->address.vmid,
 				(uint8_t)hubp->inst);
 		plane->status.requested_address = plane->address;
+		if (plane->flip_immediate)
+			plane->status.current_address = plane->address;
 		hubp->opp_id = pipe->stream_res.opp->inst;
 		hubp->mpcc_id = hubp->inst;
 		hubp->power_gated = false;
Signature · 1 line
2.43.0
#19 lore raw

PATCH 19/27 drm/amd/display: Test amdgpu_dm_dmub alt-ch apertures

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

[WHAT]
Add KUnit tests for dm_dmub_hw_init() covering the alternate-channel p-state apertures: both apertures published to DML2, and a missing or invalid-size aperture leaving the feature disabled.

---
 .../amdgpu_dm/tests/amdgpu_dm_dmub_test.c     | 92 +++++++++++++++++++
 1 file changed, 92 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_dmub_test.c +92 -0
index 595a7dcb57ad..1a4fa8c7e00c 100644
@@ -835,6 +835,96 @@ static void dm_test_dmub_hw_init_dmcu_abm(struct kunit *test)
 	KUNIT_EXPECT_TRUE(test, abm->dmcu_is_running);
 }
 
+/*
+ * Fake discovery MEM_RESERVED_INFO table: the real lookup in
+ * amdgpu_discovery_get_mem_reserved_region_by_id() walks this cached table.
+ */
+
+#define DM_TEST_VRAM_START		0x8000000000ULL
+#define DM_TEST_VRAM_BASE_OFFSET	0x40000000ULL
+#define DM_TEST_APERTURE1_START		0x10000000ULL
+#define DM_TEST_APERTURE2_START		0x30000000ULL
+#define DM_TEST_APERTURE1_SIZE		SZ_16M
+#define DM_TEST_APERTURE2_SIZE		SZ_32M
+#define DM_TEST_MC_BASE(s)		((s) + DM_TEST_VRAM_START - DM_TEST_VRAM_BASE_OFFSET)
+
+static void dm_test_set_reserved_regions(struct kunit *test, struct amdgpu_device *adev,
+					 u32 num_regions, u64 aperture2_size)
+{
+	struct mem_reserved_info_table_v1_0 *table;
+
+	table = kunit_kzalloc(test, sizeof(*table), GFP_KERNEL);
+	KUNIT_ASSERT_NOT_NULL(test, table);
+
+	table->list_num = cpu_to_le32(num_regions);
+	table->list[0].reserved_region_id = cpu_to_le32(G7_PSTATE_APERTURE1_ID);
+	table->list[0].reserved_region_size = cpu_to_le64(DM_TEST_APERTURE1_SIZE);
+	table->list[0].reserved_region_start = cpu_to_le64(DM_TEST_APERTURE1_START);
+	table->list[1].reserved_region_id = cpu_to_le32(G7_PSTATE_APERTURE2_ID);
+	table->list[1].reserved_region_size = cpu_to_le64(aperture2_size);
+	table->list[1].reserved_region_start = cpu_to_le64(DM_TEST_APERTURE2_START);
+
+	adev->discovery.mem_reserved_table = table;
+	adev->gmc.vram_start = DM_TEST_VRAM_START;
+	adev->vm_manager.vram_base_offset = DM_TEST_VRAM_BASE_OFFSET;
+	adev->ip_versions[DCE_HWIP][0] = IP_VERSION(6, 0, 0);
+}
+
+/**
+ * dm_test_dmub_hw_init_alt_channel_apertures - Test hw init publishes both p-state apertures
+ * @test: The KUnit test context
+ *
+ * With both G7 p-state apertures present in the discovery table,
+ * dm_dmub_hw_init() should translate each base into MC space and hand bits
+ * [47:16] and the size to DML2.
+ */
+static void dm_test_dmub_hw_init_alt_channel_apertures(struct kunit *test)
+{
+	struct amdgpu_device *adev = dm_test_alloc_adev_with_dmub(test);
+	struct dml2_soc_alt_ch_info *cfg = &adev->dm.dc->dml2_options.alt_ch_cfg;
+
+	dm_test_set_reserved_regions(test, adev, 2, DM_TEST_APERTURE2_SIZE);
+
+	KUNIT_EXPECT_EQ(test, dm_dmub_hw_init(adev), 0);
+	KUNIT_EXPECT_EQ(test, cfg->region_base_addr_47_16[0],
+			(u32)(DM_TEST_MC_BASE(DM_TEST_APERTURE1_START) >> 16));
+	KUNIT_EXPECT_EQ(test, cfg->region_base_addr_47_16[1],
+			(u32)(DM_TEST_MC_BASE(DM_TEST_APERTURE2_START) >> 16));
+	KUNIT_EXPECT_EQ(test, cfg->region_size_bytes[0], (u32)DM_TEST_APERTURE1_SIZE);
+	KUNIT_EXPECT_EQ(test, cfg->region_size_bytes[1], (u32)DM_TEST_APERTURE2_SIZE);
+}
+
+/**
+ * dm_test_dmub_hw_init_alt_channel_rejected - Test unusable apertures disable the feature
+ * @test: The KUnit test context
+ *
+ * A missing aperture 2, a zero-sized one or one of at least 0xfff MiB disables
+ * the feature, and dm_dmub_hw_init() must not publish the valid aperture 1.
+ */
+static void dm_test_dmub_hw_init_alt_channel_rejected(struct kunit *test)
+{
+	static const struct {
+		u32 num_regions;
+		u64 aperture2_size;
+	} cases[] = {
+		{ 1, DM_TEST_APERTURE2_SIZE },
+		{ 2, 0 },
+		{ 2, 0xfffULL << 20 },
+	};
+	struct amdgpu_device *adev;
+	unsigned int i;
+
+	for (i = 0; i < ARRAY_SIZE(cases); i++) {
+		adev = dm_test_alloc_adev_with_dmub(test);
+		dm_test_set_reserved_regions(test, adev, cases[i].num_regions,
+					     cases[i].aperture2_size);
+
+		KUNIT_EXPECT_EQ(test, dm_dmub_hw_init(adev), 0);
+		KUNIT_EXPECT_EQ_MSG(test, adev->dm.dc->dml2_options.alt_ch_cfg.region_size_bytes[0],
+				    0, "case %u", i);
+	}
+}
+
 /* Tests for dm_dmub_hw_resume() */
 
 /**
@@ -1958,6 +2048,8 @@ static struct kunit_case amdgpu_dm_dmub_tests[] = {
 	KUNIT_CASE(dm_test_dmub_hw_init_sanity_checks_dcn31),
 	KUNIT_CASE(dm_test_dmub_hw_init_sanity_checks_dcn314),
 	KUNIT_CASE(dm_test_dmub_hw_init_dmcu_abm),
+	KUNIT_CASE(dm_test_dmub_hw_init_alt_channel_apertures),
+	KUNIT_CASE(dm_test_dmub_hw_init_alt_channel_rejected),
 	/* dm_dmub_hw_resume() */
 	KUNIT_CASE(dm_test_dmub_hw_resume_no_dmub_srv),
 	KUNIT_CASE(dm_test_dmub_hw_resume_initialized_dmub),
Signature · 1 line
2.43.0
#20 lore raw

PATCH 20/27 drm/amd/display: Test amdgpu_dm_dmub SET_CONFIG sync wait

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

[WHAT]
Add KUnit tests for amdgpu_dm_process_dmub_set_config_sync() covering a pending command completed by a DMUB notification, and the reply timeout.

---
 .../amdgpu_dm/tests/amdgpu_dm_dmub_test.c     | 97 +++++++++++++++++++
 1 file changed, 97 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_dmub_test.c +97 -0
index 1a4fa8c7e00c..164071f39731 100644
@@ -925,6 +925,33 @@ static void dm_test_dmub_hw_init_alt_channel_rejected(struct kunit *test)
 	}
 }
 
+static void dm_test_free_dc_dmub_srv(void *data)
+{
+	struct dc_context *ctx = data;
+
+	kfree(ctx->dmub_srv);
+	ctx->dmub_srv = NULL;
+}
+
+/*
+ * Build an amdgpu_device whose DC DMUB service runs on the fake DMUB, so
+ * commands complete instantly and replies echo the submitted command.
+ */
+static struct amdgpu_device *dm_test_alloc_adev_with_dc_dmub(struct kunit *test)
+{
+	struct amdgpu_device *adev = dm_test_alloc_adev_with_dmub(test);
+	struct dc_context *ctx = adev->dm.dc->ctx;
+
+	spin_lock_init(&adev->dm.dmub_lock);
+	mutex_init(&adev->dm.dpia_aux_lock);
+
+	KUNIT_ASSERT_EQ(test, dm_dmub_hw_init(adev), 0);
+	KUNIT_ASSERT_NOT_NULL(test, ctx->dmub_srv);
+	KUNIT_ASSERT_EQ(test, kunit_add_action_or_reset(test, dm_test_free_dc_dmub_srv, ctx), 0);
+
+	return adev;
+}
+
 /* Tests for dm_dmub_hw_resume() */
 
 /**
@@ -1441,6 +1468,74 @@ static void dm_test_process_dmub_set_config_sync_unknown_error(struct kunit *tes
 	KUNIT_EXPECT_EQ(test, result, SET_CONFIG_UNKNOWN_ERROR);
 }
 
+static struct amdgpu_device *dm_test_alloc_adev_with_link(struct kunit *test)
+{
+	struct amdgpu_device *adev = dm_test_alloc_adev_with_dc_dmub(test);
+	struct dc_link *link;
+
+	link = kunit_kzalloc(test, sizeof(*link), GFP_KERNEL);
+	KUNIT_ASSERT_NOT_NULL(test, link);
+
+	link->ddc = kunit_kzalloc(test, sizeof(*link->ddc), GFP_KERNEL);
+	KUNIT_ASSERT_NOT_NULL(test, link->ddc);
+
+	link->ctx = adev->dm.dc->ctx;
+	adev->dm.dc->links[0] = link;
+	adev->dm.dc->link_count = 1;
+
+	adev->dm.dmub_notify = kunit_kzalloc(test, sizeof(struct dmub_notification), GFP_KERNEL);
+	KUNIT_ASSERT_NOT_NULL(test, adev->dm.dmub_notify);
+
+	init_completion(&adev->dm.dmub_aux_transfer_done);
+
+	return adev;
+}
+
+/**
+ * dm_test_process_dmub_set_config_sync_pending_notified - Test a pending SET_CONFIG completes
+ * @test: The KUnit test context
+ *
+ * When DMUB accepts the command without an immediate status, the sync helper
+ * waits for the outbox notification, reports its status and rearms the
+ * completion for the next request.
+ */
+static void dm_test_process_dmub_set_config_sync_pending_notified(struct kunit *test)
+{
+	struct amdgpu_device *adev = dm_test_alloc_adev_with_link(test);
+	struct set_config_cmd_payload payload = { 0 };
+	enum set_config_status result = SET_CONFIG_PENDING;
+	int ret;
+
+	adev->dm.dmub_notify->sc_status = SET_CONFIG_ACK_RECEIVED;
+	complete(&adev->dm.dmub_aux_transfer_done);
+
+	ret = amdgpu_dm_process_dmub_set_config_sync(adev->dm.dc->ctx, 0, &payload, &result);
+
+	KUNIT_EXPECT_EQ(test, ret, 0);
+	KUNIT_EXPECT_EQ(test, result, SET_CONFIG_ACK_RECEIVED);
+	KUNIT_EXPECT_FALSE(test, completion_done(&adev->dm.dmub_aux_transfer_done));
+}
+
+/**
+ * dm_test_process_dmub_set_config_sync_timeout - Test a pending SET_CONFIG times out
+ * @test: The KUnit test context
+ *
+ * When DMUB accepts the command but no notification arrives within the 10
+ * second wait, the sync helper returns -1 with SET_CONFIG_UNKNOWN_ERROR.
+ */
+static void dm_test_process_dmub_set_config_sync_timeout(struct kunit *test)
+{
+	struct amdgpu_device *adev = dm_test_alloc_adev_with_link(test);
+	struct set_config_cmd_payload payload = { 0 };
+	enum set_config_status result = SET_CONFIG_PENDING;
+	int ret;
+
+	ret = amdgpu_dm_process_dmub_set_config_sync(adev->dm.dc->ctx, 0, &payload, &result);
+
+	KUNIT_EXPECT_EQ(test, ret, -1);
+	KUNIT_EXPECT_EQ(test, result, SET_CONFIG_UNKNOWN_ERROR);
+}
+
 /* Tests for abort_fused_io() */
 
 /**
@@ -2071,6 +2166,8 @@ static struct kunit_case amdgpu_dm_dmub_tests[] = {
 	KUNIT_CASE(dm_test_process_dmub_aux_transfer_sync_zero_length),
 	/* amdgpu_dm_process_dmub_set_config_sync() */
 	KUNIT_CASE(dm_test_process_dmub_set_config_sync_unknown_error),
+	KUNIT_CASE(dm_test_process_dmub_set_config_sync_pending_notified),
+	KUNIT_CASE_SLOW(dm_test_process_dmub_set_config_sync_timeout),
 	/* abort_fused_io() */
 	KUNIT_CASE(dm_test_abort_fused_io_no_dmub_srv),
 	{}
Signature · 1 line
2.43.0
#21 lore raw

PATCH 21/27 drm/amd/display: Test amdgpu_dm_dmub AUX transfer timeout

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

[WHAT]
Add a KUnit test for amdgpu_dm_process_dmub_aux_transfer_sync() covering the AUX reply timeout.

---
 .../amdgpu_dm/tests/amdgpu_dm_dmub_test.c     | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_dmub_test.c +21 -0
index 164071f39731..8117ae4a2aef 100644
@@ -1536,6 +1536,26 @@ static void dm_test_process_dmub_set_config_sync_timeout(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, result, SET_CONFIG_UNKNOWN_ERROR);
 }
 
+/**
+ * dm_test_process_dmub_aux_transfer_sync_timeout - Test AUX transfer reply timeout
+ * @test: The KUnit test context
+ *
+ * When DMUB accepts the AUX request but never signals a reply within the 10
+ * second wait, the sync helper returns -1 with AUX_RET_ERROR_TIMEOUT.
+ */
+static void dm_test_process_dmub_aux_transfer_sync_timeout(struct kunit *test)
+{
+	struct amdgpu_device *adev = dm_test_alloc_adev_with_link(test);
+	struct aux_payload payload = { 0 };
+	enum aux_return_code_type result = AUX_RET_SUCCESS;
+	int ret;
+
+	ret = amdgpu_dm_process_dmub_aux_transfer_sync(adev->dm.dc->ctx, 0, &payload, &result);
+
+	KUNIT_EXPECT_EQ(test, ret, -1);
+	KUNIT_EXPECT_EQ(test, result, AUX_RET_ERROR_TIMEOUT);
+}
+
 /* Tests for abort_fused_io() */
 
 /**
@@ -2164,6 +2184,7 @@ static struct kunit_case amdgpu_dm_dmub_tests[] = {
 	KUNIT_CASE(dm_test_process_dmub_aux_transfer_sync_protocol_error),
 	KUNIT_CASE(dm_test_process_dmub_aux_transfer_sync_copies_data),
 	KUNIT_CASE(dm_test_process_dmub_aux_transfer_sync_zero_length),
+	KUNIT_CASE_SLOW(dm_test_process_dmub_aux_transfer_sync_timeout),
 	/* amdgpu_dm_process_dmub_set_config_sync() */
 	KUNIT_CASE(dm_test_process_dmub_set_config_sync_unknown_error),
 	KUNIT_CASE(dm_test_process_dmub_set_config_sync_pending_notified),
Signature · 1 line
2.43.0
#22 lore raw

PATCH 22/27 drm/amd/display: Test amdgpu_dm_dmub fused IO replies

In reply to Chenyu Chen

From: Alex Hung <[email protected]>

[WHAT]
Add KUnit tests for amdgpu_dm_execute_fused_io() covering a matching reply, and a stale reply that times out and aborts the request.

---
 .../amd/display/amdgpu_dm/amdgpu_dm_dmub.c    |  1 +
 .../amdgpu_dm/tests/amdgpu_dm_dmub_test.c     | 73 +++++++++++++++++++
 2 files changed, 74 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_dmub.c +1 -0
index 6c26fd361ce4..024c2395d2c2 100644
@@ -1018,6 +1018,7 @@ bool amdgpu_dm_execute_fused_io(
 	mutex_unlock(&dm->dpia_aux_lock);
 	return result;
 }
+EXPORT_IF_KUNIT(amdgpu_dm_execute_fused_io);
 
 int amdgpu_dm_process_dmub_set_config_sync(
 		struct dc_context *ctx,
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_dmub_test.c +73 -0

85 lines not on this page · raw message

Signature · 1 line
2.43.0
#23 lore raw

PATCH 23/27 drm/amd/display: Use Z8 enter plus exit for vblank reserve

In reply to Chenyu Chen

From: Ovidiu Bunea <[email protected]>

[Why]
The FAMS2 PMO stutter optimization uses the Z8 stutter exit latency both to decide whether Z8 meets its eco requirement and as the vblank time to reserve for Z8. The reserved vblank time is what feeds min_ttu_vblank, so it only covered the exit latency rather than the full Z8 enter plus exit latency.

Also, the stutter candidate index is never advanced, so when the Z8 candidate fails mode support the regular stutter candidate is never attempted and the whole stutter optimization is dropped.

[How]
Use z8_stutter_enter_plus_exit_latency_us instead of z8_stutter_exit_latency_us in pmo_dcn4_fams2_init_for_stutter() for the Z8 eco check and for the Z8 vblank reserved time candidate, and in pmo_dcn4_fams2_test_for_stutter() for the reserved vblank time check.

In pmo_dcn4_fams2_optimize_for_stutter(), advance to the next candidate on each attempt instead of giving up after the first one fails. Track which candidate is the Z8 one, and only require the Z8 reserved time in the stutter test while that candidate is the one being attempted.

Fewer configs now meet the Z8 eco check. Configs that still meet it reserve more vblank time (Z8 enter plus exit latency). Configs that no longer meet it fall back to the regular stutter candidate.

---
 .../dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c  | 35 +++++++++++--------
 .../src/inc/dml2_internal_shared_types.h      |  1 +
 2 files changed, 21 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.c +20 -15
index 62ac29dfe9be..cd68b5010a06 100644
@@ -2387,7 +2387,7 @@ bool pmo_dcn4_fams2_init_for_stutter(struct dml2_pmo_init_for_stutter_in_out *in
 
 	for (i = 0; i < in_out->base_display_config->display_config.num_planes; i++) {
 		if (in_out->base_display_config->mode_support_result.cfg_support_info.plane_support_info[i].active_latency_hiding_us <
-			pmo->soc_bb->power_management_parameters.z8_stutter_exit_latency_us + pmo->soc_bb->power_management_parameters.z8_min_idle_time) {
+			pmo->soc_bb->power_management_parameters.z8_stutter_enter_plus_exit_latency_us + pmo->soc_bb->power_management_parameters.z8_min_idle_time) {
 			stutter_period_meets_z8_eco = false;
 			break;
 		}
@@ -2414,8 +2414,9 @@ bool pmo_dcn4_fams2_init_for_stutter(struct dml2_pmo_init_for_stutter_in_out *in
 	pmo->scratch.pmo_dcn4.cur_stutter_candidate = 0;
 
 	if (stutter_period_meets_z8_eco && !z8_stutter_optimization_too_expensive) {
-		if (pmo->soc_bb->power_management_parameters.z8_stutter_exit_latency_us > 0) {
-			pmo->scratch.pmo_dcn4.optimal_vblank_reserved_time_for_stutter_us[pmo->scratch.pmo_dcn4.num_stutter_candidates] = (unsigned int)pmo->soc_bb->power_management_parameters.z8_stutter_exit_latency_us;
+		if (pmo->soc_bb->power_management_parameters.z8_stutter_enter_plus_exit_latency_us > 0) {
+			pmo->scratch.pmo_dcn4.optimal_vblank_reserved_time_for_stutter_us[pmo->scratch.pmo_dcn4.num_stutter_candidates] = (unsigned int)pmo->soc_bb->power_management_parameters.z8_stutter_enter_plus_exit_latency_us;
+			pmo->scratch.pmo_dcn4.stutter_candidate_is_z8[pmo->scratch.pmo_dcn4.num_stutter_candidates] = true;
 			pmo->scratch.pmo_dcn4.num_stutter_candidates++;
 			pmo->scratch.pmo_dcn4.z8_vblank_optimizable = true;
 		}
@@ -2425,6 +2426,7 @@ bool pmo_dcn4_fams2_init_for_stutter(struct dml2_pmo_init_for_stutter_in_out *in
 
 	if (!stutter_optimization_too_expensive && pmo->soc_bb->power_management_parameters.stutter_enter_plus_exit_latency_us > 0) {
 		pmo->scratch.pmo_dcn4.optimal_vblank_reserved_time_for_stutter_us[pmo->scratch.pmo_dcn4.num_stutter_candidates] = (unsigned int)pmo->soc_bb->power_management_parameters.stutter_enter_plus_exit_latency_us;
+		pmo->scratch.pmo_dcn4.stutter_candidate_is_z8[pmo->scratch.pmo_dcn4.num_stutter_candidates] = false;
 		pmo->scratch.pmo_dcn4.num_stutter_candidates++;
 	}
 
@@ -2442,9 +2444,9 @@ bool pmo_dcn4_fams2_test_for_stutter(struct dml2_pmo_test_for_stutter_in_out *in
 	unsigned int i;
 
 	for (i = 0; i < in_out->base_display_config->display_config.num_planes; i++) {
-		if (pmo->soc_bb->power_management_parameters.z8_stutter_exit_latency_us > 0 &&
+		if (pmo->soc_bb->power_management_parameters.z8_stutter_enter_plus_exit_latency_us > 0 &&
 			pmo->scratch.pmo_dcn4.z8_vblank_optimizable &&
-			in_out->base_display_config->display_config.plane_descriptors[i].overrides.reserved_vblank_time_ns < (int)pmo->soc_bb->power_management_parameters.z8_stutter_exit_latency_us * 1000) {
+			in_out->base_display_config->display_config.plane_descriptors[i].overrides.reserved_vblank_time_ns < (int)pmo->soc_bb->power_management_parameters.z8_stutter_enter_plus_exit_latency_us * 1000) {
 			success = false;
 			break;
 		}
@@ -2466,17 +2468,20 @@ bool pmo_dcn4_fams2_optimize_for_stutter(struct dml2_pmo_optimize_for_stutter_in
 
 	memcpy(in_out->optimized_display_config, in_out->base_display_config, sizeof(struct display_configuation_with_meta));
 
-	if (!in_out->last_candidate_failed) {
-		if (pmo->scratch.pmo_dcn4.cur_stutter_candidate < pmo->scratch.pmo_dcn4.num_stutter_candidates) {
-			for (i = 0; i < in_out->optimized_display_config->display_config.num_planes; i++) {
-				/* take the max of the current and the optimal reserved time */
-				in_out->optimized_display_config->display_config.plane_descriptors[i].overrides.reserved_vblank_time_ns =
-						(long)math_max2(pmo->scratch.pmo_dcn4.optimal_vblank_reserved_time_for_stutter_us[pmo->scratch.pmo_dcn4.cur_stutter_candidate] * 1000,
-						in_out->optimized_display_config->display_config.plane_descriptors[i].overrides.reserved_vblank_time_ns);
-			}
-
-			success = true;
+	if (pmo->scratch.pmo_dcn4.cur_stutter_candidate < pmo->scratch.pmo_dcn4.num_stutter_candidates) {
+		for (i = 0; i < in_out->optimized_display_config->display_config.num_planes; i++) {
+			/* take the max of the current and the optimal reserved time */
+			in_out->optimized_display_config->display_config.plane_descriptors[i].overrides.reserved_vblank_time_ns =
+					(long)math_max2(pmo->scratch.pmo_dcn4.optimal_vblank_reserved_time_for_stutter_us[pmo->scratch.pmo_dcn4.cur_stutter_candidate] * 1000,
+					in_out->optimized_display_config->display_config.plane_descriptors[i].overrides.reserved_vblank_time_ns);
 		}
+
+		/* only require the Z8 reserved time in the stutter test while the Z8 candidate is the one being attempted */
+		pmo->scratch.pmo_dcn4.z8_vblank_optimizable =
+				pmo->scratch.pmo_dcn4.stutter_candidate_is_z8[pmo->scratch.pmo_dcn4.cur_stutter_candidate];
+
+		pmo->scratch.pmo_dcn4.cur_stutter_candidate++;
+		success = true;
 	}
 
 	return success;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/inc/dml2_internal_shared_types.h +1 -0
index 54ec7ef7cbae..3f51c26dc238 100644
@@ -1093,6 +1093,7 @@ struct dml2_pmo_scratch {
 			struct dml2_pstate_meta stream_pstate_meta[DML2_MAX_PLANES];
 
 			unsigned int optimal_vblank_reserved_time_for_stutter_us[DML2_PMO_STUTTER_CANDIDATE_LIST_SIZE];
+			bool stutter_candidate_is_z8[DML2_PMO_STUTTER_CANDIDATE_LIST_SIZE];
 			unsigned int num_stutter_candidates;
 			unsigned int cur_stutter_candidate;
 			bool z8_vblank_optimizable;
Signature · 1 line
2.43.0
#24 lore raw

PATCH 24/27 drm/amd/display: Fix two streams sharing one OTG

In reply to Chenyu Chen

From: Gabe Teeger <[email protected]>

[Why]
Some ASICs have more pipes than OTGs and OPPs. A stream could be given a pipe without its own OTG and was then aliased to the last OTG and OPP, which another stream already used. Both streams then shared one OTG, so one of them stopped getting vblank interrupts.

[How]
Only pick a pipe as OTG master if it has its own OTG. If none is free, drop another stream's ODM slices and let DML validation add them back if needed. Remove the aliasing fallback. Skip pipes without an OPP when acquiring an ODM slice.

---
 .../gpu/drm/amd/display/dc/core/dc_resource.c | 64 ++++++++++++---
 .../dc/resource/dcn42b/dcn42b_resource.c      | 82 ++++++++++++++++++-
 .../dc/resource/dcn42b/dcn42b_resource.h      |  6 ++
 3 files changed, 140 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +53 -11
index ec11a79811e7..cb537aa90ad5 100644
@@ -4295,6 +4295,48 @@ static void mark_seamless_boot_stream(const struct dc  *dc,
 	}
 }
 
+/*
+ * Some ASICs (e.g. DCN 2.0.1 and DCN 4.2B) have more pipes than OTGs. A pipe
+ * without its own OTG can only be a secondary DPP pipe. As an OTG master it
+ * would share the OTG and OPP of another stream.
+ */
+static bool can_pipe_be_otg_master(const struct resource_pool *pool,
+		int pipe_idx)
+{
+	return pipe_idx >= 0 &&
+			(unsigned int)pipe_idx < pool->timing_generator_count;
+}
+
+/*
+ * Remove the ODM slices of the first stream that has more than one and return
+ * the first free pipe. DML re-evaluates the ODM slice count of that stream
+ * during validation. It adds the slices back if the timing needs them and
+ * enough OPPs are left, and fails validation otherwise.
+ */
+static int release_odm_slices_of_a_stream(
+		const struct dc_state *cur_ctx,
+		struct dc_state *new_ctx,
+		const struct resource_pool *pool)
+{
+	unsigned int i;
+
+	for (i = 0; i < pool->pipe_count; i++) {
+		struct pipe_ctx *otg_master = &new_ctx->res_ctx.pipe_ctx[i];
+
+		if (!resource_is_pipe_type(otg_master, OTG_MASTER) ||
+				resource_get_odm_slice_count(otg_master) == 1)
+			continue;
+
+		if (!resource_update_pipes_for_stream_with_slice_count(new_ctx,
+				cur_ctx, pool, otg_master->stream, 1))
+			return FREE_PIPE_INDEX_NOT_FOUND;
+
+		return resource_find_any_free_pipe(&new_ctx->res_ctx, pool);
+	}
+
+	return FREE_PIPE_INDEX_NOT_FOUND;
+}
+
 /*
  * Acquire a pipe as OTG master and assign to the stream in new dc context.
  * return - true if OTG master pipe is acquired and new dc context is updated.
@@ -4349,7 +4391,7 @@ static bool acquire_otg_master_pipe_for_stream(
 	 * Try to acquire a pipe not used in current resource context to avoid
 	 * pipe swapping.
 	 */
-	if (pipe_idx == FREE_PIPE_INDEX_NOT_FOUND)
+	if (!can_pipe_be_otg_master(pool, pipe_idx))
 		pipe_idx = recource_find_free_pipe_not_used_in_cur_res_ctx(
 				&cur_ctx->res_ctx, &new_ctx->res_ctx, pool);
 	/*
@@ -4357,12 +4399,19 @@ static bool acquire_otg_master_pipe_for_stream(
 	 * secondary DPP pipe in current state as we prioritize to support more
 	 * streams over supporting MPO planes.
 	 */
-	if (pipe_idx == FREE_PIPE_INDEX_NOT_FOUND)
+	if (!can_pipe_be_otg_master(pool, pipe_idx))
 		pipe_idx = resource_find_free_pipe_used_as_cur_sec_dpp(
 				&cur_ctx->res_ctx, &new_ctx->res_ctx, pool);
-	if (pipe_idx == FREE_PIPE_INDEX_NOT_FOUND)
+	if (!can_pipe_be_otg_master(pool, pipe_idx))
 		pipe_idx = resource_find_any_free_pipe(&new_ctx->res_ctx, pool);
-	if (pipe_idx != FREE_PIPE_INDEX_NOT_FOUND) {
+	/*
+	 * If the only free pipes have no OTG (e.g. pipe 3 on DCN 4.2B), free a
+	 * pipe that has one by removing the ODM slices of another stream.
+	 */
+	if (pipe_idx != FREE_PIPE_INDEX_NOT_FOUND &&
+			!can_pipe_be_otg_master(pool, pipe_idx))
+		pipe_idx = release_odm_slices_of_a_stream(cur_ctx, new_ctx, pool);
+	if (can_pipe_be_otg_master(pool, pipe_idx)) {
 		pipe_ctx = &new_ctx->res_ctx.pipe_ctx[pipe_idx];
 		memset(pipe_ctx, 0, sizeof(*pipe_ctx));
 		pipe_ctx->pipe_idx = (uint8_t)pipe_idx;
@@ -4376,13 +4425,6 @@ static bool acquire_otg_master_pipe_for_stream(
 		if (pool->dpps[pipe_idx])
 			pipe_ctx->plane_res.mpcc_inst = (uint8_t)pool->dpps[pipe_idx]->inst;
 
-		if ((unsigned int)pipe_idx >= pool->timing_generator_count && pool->timing_generator_count != 0) {
-			int tg_inst = pool->timing_generator_count - 1;
-
-			pipe_ctx->stream_res.tg = pool->timing_generators[tg_inst];
-			pipe_ctx->stream_res.opp = pool->opps[tg_inst];
-		}
-
 		pipe_ctx->stream = stream;
 	} else {
 		pipe_idx = acquire_first_split_pipe(&new_ctx->res_ctx, pool, stream);
drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.c +81 -1

94 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/resource/dcn42b/dcn42b_resource.h +6 -0
index 484ba1455468..8b9e3e9723ed 100644
@@ -516,4 +516,10 @@ enum dc_status dcn42b_validate_bandwidth(struct dc *dc,
 
 void dcn42b_prepare_mcache_programming(struct dc *dc, struct dc_state *context);
 
+struct pipe_ctx *dcn42b_acquire_free_pipe_as_secondary_opp_head(
+		const struct dc_state *cur_ctx,
+		struct dc_state *new_ctx,
+		const struct resource_pool *pool,
+		const struct pipe_ctx *otg_master);
+
 #endif /* _DCN42B_RESOURCE_H_ */
Signature · 1 line
2.43.0
#25 lore raw

PATCH 25/27 drm/amd/display: Count planes, not pipes, in the surface check

In reply to Chenyu Chen

From: Tony Cheng <[email protected]>

[Why]
core2_surfaces_supported compares the number of DPP pipes of the stream with the number of surfaces. With ODM, one plane has one DPP pipe for each ODM slice. Thus the check rejects each plane update on an ODM stream, and DC does not program the plane.

[How]
Compare the plane count of the stream status in the new state with the number of surfaces. Each surface must still be the plane of a DPP pipe of the stream. The vsync flip change to the DC2 seamless update added the pipe count check.

---
 drivers/gpu/drm/amd/display/dc/core2/dc_core2.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core2/dc_core2.c +5 -2
index ce2d4f0c89d6..1ab1f0ec2e41 100644
@@ -337,14 +337,17 @@ static bool core2_surfaces_supported(
 		const struct dc_update_scratch_space *scratch)
 {
 	struct pipe_ctx *dpp_pipes[MAX_PIPES];
+	struct dc_stream_status *status;
 	int i, j, n;
 
 	if (!scratch->surface_updates)
 		return false;
+	status = dc_state_get_stream_status(scratch->new_context,
+			scratch->stream);
+	if (!status || status->plane_count != scratch->surface_count)
+		return false;
 	n = resource_get_dpp_pipes_for_stream(scratch->stream,
 			&scratch->new_context->res_ctx, dpp_pipes);
-	if (n != scratch->surface_count)
-		return false;
 	for (i = 0; i < scratch->surface_count; i++) {
 		for (j = 0; j < n; j++)
 			if (dpp_pipes[j]->plane_state ==
Signature · 1 line
2.43.0
#26 lore raw

PATCH 26/27 drm/amd/display: [FW Promotion] Release 0.1.86.0

In reply to Chenyu Chen

From: Taimur Hassan <[email protected]>

Updated DMUB interface
- Add the maximum LSDMA bandwidth parameter to the DCN6 bounding-box data

---
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +1 -0
index 8a0ef22e7e82..36c75c6a0764 100644
@@ -444,6 +444,7 @@ struct dmub_soc_bb_params {
 	uint32_t fams2_lock_timeout_us;
 	uint32_t fams2_recovery_timeout_us;
 	uint32_t fams2_flip_programming_delay_us;
+	uint32_t max_lsdma_bandwidth_kbps;
 };
 #pragma pack(pop)
 
Signature · 1 line
2.43.0
#27 lore raw

PATCH 27/27 drm/amd/display: Promote DC to 3.2.409

In reply to Chenyu Chen

From: Taimur Hassan <[email protected]>

This version brings along the following updates:
- Avoid per-entry long division in __drm_lut32_to_dc_gamma
- Add more diagnostic logging, a debug option to force the DP link rate and per-CRTC pstate method in connector debugfs
- Reject Replay activation on an inactive link
- Decouple PROGRAM_CURSOR_UPDATE_NOW from dc and pipe_ctx
- Add DPMS-v2 init and tx init, and implement link_set_dpms_off_v2
- Derive DCN6 DSCCLK range from DISPCLK
- Carry stream and plane update bits in update_flags and add vsync and immediate flips to the DC2 seamless update
- Preserve bandwidth floors in overrides
- Set HDMI bypass earlier
- Add DMUB timer reference clock to ref_clocks
- Guard connector I2C transfer without DDC pin
- Refactor ABM_SET_PIPE and ABM_SET_IMMEDIATE_DISABLE
- Add amdgpu_dm_dmub tests for alt-ch apertures, SET_CONFIG sync wait, AUX transfer timeout and fused IO replies
- Use Z8 enter plus exit for vblank reserve
- Fix two streams sharing one OTG
- Count planes, not pipes, in the surface check
- Promote DMUB firmware to release 0.1.86.0

---
 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
index 69d6eed1df41..14703c0e0224 100644
@@ -69,7 +69,7 @@ struct dcn_dsc_reg_state;
 struct dcn_optc_reg_state;
 struct dcn_dccg_reg_state;
 
-#define DC_VER "3.2.408"
+#define DC_VER "3.2.409"
 
 /**
  * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.43.0