Skip to contentSkip to conversation

DC Patches Oct 06 2023

PATCH In review Tom Chung 2 participants 18 messages Oct 4, 2023

Subsystems (5)
lore
Share & tools
lore

Tom Chung

author
#0 lore raw

cover DC Patches Oct 06 2023

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

- Refactor DPG test pattern logic for ODM cases
- Refactor HWSS into component folder
- Revert "drm/amd/display: Add a check for idle power optimization"
- Revert "drm/amd/display: remove duplicated edp relink to fastboot
- Update cursor limits based on SW cursor fallback limits
- Update stream mask
- Update pmfw_driver_if new structure
- Modify SMU message logs
- Don't set dpms_off for seamless boot

Cc Daniel Wheeler <[email protected]>

Alvin Lee (2):
drm/amd/display: Update cursor limits based on SW cursor fallback
limits
drm/amd/display: Make DCN3x use older FPO sequence

Aric Cyr (2):
drm/amd/display: Revert "drm/amd/display: remove duplicated edp relink
to fastboot"
drm/amd/display: 3.2.255

Charlene Liu (1):
drm/amd/display: Update pmfw_driver_if new structure

Daniel Miess (1):
drm/amd/display: Don't set dpms_off for seamless boot

Duncan Ma (1):
drm/amd/display: Update stream mask

George Shen (2):
drm/amd/display: Refactor DPG test pattern logic for ODM cases drm/amd/display: Disable SubVP if test pattern is enabled

Max Tseng (1):
drm/amd/display: Modify Vmin default value

Mounika Adhuri (1):
drm/amd/display: Refactor HWSS into component folder

Muhammad Ahmed (1):
drm/amd/display: Update dml ssb from pmfw clock table

Muhammad Ansari (1):
drm/amd/display: VSIF v3 set Max Refresh Rate

Nicholas Kazlauskas (1):
drm/amd/display: Don't use fsleep for PSR exit waits

Sung Joon Kim (2):
drm/amd/display: Modify SMU message logs
drm/amd/display: Revert "drm/amd/display: Add a check for idle power
optimization"

 drivers/gpu/drm/amd/display/Makefile          |   1 +
 drivers/gpu/drm/amd/display/dc/Makefile       |   2 +-
 .../dc/clk_mgr/dce120/dce120_clk_mgr.c        |   2 +-
 .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c  | 215 ++++++++++++------
 .../amd/display/dc/clk_mgr/dcn35/dcn35_smu.c  |  12 +-
 .../amd/display/dc/clk_mgr/dcn35/dcn35_smu.h  |  36 ++-
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 105 +++++++--
 .../gpu/drm/amd/display/dc/core/dc_resource.c | 143 ++++++++++++
 .../gpu/drm/amd/display/dc/core/dc_stream.c   |  34 +--
 drivers/gpu/drm/amd/display/dc/dc.h           |   6 +-
 drivers/gpu/drm/amd/display/dc/dce/Makefile   |   2 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c |   3 +-
 drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c |   3 +-
 .../gpu/drm/amd/display/dc/dce100/Makefile    |   2 +-
 .../amd/display/dc/dce100/dce100_resource.c   |   4 +-
 .../gpu/drm/amd/display/dc/dce110/Makefile    |   2 +-
 .../amd/display/dc/dce110/dce110_resource.c   |   2 +-
 .../gpu/drm/amd/display/dc/dce112/Makefile    |   2 +-
 .../amd/display/dc/dce112/dce112_resource.c   |   2 +-
 .../gpu/drm/amd/display/dc/dce120/Makefile    |   1 -
 .../amd/display/dc/dce120/dce120_resource.c   |   6 +-
 .../amd/display/dc/dce60/dce60_hw_sequencer.c |   4 +-
 drivers/gpu/drm/amd/display/dc/dce80/Makefile |   2 +-
 .../drm/amd/display/dc/dce80/dce80_resource.c |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn10/Makefile |   2 +-
 .../dc/dcn10/dcn10_hw_sequencer_debug.c       |   4 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c |   4 +-
 .../drm/amd/display/dc/dcn10/dcn10_resource.c |   4 +-
 drivers/gpu/drm/amd/display/dc/dcn20/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c |   6 +-
 .../drm/amd/display/dc/dcn20/dcn20_resource.c |   4 +-
 .../gpu/drm/amd/display/dc/dcn201/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn201/dcn201_init.c   |   6 +-
 .../amd/display/dc/dcn201/dcn201_resource.c   |   4 +-
 drivers/gpu/drm/amd/display/dc/dcn21/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c |   6 +-
 .../drm/amd/display/dc/dcn21/dcn21_resource.c |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn30/Makefile |   1 -
 .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c |   6 +-
 .../drm/amd/display/dc/dcn30/dcn30_resource.c |   2 +-
 .../gpu/drm/amd/display/dc/dcn301/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn301/dcn301_init.c   |   6 +-
 .../amd/display/dc/dcn301/dcn301_resource.c   |   2 +-
 .../gpu/drm/amd/display/dc/dcn302/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn302/dcn302_init.c   |   2 +-
 .../gpu/drm/amd/display/dc/dcn303/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn303/dcn303_init.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn31/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn31/dcn31_init.c |   4 +-
 .../drm/amd/display/dc/dcn31/dcn31_resource.c |   2 +-
 .../gpu/drm/amd/display/dc/dcn314/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn314/dcn314_init.c   |   4 +-
 .../amd/display/dc/dcn314/dcn314_resource.c   |   4 +-
 .../amd/display/dc/dcn315/dcn315_resource.c   |   2 +-
 .../amd/display/dc/dcn316/dcn316_resource.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn32/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn32/dcn32_init.c |   8 +-
 .../drm/amd/display/dc/dcn32/dcn32_resource.c |   2 +-
 .../amd/display/dc/dcn321/dcn321_resource.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn35/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn35/dcn35_init.c |   4 +-
 .../drm/amd/display/dc/dcn35/dcn35_pg_cntl.c  |   1 +
 .../drm/amd/display/dc/dcn35/dcn35_resource.c |  15 +-
 .../drm/amd/display/dc/dml/dcn32/dcn32_fpu.c  |  15 +-
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  |  24 +-
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.h  |   2 -
 drivers/gpu/drm/amd/display/dc/hwss/Makefile  | 183 +++++++++++++++
 .../amd/display/dc/{ => hwss}/dce/dce_hwseq.c |   0
 .../amd/display/dc/{ => hwss}/dce/dce_hwseq.h |   0
 .../dce100/dce100_hwseq.c}                    |   4 +-
 .../dce100/dce100_hwseq.h}                    |   0
 .../dce110/dce110_hwseq.c}                    |   8 +-
 .../dce110/dce110_hwseq.h}                    |   0
 .../dce112/dce112_hwseq.c}                    |   4 +-
 .../dce112/dce112_hwseq.h}                    |   0
 .../dce120/dce120_hwseq.c}                    |   4 +-
 .../dce120/dce120_hwseq.h}                    |   0
 .../dce80/dce80_hwseq.c}                      |   6 +-
 .../dce80/dce80_hwseq.h}                      |   0
 .../dcn10/dcn10_hwseq.c}                      |  16 +-
 .../dcn10/dcn10_hwseq.h}                      |   0
 .../display/dc/{ => hwss}/dcn20/dcn20_hwseq.c |  28 ++-
 .../display/dc/{ => hwss}/dcn20/dcn20_hwseq.h |   0
 .../dc/{ => hwss}/dcn201/dcn201_hwseq.c       |   2 +-
 .../dc/{ => hwss}/dcn201/dcn201_hwseq.h       |   0
 .../display/dc/{ => hwss}/dcn21/dcn21_hwseq.c |   2 +-
 .../display/dc/{ => hwss}/dcn21/dcn21_hwseq.h |   0
 .../display/dc/{ => hwss}/dcn30/dcn30_hwseq.c |  31 +--
 .../display/dc/{ => hwss}/dcn30/dcn30_hwseq.h |   0
 .../dc/{ => hwss}/dcn301/dcn301_hwseq.c       |   0
 .../dc/{ => hwss}/dcn301/dcn301_hwseq.h       |   0
 .../dc/{ => hwss}/dcn302/dcn302_hwseq.c       |   0
 .../dc/{ => hwss}/dcn302/dcn302_hwseq.h       |   0
 .../dc/{ => hwss}/dcn303/dcn303_hwseq.c       |   0
 .../dc/{ => hwss}/dcn303/dcn303_hwseq.h       |   0
 .../display/dc/{ => hwss}/dcn31/dcn31_hwseq.c |   2 +-
 .../display/dc/{ => hwss}/dcn31/dcn31_hwseq.h |   0
 .../dc/{ => hwss}/dcn314/dcn314_hwseq.c       |   2 +-
 .../dc/{ => hwss}/dcn314/dcn314_hwseq.h       |   0
 .../display/dc/{ => hwss}/dcn32/dcn32_hwseq.c |  14 +-
 .../display/dc/{ => hwss}/dcn32/dcn32_hwseq.h |   3 +
 .../display/dc/{ => hwss}/dcn35/dcn35_hwseq.c |   2 +-
 .../display/dc/{ => hwss}/dcn35/dcn35_hwseq.h |   0
 .../display/dc/{inc => hwss}/hw_sequencer.h   |   4 +-
 .../dc/{inc => hwss}/hw_sequencer_private.h   |   0
 .../gpu/drm/amd/display/dc/inc/core_types.h   |  13 ++
 drivers/gpu/drm/amd/display/dc/inc/resource.h |   7 +
 .../display/dc/link/accessories/link_dp_cts.c | 117 ++--------
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |   1 -
 .../amd/display/modules/freesync/freesync.c   |   9 +-
 110 files changed, 820 insertions(+), 409 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/Makefile
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dce/dce_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dce/dce_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce100/dce100_hw_sequencer.c => hwss/dce100/dce100_hwseq.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{dce100/dce100_hw_sequencer.h => hwss/dce100/dce100_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce110/dce110_hw_sequencer.c => hwss/dce110/dce110_hwseq.c} (99%)
 rename drivers/gpu/drm/amd/display/dc/{dce110/dce110_hw_sequencer.h => hwss/dce110/dce110_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce112/dce112_hw_sequencer.c => hwss/dce112/dce112_hwseq.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{dce112/dce112_hw_sequencer.h => hwss/dce112/dce112_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce120/dce120_hw_sequencer.c => hwss/dce120/dce120_hwseq.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{dce120/dce120_hw_sequencer.h => hwss/dce120/dce120_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce80/dce80_hw_sequencer.c => hwss/dce80/dce80_hwseq.c} (94%)
 rename drivers/gpu/drm/amd/display/dc/{dce80/dce80_hw_sequencer.h => hwss/dce80/dce80_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dcn10/dcn10_hw_sequencer.c => hwss/dcn10/dcn10_hwseq.c} (99%)
 rename drivers/gpu/drm/amd/display/dc/{dcn10/dcn10_hw_sequencer.h => hwss/dcn10/dcn10_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn20/dcn20_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn20/dcn20_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn201/dcn201_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn201/dcn201_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn21/dcn21_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn21/dcn21_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn30/dcn30_hwseq.c (96%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn30/dcn30_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn301/dcn301_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn301/dcn301_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn302/dcn302_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn302/dcn302_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn303/dcn303_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn303/dcn303_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn31/dcn31_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn31/dcn31_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn314/dcn314_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn314/dcn314_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn32/dcn32_hwseq.c (98%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn32/dcn32_hwseq.h (98%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn35/dcn35_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn35/dcn35_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{inc => hwss}/hw_sequencer.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{inc => hwss}/hw_sequencer_private.h (100%)
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 1/16 drm/amd/display: Modify SMU message logs

From: Sung Joon Kim <[email protected]>

[why]
It's important to make sure SMU messages are logged by default to improve debugging for power optimization use cases.

[how]
Change logs to warnings when SMU message returns non-success id.

---
 .../drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c |  1 +
 .../gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_smu.c | 12 ++++++------
 drivers/gpu/drm/amd/display/dc/dc.h                  |  1 +
 drivers/gpu/drm/amd/display/dc/dcn35/dcn35_pg_cntl.c |  1 +
 4 files changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +1 -0
index b5acd7b01e40..21dfe3faf08c 100644
@@ -1046,6 +1046,7 @@ void dcn35_clk_mgr_construct(
 			ctx->dc->debug.disable_dpp_power_gate = false;
 			ctx->dc->debug.disable_hubp_power_gate = false;
 			ctx->dc->debug.disable_dsc_power_gate = false;
+			ctx->dc->debug.disable_hpo_power_gate = false;
 		} else {
 			/*let's reset the config control flag*/
 			ctx->dc->config.disable_ips = 1; /*pmfw not support it, disable it all*/
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_smu.c +6 -6
index cf74e69cb2a1..b6b8c3ca1572 100644
@@ -130,11 +130,11 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
 	result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000);
 	ASSERT(result == VBIOSSMC_Result_OK);
 
+	if (result != VBIOSSMC_Result_OK) {
+		DC_LOG_WARNING("SMU response after wait: %d, msg id = %d\n", result, msg_id);
 
-
-	if (result == VBIOSSMC_Status_BUSY) {
-		smu_print("SMU response after wait: %d\n", result);
-		return -1;
+		if (result == VBIOSSMC_Status_BUSY)
+			return -1;
 	}
 
 	/* First clear response register */
@@ -155,7 +155,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
 		else
 			ASSERT(0);
 		REG_WRITE(MP1_SMN_C2PMSG_91, VBIOSSMC_Result_OK);
-		smu_print("SMU response after wait: %d\n", result);
+		DC_LOG_WARNING("SMU response after wait: %d, msg id = %d\n", result, msg_id);
 		return -1;
 	}
 
@@ -163,7 +163,7 @@ static int dcn35_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
 		ASSERT(0);
 		result = dcn35_smu_wait_for_response(clk_mgr, 10, 2000000);
 		//dm_helpers_smu_timeout(CTX, msg_id, param, 10 * 200000);
-		smu_print("SMU response after wait: %d\n", result);
+		DC_LOG_WARNING("SMU response after wait: %d, msg id = %d\n", result, msg_id);
 	}
 
 	return REG_READ(MP1_SMN_C2PMSG_83);
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
index 7d1ce58d493b..6c51ebf5bbad 100644
@@ -830,6 +830,7 @@ struct dc_debug_options {
 	bool disable_hubp_power_gate;
 	bool disable_dsc_power_gate;
 	bool disable_optc_power_gate;
+	bool disable_hpo_power_gate;
 	int dsc_min_slice_height_override;
 	int dsc_bpp_increment_div;
 	bool disable_pplib_wm_range;
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_pg_cntl.c +1 -0
index ccfd3102e5a0..e62a192c595e 100644
@@ -262,6 +262,7 @@ void pg_cntl35_hpo_pg_control(struct pg_cntl *pg_cntl, bool power_on)
 	bool block_enabled;
 
 	if (pg_cntl->ctx->dc->debug.ignore_pg ||
+		pg_cntl->ctx->dc->debug.disable_hpo_power_gate ||
 		pg_cntl->ctx->dc->idle_optimizations_allowed)
 		return;
 
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH 2/16 drm/amd/display: VSIF v3 set Max Refresh Rate

In reply to Tom Chung

From: Muhammad Ansari <[email protected]>

[WHY]
FreeSync spec requires PB8 and PB12 to be set to nominal refresh rate regardless of fixed rate or variable

[HOW]
Removed the condition that checks and overwrites max refresh rate and set PB8/PB12 to be set to max refresh rate always

---
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +2 -7
index ef3a67409021..ccecddafeb05 100644
@@ -626,7 +626,6 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr,
 	unsigned int max_refresh;
 	unsigned int fixed_refresh;
 	unsigned int min_programmed;
-	unsigned int max_programmed;
 
 	/* PB1 = 0x1A (24bit AMD IEEE OUI (0x00001A) - Byte 0) */
 	infopacket->sb[1] = 0x1A;
@@ -672,21 +671,17 @@ static void build_vrr_infopacket_data_v3(const struct mod_vrr_params *vrr,
 			(vrr->state == VRR_STATE_INACTIVE) ? min_refresh :
 			max_refresh; // Non-fs case, program nominal range
 
-	max_programmed = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? fixed_refresh :
-			(vrr->state == VRR_STATE_ACTIVE_VARIABLE) ? max_refresh :
-			max_refresh;// Non-fs case, program nominal range
-
 	/* PB7 = FreeSync Minimum refresh rate (Hz) */
 	infopacket->sb[7] = min_programmed & 0xFF;
 
 	/* PB8 = FreeSync Maximum refresh rate (Hz) */
-	infopacket->sb[8] = max_programmed & 0xFF;
+	infopacket->sb[8] = max_refresh & 0xFF;
 
 	/* PB11 : MSB FreeSync Minimum refresh rate [Hz] - bits 9:8 */
 	infopacket->sb[11] = (min_programmed >> 8) & 0x03;
 
 	/* PB12 : MSB FreeSync Maximum refresh rate [Hz] - bits 9:8 */
-	infopacket->sb[12] = (max_programmed >> 8) & 0x03;
+	infopacket->sb[12] = (max_refresh >> 8) & 0x03;
 
 	/* PB16 : Reserved bits 7:1, FixedRate bit 0 */
 	infopacket->sb[16] = (vrr->state == VRR_STATE_ACTIVE_FIXED) ? 1 : 0;
Signature · 1 line
2.25.1
author
#3 lore raw

PATCH 3/16 drm/amd/display: Update pmfw_driver_if new structure

In reply to Tom Chung

From: Charlene Liu <[email protected]>

[why]
pmfw header file updated, need align with data structure.

[How]
Update the data structure.

---
 .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c  | 214 ++++++++++++------
 .../amd/display/dc/clk_mgr/dcn35/dcn35_smu.h  |  36 ++-
 2 files changed, 174 insertions(+), 76 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +146 -68
index 21dfe3faf08c..f80917f6153b 100644
@@ -507,7 +507,7 @@ static struct wm_table lpddr5_wm_table = {
 	}
 };
 
-static DpmClocks_t dummy_clocks;
+static DpmClocks_t_dcn35 dummy_clocks;
 
 static struct dcn35_watermarks dummy_wms = { 0 };
 
@@ -597,7 +597,7 @@ static void dcn35_notify_wm_ranges(struct clk_mgr *clk_mgr_base)
 static void dcn35_get_dpm_table_from_smu(struct clk_mgr_internal *clk_mgr,
 		struct dcn35_smu_dpm_clks *smu_dpm_clks)
 {
-	DpmClocks_t *table = smu_dpm_clks->dpm_clks;
+	DpmClocks_t_dcn35 *table = smu_dpm_clks->dpm_clks;
 
 	if (!clk_mgr->smu_ver)
 		return;
@@ -627,88 +627,158 @@ static uint32_t find_max_clk_value(const uint32_t clocks[], uint32_t num_clocks)
 	return max;
 }
 
-static unsigned int find_clk_for_voltage(
-		const DpmClocks_t *clock_table,
-		const uint32_t clocks[],
-		unsigned int voltage)
+static inline bool is_valid_clock_value(uint32_t clock_value)
 {
-	int i;
-	int max_voltage = 0;
-	int clock = 0;
-
-	for (i = 0; i < NUM_SOC_VOLTAGE_LEVELS; i++) {
-		if (clock_table->SocVoltage[i] == voltage) {
-			return clocks[i];
-		} else if (clock_table->SocVoltage[i] >= max_voltage &&
-				clock_table->SocVoltage[i] < voltage) {
-			max_voltage = clock_table->SocVoltage[i];
-			clock = clocks[i];
-		}
+	return clock_value > 1 && clock_value < 100000;
+}
+
+static unsigned int convert_wck_ratio(uint8_t wck_ratio)
+{
+	switch (wck_ratio) {
+	case WCK_RATIO_1_2:
+		return 2;
+
+	case WCK_RATIO_1_4:
+		return 4;
+	/* Find lowest DPM, FCLK is filled in reverse order*/
+
+	default:
+			break;
 	}
 
-	ASSERT(clock);
-	return clock;
+	return 1;
 }
 
 static void dcn35_clk_mgr_helper_populate_bw_params(struct clk_mgr_internal *clk_mgr,
 						    struct integrated_info *bios_info,
-						    const DpmClocks_t *clock_table)
+						    DpmClocks_t_dcn35 *clock_table)
 {
-	int i, j;
 	struct clk_bw_params *bw_params = clk_mgr->base.bw_params;
-	uint32_t max_dispclk = 0, max_dppclk = 0;
-
-	j = -1;
-
-	ASSERT(NUM_DF_PSTATE_LEVELS <= MAX_NUM_DPM_LVL);
-
-	/* Find lowest DPM, FCLK is filled in reverse order*/
+	struct clk_limit_table_entry def_max = bw_params->clk_table.entries[bw_params->clk_table.num_entries - 1];
+	uint32_t max_pstate = 0,  max_uclk = 0, max_fclk = 0;
+	uint32_t min_pstate = 0, max_dispclk = 0, max_dppclk = 0;
+	int i;
 
-	for (i = NUM_DF_PSTATE_LEVELS - 1; i >= 0; i--) {
-		if (clock_table->DfPstateTable[i].FClk != 0) {
-			j = i;
-			break;
+	for (i = 0; i < clock_table->NumMemPstatesEnabled; i++) {
+		if (is_valid_clock_value(clock_table->MemPstateTable[i].UClk) &&
+		    clock_table->MemPstateTable[i].UClk > max_uclk) {
+			max_uclk = clock_table->MemPstateTable[i].UClk;
+			max_pstate = i;
 		}
 	}
 
-	if (j == -1) {
-		/* clock table is all 0s, just use our own hardcode */
-		ASSERT(0);
-		return;
-	}
+	/* We expect the table to contain at least one valid Uclk entry. */
+	ASSERT(is_valid_clock_value(max_uclk));
 
-	bw_params->clk_table.num_entries = j + 1;
 
 	/* dispclk and dppclk can be max at any voltage, same number of levels for both */
 	if (clock_table->NumDispClkLevelsEnabled <= NUM_DISPCLK_DPM_LEVELS &&
 	    clock_table->NumDispClkLevelsEnabled <= NUM_DPPCLK_DPM_LEVELS) {
-		max_dispclk = find_max_clk_value(clock_table->DispClocks, clock_table->NumDispClkLevelsEnabled);
-		max_dppclk = find_max_clk_value(clock_table->DppClocks, clock_table->NumDispClkLevelsEnabled);
+		max_dispclk = find_max_clk_value(clock_table->DispClocks,
+			clock_table->NumDispClkLevelsEnabled);
+		max_dppclk = find_max_clk_value(clock_table->DppClocks,
+			clock_table->NumDispClkLevelsEnabled);
 	} else {
 		ASSERT(0);
 	}
+	if (clock_table->NumFclkLevelsEnabled <= NUM_FCLK_DPM_LEVELS)
+		max_fclk = find_max_clk_value(clock_table->FclkClocks_Freq,
+			clock_table->NumFclkLevelsEnabled);
+
+	for (i = 0; i < clock_table->NumMemPstatesEnabled; i++) {
+		uint32_t min_uclk = clock_table->MemPstateTable[0].UClk;
+		int j;
+
+		for (j = 1; j < clock_table->NumMemPstatesEnabled; j++) {
+			if (is_valid_clock_value(clock_table->MemPstateTable[j].UClk) &&
+			    clock_table->MemPstateTable[j].UClk < min_uclk &&
+			    clock_table->MemPstateTable[j].Voltage <= clock_table->SocVoltage[i]) {
+				min_uclk = clock_table->MemPstateTable[j].UClk;
+				min_pstate = j;
+			}
+		}
 
-	for (i = 0; i < bw_params->clk_table.num_entries; i++, j--) {
-		bw_params->clk_table.entries[i].fclk_mhz = clock_table->DfPstateTable[j].FClk;
-		bw_params->clk_table.entries[i].memclk_mhz = clock_table->DfPstateTable[j].MemClk;
-		bw_params->clk_table.entries[i].voltage = clock_table->DfPstateTable[j].Voltage;
-		switch (clock_table->DfPstateTable[j].WckRatio) {
-		case WCK_RATIO_1_2:
-			bw_params->clk_table.entries[i].wck_ratio = 2;
-			break;
-		case WCK_RATIO_1_4:
-			bw_params->clk_table.entries[i].wck_ratio = 4;
+		for (j = bw_params->clk_table.num_entries - 1; j > 0; j--)
+			if (bw_params->clk_table.entries[j].dcfclk_mhz <= clock_table->DcfClocks[i])
 			break;
-		default:
-			bw_params->clk_table.entries[i].wck_ratio = 1;
+
+		bw_params->clk_table.entries[i].phyclk_mhz = bw_params->clk_table.entries[j].phyclk_mhz;
+		bw_params->clk_table.entries[i].phyclk_d18_mhz = bw_params->clk_table.entries[j].phyclk_d18_mhz;
+		bw_params->clk_table.entries[i].dtbclk_mhz = bw_params->clk_table.entries[j].dtbclk_mhz;
+		bw_params->clk_table.entries[i].fclk_mhz = max_fclk;
+		bw_params->clk_table.entries[i].memclk_mhz = clock_table->MemPstateTable[min_pstate].MemClk;
+		bw_params->clk_table.entries[i].voltage = clock_table->MemPstateTable[min_pstate].Voltage;
+		bw_params->clk_table.entries[i].dcfclk_mhz = clock_table->DcfClocks[i];
+		bw_params->clk_table.entries[i].socclk_mhz = clock_table->SocClocks[i];
+		bw_params->clk_table.entries[i].dispclk_mhz = max_dispclk;
+		bw_params->clk_table.entries[i].dppclk_mhz = max_dppclk;
+		bw_params->clk_table.entries[i].wck_ratio = convert_wck_ratio(
+			clock_table->MemPstateTable[min_pstate].WckRatio);
 		}
-		bw_params->clk_table.entries[i].dcfclk_mhz = find_clk_for_voltage(clock_table, clock_table->DcfClocks, clock_table->DfPstateTable[j].Voltage);
-		bw_params->clk_table.entries[i].socclk_mhz = find_clk_for_voltage(clock_table, clock_table->SocClocks, clock_table->DfPstateTable[j].Voltage);
+
+	/* Make sure to include at least one entry at highest pstate */
+	if (max_pstate != min_pstate || i == 0) {
+		if (i > MAX_NUM_DPM_LVL - 1)
+			i = MAX_NUM_DPM_LVL - 1;
+		bw_params->clk_table.entries[i].fclk_mhz = max_fclk;
+		bw_params->clk_table.entries[i].memclk_mhz = clock_table->MemPstateTable[max_pstate].MemClk;
+		bw_params->clk_table.entries[i].voltage = clock_table->MemPstateTable[max_pstate].Voltage;
+		bw_params->clk_table.entries[i].dcfclk_mhz =
+			find_max_clk_value(clock_table->DcfClocks, NUM_DCFCLK_DPM_LEVELS);
+		bw_params->clk_table.entries[i].socclk_mhz =
+			find_max_clk_value(clock_table->SocClocks, NUM_SOCCLK_DPM_LEVELS);
 		bw_params->clk_table.entries[i].dispclk_mhz = max_dispclk;
 		bw_params->clk_table.entries[i].dppclk_mhz = max_dppclk;
+		bw_params->clk_table.entries[i].wck_ratio = convert_wck_ratio(
+			clock_table->MemPstateTable[max_pstate].WckRatio);
+		i++;
 	}
-
+	bw_params->clk_table.num_entries = i--;
+
+	bw_params->clk_table.entries[i].socclk_mhz =
+		find_max_clk_value(clock_table->SocClocks, NUM_SOCCLK_DPM_LEVELS);
+	bw_params->clk_table.entries[i].dispclk_mhz =
+		find_max_clk_value(clock_table->DispClocks, NUM_DISPCLK_DPM_LEVELS);
+	bw_params->clk_table.entries[i].dppclk_mhz =
+		find_max_clk_value(clock_table->DppClocks, NUM_DPPCLK_DPM_LEVELS);
+	bw_params->clk_table.entries[i].fclk_mhz =
+		find_max_clk_value(clock_table->FclkClocks_Freq, NUM_FCLK_DPM_LEVELS);
+	ASSERT(clock_table->DcfClocks[i] == find_max_clk_value(clock_table->DcfClocks, NUM_DCFCLK_DPM_LEVELS));
+	bw_params->clk_table.entries[i].phyclk_mhz = def_max.phyclk_mhz;
+	bw_params->clk_table.entries[i].phyclk_d18_mhz = def_max.phyclk_d18_mhz;
+	bw_params->clk_table.entries[i].dtbclk_mhz = def_max.dtbclk_mhz;
+	bw_params->clk_table.num_entries_per_clk.num_dcfclk_levels = clock_table->NumDcfClkLevelsEnabled;
+	bw_params->clk_table.num_entries_per_clk.num_dispclk_levels = clock_table->NumDispClkLevelsEnabled;
+	bw_params->clk_table.num_entries_per_clk.num_dppclk_levels = clock_table->NumDispClkLevelsEnabled;
+	bw_params->clk_table.num_entries_per_clk.num_fclk_levels = clock_table->NumFclkLevelsEnabled;
+	bw_params->clk_table.num_entries_per_clk.num_memclk_levels = clock_table->NumMemPstatesEnabled;
+	bw_params->clk_table.num_entries_per_clk.num_socclk_levels = clock_table->NumSocClkLevelsEnabled;
+	for (i = 0; i < bw_params->clk_table.num_entries; i++) {
+		if (!bw_params->clk_table.entries[i].fclk_mhz) {
+			bw_params->clk_table.entries[i].fclk_mhz = def_max.fclk_mhz;
+			bw_params->clk_table.entries[i].memclk_mhz = def_max.memclk_mhz;
+			bw_params->clk_table.entries[i].voltage = def_max.voltage;
+		}
+		if (!bw_params->clk_table.entries[i].dcfclk_mhz)
+			bw_params->clk_table.entries[i].dcfclk_mhz = def_max.dcfclk_mhz;
+		if (!bw_params->clk_table.entries[i].socclk_mhz)
+			bw_params->clk_table.entries[i].socclk_mhz = def_max.socclk_mhz;
+		if (!bw_params->clk_table.entries[i].dispclk_mhz)
+			bw_params->clk_table.entries[i].dispclk_mhz = def_max.dispclk_mhz;
+		if (!bw_params->clk_table.entries[i].dppclk_mhz)
+			bw_params->clk_table.entries[i].dppclk_mhz = def_max.dppclk_mhz;
+		if (!bw_params->clk_table.entries[i].fclk_mhz)
+			bw_params->clk_table.entries[i].fclk_mhz = def_max.fclk_mhz;
+		if (!bw_params->clk_table.entries[i].phyclk_mhz)
+			bw_params->clk_table.entries[i].phyclk_mhz = def_max.phyclk_mhz;
+		if (!bw_params->clk_table.entries[i].phyclk_d18_mhz)
+			bw_params->clk_table.entries[i].phyclk_d18_mhz = def_max.phyclk_d18_mhz;
+		if (!bw_params->clk_table.entries[i].dtbclk_mhz)
+			bw_params->clk_table.entries[i].dtbclk_mhz = def_max.dtbclk_mhz;
+	}
+	ASSERT(bw_params->clk_table.entries[i-1].dcfclk_mhz);
 	bw_params->vram_type = bios_info->memory_type;
+	bw_params->dram_channel_width_bytes = bios_info->memory_type == 0x22 ? 8 : 4;
 	bw_params->num_channels = bios_info->ma_channel_number ? bios_info->ma_channel_number : 4;
 
 	for (i = 0; i < WM_SET_COUNT; i++) {
@@ -938,10 +1008,10 @@ void dcn35_clk_mgr_construct(
 	}
 	ASSERT(clk_mgr->smu_wm_set.wm_set);
 
-	smu_dpm_clks.dpm_clks = (DpmClocks_t *)dm_helpers_allocate_gpu_mem(
+	smu_dpm_clks.dpm_clks = (DpmClocks_t_dcn35 *)dm_helpers_allocate_gpu_mem(
 				clk_mgr->base.base.ctx,
 				DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
-				sizeof(DpmClocks_t),
+				sizeof(DpmClocks_t_dcn35),
 				&smu_dpm_clks.mc_address.quad_part);
 
 	if (smu_dpm_clks.dpm_clks == NULL) {
@@ -988,14 +1058,16 @@ void dcn35_clk_mgr_construct(
 				   "NumDispClkLevelsEnabled: %d\n"
 				   "NumSocClkLevelsEnabled: %d\n"
 				   "VcnClkLevelsEnabled: %d\n"
-				   "NumDfPst atesEnabled: %d\n"
+				   "FClkLevelsEnabled: %d\n"
+				   "NumMemPstatesEnabled: %d\n"
 				   "MinGfxClk: %d\n"
 				   "MaxGfxClk: %d\n",
 				   smu_dpm_clks.dpm_clks->NumDcfClkLevelsEnabled,
 				   smu_dpm_clks.dpm_clks->NumDispClkLevelsEnabled,
 				   smu_dpm_clks.dpm_clks->NumSocClkLevelsEnabled,
 				   smu_dpm_clks.dpm_clks->VcnClkLevelsEnabled,
-				   smu_dpm_clks.dpm_clks->NumDfPstatesEnabled,
+				   smu_dpm_clks.dpm_clks->NumFclkLevelsEnabled,
+				   smu_dpm_clks.dpm_clks->NumMemPstatesEnabled,
 				   smu_dpm_clks.dpm_clks->MinGfxClk,
 				   smu_dpm_clks.dpm_clks->MaxGfxClk);
 		for (i = 0; i < smu_dpm_clks.dpm_clks->NumDcfClkLevelsEnabled; i++) {
@@ -1011,17 +1083,23 @@ void dcn35_clk_mgr_construct(
 			DC_LOG_SMU("smu_dpm_clks.dpm_clks->SocClocks[%d] = %d\n",
 					   i, smu_dpm_clks.dpm_clks->SocClocks[i]);
 		}
-		for (i = 0; i < NUM_SOC_VOLTAGE_LEVELS; i++)
+		for (i = 0; i < smu_dpm_clks.dpm_clks->NumFclkLevelsEnabled; i++) {
+			DC_LOG_SMU("smu_dpm_clks.dpm_clks->FclkClocks_Freq[%d] = %d\n",
+					   i, smu_dpm_clks.dpm_clks->FclkClocks_Freq[i]);
+			DC_LOG_SMU("smu_dpm_clks.dpm_clks->FclkClocks_Voltage[%d] = %d\n",
+					   i, smu_dpm_clks.dpm_clks->FclkClocks_Voltage[i]);
+		}
+		for (i = 0; i < smu_dpm_clks.dpm_clks->NumSocClkLevelsEnabled; i++)
 			DC_LOG_SMU("smu_dpm_clks.dpm_clks->SocVoltage[%d] = %d\n",
 					   i, smu_dpm_clks.dpm_clks->SocVoltage[i]);
 
-		for (i = 0; i < NUM_DF_PSTATE_LEVELS; i++) {
-			DC_LOG_SMU("smu_dpm_clks.dpm_clks.DfPstateTable[%d].FClk = %d\n"
-					   "smu_dpm_clks.dpm_clks->DfPstateTable[%d].MemClk= %d\n"
-					   "smu_dpm_clks.dpm_clks->DfPstateTable[%d].Voltage = %d\n",
-					   i, smu_dpm_clks.dpm_clks->DfPstateTable[i].FClk,
-					   i, smu_dpm_clks.dpm_clks->DfPstateTable[i].MemClk,
-					   i, smu_dpm_clks.dpm_clks->DfPstateTable[i].Voltage);
+		for (i = 0; i < smu_dpm_clks.dpm_clks->NumMemPstatesEnabled; i++) {
+			DC_LOG_SMU("smu_dpm_clks.dpm_clks.MemPstateTable[%d].UClk = %d\n"
+					   "smu_dpm_clks.dpm_clks->MemPstateTable[%d].MemClk= %d\n"
+					   "smu_dpm_clks.dpm_clks->MemPstateTable[%d].Voltage = %d\n",
+					   i, smu_dpm_clks.dpm_clks->MemPstateTable[i].UClk,
+					   i, smu_dpm_clks.dpm_clks->MemPstateTable[i].MemClk,
+					   i, smu_dpm_clks.dpm_clks->MemPstateTable[i].Voltage);
 		}
 
 		if (ctx->dc_bios && ctx->dc_bios->integrated_info && ctx->dc->config.use_default_clock_table == false) {
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_smu.h +28 -8
index 8fb65a49351b..2b8e6959a03d 100644
@@ -79,7 +79,9 @@ typedef struct {
 #define NUM_SOCCLK_DPM_LEVELS   8
 #define NUM_VCN_DPM_LEVELS      8
 #define NUM_SOC_VOLTAGE_LEVELS  8
-#define NUM_DF_PSTATE_LEVELS    4
+#define NUM_VPE_DPM_LEVELS        8
+#define NUM_FCLK_DPM_LEVELS       8
+#define NUM_MEM_PSTATE_LEVELS     4
 
 typedef enum{
   WCK_RATIO_1_1 = 0,  // DDR5, Wck:ck is always 1:1;
@@ -89,12 +91,12 @@ typedef enum{
 } WCK_RATIO_e;
 
 typedef struct {
-  uint32_t FClk;
+  uint32_t UClk;
   uint32_t MemClk;
   uint32_t Voltage;
   uint8_t  WckRatio;
   uint8_t  Spare[3];
-} DfPstateTable_t;
+} MemPstateTable_t;
 
 //Freq in MHz
 //Voltage in milli volts with 2 fractional bits
@@ -105,19 +107,37 @@ typedef struct {
   uint32_t SocClocks[NUM_SOCCLK_DPM_LEVELS];
   uint32_t VClocks[NUM_VCN_DPM_LEVELS];
   uint32_t DClocks[NUM_VCN_DPM_LEVELS];
+  uint32_t VPEClocks[NUM_VPE_DPM_LEVELS];
+  uint32_t FclkClocks_Freq[NUM_FCLK_DPM_LEVELS];
+  uint32_t FclkClocks_Voltage[NUM_FCLK_DPM_LEVELS];
   uint32_t SocVoltage[NUM_SOC_VOLTAGE_LEVELS];
-  DfPstateTable_t DfPstateTable[NUM_DF_PSTATE_LEVELS];
+  MemPstateTable_t MemPstateTable[NUM_MEM_PSTATE_LEVELS];
 
   uint8_t  NumDcfClkLevelsEnabled;
   uint8_t  NumDispClkLevelsEnabled; //Applies to both Dispclk and Dppclk
   uint8_t  NumSocClkLevelsEnabled;
   uint8_t  VcnClkLevelsEnabled;     //Applies to both Vclk and Dclk
-  uint8_t  NumDfPstatesEnabled;
-  uint8_t  spare[3];
+  uint8_t  VpeClkLevelsEnabled;
+  uint8_t  NumMemPstatesEnabled;
+  uint8_t  NumFclkLevelsEnabled;
+  uint8_t  spare[2];
 
   uint32_t MinGfxClk;
   uint32_t MaxGfxClk;
-} DpmClocks_t;
+} DpmClocks_t_dcn35;
+
+
+// Throttler Status Bitmask
+
+
+
+
+
+
+
+
+
+
 
 #define TABLE_BIOS_IF            0 // Called by BIOS
 #define TABLE_WATERMARKS         1 // Called by DAL through VBIOS
@@ -139,7 +159,7 @@ struct dcn35_watermarks {
 };
 
 struct dcn35_smu_dpm_clks {
-	DpmClocks_t *dpm_clks;
+	DpmClocks_t_dcn35 *dpm_clks;
 	union large_integer mc_address;
 };
 
Signature · 1 line
2.25.1
author
#4 lore raw

PATCH 4/16 drm/amd/display: Modify Vmin default value

In reply to Tom Chung

From: Max Tseng <[email protected]>

Fine tune the Vmin clock value

---
 drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c | 2 +-
 drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c   | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +1 -1
index d8fa229d78ce..64a2692fd4f6 100644
@@ -1914,7 +1914,7 @@ static bool dcn314_resource_construct(
 	dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
 	dc->caps.color.mpc.ocsc = 1;
 
-	dc->caps.max_disp_clock_khz_at_vmin = 694000;
+	dc->caps.max_disp_clock_khz_at_vmin = 650000;
 
 	/* Use pipe context based otg sync logic */
 	dc->config.use_pipe_ctx_sync_logic = true;
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +7 -1
index 693c7ba4b34d..24b455f3ac3c 100644
@@ -1831,7 +1831,13 @@ static bool dcn35_resource_construct(
 	dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
 	dc->caps.color.mpc.ocsc = 1;
 
-	dc->caps.max_disp_clock_khz_at_vmin = 669154;
+	/* max_disp_clock_khz_at_vmin is slightly lower than the STA value in order
+	 * to provide some margin.
+	 * It's expected for furture ASIC to have equal or higher value, in order to
+	 * have determinstic power improvement from generate to genration.
+	 * (i.e., we should not expect new ASIC generation with lower vmin rate)
+	 */
+	dc->caps.max_disp_clock_khz_at_vmin = 650000;
 
 	/* Use pipe context based otg sync logic */
 	dc->config.use_pipe_ctx_sync_logic = true;
Signature · 1 line
2.25.1
author
#5 lore raw

PATCH 5/16 drm/amd/display: Revert "drm/amd/display: remove duplicated edp relink to fastboot"

In reply to Tom Chung

From: Aric Cyr <[email protected]>

Revert commit a0b8a2c85d1b ("drm/amd/display: remove duplicated edp relink to fastboot")

Because it cause 4k EDP not light up on boot

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 59 ++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +59 -0
index 63e97fb0a478..17a36953d3a9 100644
@@ -1213,6 +1213,64 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
 	dc_release_state(current_ctx);
 }
 
+static void disable_vbios_mode_if_required(
+		struct dc *dc,
+		struct dc_state *context)
+{
+	unsigned int i, j;
+
+	/* check if timing_changed, disable stream*/
+	for (i = 0; i < dc->res_pool->pipe_count; i++) {
+		struct dc_stream_state *stream = NULL;
+		struct dc_link *link = NULL;
+		struct pipe_ctx *pipe = NULL;
+
+		pipe = &context->res_ctx.pipe_ctx[i];
+		stream = pipe->stream;
+		if (stream == NULL)
+			continue;
+
+		// only looking for first odm pipe
+		if (pipe->prev_odm_pipe)
+			continue;
+
+		if (stream->link->local_sink &&
+			stream->link->local_sink->sink_signal == SIGNAL_TYPE_EDP) {
+			link = stream->link;
+		}
+
+		if (link != NULL && link->link_enc->funcs->is_dig_enabled(link->link_enc)) {
+			unsigned int enc_inst, tg_inst = 0;
+			unsigned int pix_clk_100hz;
+
+			enc_inst = link->link_enc->funcs->get_dig_frontend(link->link_enc);
+			if (enc_inst != ENGINE_ID_UNKNOWN) {
+				for (j = 0; j < dc->res_pool->stream_enc_count; j++) {
+					if (dc->res_pool->stream_enc[j]->id == enc_inst) {
+						tg_inst = dc->res_pool->stream_enc[j]->funcs->dig_source_otg(
+							dc->res_pool->stream_enc[j]);
+						break;
+					}
+				}
+
+				dc->res_pool->dp_clock_source->funcs->get_pixel_clk_frequency_100hz(
+					dc->res_pool->dp_clock_source,
+					tg_inst, &pix_clk_100hz);
+
+				if (link->link_status.link_active) {
+					uint32_t requested_pix_clk_100hz =
+						pipe->stream_res.pix_clk_params.requested_pix_clk_100hz;
+
+					if (pix_clk_100hz != requested_pix_clk_100hz) {
+						dc->link_srv->set_dpms_off(pipe);
+						pipe->stream->dpms_off = false;
+					}
+				}
+			}
+		}
+	}
+}
+
 static void wait_for_no_pipes_pending(struct dc *dc, struct dc_state *context)
 {
 	int i;
@@ -1782,6 +1840,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
 		dc_streams[i] =  context->streams[i];
 
 	if (!dcb->funcs->is_accelerated_mode(dcb)) {
+		disable_vbios_mode_if_required(dc, context);
 		dc->hwss.enable_accelerated_mode(dc, context);
 	}
 
Signature · 1 line
2.25.1
author
#6 lore raw

PATCH 6/16 drm/amd/display: Update stream mask

In reply to Tom Chung

From: Duncan Ma <[email protected]>

[Why]
Whenever stream changes because of new pipe arrangements such as ODM. The new stream mask is not reflected in DMCUB.

The mismatch in stream mask is blocking ips entry in some scenarios.

[How]
Whenever stream arrangement changes, update stream mask and notify DMCUB.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +7 -0
index 17a36953d3a9..825f275ea9eb 100644
@@ -3561,6 +3561,7 @@ static void commit_planes_for_stream(struct dc *dc,
 	bool should_lock_all_pipes = (update_type != UPDATE_TYPE_FAST);
 	bool subvp_prev_use = false;
 	bool subvp_curr_use = false;
+	uint8_t current_stream_mask = 0;
 
 	// Once we apply the new subvp context to hardware it won't be in the
 	// dc->current_state anymore, so we have to cache it before we apply
@@ -3910,6 +3911,12 @@ static void commit_planes_for_stream(struct dc *dc,
 		if (pipe_ctx->stream_res.tg->funcs->program_manual_trigger)
 			pipe_ctx->stream_res.tg->funcs->program_manual_trigger(pipe_ctx->stream_res.tg);
 	}
+
+	current_stream_mask = get_stream_mask(dc, context);
+	if (current_stream_mask != context->stream_mask) {
+		context->stream_mask = current_stream_mask;
+		dc_dmub_srv_notify_stream_mask(dc->ctx->dmub_srv, current_stream_mask);
+	}
 }
 
 /**
Signature · 1 line
2.25.1
author
#7 lore raw

PATCH 7/16 drm/amd/display: Update dml ssb from pmfw clock table

In reply to Tom Chung

From: Muhammad Ahmed <[email protected]>

[why]
Need to use real clock table

[How]
Update the clock table

---
 .../drm/amd/display/dc/dcn35/dcn35_resource.c |  3 ++-
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  | 24 +------------------
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.h  |  2 --
 3 files changed, 3 insertions(+), 26 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +2 -1
index 24b455f3ac3c..d3cc8f4a82d1 100644
@@ -698,7 +698,7 @@ static const struct dc_debug_options debug_defaults_drv = {
 	.underflow_assert_delay_us = 0xFFFFFFFF,
 	.dwb_fi_phase = -1, // -1 = disable,
 	.dmub_command_table = true,
-	.pstate_enabled = false,
+	.pstate_enabled = true,
 	.use_max_lb = true,
 	.enable_mem_low_power = {
 		.bits = {
@@ -1841,6 +1841,7 @@ static bool dcn35_resource_construct(
 
 	/* Use pipe context based otg sync logic */
 	dc->config.use_pipe_ctx_sync_logic = true;
+	dc->config.use_default_clock_table = false;
 	/* read VBIOS LTTPR caps */
 	{
 		if (ctx->dc_bios->funcs->get_lttpr_caps) {
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +1 -23
index 4d5ee2aad9e4..be345f470b25 100644
@@ -205,29 +205,7 @@ void dcn35_build_wm_range_table_fpu(struct clk_mgr *clk_mgr)
 	//TODO
 }
 
-void dcn35_patch_dpm_table(struct clk_bw_params *bw_params)
-{
-	int i;
-	unsigned int max_dcfclk_mhz = 0, max_dispclk_mhz = 0, max_dppclk_mhz = 0,
-			max_phyclk_mhz = 0, max_dtbclk_mhz = 0, max_fclk_mhz = 0, max_uclk_mhz = 0;
-
-	for (i = 0; i < MAX_NUM_DPM_LVL; i++) {
-		if (bw_params->clk_table.entries[i].dcfclk_mhz > max_dcfclk_mhz)
-			max_dcfclk_mhz = bw_params->clk_table.entries[i].dcfclk_mhz;
-		if (bw_params->clk_table.entries[i].fclk_mhz > max_fclk_mhz)
-			max_fclk_mhz = bw_params->clk_table.entries[i].fclk_mhz;
-		if (bw_params->clk_table.entries[i].memclk_mhz > max_uclk_mhz)
-			max_uclk_mhz = bw_params->clk_table.entries[i].memclk_mhz;
-		if (bw_params->clk_table.entries[i].dispclk_mhz > max_dispclk_mhz)
-			max_dispclk_mhz = bw_params->clk_table.entries[i].dispclk_mhz;
-		if (bw_params->clk_table.entries[i].dppclk_mhz > max_dppclk_mhz)
-			max_dppclk_mhz = bw_params->clk_table.entries[i].dppclk_mhz;
-		if (bw_params->clk_table.entries[i].phyclk_mhz > max_phyclk_mhz)
-			max_phyclk_mhz = bw_params->clk_table.entries[i].phyclk_mhz;
-		if (bw_params->clk_table.entries[i].dtbclk_mhz > max_dtbclk_mhz)
-			max_dtbclk_mhz = bw_params->clk_table.entries[i].dtbclk_mhz;
-	}
-}
+
 /*
  * dcn35_update_bw_bounding_box
  *
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.h +0 -2
index b122ffdcc30a..e8d5a170893e 100644
@@ -34,8 +34,6 @@ void dcn35_build_wm_range_table_fpu(struct clk_mgr *clk_mgr);
 void dcn35_update_bw_bounding_box_fpu(struct dc *dc,
 				      struct clk_bw_params *bw_params);
 
-void dcn35_patch_dpm_table(struct clk_bw_params *bw_params);
-
 int dcn35_populate_dml_pipes_from_context_fpu(struct dc *dc,
 					      struct dc_state *context,
 					      display_e2e_pipe_params_st *pipes,
Signature · 1 line
2.25.1
author
#8 lore raw

PATCH 8/16 drm/amd/display: Update cursor limits based on SW cursor fallback limits

In reply to Tom Chung

From: Alvin Lee <[email protected]>

[Why&How]
For determining the cursor size limit, use the same checks that are used for determining SW cursor fallback instead of only using SubVP

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  8 ++--
 .../gpu/drm/amd/display/dc/core/dc_resource.c | 39 +++++++++++++++++++
 .../gpu/drm/amd/display/dc/core/dc_stream.c   | 34 +---------------
 drivers/gpu/drm/amd/display/dc/inc/resource.h |  3 ++
 4 files changed, 47 insertions(+), 37 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -4
index 825f275ea9eb..623f4ac0bf42 100644
@@ -5436,15 +5436,15 @@ bool dc_abm_save_restore(
 void dc_query_current_properties(struct dc *dc, struct dc_current_properties *properties)
 {
 	unsigned int i;
-	bool subvp_in_use = false;
+	bool subvp_sw_cursor_req = false;
 
 	for (i = 0; i < dc->current_state->stream_count; i++) {
-		if (dc->current_state->streams[i]->mall_stream_config.type != SUBVP_NONE) {
-			subvp_in_use = true;
+		if (check_subvp_sw_cursor_fallback_req(dc, dc->current_state->streams[i])) {
+			subvp_sw_cursor_req = true;
 			break;
 		}
 	}
-	properties->cursor_size_limit = subvp_in_use ? 64 : dc->caps.max_cursor_size;
+	properties->cursor_size_limit = subvp_sw_cursor_req ? 64 : dc->caps.max_cursor_size;
 }
 
 /**
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +39 -0
index aa7b5db83644..3549a9b852a2 100644
@@ -1334,6 +1334,32 @@ static void calculate_inits_and_viewports(struct pipe_ctx *pipe_ctx)
 	data->viewport_c.y += src.y / vpc_div;
 }
 
+static bool is_subvp_high_refresh_candidate(struct dc_stream_state *stream)
+{
+	uint32_t refresh_rate;
+	struct dc *dc = stream->ctx->dc;
+
+	refresh_rate = (stream->timing.pix_clk_100hz * (uint64_t)100 +
+		stream->timing.v_total * stream->timing.h_total - (uint64_t)1);
+	refresh_rate = div_u64(refresh_rate, stream->timing.v_total);
+	refresh_rate = div_u64(refresh_rate, stream->timing.h_total);
+
+	/* If there's any stream that fits the SubVP high refresh criteria,
+	 * we must return true. This is because cursor updates are asynchronous
+	 * with full updates, so we could transition into a SubVP config and
+	 * remain in HW cursor mode if there's no cursor update which will
+	 * then cause corruption.
+	 */
+	if ((refresh_rate >= 120 && refresh_rate <= 175 &&
+			stream->timing.v_addressable >= 1080 &&
+			stream->timing.v_addressable <= 2160) &&
+			(dc->current_state->stream_count > 1 ||
+			(dc->current_state->stream_count == 1 && !stream->allow_freesync)))
+		return true;
+
+	return false;
+}
+
 bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
 {
 	const struct dc_plane_state *plane_state = pipe_ctx->plane_state;
@@ -5101,3 +5127,16 @@ enum dc_status update_dp_encoder_resources_for_test_harness(const struct dc *dc,
 	return DC_OK;
 }
 
+bool check_subvp_sw_cursor_fallback_req(const struct dc *dc, struct dc_stream_state *stream)
+{
+	if (!dc->debug.disable_subvp_high_refresh && is_subvp_high_refresh_candidate(stream))
+		return true;
+	if (dc->current_state->stream_count == 1 && stream->timing.v_addressable >= 2880 &&
+			((stream->timing.pix_clk_100hz * 100) / stream->timing.v_total / stream->timing.h_total) < 120)
+		return true;
+	else if (dc->current_state->stream_count > 1 && stream->timing.v_addressable >= 2160 &&
+			((stream->timing.pix_clk_100hz * 100) / stream->timing.v_total / stream->timing.h_total) < 120)
+		return true;
+
+	return false;
+}
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +1 -33
index ac493dd7fa68..8a6a2881be41 100644
@@ -288,32 +288,6 @@ static void program_cursor_attributes(
 	}
 }
 
-static bool is_subvp_high_refresh_candidate(struct dc_stream_state *stream)
-{
-	uint32_t refresh_rate;
-	struct dc *dc = stream->ctx->dc;
-
-	refresh_rate = (stream->timing.pix_clk_100hz * (uint64_t)100 +
-		stream->timing.v_total * stream->timing.h_total - (uint64_t)1);
-	refresh_rate = div_u64(refresh_rate, stream->timing.v_total);
-	refresh_rate = div_u64(refresh_rate, stream->timing.h_total);
-
-	/* If there's any stream that fits the SubVP high refresh criteria,
-	 * we must return true. This is because cursor updates are asynchronous
-	 * with full updates, so we could transition into a SubVP config and
-	 * remain in HW cursor mode if there's no cursor update which will
-	 * then cause corruption.
-	 */
-	if ((refresh_rate >= 120 && refresh_rate <= 175 &&
-			stream->timing.v_addressable >= 1080 &&
-			stream->timing.v_addressable <= 2160) &&
-			(dc->current_state->stream_count > 1 ||
-			(dc->current_state->stream_count == 1 && !stream->allow_freesync)))
-		return true;
-
-	return false;
-}
-
 /*
  * dc_stream_set_cursor_attributes() - Update cursor attributes and set cursor surface address
  */
@@ -347,13 +321,7 @@ bool dc_stream_set_cursor_attributes(
 	 * 3. If not subvp high refresh, for multi display cases, if resolution is >= 4K and refresh rate < 120hz
 	 */
 	if (dc->debug.allow_sw_cursor_fallback && attributes->height * attributes->width * 4 > 16384) {
-		if (!dc->debug.disable_subvp_high_refresh && is_subvp_high_refresh_candidate(stream))
-			return false;
-		if (dc->current_state->stream_count == 1 && stream->timing.v_addressable >= 2880 &&
-				((stream->timing.pix_clk_100hz * 100) / stream->timing.v_total / stream->timing.h_total) < 120)
-			return false;
-		else if (dc->current_state->stream_count > 1 && stream->timing.v_addressable >= 2160 &&
-				((stream->timing.pix_clk_100hz * 100) / stream->timing.v_total / stream->timing.h_total) < 120)
+		if (check_subvp_sw_cursor_fallback_req(dc, stream))
 			return false;
 	}
 
drivers/gpu/drm/amd/display/dc/inc/resource.h +3 -0
index 00230a7fbe25..67d1ec0f3c68 100644
@@ -604,4 +604,7 @@ bool dc_resource_acquire_secondary_pipe_for_mpc_odm_legacy(
 enum dc_status update_dp_encoder_resources_for_test_harness(const struct dc *dc,
 		struct dc_state *context,
 		struct pipe_ctx *pipe_ctx);
+
+bool check_subvp_sw_cursor_fallback_req(const struct dc *dc, struct dc_stream_state *stream);
+
 #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_RESOURCE_H_ */
Signature · 1 line
2.25.1
author
#9 lore raw

PATCH 9/16 drm/amd/display: Don't use fsleep for PSR exit waits

In reply to Tom Chung

From: Nicholas Kazlauskas <[email protected]>

[Why]
These functions can be called from high IRQ levels and the OS will hang if it tries to use a usleep_highres or a msleep.

[How]
Replace the fsleep with a udelay.

---
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 ++-
 drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +2 -1
index b87bfecb7755..a8e79104b684 100644
@@ -586,7 +586,8 @@ static void dcn10_dmcu_set_psr_enable(struct dmcu *dmcu, bool enable, bool wait)
 				if (state == PSR_STATE0)
 					break;
 			}
-			fsleep(500);
+			/* must *not* be fsleep - this can be called from high irq levels */
+			udelay(500);
 		}
 
 		/* assert if max retry hit */
drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +2 -1
index f27cc8f9d0aa..9d4170a356a2 100644
@@ -217,7 +217,8 @@ static void dmub_psr_enable(struct dmub_psr *dmub, bool enable, bool wait, uint8
 					break;
 			}
 
-			fsleep(500);
+			/* must *not* be fsleep - this can be called from high irq levels */
+			udelay(500);
 		}
 
 		/* assert if max retry hit */
Signature · 1 line
2.25.1
author
#10 lore raw

PATCH 10/16 drm/amd/display: Make DCN3x use older FPO sequence

In reply to Tom Chung

From: Alvin Lee <[email protected]>

[Why]
Latest FPO sequence is causing intermittent hangs

[How]
Update the FPO sequence

---
 .../drm/amd/display/dc/dcn30/dcn30_hwseq.c    | 21 -------------------
 .../drm/amd/display/dc/dcn32/dcn32_hwseq.c    | 12 +++++++++++
 .../drm/amd/display/dc/dcn32/dcn32_hwseq.h    |  3 +++
 .../gpu/drm/amd/display/dc/dcn32/dcn32_init.c |  2 +-
 4 files changed, 16 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +0 -21
index af9a9fc7db48..b6d88266e8ab 100644
@@ -997,14 +997,6 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc,
 void dcn30_prepare_bandwidth(struct dc *dc,
 	struct dc_state *context)
 {
-	bool p_state_change_support = context->bw_ctx.bw.dcn.clk.p_state_change_support;
-	/* Any transition into an FPO config should disable MCLK switching first to avoid
-	 * driver and FW P-State synchronization issues.
-	 */
-	if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching || dc->clk_mgr->clks.fw_based_mclk_switching) {
-		dc->optimized_required = true;
-		context->bw_ctx.bw.dcn.clk.p_state_change_support = false;
-	}
 
 	if (dc->clk_mgr->dc_mode_softmax_enabled)
 		if (dc->clk_mgr->clks.dramclk_khz <= dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000 &&
@@ -1012,20 +1004,7 @@ void dcn30_prepare_bandwidth(struct dc *dc,
 			dc->clk_mgr->funcs->set_max_memclk(dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries - 1].memclk_mhz);
 
 	dcn20_prepare_bandwidth(dc, context);
-	/*
-	 * enabled -> enabled: do not disable
-	 * enabled -> disabled: disable
-	 * disabled -> enabled: don't care
-	 * disabled -> disabled: don't care
-	 */
-	if (!context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching)
-		dc_dmub_srv_p_state_delegate(dc, false, context);
 
-	if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching || dc->clk_mgr->clks.fw_based_mclk_switching) {
-		/* After disabling P-State, restore the original value to ensure we get the correct P-State
-		 * on the next optimize. */
-		context->bw_ctx.bw.dcn.clk.p_state_change_support = p_state_change_support;
-	}
 }
 
 void dcn30_set_static_screen_control(struct pipe_ctx **pipe_ctx,
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +12 -0
index 45b557d8e089..67687e45f031 100644
@@ -50,6 +50,7 @@
 #include "dce/dmub_hw_lock_mgr.h"
 #include "dcn32_resource.h"
 #include "link.h"
+#include "../dcn20/dcn20_hwseq.h"
 
 #define DC_LOGGER_INIT(logger)
 
@@ -1676,3 +1677,14 @@ bool dcn32_is_pipe_topology_transition_seamless(struct dc *dc,
 
 	return is_seamless;
 }
+
+void dcn32_prepare_bandwidth(struct dc *dc,
+	struct dc_state *context)
+{
+	if (dc->clk_mgr->dc_mode_softmax_enabled)
+		if (dc->clk_mgr->clks.dramclk_khz <= dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000 &&
+				context->bw_ctx.bw.dcn.clk.dramclk_khz > dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000)
+			dc->clk_mgr->funcs->set_max_memclk(dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries - 1].memclk_mhz);
+
+	dcn20_prepare_bandwidth(dc, context);
+}
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h +3 -0
index 9992e40acd21..cecf7f0f5671 100644
@@ -124,4 +124,7 @@ bool dcn32_is_pipe_topology_transition_seamless(struct dc *dc,
 		const struct dc_state *cur_ctx,
 		const struct dc_state *new_ctx);
 
+void dcn32_prepare_bandwidth(struct dc *dc,
+	struct dc_state *context);
+
 #endif /* __DC_HWSS_DCN32_H__ */
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c +1 -1
index 6e7f6df1d423..04309412b087 100644
@@ -60,7 +60,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = {
 	.pipe_control_lock = dcn20_pipe_control_lock,
 	.interdependent_update_lock = dcn10_lock_all_pipes,
 	.cursor_lock = dcn10_cursor_lock,
-	.prepare_bandwidth = dcn30_prepare_bandwidth,
+	.prepare_bandwidth = dcn32_prepare_bandwidth,
 	.optimize_bandwidth = dcn20_optimize_bandwidth,
 	.update_bandwidth = dcn20_update_bandwidth,
 	.set_drr = dcn10_set_drr,
Signature · 1 line
2.25.1
author
#11 lore raw

PATCH 11/16 drm/amd/display: Revert "drm/amd/display: Add a check for idle power optimization"

In reply to Tom Chung

From: Sung Joon Kim <[email protected]>

Revert commit 0ca0151b9902 ("drm/amd/display: Add a check for idle power optimization") Because it cause Freesync and S4 regression

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      | 20 +------------------
 drivers/gpu/drm/amd/display/dc/dc.h           |  1 -
 .../gpu/drm/amd/display/dmub/src/dmub_srv.c   |  1 -
 3 files changed, 1 insertion(+), 21 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -19
index 623f4ac0bf42..bd4834f921c1 100644
@@ -4872,8 +4872,7 @@ bool dc_set_psr_allow_active(struct dc *dc, bool enable)
 
 void dc_allow_idle_optimizations(struct dc *dc, bool allow)
 {
-	if (dc->debug.disable_idle_power_optimizations ||
-		(dc->caps.ips_support && dc->config.disable_ips))
+	if (dc->debug.disable_idle_power_optimizations)
 		return;
 
 	if (dc->clk_mgr != NULL && dc->clk_mgr->funcs->is_smu_present)
@@ -4887,23 +4886,6 @@ void dc_allow_idle_optimizations(struct dc *dc, bool allow)
 		dc->idle_optimizations_allowed = allow;
 }
 
-bool dc_is_idle_power_optimized(struct dc *dc)
-{
-	uint32_t idle_state = 0;
-
-	if (dc->debug.disable_idle_power_optimizations)
-		return false;
-
-	if (dc->hwss.get_idle_state)
-		idle_state = dc->hwss.get_idle_state(dc);
-
-	if ((idle_state & DMUB_IPS1_ALLOW_MASK) ||
-		(idle_state & DMUB_IPS2_ALLOW_MASK))
-		return true;
-
-	return false;
-}
-
 /* set min and max memory clock to lowest and highest DPM level, respectively */
 void dc_unlock_memory_clock_frequency(struct dc *dc)
 {
drivers/gpu/drm/amd/display/dc/dc.h +0 -1
index 6c51ebf5bbad..41c77910f046 100644
@@ -2359,7 +2359,6 @@ bool dc_is_plane_eligible_for_idle_optimizations(struct dc *dc, struct dc_plane_
 				struct dc_cursor_attributes *cursor_attr);
 
 void dc_allow_idle_optimizations(struct dc *dc, bool allow);
-bool dc_is_idle_power_optimized(struct dc *dc);
 
 /* set min and max memory clock to lowest and highest DPM level, respectively */
 void dc_unlock_memory_clock_frequency(struct dc *dc);
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +0 -1
index e43e8d4bfe37..b99db771e071 100644
@@ -352,7 +352,6 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
 			funcs->init_reg_offsets = dmub_srv_dcn35_regs_init;
 
 			funcs->is_hw_powered_up = dmub_dcn35_is_hw_powered_up;
-			funcs->should_detect = dmub_dcn35_should_detect;
 			break;
 
 	default:
Signature · 1 line
2.25.1
author
#12 lore raw

PATCH 12/16 drm/amd/display: Refactor HWSS into component folder

In reply to Tom Chung

From: Mounika Adhuri <[email protected]>

[why]
Rename hw_sequencer to hwseq.
Move all hwseq files to unique
folder hwss.

[how]
creating hwss repo in dc, and moved the dcnxx_hwseq.c and .h files into corresponding new folders inside the hwss and cleared the linkage errors by adding relative paths in the Makefile.template.

---
 drivers/gpu/drm/amd/display/Makefile          |   1 +
 drivers/gpu/drm/amd/display/dc/Makefile       |   2 +-
 .../dc/clk_mgr/dce120/dce120_clk_mgr.c        |   2 +-
 drivers/gpu/drm/amd/display/dc/dc.h           |   2 +-
 drivers/gpu/drm/amd/display/dc/dce/Makefile   |   2 +-
 .../gpu/drm/amd/display/dc/dce100/Makefile    |   2 +-
 .../amd/display/dc/dce100/dce100_resource.c   |   4 +-
 .../gpu/drm/amd/display/dc/dce110/Makefile    |   2 +-
 .../amd/display/dc/dce110/dce110_resource.c   |   2 +-
 .../gpu/drm/amd/display/dc/dce112/Makefile    |   2 +-
 .../amd/display/dc/dce112/dce112_resource.c   |   2 +-
 .../gpu/drm/amd/display/dc/dce120/Makefile    |   1 -
 .../amd/display/dc/dce120/dce120_resource.c   |   6 +-
 .../amd/display/dc/dce60/dce60_hw_sequencer.c |   4 +-
 drivers/gpu/drm/amd/display/dc/dce80/Makefile |   2 +-
 .../drm/amd/display/dc/dce80/dce80_resource.c |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn10/Makefile |   2 +-
 .../dc/dcn10/dcn10_hw_sequencer_debug.c       |   4 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_init.c |   4 +-
 .../drm/amd/display/dc/dcn10/dcn10_resource.c |   4 +-
 drivers/gpu/drm/amd/display/dc/dcn20/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn20/dcn20_init.c |   6 +-
 .../drm/amd/display/dc/dcn20/dcn20_resource.c |   4 +-
 .../gpu/drm/amd/display/dc/dcn201/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn201/dcn201_init.c   |   6 +-
 .../amd/display/dc/dcn201/dcn201_resource.c   |   4 +-
 drivers/gpu/drm/amd/display/dc/dcn21/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn21/dcn21_init.c |   6 +-
 .../drm/amd/display/dc/dcn21/dcn21_resource.c |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn30/Makefile |   1 -
 .../gpu/drm/amd/display/dc/dcn30/dcn30_init.c |   6 +-
 .../drm/amd/display/dc/dcn30/dcn30_resource.c |   2 +-
 .../gpu/drm/amd/display/dc/dcn301/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn301/dcn301_init.c   |   6 +-
 .../amd/display/dc/dcn301/dcn301_resource.c   |   2 +-
 .../gpu/drm/amd/display/dc/dcn302/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn302/dcn302_init.c   |   2 +-
 .../gpu/drm/amd/display/dc/dcn303/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn303/dcn303_init.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn31/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn31/dcn31_init.c |   4 +-
 .../drm/amd/display/dc/dcn31/dcn31_resource.c |   2 +-
 .../gpu/drm/amd/display/dc/dcn314/Makefile    |   2 +-
 .../drm/amd/display/dc/dcn314/dcn314_init.c   |   4 +-
 .../amd/display/dc/dcn314/dcn314_resource.c   |   2 +-
 .../amd/display/dc/dcn315/dcn315_resource.c   |   2 +-
 .../amd/display/dc/dcn316/dcn316_resource.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn32/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn32/dcn32_init.c |   6 +-
 .../drm/amd/display/dc/dcn32/dcn32_resource.c |   2 +-
 .../amd/display/dc/dcn321/dcn321_resource.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/dcn35/Makefile |   2 +-
 .../gpu/drm/amd/display/dc/dcn35/dcn35_init.c |   4 +-
 .../drm/amd/display/dc/dcn35/dcn35_resource.c |   4 +-
 drivers/gpu/drm/amd/display/dc/hwss/Makefile  | 183 ++++++++++++++++++
 .../amd/display/dc/{ => hwss}/dce/dce_hwseq.c |   0
 .../amd/display/dc/{ => hwss}/dce/dce_hwseq.h |   0
 .../dce100/dce100_hwseq.c}                    |   4 +-
 .../dce100/dce100_hwseq.h}                    |   0
 .../dce110/dce110_hwseq.c}                    |   8 +-
 .../dce110/dce110_hwseq.h}                    |   0
 .../dce112/dce112_hwseq.c}                    |   4 +-
 .../dce112/dce112_hwseq.h}                    |   0
 .../dce120/dce120_hwseq.c}                    |   4 +-
 .../dce120/dce120_hwseq.h}                    |   0
 .../dce80/dce80_hwseq.c}                      |   6 +-
 .../dce80/dce80_hwseq.h}                      |   0
 .../dcn10/dcn10_hwseq.c}                      |  16 +-
 .../dcn10/dcn10_hwseq.h}                      |   0
 .../display/dc/{ => hwss}/dcn20/dcn20_hwseq.c |   6 +-
 .../display/dc/{ => hwss}/dcn20/dcn20_hwseq.h |   0
 .../dc/{ => hwss}/dcn201/dcn201_hwseq.c       |   2 +-
 .../dc/{ => hwss}/dcn201/dcn201_hwseq.h       |   0
 .../display/dc/{ => hwss}/dcn21/dcn21_hwseq.c |   2 +-
 .../display/dc/{ => hwss}/dcn21/dcn21_hwseq.h |   0
 .../display/dc/{ => hwss}/dcn30/dcn30_hwseq.c |  10 +-
 .../display/dc/{ => hwss}/dcn30/dcn30_hwseq.h |   0
 .../dc/{ => hwss}/dcn301/dcn301_hwseq.c       |   0
 .../dc/{ => hwss}/dcn301/dcn301_hwseq.h       |   0
 .../dc/{ => hwss}/dcn302/dcn302_hwseq.c       |   0
 .../dc/{ => hwss}/dcn302/dcn302_hwseq.h       |   0
 .../dc/{ => hwss}/dcn303/dcn303_hwseq.c       |   0
 .../dc/{ => hwss}/dcn303/dcn303_hwseq.h       |   0
 .../display/dc/{ => hwss}/dcn31/dcn31_hwseq.c |   2 +-
 .../display/dc/{ => hwss}/dcn31/dcn31_hwseq.h |   0
 .../dc/{ => hwss}/dcn314/dcn314_hwseq.c       |   2 +-
 .../dc/{ => hwss}/dcn314/dcn314_hwseq.h       |   0
 .../display/dc/{ => hwss}/dcn32/dcn32_hwseq.c |   2 +-
 .../display/dc/{ => hwss}/dcn32/dcn32_hwseq.h |   0
 .../display/dc/{ => hwss}/dcn35/dcn35_hwseq.c |   2 +-
 .../display/dc/{ => hwss}/dcn35/dcn35_hwseq.h |   0
 .../display/dc/{inc => hwss}/hw_sequencer.h   |   4 +-
 .../dc/{inc => hwss}/hw_sequencer_private.h   |   0
 93 files changed, 297 insertions(+), 115 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/hwss/Makefile
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dce/dce_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dce/dce_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce100/dce100_hw_sequencer.c => hwss/dce100/dce100_hwseq.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{dce100/dce100_hw_sequencer.h => hwss/dce100/dce100_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce110/dce110_hw_sequencer.c => hwss/dce110/dce110_hwseq.c} (99%)
 rename drivers/gpu/drm/amd/display/dc/{dce110/dce110_hw_sequencer.h => hwss/dce110/dce110_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce112/dce112_hw_sequencer.c => hwss/dce112/dce112_hwseq.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{dce112/dce112_hw_sequencer.h => hwss/dce112/dce112_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce120/dce120_hw_sequencer.c => hwss/dce120/dce120_hwseq.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{dce120/dce120_hw_sequencer.h => hwss/dce120/dce120_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dce80/dce80_hw_sequencer.c => hwss/dce80/dce80_hwseq.c} (94%)
 rename drivers/gpu/drm/amd/display/dc/{dce80/dce80_hw_sequencer.h => hwss/dce80/dce80_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{dcn10/dcn10_hw_sequencer.c => hwss/dcn10/dcn10_hwseq.c} (99%)
 rename drivers/gpu/drm/amd/display/dc/{dcn10/dcn10_hw_sequencer.h => hwss/dcn10/dcn10_hwseq.h} (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn20/dcn20_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn20/dcn20_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn201/dcn201_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn201/dcn201_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn21/dcn21_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn21/dcn21_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn30/dcn30_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn30/dcn30_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn301/dcn301_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn301/dcn301_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn302/dcn302_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn302/dcn302_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn303/dcn303_hwseq.c (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn303/dcn303_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn31/dcn31_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn31/dcn31_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn314/dcn314_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn314/dcn314_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn32/dcn32_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn32/dcn32_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn35/dcn35_hwseq.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => hwss}/dcn35/dcn35_hwseq.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{inc => hwss}/hw_sequencer.h (99%)
 rename drivers/gpu/drm/amd/display/dc/{inc => hwss}/hw_sequencer_private.h (100%)
drivers/gpu/drm/amd/display/Makefile +1 -0
index 0d610cb376bb..af17ab8027df 100644
@@ -29,6 +29,7 @@ AMDDALPATH = $(RELATIVE_AMD_DISPLAY_PATH)
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/inc/hw
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/clk_mgr
+subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/hwss
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/inc
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/freesync
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/color
drivers/gpu/drm/amd/display/dc/Makefile +1 -1
index 2f3d9602b7a0..393ee26cfcd0 100644
@@ -22,7 +22,7 @@
 #
 # Makefile for Display Core (dc) component.
 
-DC_LIBS = basics bios dml clk_mgr dce gpio irq link virtual dsc
+DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc
 
 ifdef CONFIG_DRM_AMD_DC_FP
 
drivers/gpu/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c +1 -1
index 5399b8cf6b75..c9ba7b3fd2c3 100644
@@ -30,7 +30,7 @@
 #include "dce110/dce110_clk_mgr.h"
 #include "dce120_clk_mgr.h"
 #include "dce100/dce_clk_mgr.h"
-#include "dce120/dce120_hw_sequencer.h"
+#include "dce120/dce120_hwseq.h"
 
 static const struct state_dependent_clocks dce120_max_clks_by_state[] = {
 /*ClocksStateInvalid - should not be used*/
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
index 41c77910f046..0b9384707106 100644
@@ -35,7 +35,7 @@
 #include "grph_object_ctrl_defs.h"
 #include <inc/hw/opp.h>
 
-#include "inc/hw_sequencer.h"
+#include "hwss/hw_sequencer.h"
 #include "inc/compressor.h"
 #include "inc/hw/dmcu.h"
 #include "dml/display_mode_lib.h"
drivers/gpu/drm/amd/display/dc/dce/Makefile +1 -1
index 15b64c26d5a2..986e0e7abbc2 100644
@@ -26,7 +26,7 @@
 #   - register programming through common macros that look up register 
 #     offset/shift/mask stored in dce_hw struct
 
-DCE = dce_audio.o dce_stream_encoder.o dce_link_encoder.o dce_hwseq.o \
+DCE = dce_audio.o dce_stream_encoder.o dce_link_encoder.o \
 dce_mem_input.o dce_clock_source.o dce_scl_filters.o dce_transform.o \
 dce_opp.o dce_dmcu.o dce_abm.o dce_ipp.o dce_aux.o \
 dce_i2c.o dce_i2c_hw.o dce_i2c_sw.o dmub_psr.o dmub_abm.o dmub_abm_lcd.o dce_panel_cntl.o \
drivers/gpu/drm/amd/display/dc/dce100/Makefile +1 -1
index ff20c47f559e..0d2f6bbf7558 100644
@@ -25,7 +25,7 @@
 
 CFLAGS_$(AMDDALPATH)/dc/dce100/dce100_resource.o = $(call cc-disable-warning, override-init)
 
-DCE100 = dce100_resource.o dce100_hw_sequencer.o
+DCE100 = dce100_resource.o
 
 AMD_DAL_DCE100 = $(addprefix $(AMDDALPATH)/dc/dce100/,$(DCE100))
 
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +2 -2
index 899b25b0bad8..53a5f4cb648c 100644
@@ -30,7 +30,7 @@
 
 #include "resource.h"
 #include "include/irq_service_interface.h"
-#include "../virtual/virtual_stream_encoder.h"
+#include "virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dce110/dce110_timing_generator.h"
 #include "irq/dce110/irq_service_dce110.h"
@@ -43,7 +43,7 @@
 #include "dce/dce_clock_source.h"
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
-#include "dce100/dce100_hw_sequencer.h"
+#include "dce100/dce100_hwseq.h"
 #include "dce/dce_panel_cntl.h"
 
 #include "reg_helper.h"
drivers/gpu/drm/amd/display/dc/dce110/Makefile +1 -1
index 84ab48df0c26..695a50ed5ad2 100644
@@ -26,7 +26,7 @@
 CFLAGS_$(AMDDALPATH)/dc/dce110/dce110_resource.o = $(call cc-disable-warning, override-init)
 
 DCE110 = dce110_timing_generator.o \
-dce110_compressor.o dce110_hw_sequencer.o dce110_resource.o \
+dce110_compressor.o dce110_resource.o \
 dce110_opp_regamma_v.o dce110_opp_csc_v.o dce110_timing_generator_v.o \
 dce110_mem_input_v.o dce110_opp_v.o dce110_transform_v.o
 
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +1 -1
index 1289b9418877..fe518fd27b08 100644
@@ -46,7 +46,7 @@
 #include "dce110/dce110_opp_v.h"
 #include "dce/dce_clock_source.h"
 #include "dce/dce_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dce/dce_aux.h"
 #include "dce/dce_abm.h"
 #include "dce/dce_dmcu.h"
drivers/gpu/drm/amd/display/dc/dce112/Makefile +1 -1
index 9de6501702d2..e846ef58cab3 100644
@@ -25,7 +25,7 @@
 
 CFLAGS_$(AMDDALPATH)/dc/dce112/dce112_resource.o = $(call cc-disable-warning, override-init)
 
-DCE112 = dce112_compressor.o dce112_hw_sequencer.o \
+DCE112 = dce112_compressor.o \
 dce112_resource.o
 
 AMD_DAL_DCE112 = $(addprefix $(AMDDALPATH)/dc/dce112/,$(DCE112))
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c +1 -1
index 2b20180f1a32..d1edac46c9a0 100644
@@ -44,7 +44,7 @@
 #include "dce/dce_clock_source.h"
 
 #include "dce/dce_hwseq.h"
-#include "dce112/dce112_hw_sequencer.h"
+#include "dce112/dce112_hwseq.h"
 #include "dce/dce_abm.h"
 #include "dce/dce_dmcu.h"
 #include "dce/dce_aux.h"
drivers/gpu/drm/amd/display/dc/dce120/Makefile +0 -1
index a9cc4b73270b..097cf407a15d 100644
@@ -27,7 +27,6 @@
 CFLAGS_$(AMDDALPATH)/dc/dce120/dce120_resource.o = $(call cc-disable-warning, override-init)
 
 DCE120 = dce120_resource.o dce120_timing_generator.o \
-dce120_hw_sequencer.o
 
 AMD_DAL_DCE120 = $(addprefix $(AMDDALPATH)/dc/dce120/,$(DCE120))
 
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c +3 -3
index 18c5a86d2d61..962de79be169 100644
@@ -35,7 +35,7 @@
 #include "dce112/dce112_resource.h"
 
 #include "dce110/dce110_resource.h"
-#include "../virtual/virtual_stream_encoder.h"
+#include "virtual/virtual_stream_encoder.h"
 #include "dce120_timing_generator.h"
 #include "irq/dce120/irq_service_dce120.h"
 #include "dce/dce_opp.h"
@@ -44,8 +44,8 @@
 #include "dce/dce_mem_input.h"
 #include "dce/dce_panel_cntl.h"
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dce120/dce120_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dce120/dce120_hwseq.h"
 #include "dce/dce_transform.h"
 #include "clk_mgr.h"
 #include "dce/dce_audio.h"
drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c +2 -2
index 920c7ae29d53..1fdeef47e4dc 100644
@@ -29,8 +29,8 @@
 #include "dce60_hw_sequencer.h"
 
 #include "dce/dce_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
-#include "dce100/dce100_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dce100/dce100_hwseq.h"
 
 /* include DCE6 register header files */
 #include "dce/dce_6_0_d.h"
drivers/gpu/drm/amd/display/dc/dce80/Makefile +1 -1
index 0a9d1a350d8b..93dd68c31275 100644
@@ -25,7 +25,7 @@
 
 CFLAGS_$(AMDDALPATH)/dc/dce80/dce80_resource.o = $(call cc-disable-warning, override-init)
 
-DCE80 = dce80_timing_generator.o dce80_hw_sequencer.o \
+DCE80 = dce80_timing_generator.o \
 	dce80_resource.o
 
 AMD_DAL_DCE80 = $(addprefix $(AMDDALPATH)/dc/dce80/,$(DCE80))
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +1 -1
index 061221394ce0..35a2cce0c2b8 100644
@@ -46,7 +46,7 @@
 #include "dce/dce_clock_source.h"
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
-#include "dce80/dce80_hw_sequencer.h"
+#include "dce80/dce80_hwseq.h"
 #include "dce100/dce100_resource.h"
 #include "dce/dce_panel_cntl.h"
 
drivers/gpu/drm/amd/display/dc/dcn10/Makefile +1 -1
index 62ad1a11bff9..2d2007c3e2b6 100644
@@ -22,7 +22,7 @@
 #
 # Makefile for DCN.
 
-DCN10 = dcn10_init.o dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \
+DCN10 = dcn10_init.o dcn10_resource.o dcn10_ipp.o \
 		dcn10_hw_sequencer_debug.o \
 		dcn10_dpp.o dcn10_opp.o dcn10_optc.o \
 		dcn10_hubp.o dcn10_mpc.o \
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c +2 -2
index 46a2ebcabd1a..92fdab731f4a 100644
@@ -27,8 +27,8 @@
 #include "core_types.h"
 #include "resource.h"
 #include "custom_float.h"
-#include "dcn10_hw_sequencer.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dcn10/dcn10_hwseq.h"
+#include "dce110/dce110_hwseq.h"
 #include "dce/dce_hwseq.h"
 #include "abm.h"
 #include "dmcu.h"
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c +2 -2
index f2371c948822..a5bdac79a744 100644
@@ -24,8 +24,8 @@
  */
 
 #include "hw_sequencer_private.h"
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
 
 static const struct hw_sequencer_funcs dcn10_funcs = {
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +2 -2
index 9f9145742f14..d1d8e904346e 100644
@@ -36,8 +36,8 @@
 #include "irq/dcn10/irq_service_dcn10.h"
 #include "dcn10_dpp.h"
 #include "dcn10_optc.h"
-#include "dcn10_hw_sequencer.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dcn10/dcn10_hwseq.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn10_opp.h"
 #include "dcn10_link_encoder.h"
 #include "dcn10_stream_encoder.h"
drivers/gpu/drm/amd/display/dc/dcn20/Makefile +1 -1
index abaed2121feb..d7dc9696a8c8 100644
@@ -2,7 +2,7 @@
 #
 # Makefile for DCN.
 
-DCN20 = dcn20_resource.o dcn20_init.o dcn20_hwseq.o dcn20_dpp.o dcn20_dpp_cm.o dcn20_hubp.o \
+DCN20 = dcn20_resource.o dcn20_init.o dcn20_dpp.o dcn20_dpp_cm.o dcn20_hubp.o \
 		dcn20_mpc.o dcn20_opp.o dcn20_hubbub.o dcn20_optc.o dcn20_mmhubbub.o \
 		dcn20_stream_encoder.o dcn20_link_encoder.o dcn20_dccg.o \
 		dcn20_vmid.o dcn20_dwb.o dcn20_dwb_scl.o
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c +3 -3
index 15b66ed66ad6..884e3e323338 100644
@@ -23,9 +23,9 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
-#include "dcn20_hwseq.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
+#include "dcn20/dcn20_hwseq.h"
 
 #include "dcn20_init.h"
 
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +2 -2
index 2820393d5c6f..71ced2b6f3de 100644
@@ -45,8 +45,8 @@
 #include "irq/dcn20/irq_service_dcn20.h"
 #include "dcn20_dpp.h"
 #include "dcn20_optc.h"
-#include "dcn20_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dcn20/dcn20_hwseq.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn10/dcn10_resource.h"
 #include "dcn20_opp.h"
 
drivers/gpu/drm/amd/display/dc/dcn201/Makefile +1 -1
index 5c9ce2cebb0f..3a41a97b0729 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: MIT
 #
 # Makefile for DCN.
-DCN201 = dcn201_init.o dcn201_resource.o dcn201_hwseq.o \
+DCN201 = dcn201_init.o dcn201_resource.o \
 	dcn201_hubbub.o\
 	dcn201_mpc.o dcn201_hubp.o dcn201_opp.o dcn201_optc.o dcn201_dpp.o \
 	dcn201_dccg.o dcn201_link_encoder.o
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_init.c +3 -3
index 92dd4cddbab8..a13bf6c9386e 100644
@@ -23,10 +23,10 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
-#include "dcn201_hwseq.h"
+#include "dcn201/dcn201_hwseq.h"
 #include "dcn201_init.h"
 
 static const struct hw_sequencer_funcs dcn201_funcs = {
drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c +2 -2
index 9389bd8df42b..a11b2f6afe4a 100644
@@ -43,8 +43,8 @@
 #include "dcn201/dcn201_hubbub.h"
 #include "dcn201_dccg.h"
 #include "dcn201_optc.h"
-#include "dcn201_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dcn201/dcn201_hwseq.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn201_opp.h"
 #include "dcn201/dcn201_link_encoder.h"
 #include "dcn20/dcn20_stream_encoder.h"
drivers/gpu/drm/amd/display/dc/dcn21/Makefile +1 -1
index 0dc06e428999..ce1be0afae4a 100644
@@ -3,7 +3,7 @@
 # Makefile for DCN21.
 
 DCN21 = dcn21_init.o dcn21_hubp.o dcn21_hubbub.o dcn21_resource.o \
-	 dcn21_hwseq.o dcn21_link_encoder.o dcn21_dccg.o
+	 dcn21_link_encoder.o dcn21_dccg.o
 
 AMD_DAL_DCN21 = $(addprefix $(AMDDALPATH)/dc/dcn21/,$(DCN21))
 
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c +3 -3
index 647e666f692a..18249c6b6d81 100644
@@ -23,10 +23,10 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
-#include "dcn21_hwseq.h"
+#include "dcn21/dcn21_hwseq.h"
 
 #include "dcn21_init.h"
 
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c +1 -1
index 71e82692dd7c..f30ad4c4f407 100644
@@ -49,7 +49,7 @@
 #include "dcn20/dcn20_dpp.h"
 #include "dcn20/dcn20_optc.h"
 #include "dcn21/dcn21_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn20/dcn20_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn21/dcn21_link_encoder.h"
drivers/gpu/drm/amd/display/dc/dcn30/Makefile +0 -1
index 4a3e9e47b6b6..af4d2065d2c1 100644
@@ -30,7 +30,6 @@ DCN30 := \
 	dcn30_dpp.o \
 	dcn30_optc.o \
 	dcn30_dccg.o \
-	dcn30_hwseq.o \
 	dcn30_mpc.o dcn30_vpg.o \
 	dcn30_afmt.o \
 	dcn30_dio_stream_encoder.o \
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_init.c +3 -3
index e56fca60a1ed..9894caedffed 100644
@@ -23,11 +23,11 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn21/dcn21_hwseq.h"
-#include "dcn30_hwseq.h"
+#include "dcn30/dcn30_hwseq.h"
 
 #include "dcn30_init.h"
 
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c +1 -1
index 9f3c8626c0b2..473581cff06b 100644
@@ -44,7 +44,7 @@
 #include "dcn30/dcn30_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn301/Makefile +1 -1
index 9002cb10a6ae..30fbc5e06dca 100644
@@ -11,7 +11,7 @@
 # Makefile for dcn30.
 
 DCN301 = dcn301_init.o dcn301_resource.o dcn301_dccg.o \
-		dcn301_dio_link_encoder.o dcn301_hwseq.o dcn301_panel_cntl.o dcn301_hubbub.o \
+		dcn301_dio_link_encoder.o dcn301_panel_cntl.o dcn301_hubbub.o \
 		dcn301_optc.o
 
 AMD_DAL_DCN301 = $(addprefix $(AMDDALPATH)/dc/dcn301/,$(DCN301))
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_init.c +3 -3
index fdbe3d42cd7b..6477009ce065 100644
@@ -23,12 +23,12 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn21/dcn21_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dcn301_hwseq.h"
+#include "dcn301/dcn301_hwseq.h"
 
 #include "dcn301_init.h"
 
drivers/gpu/drm/amd/display/dc/dcn301/dcn301_resource.c +1 -1
index 6d2f99c1fcd5..b4b3b52990b9 100644
@@ -45,7 +45,7 @@
 #include "dcn301/dcn301_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn302/Makefile +1 -1
index ebd01cb467b7..95b66baf39e9 100644
@@ -5,7 +5,7 @@
 #
 # Makefile for dcn302.
 
-DCN3_02 = dcn302_init.o dcn302_hwseq.o dcn302_resource.o
+DCN3_02 = dcn302_init.o dcn302_resource.o
 
 AMD_DAL_DCN3_02 = $(addprefix $(AMDDALPATH)/dc/dcn302/,$(DCN3_02))
 
drivers/gpu/drm/amd/display/dc/dcn302/dcn302_init.c +1 -1
index eb375f30f5bc..637f9514d37b 100644
@@ -23,7 +23,7 @@
  *
  */
 
-#include "dcn302_hwseq.h"
+#include "dcn302/dcn302_hwseq.h"
 
 #include "dcn30/dcn30_init.h"
 
drivers/gpu/drm/amd/display/dc/dcn303/Makefile +1 -1
index 8702e0b7fda3..d7b3ad780e5d 100644
@@ -6,7 +6,7 @@
 #
 # Makefile for dcn303.
 
-DCN3_03 = dcn303_init.o dcn303_hwseq.o dcn303_resource.o
+DCN3_03 = dcn303_init.o dcn303_resource.o
 
 AMD_DAL_DCN3_03 = $(addprefix $(AMDDALPATH)/dc/dcn303/,$(DCN3_03))
 
drivers/gpu/drm/amd/display/dc/dcn303/dcn303_init.c +1 -1
index f499f8ab5e47..39cf7a50bd26 100644
@@ -5,7 +5,7 @@
  * Authors: AMD
  */
 
-#include "dcn303_hwseq.h"
+#include "dcn303/dcn303_hwseq.h"
 #include "dcn30/dcn30_init.h"
 #include "dc.h"
 
drivers/gpu/drm/amd/display/dc/dcn31/Makefile +1 -1
index ec041e3cda30..996d8c1e9d2a 100644
@@ -10,7 +10,7 @@
 #
 # Makefile for dcn31.
 
-DCN31 = dcn31_resource.o dcn31_hubbub.o dcn31_hwseq.o dcn31_init.o dcn31_hubp.o \
+DCN31 = dcn31_resource.o dcn31_hubbub.o dcn31_init.o dcn31_hubp.o \
 	dcn31_dccg.o dcn31_optc.o dcn31_dio_link_encoder.o dcn31_panel_cntl.o \
 	dcn31_apg.o dcn31_hpo_dp_stream_encoder.o dcn31_hpo_dp_link_encoder.o \
 	dcn31_afmt.o dcn31_vpg.o
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_init.c +2 -2
index 084861519e28..669f524bd064 100644
@@ -23,8 +23,8 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn21/dcn21_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c +1 -1
index 239d7ce8e533..cdf005f91869 100644
@@ -48,7 +48,7 @@
 #include "dcn31/dcn31_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn314/Makefile +1 -1
index 702c28c2560e..72456debb99f 100644
@@ -10,7 +10,7 @@
 #
 # Makefile for dcn314.
 
-DCN314 = dcn314_resource.o dcn314_hwseq.o dcn314_init.o \
+DCN314 = dcn314_resource.o dcn314_init.o \
 		dcn314_dio_stream_encoder.o dcn314_dccg.o dcn314_optc.o
 
 AMD_DAL_DCN314 = $(addprefix $(AMDDALPATH)/dc/dcn314/,$(DCN314))
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_init.c +2 -2
index 163dd563b209..ccb7e317e86a 100644
@@ -24,8 +24,8 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn21/dcn21_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c +1 -1
index 64a2692fd4f6..2d7436f2ea82 100644
@@ -50,7 +50,7 @@
 #include "dcn314/dcn314_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c +1 -1
index ed804439fb7e..c11dbb1f4033 100644
@@ -47,7 +47,7 @@
 #include "dcn31/dcn31_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn316/dcn316_resource.c +1 -1
index 9133a1ea4ca0..4220fe4cae4a 100644
@@ -47,7 +47,7 @@
 #include "dcn31/dcn31_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn32/Makefile +1 -1
index e943b643ab6b..8bb251307247 100644
@@ -10,7 +10,7 @@
 #
 # Makefile for dcn32.
 
-DCN32 = dcn32_resource.o dcn32_hubbub.o dcn32_hwseq.o dcn32_init.o \
+DCN32 = dcn32_resource.o dcn32_hubbub.o dcn32_init.o dcn32_dccg.o \
 		dcn32_dccg.o dcn32_optc.o dcn32_mmhubbub.o dcn32_hubp.o dcn32_dpp.o \
 		dcn32_dio_stream_encoder.o dcn32_dio_link_encoder.o dcn32_hpo_dp_link_encoder.o \
 		dcn32_resource_helpers.o dcn32_mpc.o
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_init.c +3 -3
index 04309412b087..427cfc8c24a4 100644
@@ -23,13 +23,13 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn21/dcn21_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
 #include "dcn31/dcn31_hwseq.h"
-#include "dcn32_hwseq.h"
+#include "dcn32/dcn32_hwseq.h"
 #include "dcn32_init.h"
 
 static const struct hw_sequencer_funcs dcn32_funcs = {
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c +1 -1
index a74d4cab5a7d..f4cd2fcaafef 100644
@@ -47,7 +47,7 @@
 #include "dcn32/dcn32_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c +1 -1
index f11ff6f071e2..05693c2051da 100644
@@ -50,7 +50,7 @@
 #include "dcn32/dcn32_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn30/dcn30_opp.h"
 #include "dcn20/dcn20_dsc.h"
 #include "dcn30/dcn30_vpg.h"
drivers/gpu/drm/amd/display/dc/dcn35/Makefile +1 -1
index c01d4ab4cdb6..20d0eef1a13b 100644
@@ -10,7 +10,7 @@
 #
 # Makefile for DCN35.
 
-DCN35 = dcn35_resource.o dcn35_hwseq.o dcn35_init.o dcn35_dio_stream_encoder.o \
+DCN35 = dcn35_resource.o dcn35_init.o dcn35_dio_stream_encoder.o \
 	dcn35_dio_link_encoder.o dcn35_dccg.o dcn35_optc.o \
 	dcn35_dsc.o dcn35_hubp.o dcn35_hubbub.o \
 	dcn35_mmhubbub.o dcn35_opp.o dcn35_dpp.o dcn35_pg_cntl.o dcn35_dwb.o
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_init.c +2 -2
index ae828d5f4e34..534223dbe595 100644
@@ -22,8 +22,8 @@
  *
  */
 
-#include "dce110/dce110_hw_sequencer.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn21/dcn21_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c +2 -2
index d3cc8f4a82d1..b888d483e901 100644
@@ -49,7 +49,7 @@
 #include "dcn35/dcn35_optc.h"
 #include "dcn20/dcn20_hwseq.h"
 #include "dcn30/dcn30_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn35/dcn35_opp.h"
 #include "dcn35/dcn35_dsc.h"
 #include "dcn30/dcn30_vpg.h"
@@ -75,7 +75,7 @@
 #include "dcn35/dcn35_pg_cntl.h"
 #include "dcn10/dcn10_resource.h"
 #include "dcn31/dcn31_panel_cntl.h"
-#include "dcn35_hwseq.h"
+#include "dcn35/dcn35_hwseq.h"
 #include "dcn35_dio_link_encoder.h"
 #include "dml/dcn31/dcn31_fpu.h" /*todo*/
 #include "dml/dcn35/dcn35_fpu.h"
drivers/gpu/drm/amd/display/dc/hwss/Makefile new file +183 -0

184 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dce/dce_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dce100/dce100_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c +2 -2
similarity index 98%
rename from drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dce100/dce100_hwseq.c
index 753cb8edd996..f1f14796a3da 100644
@@ -26,10 +26,10 @@
 #include "dc.h"
 #include "core_types.h"
 #include "clk_mgr.h"
-#include "dce100_hw_sequencer.h"
+#include "dce100_hwseq.h"
 #include "resource.h"
 
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 
 /* include DCE10 register header files */
 #include "dce/dce_10_0_d.h"
drivers/gpu/drm/amd/display/dc/hwss/dce100/dce100_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dce100/dce100_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +4 -4
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
index 5e4e9c1eb4f2..4e14373da721 100644
@@ -30,11 +30,11 @@
 #include "core_status.h"
 #include "resource.h"
 #include "dm_helpers.h"
-#include "dce110_timing_generator.h"
+#include "dce110/dce110_timing_generator.h"
 #include "dce/dce_hwseq.h"
 #include "gpio_service_interface.h"
 
-#include "dce110_compressor.h"
+#include "dce110/dce110_compressor.h"
 
 #include "bios/bios_parser_helper.h"
 #include "timing_generator.h"
@@ -62,9 +62,9 @@
 
 #include "atomfirmware.h"
 
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dcn10/dcn10_hwseq.h"
 
-#include "dce110_hw_sequencer.h"
+#include "dce110_hwseq.h"
 
 #define GAMMA_HW_POINTS_NUM 256
 
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dce112/dce112_hw_sequencer.c +2 -2
similarity index 98%
rename from drivers/gpu/drm/amd/display/dc/dce112/dce112_hw_sequencer.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c
index 0ef9ebb3c1e2..ed9b0113a7a0 100644
@@ -26,9 +26,9 @@
 #include "dm_services.h"
 #include "dc.h"
 #include "core_types.h"
-#include "dce112_hw_sequencer.h"
+#include "dce112_hwseq.h"
 
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 
 /* include DCE11.2 register header files */
 #include "dce/dce_11_2_d.h"
drivers/gpu/drm/amd/display/dc/hwss/dce112/dce112_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dce112/dce112_hw_sequencer.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dce112/dce112_hw_sequencer.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dce112/dce112_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c +2 -2
similarity index 98%
rename from drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
index 45e08c4d5861..22ee304ef9cf 100644
@@ -26,10 +26,10 @@
 #include "dm_services.h"
 #include "dc.h"
 #include "core_types.h"
-#include "dce120_hw_sequencer.h"
+#include "dce120_hwseq.h"
 #include "dce/dce_hwseq.h"
 
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 
 #include "dce/dce_12_0_offset.h"
 #include "dce/dce_12_0_sh_mask.h"
drivers/gpu/drm/amd/display/dc/hwss/dce120/dce120_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dce120/dce120_hw_sequencer.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dce120/dce120_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dce80/dce80_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c +3 -3
similarity index 94%
rename from drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dce80/dce80_hwseq.c
index d2ceebdbdf51..0a054e880801 100644
@@ -26,11 +26,11 @@
 #include "dm_services.h"
 #include "dc.h"
 #include "core_types.h"
-#include "dce80_hw_sequencer.h"
+#include "dce80_hwseq.h"
 
 #include "dce/dce_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
-#include "dce100/dce100_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
+#include "dce100/dce100_hwseq.h"
 
 /* include DCE8 register header files */
 #include "dce/dce_8_0_d.h"
drivers/gpu/drm/amd/display/dc/hwss/dce80/dce80_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dce80/dce80_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +8 -8
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
index 817827fa0a0e..2b8b8366538e 100644
@@ -29,22 +29,22 @@
 #include "core_types.h"
 #include "resource.h"
 #include "custom_float.h"
-#include "dcn10_hw_sequencer.h"
-#include "dcn10_hw_sequencer_debug.h"
+#include "dcn10_hwseq.h"
+#include "dcn10/dcn10_hw_sequencer_debug.h"
 #include "dce/dce_hwseq.h"
 #include "abm.h"
 #include "dmcu.h"
-#include "dcn10_optc.h"
-#include "dcn10_dpp.h"
-#include "dcn10_mpc.h"
+#include "dcn10/dcn10_optc.h"
+#include "dcn10/dcn10_dpp.h"
+#include "dcn10/dcn10_mpc.h"
 #include "timing_generator.h"
 #include "opp.h"
 #include "ipp.h"
 #include "mpc.h"
 #include "reg_helper.h"
-#include "dcn10_hubp.h"
-#include "dcn10_hubbub.h"
-#include "dcn10_cm_common.h"
+#include "dcn10/dcn10_hubp.h"
+#include "dcn10/dcn10_hubbub.h"
+#include "dcn10/dcn10_cm_common.h"
 #include "dccg.h"
 #include "clk_mgr.h"
 #include "link_hwss.h"
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +3 -3
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
index f5a7002302f8..d8c02f83b7d7 100644
@@ -29,11 +29,11 @@
 #include "dm_helpers.h"
 #include "core_types.h"
 #include "resource.h"
-#include "dcn20_resource.h"
+#include "dcn20/dcn20_resource.h"
 #include "dcn20_hwseq.h"
 #include "dce/dce_hwseq.h"
-#include "dcn20_dsc.h"
-#include "dcn20_optc.h"
+#include "dcn20/dcn20_dsc.h"
+#include "dcn20/dcn20_optc.h"
 #include "abm.h"
 #include "clk_mgr.h"
 #include "dmcu.h"
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
index 9e027db6d752..d3fe6092f50e 100644
@@ -28,7 +28,7 @@
 #include "core_types.h"
 #include "resource.h"
 #include "dcn201_hwseq.h"
-#include "dcn201_optc.h"
+#include "dcn201/dcn201_optc.h"
 #include "dce/dce_hwseq.h"
 #include "hubp.h"
 #include "dchubbub.h"
drivers/gpu/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
index 43463d08f21b..467812cf3368 100644
@@ -28,7 +28,7 @@
 #include "core_types.h"
 #include "resource.h"
 #include "dce/dce_hwseq.h"
-#include "dce110/dce110_hw_sequencer.h"
+#include "dce110/dce110_hwseq.h"
 #include "dcn21_hwseq.h"
 #include "vmid.h"
 #include "reg_helper.h"
drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c +5 -5
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
index b6d88266e8ab..ed1b2fed696d 100644
@@ -31,10 +31,10 @@
 #include "dcn30_hwseq.h"
 #include "dccg.h"
 #include "dce/dce_hwseq.h"
-#include "dcn30_mpc.h"
-#include "dcn30_dpp.h"
+#include "dcn30/dcn30_mpc.h"
+#include "dcn30/dcn30_dpp.h"
 #include "dcn10/dcn10_cm_common.h"
-#include "dcn30_cm_common.h"
+#include "dcn30/dcn30_cm_common.h"
 #include "reg_helper.h"
 #include "abm.h"
 #include "clk_mgr.h"
@@ -48,8 +48,8 @@
 #include "dc_dmub_srv.h"
 #include "link_hwss.h"
 #include "dpcd_defs.h"
-#include "../dcn20/dcn20_hwseq.h"
-#include "dcn30_resource.h"
+#include "dcn20/dcn20_hwseq.h"
+#include "dcn30/dcn30_resource.h"
 #include "link.h"
 
 
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_hwseq.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn301/dcn301_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn302/dcn302_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn303/dcn303_hwseq.c +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn303/dcn303_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.c
drivers/gpu/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn303/dcn303_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn303/dcn303_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
index 65e8504e6063..c339f756b8e7 100644
@@ -46,7 +46,7 @@
 #include "dpcd_defs.h"
 #include "dce/dmub_outbox.h"
 #include "link.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "inc/link_enc_cfg.h"
 #include "dcn30/dcn30_vpg.h"
 #include "dce/dce_i2c_hw.h"
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
index 5b197807080e..3a9cc8ac0c07 100644
@@ -47,7 +47,7 @@
 #include "dpcd_defs.h"
 #include "dce/dmub_outbox.h"
 #include "link.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "inc/link_enc_cfg.h"
 #include "dcn30/dcn30_vpg.h"
 #include "dce/dce_i2c_hw.h"
drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
index 67687e45f031..d1ed45b532e2 100644
@@ -48,7 +48,7 @@
 #include "dsc.h"
 #include "dcn20/dcn20_optc.h"
 #include "dce/dmub_hw_lock_mgr.h"
-#include "dcn32_resource.h"
+#include "dcn32/dcn32_resource.h"
 #include "link.h"
 #include "../dcn20/dcn20_hwseq.h"
 
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.c +1 -1
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.c
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
index 2be2a2f91434..0e218f9e2a86 100644
@@ -45,7 +45,7 @@
 #include "dpcd_defs.h"
 #include "dce/dmub_outbox.h"
 #include "link.h"
-#include "dcn10/dcn10_hw_sequencer.h"
+#include "dcn10/dcn10_hwseq.h"
 #include "inc/link_enc_cfg.h"
 #include "dcn30/dcn30_vpg.h"
 #include "dce/dce_i2c_hw.h"
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.h renamed from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/dcn35/dcn35_hwseq.h
rename to drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.h
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h renamed from drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h +2 -2
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/inc/hw_sequencer.h
rename to drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer.h
index 844ad5eb8e35..452680fe9aab 100644
@@ -26,11 +26,11 @@
 #ifndef __DC_HW_SEQUENCER_H__
 #define __DC_HW_SEQUENCER_H__
 #include "dc_types.h"
-#include "clock_source.h"
+#include "inc/clock_source.h"
 #include "inc/hw/timing_generator.h"
 #include "inc/hw/opp.h"
 #include "inc/hw/link_encoder.h"
-#include "core_status.h"
+#include "inc/core_status.h"
 
 struct pipe_ctx;
 struct dc_state;
drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer_private.h renamed from drivers/gpu/drm/amd/display/dc/inc/hw_sequencer_private.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/inc/hw_sequencer_private.h
rename to drivers/gpu/drm/amd/display/dc/hwss/hw_sequencer_private.h
Signature · 1 line
2.25.1
author
#13 lore raw

PATCH 13/16 drm/amd/display: Don't set dpms_off for seamless boot

In reply to Tom Chung

From: Daniel Miess <[email protected]>

[Why]
eDPs fail to light up with seamless boot enabled

[How]
When seamless boot is enabled don't configure dpms_off in disable_vbios_mode_if_required.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
index bd4834f921c1..88d41bf6d53a 100644
@@ -1230,6 +1230,9 @@ static void disable_vbios_mode_if_required(
 		if (stream == NULL)
 			continue;
 
+		if (stream->apply_seamless_boot_optimization)
+			continue;
+
 		// only looking for first odm pipe
 		if (pipe->prev_odm_pipe)
 			continue;
Signature · 1 line
2.25.1
#14 lore raw

RE: [PATCH 13/16] drm/amd/display: Don't set dpms_off for seamless boot

[AMD Official Use Only - General]

Quoted 15 lines

From: Daniel Miess <[email protected]>

[Why]
eDPs fail to light up with seamless boot enabled

[How]
When seamless boot is enabled don't configure dpms_off in disable_vbios_mode_if_required.

Quoted 3 lines
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 3 +++
 1 file changed, 3 insertions(+)

Feifei,

Can you recheck seamless boot on DCN3.2 after this lands into amd-staging-drm-next? If it works, we may remove the check to only apply it to APUs.

Quoted 18 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -1
index bd4834f921c1..88d41bf6d53a 100644
@@ -1230,6 +1230,9 @@ static void disable_vbios_mode_if_required(
              if (stream == NULL)
                      continue;
 
+             if (stream->apply_seamless_boot_optimization)
+                     continue;
+
              // only looking for first odm pipe
              if (pipe->prev_odm_pipe)
                      continue;
--

2.25.1

author
#15 lore raw

PATCH 14/16 drm/amd/display: Refactor DPG test pattern logic for ODM cases

In reply to Tom Chung

From: George Shen <[email protected]>

[Why]
Current DPG test pattern logic does not account for ODM configuration changes after test pattern has already been programmed. For example, if ODM2:1 is enabled after test pattern is already being output, the second pipe is not programmed to output test pattern, causing half the screen to be black.

[How]
Move DPG test pattern parameter calculations into separate function. Whenever ODM pipe configuration changes, re-calculate DPG test pattern parameters and program DPG if test pattern is currently enabled.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |   8 ++
 .../gpu/drm/amd/display/dc/core/dc_resource.c | 104 ++++++++++++++++
 .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c   |  22 ++++
 .../gpu/drm/amd/display/dc/inc/core_types.h   |  13 ++
 drivers/gpu/drm/amd/display/dc/inc/resource.h |   4 +
 .../display/dc/link/accessories/link_dp_cts.c | 117 ++++--------------
 6 files changed, 175 insertions(+), 93 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +8 -0
index 88d41bf6d53a..544c915469f9 100644
@@ -3145,6 +3145,14 @@ static bool update_planes_and_stream_state(struct dc *dc,
 			BREAK_TO_DEBUGGER();
 			goto fail;
 		}
+
+		for (i = 0; i < context->stream_count; i++) {
+			struct pipe_ctx *otg_master = resource_get_otg_master_for_stream(&context->res_ctx,
+					context->streams[i]);
+
+			if (otg_master->stream->test_pattern.type != DP_TEST_PATTERN_VIDEO_MODE)
+				resource_build_test_pattern_params(&context->res_ctx, otg_master);
+		}
 	}
 
 	*new_context = context;
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +104 -0

110 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +22 -0
index d8c02f83b7d7..4d6493e0ccfc 100644
@@ -1538,6 +1538,11 @@ static void dcn20_detect_pipe_changes(struct pipe_ctx *old_pipe, struct pipe_ctx
 
 	if (old_pipe->unbounded_req != new_pipe->unbounded_req)
 		new_pipe->update_flags.bits.unbounded_req = 1;
+
+	if (memcmp(&old_pipe->stream_res.test_pattern_params,
+				&new_pipe->stream_res.test_pattern_params, sizeof(struct test_pattern_params))) {
+		new_pipe->update_flags.bits.test_pattern_changed = 1;
+	}
 }
 
 static void dcn20_update_dchubp_dpp(
@@ -1846,6 +1851,23 @@ static void dcn20_program_pipe(
 				pipe_ctx->stream->abm_level);
 		}
 	}
+
+	if (pipe_ctx->update_flags.bits.test_pattern_changed) {
+		struct output_pixel_processor *odm_opp = pipe_ctx->stream_res.opp;
+		struct bit_depth_reduction_params params;
+
+		memset(&params, 0, sizeof(params));
+		odm_opp->funcs->opp_program_bit_depth_reduction(odm_opp, &params);
+		dc->hwss.set_disp_pattern_generator(dc,
+				pipe_ctx,
+				pipe_ctx->stream_res.test_pattern_params.test_pattern,
+				pipe_ctx->stream_res.test_pattern_params.color_space,
+				pipe_ctx->stream_res.test_pattern_params.color_depth,
+				NULL,
+				pipe_ctx->stream_res.test_pattern_params.width,
+				pipe_ctx->stream_res.test_pattern_params.height,
+				pipe_ctx->stream_res.test_pattern_params.offset);
+	}
 }
 
 void dcn20_program_front_end_for_ctx(
drivers/gpu/drm/amd/display/dc/inc/core_types.h +13 -0
index c095ccbb80c4..92e52b218150 100644
@@ -308,6 +308,16 @@ struct dcn_fe_bandwidth {
 
 };
 
+/* Parameters needed to call set_disp_pattern_generator */
+struct test_pattern_params {
+	enum controller_dp_test_pattern test_pattern;
+	enum controller_dp_color_space color_space;
+	enum dc_color_depth color_depth;
+	int width;
+	int height;
+	int offset;
+};
+
 struct stream_resource {
 	struct output_pixel_processor *opp;
 	struct display_stream_compressor *dsc;
@@ -324,6 +334,8 @@ struct stream_resource {
 	 * otherwise it's using group number 'gsl_group-1'
 	 */
 	uint8_t gsl_group;
+
+	struct test_pattern_params test_pattern_params;
 };
 
 struct plane_resource {
@@ -367,6 +379,7 @@ union pipe_update_flags {
 		uint32_t plane_changed : 1;
 		uint32_t det_size : 1;
 		uint32_t unbounded_req : 1;
+		uint32_t test_pattern_changed : 1;
 	} bits;
 	uint32_t raw;
 };
drivers/gpu/drm/amd/display/dc/inc/resource.h +4 -0
index 67d1ec0f3c68..06ca8bfb91e7 100644
@@ -103,6 +103,10 @@ enum dc_status resource_map_pool_resources(
 		struct dc_state *context,
 		struct dc_stream_state *stream);
 
+void resource_build_test_pattern_params(
+		struct resource_context *res_ctx,
+		struct pipe_ctx *pipe_ctx);
+
 bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx);
 
 enum dc_status resource_build_scaling_params_for_context(
drivers/gpu/drm/amd/display/dc/link/accessories/link_dp_cts.c +24 -93

156 lines not on this page · raw message

Signature · 1 line
2.25.1
author
#16 lore raw

PATCH 15/16 drm/amd/display: Disable SubVP if test pattern is enabled

In reply to Tom Chung

From: George Shen <[email protected]>

[Why]
Enabling DPG causes HUBP to stay in blank constantly. If DPG is enabled while an MCLK switch is taking place with SubVP, it will cause the MCLK to never complete. This is because SubVP MCLK switch relies a HUBP VLine interrupt, which will never occur when HUBP is constantly in blank.

[How]
Disable SubVP when test pattern is enabled.

---
 .../gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c  | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c +14 -1
index 7179c2b3b1b7..4c2c0e252867 100644
@@ -1383,6 +1383,19 @@ static void try_odm_power_optimization_and_revalidate(
 	}
 }
 
+static bool is_test_pattern_enabled(
+		struct dc_state *context)
+{
+	int i;
+
+	for (i = 0; i < context->stream_count; i++) {
+		if (context->streams[i]->test_pattern.type != DP_TEST_PATTERN_VIDEO_MODE)
+			return true;
+	}
+
+	return false;
+}
+
 static void dcn32_full_validate_bw_helper(struct dc *dc,
 				   struct dc_state *context,
 				   display_e2e_pipe_params_st *pipes,
@@ -1426,7 +1439,7 @@ static void dcn32_full_validate_bw_helper(struct dc *dc,
 	 * 5. (Config doesn't support MCLK in VACTIVE/VBLANK || dc->debug.force_subvp_mclk_switch)
 	 */
 	if (!dc->debug.force_disable_subvp && !dc->caps.dmub_caps.gecc_enable && dcn32_all_pipes_have_stream_and_plane(dc, context) &&
-	    !dcn32_mpo_in_use(context) && !dcn32_any_surfaces_rotated(dc, context) &&
+	    !dcn32_mpo_in_use(context) && !dcn32_any_surfaces_rotated(dc, context) && !is_test_pattern_enabled(context) &&
 		(*vlevel == context->bw_ctx.dml.soc.num_states ||
 	    vba->DRAMClockChangeSupport[*vlevel][vba->maxMpcComb] == dm_dram_clock_change_unsupported ||
 	    dc->debug.force_subvp_mclk_switch)) {
Signature · 1 line
2.25.1
author
#17 lore raw

PATCH 16/16 drm/amd/display: 3.2.255

In reply to Tom Chung

From: Aric Cyr <[email protected]>

This version brings along following fixes:
- Refactor DPG test pattern logic for ODM cases
- Refactor HWSS into component folder
- Revert "drm/amd/display: Add a check for idle power optimization"
- Revert "drm/amd/display: remove duplicated edp relink to fastboot
- Update cursor limits based on SW cursor fallback limits
- Update stream mask
- Update pmfw_driver_if new structure
- Modify SMU message logs
- Don't set dpms_off for seamless boot

---
 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 0b9384707106..9f6d8d5000bf 100644
@@ -47,7 +47,7 @@ struct aux_payload;
 struct set_config_cmd_payload;
 struct dmub_notification;
 
-#define DC_VER "3.2.254"
+#define DC_VER "3.2.255"
 
 #define MAX_SURFACES 3
 #define MAX_PLANES 6
Signature · 1 line
2.25.1