Skip to contentSkip to conversation

DC Patches Feb 09 2026

PATCH In review Tom Chung 2 participants 18 messages Feb 3 – Feb 9

Subsystems (4)
lore
Share & tools
lore

Tom Chung

author
#0 lore raw

cover DC Patches Feb 09 2026

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

- Fix system resume lag issue
- Correct hubp GfxVersion verification
- Add parse all extension blocks for VSDB
- Increase DCN35 SR enter/exit latency
- Refactor virtual directory reorganize encoder and hwss files
- Set enable_legacy_fast_update to false for DCN36
- Avoid updating surface with the same surface under MPO

Cc Daniel Wheeler <[email protected]>

Alex Hung (1):
drm/amd/display: Fix the incorrect type in dml_print

Bhuvanachandra Pinninti (1):
drm/amd/display: Refactor virtual directory reorganize encoder and
hwss files.

Clay King (1):
drm/amd/display: bypass post csc for additional color spaces in dal

Leo Li (1):
drm/amd/display: Increase DCN35 SR enter/exit latency

Leon Huang (1):
drm/amd/display: Check frame skip capability in Sink side

Muaaz Nisar (1):
Revert "drm/amd/display: mouse event trigger to boost RR when idle"

Nicholas Carbones (2):
drm/amd/display: Correct hubp GfxVersion verification drm/amd/display: Revert "Migrate DCCG register access from hwseq to
dccg component."

Peichen Huang (1):
drm/amd/display: use enum value for panel replay setting

Ray Wu (1):
drm/amd/display: Parse all extension blocks for VSDB

Roman Li (1):
drm/amd/display: Make GPIO HPD path conditional

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

Tom Chung (1):
drm/amd/display: Fix system resume lag issue

Wayne Lin (1):
drm/amd/display: Avoid updating surface with the same surface under
MPO

YiLing Chen (1):
drm/amd/display: set enable_legacy_fast_update to false for DCN36

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 +++++-
 drivers/gpu/drm/amd/display/dc/Makefile       |  2 +-
 .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c  | 16 +++---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  2 +-
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  4 +-
 .../gpu/drm/amd/display/dc/core/dc_stream.c   | 13 -----
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.c    | 54 +------------------
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.h    | 18 ++-----
 drivers/gpu/drm/amd/display/dc/dio/Makefile   |  9 ++++
 .../{ => dio}/virtual/virtual_link_encoder.c  |  2 -
 .../{ => dio}/virtual/virtual_link_encoder.h  |  0
 .../virtual/virtual_stream_encoder.c          |  1 -
 .../virtual/virtual_stream_encoder.h          |  0
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  |  4 +-
 .../amd/display/dc/dml2_0/display_mode_util.c |  2 +-
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  | 21 ++++++--
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h  |  4 ++
 .../amd/display/dc/dpp/dcn401/dcn401_dpp.c    |  6 +--
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.c    | 35 ++++++------
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.c    | 28 +++++-----
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    | 28 +++++-----
 .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c   | 29 +++++++---
 .../amd/display/dc/hwss/dcn201/dcn201_hwseq.c |  5 +-
 .../amd/display/dc/hwss/dcn21/dcn21_hwseq.c   |  9 ++--
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |  3 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  5 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h  |  4 --
 drivers/gpu/drm/amd/display/dc/link/Makefile  |  3 +-
 .../hwss/link_hwss_virtual.c}                 |  2 +-
 .../hwss/link_hwss_virtual.h}                 |  6 +--
 .../drm/amd/display/dc/link/link_factory.c    |  8 +--
 .../dc/link/protocols/link_dp_panel_replay.c  | 14 ++++-
 .../amd/display/dc/link/protocols/link_hpd.c  |  9 +++-
 .../dc/resource/dce100/dce100_resource.c      |  2 +-
 .../dc/resource/dce120/dce120_resource.c      |  2 +-
 .../dc/resource/dcn10/dcn10_resource.c        |  2 +-
 .../dc/resource/dcn20/dcn20_resource.c        |  2 +-
 .../dc/resource/dcn201/dcn201_resource.c      |  2 +-
 .../dc/resource/dcn21/dcn21_resource.c        |  2 +-
 .../dc/resource/dcn30/dcn30_resource.c        |  2 +-
 .../dc/resource/dcn301/dcn301_resource.c      |  2 +-
 .../dc/resource/dcn31/dcn31_resource.c        |  2 +-
 .../dc/resource/dcn314/dcn314_resource.c      |  2 +-
 .../dc/resource/dcn315/dcn315_resource.c      |  2 +-
 .../dc/resource/dcn316/dcn316_resource.c      |  2 +-
 .../dc/resource/dcn32/dcn32_resource.c        |  2 +-
 .../dc/resource/dcn321/dcn321_resource.c      |  2 +-
 .../dc/resource/dcn35/dcn35_resource.c        |  2 +-
 .../dc/resource/dcn351/dcn351_resource.c      |  2 +-
 .../dc/resource/dcn36/dcn36_resource.c        |  4 +-
 .../dc/resource/dcn401/dcn401_resource.c      |  2 +-
 .../gpu/drm/amd/display/dc/virtual/Makefile   | 30 -----------
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   | 15 ++++++
 58 files changed, 229 insertions(+), 238 deletions(-)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_link_encoder.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_link_encoder.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_stream_encoder.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_stream_encoder.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{virtual/virtual_link_hwss.c => link/hwss/link_hwss_virtual.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{virtual/virtual_link_hwss.h => link/hwss/link_hwss_virtual.h} (92%)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/virtual/Makefile
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 1/16 drm/amd/display: Avoid updating surface with the same surface under MPO

From: Wayne Lin <[email protected]>

[Why & How]
Although it's dummy updates of surface update for committing stream updates, we should not have dummy_updates[j].surface all indicating to the same surface under multiple surfaces case. Otherwise, copy_surface_update_to_plane() in update_planes_and_stream_state() will update to the same surface only.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 00375d208ff9..b9e8ea4396b5 100644
@@ -10960,7 +10960,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 			continue;
 		}
 		for (j = 0; j < status->plane_count; j++)
-			dummy_updates[j].surface = status->plane_states[0];
+			dummy_updates[j].surface = status->plane_states[j];
 
 		sort(dummy_updates, status->plane_count,
 		     sizeof(*dummy_updates), dm_plane_layer_index_cmp, NULL);
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH 2/16 drm/amd/display: Check frame skip capability in Sink side

In reply to Tom Chung

From: Leon Huang <[email protected]>

[Why&How]
Frame skip capability is described in AMD VSDB in EDID. Need to retrieve the cap and determine fr.skipping mode enablement

---
 .../display/dc/link/protocols/link_dp_panel_replay.c   | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c +10 -0
index cc3b44cf7662..4a9e86d32dbb 100644
@@ -34,6 +34,7 @@
 	link->ctx->logger
 
 #define DP_SINK_PR_ENABLE_AND_CONFIGURATION		0x37B
+#define DP_SINK_ENABLE_FRAME_SKIPPING_MODE_SHIFT	(5)
 
 static unsigned int dp_pr_calc_num_static_frames(unsigned int vsync_rate_hz)
 {
@@ -89,6 +90,7 @@ static bool dp_setup_panel_replay(struct dc_link *link, const struct dc_stream_s
 	union panel_replay_enable_and_configuration_2 pr_config_2 = { 0 };
 
 	union dpcd_alpm_configuration alpm_config;
+	uint8_t data = 0;
 
 	replay_context.controllerId = CONTROLLER_ID_UNDEFINED;
 
@@ -186,6 +188,14 @@ static bool dp_setup_panel_replay(struct dc_link *link, const struct dc_stream_s
 			DP_RECEIVER_ALPM_CONFIG,
 			&alpm_config.raw,
 			sizeof(alpm_config.raw));
+
+		//Enable frame skipping
+		if (link->replay_settings.config.frame_skip_supported)
+			data = data | (1 << DP_SINK_ENABLE_FRAME_SKIPPING_MODE_SHIFT);
+
+		dm_helpers_dp_write_dpcd(link->ctx, link,
+			DP_SINK_PR_ENABLE_AND_CONFIGURATION,
+			(uint8_t *)&(data), sizeof(uint8_t));
 	}
 
 	return true;
Signature · 1 line
2.43.0
author
#3 lore raw

PATCH 3/16 drm/amd/display: set enable_legacy_fast_update to false for DCN36

In reply to Tom Chung

From: YiLing Chen <[email protected]>

[Why/How]
Align the default value of the flag with DCN35/351.

---
 drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +1 -1
index 0ee16926db4e..1d8ca312fe1e 100644
@@ -775,7 +775,7 @@ static const struct dc_debug_options debug_defaults_drv = {
 };
 
 static const struct dc_check_config config_defaults = {
-	.enable_legacy_fast_update = true,
+	.enable_legacy_fast_update = false,
 };
 
 static const struct dc_panel_config panel_config_defaults = {
Signature · 1 line
2.43.0
author
#4 lore raw

PATCH 4/16 drm/amd/display: Refactor virtual directory reorganize encoder and hwss files.

In reply to Tom Chung

From: Bhuvanachandra Pinninti <[email protected]>

[why]
Virtual encoders & hwss were grouped in a separate directory, not aligned with dio and link component structure.

[how]
Moved virtual_link_encoder and virtual_stream_encoder to dc/dio/virtual/. Moved virtual_link_hwss to dc/link/hwss/ and renamed to link_hwss_virtual. Removed dc/virtual/ directory.
Updated all includes and build files (Makefiles)

---
 drivers/gpu/drm/amd/display/dc/Makefile       |  2 +-
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  2 +-
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  4 +--
 drivers/gpu/drm/amd/display/dc/dio/Makefile   |  9 ++++++
 .../{ => dio}/virtual/virtual_link_encoder.c  |  2 --
 .../{ => dio}/virtual/virtual_link_encoder.h  |  0
 .../virtual/virtual_stream_encoder.c          |  1 -
 .../virtual/virtual_stream_encoder.h          |  0
 drivers/gpu/drm/amd/display/dc/link/Makefile  |  3 +-
 .../hwss/link_hwss_virtual.c}                 |  2 +-
 .../hwss/link_hwss_virtual.h}                 |  6 ++--
 .../dc/resource/dce100/dce100_resource.c      |  2 +-
 .../dc/resource/dce120/dce120_resource.c      |  2 +-
 .../dc/resource/dcn10/dcn10_resource.c        |  2 +-
 .../dc/resource/dcn20/dcn20_resource.c        |  2 +-
 .../dc/resource/dcn201/dcn201_resource.c      |  2 +-
 .../dc/resource/dcn21/dcn21_resource.c        |  2 +-
 .../dc/resource/dcn30/dcn30_resource.c        |  2 +-
 .../dc/resource/dcn301/dcn301_resource.c      |  2 +-
 .../dc/resource/dcn31/dcn31_resource.c        |  2 +-
 .../dc/resource/dcn314/dcn314_resource.c      |  2 +-
 .../dc/resource/dcn315/dcn315_resource.c      |  2 +-
 .../dc/resource/dcn316/dcn316_resource.c      |  2 +-
 .../dc/resource/dcn32/dcn32_resource.c        |  2 +-
 .../dc/resource/dcn321/dcn321_resource.c      |  2 +-
 .../dc/resource/dcn35/dcn35_resource.c        |  2 +-
 .../dc/resource/dcn351/dcn351_resource.c      |  2 +-
 .../dc/resource/dcn36/dcn36_resource.c        |  2 +-
 .../dc/resource/dcn401/dcn401_resource.c      |  2 +-
 .../gpu/drm/amd/display/dc/virtual/Makefile   | 30 -------------------
 30 files changed, 37 insertions(+), 60 deletions(-)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_link_encoder.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_link_encoder.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_stream_encoder.c (99%)
 rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_stream_encoder.h (100%)
 rename drivers/gpu/drm/amd/display/dc/{virtual/virtual_link_hwss.c => link/hwss/link_hwss_virtual.c} (98%)
 rename drivers/gpu/drm/amd/display/dc/{virtual/virtual_link_hwss.h => link/hwss/link_hwss_virtual.h} (92%)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/virtual/Makefile
drivers/gpu/drm/amd/display/dc/Makefile +1 -1
index 7277ed21552f..93d02956c5eb 100644
@@ -22,7 +22,7 @@
 #
 # Makefile for Display Core (dc) component.
 
-DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link virtual dsc resource optc dpp hubbub dccg hubp dio dwb hpo mmhubbub mpc opp pg
+DC_LIBS = basics bios dml clk_mgr dce gpio hwss irq link dsc resource optc dpp hubbub dccg hubp dio dwb hpo mmhubbub mpc opp pg
 
 ifdef CONFIG_DRM_AMD_DC_FP
 
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
index e7d2b861dedd..17ba7af0ddcd 100644
@@ -53,7 +53,7 @@
 #include "dpp.h"
 #include "timing_generator.h"
 #include "abm.h"
-#include "virtual/virtual_link_encoder.h"
+#include "dio/virtual/virtual_link_encoder.h"
 #include "hubp.h"
 
 #include "link_hwss.h"
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +2 -2
index b4e5a79e9749..639831295b21 100644
@@ -37,7 +37,7 @@
 #include "dpp.h"
 #include "core_types.h"
 #include "set_mode_types.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dpcd_defs.h"
 #include "link_enc_cfg.h"
 #include "link_service.h"
@@ -45,7 +45,7 @@
 #include "dc_state_priv.h"
 #include "dc_stream_priv.h"
 
-#include "virtual/virtual_link_hwss.h"
+#include "link/hwss/link_hwss_virtual.h"
 #include "link/hwss/link_hwss_dio.h"
 #include "link/hwss/link_hwss_dpia.h"
 #include "link/hwss/link_hwss_hpo_dp.h"
drivers/gpu/drm/amd/display/dc/dio/Makefile +9 -0
index 02eec03dc204..2f5619078e1f 100644
@@ -23,6 +23,15 @@
 #
 #
 
+###############################################################################
+# VIRTUAL
+###############################################################################
+DIO_VIRTUAL = virtual_link_encoder.o virtual_stream_encoder.o
+
+AMD_DAL_DIO_VIRTUAL = $(addprefix $(AMDDALPATH)/dc/dio/virtual/,$(DIO_VIRTUAL))
+
+AMD_DISPLAY_FILES += $(AMD_DAL_DIO_VIRTUAL)
+
 ifdef CONFIG_DRM_AMD_DC_FP
 ###############################################################################
 # DCN10
drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_link_encoder.c renamed from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c +0 -2
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.c
rename to drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_link_encoder.c
index 1d226e0519a5..2655bc194a35 100644
@@ -128,5 +128,3 @@ bool virtual_link_encoder_construct(
 
 	return true;
 }
-
-
drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_link_encoder.h renamed from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_encoder.h
rename to drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_link_encoder.h
drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c renamed from drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c +0 -1
similarity index 99%
rename from drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.c
rename to drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.c
index ad088d70e189..c5d2e9404d94 100644
@@ -171,4 +171,3 @@ struct stream_encoder *virtual_stream_encoder_create(
 	kfree(enc);
 	return NULL;
 }
-
drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.h renamed from drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.h +0 -0
similarity index 100%
rename from drivers/gpu/drm/amd/display/dc/virtual/virtual_stream_encoder.h
rename to drivers/gpu/drm/amd/display/dc/dio/virtual/virtual_stream_encoder.h
drivers/gpu/drm/amd/display/dc/link/Makefile +2 -1
index 84dace27daf7..0f3670e30232 100644
@@ -43,7 +43,8 @@ AMD_DISPLAY_FILES += $(AMD_DAL_LINK_ACCESSORIES)
 # hwss
 ###############################################################################
 LINK_HWSS = link_hwss_dio.o link_hwss_dpia.o link_hwss_hpo_dp.o \
-link_hwss_dio_fixed_vs_pe_retimer.o link_hwss_hpo_fixed_vs_pe_retimer_dp.o
+link_hwss_dio_fixed_vs_pe_retimer.o link_hwss_hpo_fixed_vs_pe_retimer_dp.o \
+link_hwss_virtual.o
 
 AMD_DAL_LINK_HWSS = $(addprefix $(AMDDALPATH)/dc/link/hwss/, \
 $(LINK_HWSS))
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_virtual.c renamed from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.c +1 -1
similarity index 98%
rename from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.c
rename to drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_virtual.c
index 4f7f99156897..64742c24f7e6 100644
@@ -23,7 +23,7 @@
  *
  */
 
-#include "virtual_link_hwss.h"
+#include "link_hwss_virtual.h"
 
 void virtual_setup_stream_encoder(struct pipe_ctx *pipe_ctx)
 {
drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_virtual.h renamed from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.h +3 -3
similarity index 92%
rename from drivers/gpu/drm/amd/display/dc/virtual/virtual_link_hwss.h
rename to drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_virtual.h
index fbcbc5afb47d..f6e448c89751 100644
@@ -22,8 +22,8 @@
  * Authors: AMD
  *
  */
-#ifndef __DC_VIRTUAL_LINK_HWSS_H__
-#define __DC_VIRTUAL_LINK_HWSS_H__
+#ifndef __DC_LINK_HWSS_VIRTUAL_H__
+#define __DC_LINK_HWSS_VIRTUAL_H__
 
 #include "core_types.h"
 
@@ -32,4 +32,4 @@ void virtual_setup_stream_attribute(struct pipe_ctx *pipe_ctx);
 void virtual_reset_stream_encoder(struct pipe_ctx *pipe_ctx);
 const struct link_hwss *get_virtual_link_hwss(void);
 
-#endif /* __DC_VIRTUAL_LINK_HWSS_H__ */
+#endif /* __DC_LINK_HWSS_VIRTUAL_H__ */
drivers/gpu/drm/amd/display/dc/resource/dce100/dce100_resource.c +1 -1
index d40d91ec2035..a929e64524e5 100644
@@ -31,7 +31,7 @@
 #include "resource.h"
 #include "clk_mgr.h"
 #include "include/irq_service_interface.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dce110/dce110_timing_generator.h"
 #include "irq/dce110/irq_service_dce110.h"
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c +1 -1
index b1570b6b1af3..92890784caa6 100644
@@ -35,7 +35,7 @@
 #include "dce112/dce112_resource.h"
 
 #include "dce110/dce110_resource.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce120/dce120_timing_generator.h"
 #include "irq/dce120/irq_service_dce120.h"
 #include "dce/dce_opp.h"
drivers/gpu/drm/amd/display/dc/resource/dcn10/dcn10_resource.c +1 -1
index f12367adf145..476780a5450f 100644
@@ -48,7 +48,7 @@
 #include "dce/dce_clock_source.h"
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dce112/dce112_resource.h"
 #include "dcn10/dcn10_hubp.h"
drivers/gpu/drm/amd/display/dc/resource/dcn20/dcn20_resource.c +1 -1
index 46985eb2a623..6731544f0981 100644
@@ -55,7 +55,7 @@
 #include "dce/dce_clock_source.h"
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dcn20/dcn20_dccg.h"
drivers/gpu/drm/amd/display/dc/resource/dcn201/dcn201_resource.c +1 -1
index 055107843a70..90d38631f63a 100644
@@ -51,7 +51,7 @@
 #include "dce/dce_clock_source.h"
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dce/dce_aux.h"
 #include "dce/dce_i2c.h"
drivers/gpu/drm/amd/display/dc/resource/dcn21/dcn21_resource.c +1 -1
index 967e813a45e5..107612595db6 100644
@@ -57,7 +57,7 @@
 #include "dce/dce_clock_source.h"
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dml/display_mode_vba.h"
 #include "dcn20/dcn20_dccg.h"
 #include "dcn21/dcn21_dccg.h"
drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c +1 -1
index d0ebb733e802..6cfdc37dab58 100644
@@ -55,7 +55,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dcn30/dcn30_dccg.h"
drivers/gpu/drm/amd/display/dc/resource/dcn301/dcn301_resource.c +1 -1
index 3ad6a3d4858e..e1d0c166b484 100644
@@ -54,7 +54,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dcn301/dcn301_dccg.h"
drivers/gpu/drm/amd/display/dc/resource/dcn31/dcn31_resource.c +1 -1
index e853ea110310..8ad72557b16a 100644
@@ -64,7 +64,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dml/dcn31/dcn31_fpu.h"
drivers/gpu/drm/amd/display/dc/resource/dcn314/dcn314_resource.c +1 -1
index 3ccde75a4ecb..5f0fe6e5bd82 100644
@@ -66,7 +66,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dml/dcn31/dcn31_fpu.h"
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +1 -1
index 4e962f522f1b..a8283f21008e 100644
@@ -63,7 +63,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dml/dcn31/dcn31_fpu.h"
drivers/gpu/drm/amd/display/dc/resource/dcn316/dcn316_resource.c +1 -1
index 5a95dd54cb42..4da0e9320159 100644
@@ -63,7 +63,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dml/dcn31/dcn31_fpu.h"
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +1 -1
index b276fec3e479..d3b92c61b7ad 100644
@@ -65,7 +65,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dml/display_mode_vba.h"
 #include "dcn32/dcn32_dccg.h"
 #include "dcn10/dcn10_resource.h"
drivers/gpu/drm/amd/display/dc/resource/dcn321/dcn321_resource.c +1 -1
index 3466ca34c93f..d08691ea27ea 100644
@@ -68,7 +68,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dml/display_mode_vba.h"
 #include "dcn32/dcn32_dccg.h"
 #include "dcn10/dcn10_resource.h"
drivers/gpu/drm/amd/display/dc/resource/dcn35/dcn35_resource.c +1 -1
index 45454a097264..945da8cffada 100644
@@ -70,7 +70,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dcn35/dcn35_dccg.h"
drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c +1 -1
index e3c587165807..e660889904a9 100644
@@ -49,7 +49,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dcn35/dcn35_dccg.h"
drivers/gpu/drm/amd/display/dc/resource/dcn36/dcn36_resource.c +1 -1
index 1d8ca312fe1e..7582217bd06d 100644
@@ -49,7 +49,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dce110/dce110_resource.h"
 #include "dml/display_mode_vba.h"
 #include "dcn35/dcn35_dccg.h"
drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +1 -1
index 4875faffe873..f5e02a1ff771 100644
@@ -47,7 +47,7 @@
 #include "dce/dce_audio.h"
 #include "dce/dce_hwseq.h"
 #include "clk_mgr.h"
-#include "virtual/virtual_stream_encoder.h"
+#include "dio/virtual/virtual_stream_encoder.h"
 #include "dml/display_mode_vba.h"
 #include "dcn401/dcn401_dccg.h"
 #include "dcn10/dcn10_resource.h"
drivers/gpu/drm/amd/display/dc/virtual/Makefile deleted +0 -30
deleted file mode 100644
index 931facd4dab5..000000000000
@@ -1,30 +0,0 @@
-#
-# Copyright 2017 Advanced Micro Devices, Inc.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-# OTHER DEALINGS IN THE SOFTWARE.
-#
-#
-# Makefile for the virtual sub-component of DAL.
-# It provides the control and status of HW CRTC block.
-
-VIRTUAL = virtual_link_encoder.o virtual_stream_encoder.o virtual_link_hwss.o
-
-AMD_DAL_VIRTUAL = $(addprefix $(AMDDALPATH)/dc/virtual/,$(VIRTUAL))
-
-AMD_DISPLAY_FILES += $(AMD_DAL_VIRTUAL)
Signature · 1 line
2.43.0
author
#5 lore raw

PATCH 5/16 drm/amd/display: use enum value for panel replay setting

In reply to Tom Chung

From: Peichen Huang <[email protected]>

[WHY & HOW]
use enum value for Panel Replay setting.

---
 .../drm/amd/display/dc/link/protocols/link_dp_panel_replay.c  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_panel_replay.c +2 -2
index 4a9e86d32dbb..7e45d1e767bb 100644
@@ -333,10 +333,10 @@ bool dp_pr_copy_settings(struct dc_link *link, struct replay_context *replay_con
 			pipe_ctx->stream->timing.dsc_cfg.num_slices_v;
 
 	if (dc_is_embedded_signal(link->connector_signal))
-		cmd.pr_copy_settings.data.main_link_activity_option = 0x03;//OPTION_1C;
+		cmd.pr_copy_settings.data.main_link_activity_option = OPTION_1C;
 	else
 		// For external DP, use option 1-A
-		cmd.pr_copy_settings.data.main_link_activity_option = 0x01;//OPTION_1A;
+		cmd.pr_copy_settings.data.main_link_activity_option = OPTION_1A;
 
 	dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
 	return true;
Signature · 1 line
2.43.0
author
#6 lore raw

PATCH 6/16 drm/amd/display: Increase DCN35 SR enter/exit latency

In reply to Tom Chung

From: Leo Li <[email protected]>

[Why & How]

On Framework laptops with DDR5 modules, underflow can be observed. It's unclear why it only occurs on specific desktop contents. However, increasing enter/exit latencies by 3us seems to resolve it.

---
 .../amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 16 ++++++++--------
 .../gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c +8 -8
index 7abe6811e4df..6fc524752613 100644
@@ -766,32 +766,32 @@ static struct wm_table ddr5_wm_table = {
 			.wm_inst = WM_A,
 			.wm_type = WM_TYPE_PSTATE_CHG,
 			.pstate_latency_us = 11.72,
-			.sr_exit_time_us = 28.0,
-			.sr_enter_plus_exit_time_us = 30.0,
+			.sr_exit_time_us = 31.0,
+			.sr_enter_plus_exit_time_us = 33.0,
 			.valid = true,
 		},
 		{
 			.wm_inst = WM_B,
 			.wm_type = WM_TYPE_PSTATE_CHG,
 			.pstate_latency_us = 11.72,
-			.sr_exit_time_us = 28.0,
-			.sr_enter_plus_exit_time_us = 30.0,
+			.sr_exit_time_us = 31.0,
+			.sr_enter_plus_exit_time_us = 33.0,
 			.valid = true,
 		},
 		{
 			.wm_inst = WM_C,
 			.wm_type = WM_TYPE_PSTATE_CHG,
 			.pstate_latency_us = 11.72,
-			.sr_exit_time_us = 28.0,
-			.sr_enter_plus_exit_time_us = 30.0,
+			.sr_exit_time_us = 31.0,
+			.sr_enter_plus_exit_time_us = 33.0,
 			.valid = true,
 		},
 		{
 			.wm_inst = WM_D,
 			.wm_type = WM_TYPE_PSTATE_CHG,
 			.pstate_latency_us = 11.72,
-			.sr_exit_time_us = 28.0,
-			.sr_enter_plus_exit_time_us = 30.0,
+			.sr_exit_time_us = 31.0,
+			.sr_enter_plus_exit_time_us = 33.0,
 			.valid = true,
 		},
 	}
drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +2 -2
index 817a370e80a7..8a177d5ae213 100644
@@ -164,8 +164,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_5_soc = {
 		},
 	},
 	.num_states = 5,
-	.sr_exit_time_us = 28.0,
-	.sr_enter_plus_exit_time_us = 30.0,
+	.sr_exit_time_us = 31.0,
+	.sr_enter_plus_exit_time_us = 33.0,
 	.sr_exit_z8_time_us = 250.0,
 	.sr_enter_plus_exit_z8_time_us = 350.0,
 	.fclk_change_latency_us = 24.0,
Signature · 1 line
2.43.0
author
#7 lore raw

PATCH 7/16 drm/amd/display: Make GPIO HPD path conditional

In reply to Tom Chung

From: Roman Li <[email protected]>

[Why]
Avoid unnecessary GPIO configuration attempts on dcn that doesn't support it.

[How]
Conditionally use GPIO HPD detection or rely on hw encoder path.

---
 drivers/gpu/drm/amd/display/dc/link/link_factory.c       | 8 +++++---
 drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c | 9 +++++++--
 2 files changed, 12 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/dc/link/link_factory.c +5 -3
index 5fbcf04c6251..6f4c3c73e113 100644
@@ -564,9 +564,11 @@ static bool construct_phy(struct dc_link *link,
 	enc_init_data.analog_engine = find_analog_engine(link, &enc_init_data.analog_encoder);
 	enc_init_data.encoder = link_encoder;
 	enc_init_data.analog_engine = link_analog_engine;
-	enc_init_data.hpd_gpio = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
-				      link->ctx->gpio_service);
-
+	if (link->ctx->dce_version <= DCN_VERSION_4_01)
+		enc_init_data.hpd_gpio = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
+					      link->ctx->gpio_service);
+	else
+		enc_init_data.hpd_gpio = NULL;
 	if (enc_init_data.hpd_gpio) {
 		dal_gpio_open(enc_init_data.hpd_gpio, GPIO_MODE_INTERRUPT);
 		dal_gpio_unlock_pin(enc_init_data.hpd_gpio);
drivers/gpu/drm/amd/display/dc/link/protocols/link_hpd.c +7 -2
index 29f3a03687b2..b157d05b67ad 100644
@@ -136,8 +136,13 @@ enum hpd_source_id get_hpd_line(struct dc_link *link)
 
 		hpd_id = HPD_SOURCEID_UNKNOWN;
 
-	hpd = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
-			   link->ctx->gpio_service);
+	/* Use GPIO path where supported, otherwise use hardware encoder path */
+	if (link->ctx && link->ctx->dce_version <= DCN_VERSION_4_01) {
+		hpd = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
+				   link->ctx->gpio_service);
+	} else {
+		hpd = NULL;
+	}
 
 	if (hpd) {
 		switch (dal_irq_get_source(hpd)) {
Signature · 1 line
2.43.0
author
#8 lore raw

PATCH 8/16 drm/amd/display: Parse all extension blocks for VSDB

In reply to Tom Chung

From: Ray Wu <[email protected]>

[Why]
VSDB parsing loop only searched within the first extension block. If the VSDB was located in a subsequent extension block, it would not be found.

[How]
Calculate the total length of all extension blocks (EDID_LENGTH * edid->extensions) and use that as the loop boundary, allowing the parser to search through all available extension blocks.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -1
index b9e8ea4396b5..7af538adac46 100644
@@ -13135,6 +13135,7 @@ static int parse_amd_vsdb(struct amdgpu_dm_connector *aconnector,
 	u8 *edid_ext = NULL;
 	int i;
 	int j = 0;
+	int total_ext_block_len;
 
 	if (edid == NULL || edid->extensions == 0)
 		return -ENODEV;
@@ -13146,7 +13147,8 @@ static int parse_amd_vsdb(struct amdgpu_dm_connector *aconnector,
 			break;
 	}
 
-	while (j < EDID_LENGTH - sizeof(struct amd_vsdb_block)) {
+	total_ext_block_len = EDID_LENGTH * edid->extensions;
+	while (j < total_ext_block_len - sizeof(struct amd_vsdb_block)) {
 		struct amd_vsdb_block *amd_vsdb = (struct amd_vsdb_block *)&edid_ext[j];
 		unsigned int ieeeId = (amd_vsdb->ieee_id[2] << 16) | (amd_vsdb->ieee_id[1] << 8) | (amd_vsdb->ieee_id[0]);
 
Signature · 1 line
2.43.0
author
#9 lore raw

PATCH 9/16 Revert "drm/amd/display: mouse event trigger to boost RR when idle"

In reply to Tom Chung

From: Muaaz Nisar <[email protected]>

This reverts commit 67f77421bdb59680ff047cb230a4f00946539e6b. It cause some regression.

---
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 13 -------------
 1 file changed, 13 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +0 -13
index f59020f1a722..9349cccc8438 100644
@@ -515,19 +515,6 @@ bool dc_stream_program_cursor_position(
 			}
 		}
 
-		/* apply manual trigger */
-		int i;
-
-		for (i = 0; i < dc->res_pool->pipe_count; i++) {
-			struct pipe_ctx *pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i];
-
-			/* trigger event on first pipe with current stream */
-			if (stream == pipe_ctx->stream) {
-				pipe_ctx->stream_res.tg->funcs->program_manual_trigger(pipe_ctx->stream_res.tg);
-				break;
-			}
-		}
-
 		return true;
 	}
 
Signature · 1 line
2.43.0
author
#10 lore raw

PATCH 10/16 drm/amd/display: Correct hubp GfxVersion verification

In reply to Tom Chung

From: Nicholas Carbones <[email protected]>

[Why]
DcGfxBase case was not accounted for in hubp program tiling functions, causing tiling corruption on PNP.

[How]
Add handling for DcGfxBase so that tiling gets properly cleared.

---
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.c    | 35 +++++++++++--------
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.c    | 28 ++++++++-------
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    | 28 ++++++++-------
 3 files changed, 52 insertions(+), 39 deletions(-)
drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c +20 -15
index e697d9bf1b44..78c866688c61 100644
@@ -145,21 +145,26 @@ void hubp1_program_tiling(
 {
 	struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
 
-	ASSERT(info->gfxversion == DcGfxVersion9);
-
-	REG_UPDATE_6(DCSURF_ADDR_CONFIG,
-			NUM_PIPES, log_2(info->gfx9.num_pipes),
-			NUM_BANKS, log_2(info->gfx9.num_banks),
-			PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
-			NUM_SE, log_2(info->gfx9.num_shader_engines),
-			NUM_RB_PER_SE, log_2(info->gfx9.num_rb_per_se),
-			MAX_COMPRESSED_FRAGS, log_2(info->gfx9.max_compressed_frags));
-
-	REG_UPDATE_4(DCSURF_TILING_CONFIG,
-			SW_MODE, info->gfx9.swizzle,
-			META_LINEAR, info->gfx9.meta_linear,
-			RB_ALIGNED, info->gfx9.rb_aligned,
-			PIPE_ALIGNED, info->gfx9.pipe_aligned);
+	ASSERT(info->gfxversion == DcGfxVersion9 || info->gfxversion == DcGfxBase);
+
+	if (info->gfxversion == DcGfxVersion9) {
+		REG_UPDATE_6(DCSURF_ADDR_CONFIG,
+				NUM_PIPES, log_2(info->gfx9.num_pipes),
+				NUM_BANKS, log_2(info->gfx9.num_banks),
+				PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
+				NUM_SE, log_2(info->gfx9.num_shader_engines),
+				NUM_RB_PER_SE, log_2(info->gfx9.num_rb_per_se),
+				MAX_COMPRESSED_FRAGS, log_2(info->gfx9.max_compressed_frags));
+
+		REG_UPDATE_4(DCSURF_TILING_CONFIG,
+				SW_MODE, info->gfx9.swizzle,
+				META_LINEAR, info->gfx9.meta_linear,
+				RB_ALIGNED, info->gfx9.rb_aligned,
+				PIPE_ALIGNED, info->gfx9.pipe_aligned);
+	} else {
+		hubp1_clear_tiling(&hubp1->base);
+	}
+
 }
 
 void hubp1_program_size(
drivers/gpu/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c +16 -12
index 4715e60e812a..aaa8f8cf6c30 100644
@@ -313,18 +313,22 @@ static void hubp2_program_tiling(
 	const struct dc_tiling_info *info,
 	const enum surface_pixel_format pixel_format)
 {
-	ASSERT(info->gfxversion == DcGfxVersion9);
-
-	REG_UPDATE_3(DCSURF_ADDR_CONFIG,
-			NUM_PIPES, log_2(info->gfx9.num_pipes),
-			PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
-			MAX_COMPRESSED_FRAGS, log_2(info->gfx9.max_compressed_frags));
-
-	REG_UPDATE_4(DCSURF_TILING_CONFIG,
-			SW_MODE, info->gfx9.swizzle,
-			META_LINEAR, 0,
-			RB_ALIGNED, 0,
-			PIPE_ALIGNED, 0);
+	ASSERT(info->gfxversion == DcGfxVersion9 || info->gfxversion == DcGfxBase);
+
+	if (info->gfxversion == DcGfxVersion9) {
+		REG_UPDATE_3(DCSURF_ADDR_CONFIG,
+				NUM_PIPES, log_2(info->gfx9.num_pipes),
+				PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
+				MAX_COMPRESSED_FRAGS, log_2(info->gfx9.max_compressed_frags));
+
+		REG_UPDATE_4(DCSURF_TILING_CONFIG,
+				SW_MODE, info->gfx9.swizzle,
+				META_LINEAR, 0,
+				RB_ALIGNED, 0,
+				PIPE_ALIGNED, 0);
+	} else {
+		hubp2_clear_tiling(&hubp2->base);
+	}
 }
 
 void hubp2_program_size(
drivers/gpu/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c +16 -12
index 207c2f86b7d7..2126830a5a9e 100644
@@ -321,18 +321,22 @@ void hubp3_program_tiling(
 	const struct dc_tiling_info *info,
 	const enum surface_pixel_format pixel_format)
 {
-	ASSERT(info->gfxversion == DcGfxVersion9);
-
-	REG_UPDATE_4(DCSURF_ADDR_CONFIG,
-		NUM_PIPES, log_2(info->gfx9.num_pipes),
-		PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
-		MAX_COMPRESSED_FRAGS, log_2(info->gfx9.max_compressed_frags),
-		NUM_PKRS, log_2(info->gfx9.num_pkrs));
-
-	REG_UPDATE_3(DCSURF_TILING_CONFIG,
-			SW_MODE, info->gfx9.swizzle,
-			META_LINEAR, info->gfx9.meta_linear,
-			PIPE_ALIGNED, info->gfx9.pipe_aligned);
+	ASSERT(info->gfxversion == DcGfxVersion9 || info->gfxversion == DcGfxBase);
+
+	if (info->gfxversion == DcGfxVersion9) {
+		REG_UPDATE_4(DCSURF_ADDR_CONFIG,
+			NUM_PIPES, log_2(info->gfx9.num_pipes),
+			PIPE_INTERLEAVE, info->gfx9.pipe_interleave,
+			MAX_COMPRESSED_FRAGS, log_2(info->gfx9.max_compressed_frags),
+			NUM_PKRS, log_2(info->gfx9.num_pkrs));
+
+		REG_UPDATE_3(DCSURF_TILING_CONFIG,
+				SW_MODE, info->gfx9.swizzle,
+				META_LINEAR, info->gfx9.meta_linear,
+				PIPE_ALIGNED, info->gfx9.pipe_aligned);
+	} else {
+		hubp3_clear_tiling(&hubp2->base);
+	}
 
 }
 
Signature · 1 line
2.43.0
author
#11 lore raw

PATCH 11/16 drm/amd/display: Revert "Migrate DCCG register access from hwseq to dccg component."

In reply to Tom Chung

From: Nicholas Carbones <[email protected]>

[Why & How]
This reverts commit a90acf60ab9dc283d0a13ede90e393c702a985c7, which causes regressions related to HDCP when resuming from S3.

---
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.c    | 54 +------------------
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.h    | 18 ++-----
 .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c   | 29 +++++++---
 .../amd/display/dc/hwss/dcn201/dcn201_hwseq.c |  5 +-
 .../amd/display/dc/hwss/dcn21/dcn21_hwseq.c   |  9 ++--
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |  3 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  5 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h  |  4 --
 12 files changed, 49 insertions(+), 98 deletions(-)
drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c +1 -53
index 50b98822b6fd..33d8bd91cb01 100644
@@ -131,54 +131,6 @@ void dccg2_otg_drop_pixel(struct dccg *dccg,
 
 void dccg2_init(struct dccg *dccg)
 {
-	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
-
-	/* Hardcoded register values for DCN20
-	 * These are specific to 100Mhz refclk
-	 * Different ASICs with different refclk may override this in their own init
-	 */
-	REG_WRITE(MICROSECOND_TIME_BASE_DIV, 0x00120264);
-	REG_WRITE(MILLISECOND_TIME_BASE_DIV, 0x001186a0);
-	REG_WRITE(DISPCLK_FREQ_CHANGE_CNTL, 0x0e01003c);
-
-	if (REG(REFCLK_CNTL))
-		REG_WRITE(REFCLK_CNTL, 0);
-}
-
-void dccg2_refclk_setup(struct dccg *dccg)
-{
-	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
-
-	/* REFCLK programming that must occur after hubbub initialization */
-	if (REG(REFCLK_CNTL))
-		REG_WRITE(REFCLK_CNTL, 0);
-}
-
-bool dccg2_is_s0i3_golden_init_wa_done(struct dccg *dccg)
-{
-	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
-
-	return REG_READ(MICROSECOND_TIME_BASE_DIV) == 0x00120464;
-}
-
-void dccg2_allow_clock_gating(struct dccg *dccg, bool allow)
-{
-	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
-
-	if (allow) {
-		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0);
-		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0);
-	} else {
-		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0xFFFFFFFF);
-		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0xFFFFFFFF);
-	}
-}
-
-void dccg2_enable_memory_low_power(struct dccg *dccg, bool enable)
-{
-	struct dcn_dccg *dccg_dcn = TO_DCN_DCCG(dccg);
-
-	REG_UPDATE(DC_MEM_GLOBAL_PWR_REQ_CNTL, DC_MEM_GLOBAL_PWR_REQ_DIS, enable ? 0 : 1);
 }
 
 static const struct dccg_funcs dccg2_funcs = {
@@ -187,11 +139,7 @@ static const struct dccg_funcs dccg2_funcs = {
 	.set_fifo_errdet_ovr_en = dccg2_set_fifo_errdet_ovr_en,
 	.otg_add_pixel = dccg2_otg_add_pixel,
 	.otg_drop_pixel = dccg2_otg_drop_pixel,
-	.dccg_init = dccg2_init,
-	.refclk_setup = dccg2_refclk_setup, /* Deprecated - for backward compatibility only */
-	.allow_clock_gating = dccg2_allow_clock_gating,
-	.enable_memory_low_power = dccg2_enable_memory_low_power,
-	.is_s0i3_golden_init_wa_done = dccg2_is_s0i3_golden_init_wa_done
+	.dccg_init = dccg2_init
 };
 
 struct dccg *dccg2_create(
drivers/gpu/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h +3 -15
index 237a684ded86..8bdffd9ff31b 100644
@@ -46,9 +46,7 @@
 	DCCG_SRII(PIXEL_RATE_CNTL, OTG, 2),\
 	DCCG_SRII(PIXEL_RATE_CNTL, OTG, 3),\
 	DCCG_SRII(PIXEL_RATE_CNTL, OTG, 4),\
-	DCCG_SRII(PIXEL_RATE_CNTL, OTG, 5),\
-	SR(DCCG_GATE_DISABLE_CNTL),\
-	SR(DCCG_GATE_DISABLE_CNTL2)
+	DCCG_SRII(PIXEL_RATE_CNTL, OTG, 5)
 
 #define DCCG_SF(reg_name, field_name, post_fix)\
 	.field_name = reg_name ## __ ## field_name ## post_fix
@@ -83,8 +81,7 @@
 	DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 0, mask_sh),\
 	DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, ADD_PIXEL, 1, mask_sh),\
 	DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 0, mask_sh),\
-	DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 1, mask_sh),\
-	DCCG_SF(DC_MEM_GLOBAL_PWR_REQ_CNTL, DC_MEM_GLOBAL_PWR_REQ_DIS, mask_sh)
+	DCCG_SFII(OTG, PIXEL_RATE_CNTL, OTG, DROP_PIXEL, 1, mask_sh)
 
 
 
@@ -133,8 +130,7 @@
 	type DISPCLK_CHG_FWD_CORR_DISABLE;\
 	type DISPCLK_FREQ_CHANGE_CNTL;\
 	type OTG_ADD_PIXEL[MAX_PIPES];\
-	type OTG_DROP_PIXEL[MAX_PIPES];\
-	type DC_MEM_GLOBAL_PWR_REQ_DIS;
+	type OTG_DROP_PIXEL[MAX_PIPES];
 
 #define DCCG3_REG_FIELD_LIST(type) \
 	type HDMICHARCLK0_EN;\
@@ -519,14 +515,6 @@ void dccg2_otg_drop_pixel(struct dccg *dccg,
 
 void dccg2_init(struct dccg *dccg);
 
-void dccg2_refclk_setup(struct dccg *dccg);
-
-bool dccg2_is_s0i3_golden_init_wa_done(struct dccg *dccg);
-
-void dccg2_allow_clock_gating(struct dccg *dccg, bool allow);
-
-void dccg2_enable_memory_low_power(struct dccg *dccg, bool enable);
-
 struct dccg *dccg2_create(
 	struct dc_context *ctx,
 	const struct dccg_registers *regs,
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c +3 -2
index 5243177c1faa..9613d1ceb5dc 100644
@@ -1887,8 +1887,9 @@ void dcn10_init_hw(struct dc *dc)
 
 	if (!dc->debug.disable_clock_gate) {
 		/* enable all DCN clock gating */
-		if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->allow_clock_gating)
-			dc->res_pool->dccg->funcs->allow_clock_gating(dc->res_pool->dccg, true);
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0);
+
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0);
 
 		REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
 	}
drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c +21 -8
index 307e8f8060e6..0ee3a0041c61 100644
@@ -357,10 +357,26 @@ void dcn20_enable_power_gating_plane(
 
 void dcn20_dccg_init(struct dce_hwseq *hws)
 {
-	struct dc *dc = hws->ctx->dc;
+	/*
+	 * set MICROSECOND_TIME_BASE_DIV
+	 * 100Mhz refclk -> 0x120264
+	 * 27Mhz refclk -> 0x12021b
+	 * 48Mhz refclk -> 0x120230
+	 *
+	 */
+	REG_WRITE(MICROSECOND_TIME_BASE_DIV, 0x120264);
+
+	/*
+	 * set MILLISECOND_TIME_BASE_DIV
+	 * 100Mhz refclk -> 0x1186a0
+	 * 27Mhz refclk -> 0x106978
+	 * 48Mhz refclk -> 0x10bb80
+	 *
+	 */
+	REG_WRITE(MILLISECOND_TIME_BASE_DIV, 0x1186a0);
 
-	if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->dccg_init)
-		dc->res_pool->dccg->funcs->dccg_init(dc->res_pool->dccg);
+	/* This value is dependent on the hardware pipeline delay so set once per SOC */
+	REG_WRITE(DISPCLK_FREQ_CHANGE_CNTL, 0xe01003c);
 }
 
 void dcn20_disable_vga(
@@ -3140,11 +3156,8 @@ void dcn20_fpga_init_hw(struct dc *dc)
 
 	dcn10_hubbub_global_timer_enable(dc->res_pool->hubbub, true, 2);
 
-	if (hws->funcs.dccg_init)
-		hws->funcs.dccg_init(hws);
-
-	if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->refclk_setup)
-		dc->res_pool->dccg->funcs->refclk_setup(dc->res_pool->dccg);
+	if (REG(REFCLK_CNTL))
+		REG_WRITE(REFCLK_CNTL, 0);
 	//
 
 
drivers/gpu/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c +3 -2
index ce18d75fd991..6298bd87a18b 100644
@@ -367,8 +367,9 @@ void dcn201_init_hw(struct dc *dc)
 
 	if (!dc->debug.disable_clock_gate) {
 		/* enable all DCN clock gating */
-		if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->allow_clock_gating)
-			dc->res_pool->dccg->funcs->allow_clock_gating(dc->res_pool->dccg, true);
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0);
+
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0);
 
 		REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
 	}
drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c +5 -4
index 062745389d9a..e2269211553c 100644
@@ -33,7 +33,6 @@
 #include "vmid.h"
 #include "reg_helper.h"
 #include "hw/clk_mgr.h"
-#include "hw/dccg.h"
 #include "dc_dmub_srv.h"
 #include "abm.h"
 #include "link_service.h"
@@ -88,10 +87,12 @@ int dcn21_init_sys_ctx(struct dce_hwseq *hws, struct dc *dc, struct dc_phy_addr_
 
 bool dcn21_s0i3_golden_init_wa(struct dc *dc)
 {
-	if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->is_s0i3_golden_init_wa_done)
-		return !dc->res_pool->dccg->funcs->is_s0i3_golden_init_wa_done(dc->res_pool->dccg);
+	struct dce_hwseq *hws = dc->hwseq;
+	uint32_t value = 0;
 
-	return false;
+	value = REG_READ(MICROSECOND_TIME_BASE_DIV);
+
+	return value != 0x00120464;
 }
 
 void dcn21_exit_optimized_pwr_state(
drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c +3 -2
index d58f2cf2615c..cfabda421eb5 100644
@@ -800,8 +800,9 @@ void dcn30_init_hw(struct dc *dc)
 
 	if (!dc->debug.disable_clock_gate) {
 		/* enable all DCN clock gating */
-		if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->allow_clock_gating)
-			dc->res_pool->dccg->funcs->allow_clock_gating(dc->res_pool->dccg, true);
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0);
+
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0);
 
 		REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
 	}
drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c +3 -2
index db2f7cbb12ff..fa35d538a10a 100644
@@ -247,8 +247,9 @@ void dcn31_init_hw(struct dc *dc)
 
 	if (!dc->debug.disable_clock_gate) {
 		/* enable all DCN clock gating */
-		if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->allow_clock_gating)
-			dc->res_pool->dccg->funcs->allow_clock_gating(dc->res_pool->dccg, true);
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0);
+
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0);
 
 		REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
 	}
drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c +3 -2
index 37300e12e645..11f32dcc0a3e 100644
@@ -961,8 +961,9 @@ void dcn32_init_hw(struct dc *dc)
 
 	if (!dc->debug.disable_clock_gate) {
 		/* enable all DCN clock gating */
-		if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->allow_clock_gating)
-			dc->res_pool->dccg->funcs->allow_clock_gating(dc->res_pool->dccg, true);
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0);
+
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0);
 
 		REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
 	}
drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c +1 -2
index b5a4cefbd35f..0cbd75ab61a1 100644
@@ -286,8 +286,7 @@ void dcn35_init_hw(struct dc *dc)
 	}
 
 	if (dc->debug.disable_mem_low_power) {
-		if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->enable_memory_low_power)
-			dc->res_pool->dccg->funcs->enable_memory_low_power(dc->res_pool->dccg, false);
+		REG_UPDATE(DC_MEM_GLOBAL_PWR_REQ_CNTL, DC_MEM_GLOBAL_PWR_REQ_DIS, 1);
 	}
 	if (!dcb->funcs->is_accelerated_mode(dcb) && dc->res_pool->hubbub->funcs->init_watermarks)
 		dc->res_pool->hubbub->funcs->init_watermarks(dc->res_pool->hubbub);
drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c +3 -2
index 9cda39d0ed95..55b22439cf1b 100644
@@ -326,8 +326,9 @@ void dcn401_init_hw(struct dc *dc)
 
 	if (!dc->debug.disable_clock_gate) {
 		/* enable all DCN clock gating */
-		if (dc->res_pool->dccg && dc->res_pool->dccg->funcs && dc->res_pool->dccg->funcs->allow_clock_gating)
-			dc->res_pool->dccg->funcs->allow_clock_gating(dc->res_pool->dccg, true);
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL, 0);
+
+		REG_WRITE(DCCG_GATE_DISABLE_CNTL2, 0);
 
 		REG_UPDATE(DCFCLK_CNTL, DCFCLK_GATE_DIS, 0);
 	}
drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h +0 -4
index a26d31ab7cba..1e6ffd86a4c0 100644
@@ -224,9 +224,6 @@ struct dccg_funcs {
 	void (*otg_drop_pixel)(struct dccg *dccg,
 			uint32_t otg_inst);
 	void (*dccg_init)(struct dccg *dccg);
-	void (*refclk_setup)(struct dccg *dccg); /* Deprecated - for backward compatibility only */
-	void (*allow_clock_gating)(struct dccg *dccg, bool allow);
-	void (*enable_memory_low_power)(struct dccg *dccg, bool enable);
 	void (*set_dpstreamclk_root_clock_gating)(
 			struct dccg *dccg,
 			int dp_hpo_inst,
@@ -337,7 +334,6 @@ struct dccg_funcs {
 	void (*dccg_root_gate_disable_control)(struct dccg *dccg, uint32_t pipe_idx, uint32_t disable_clock_gating);
 	void (*dccg_read_reg_state)(struct dccg *dccg, struct dcn_dccg_reg_state *dccg_reg_state);
 	void (*dccg_enable_global_fgcg)(struct dccg *dccg, bool enable);
-	bool (*is_s0i3_golden_init_wa_done)(struct dccg *dccg);
 };
 
 #endif //__DAL_DCCG_H__
Signature · 1 line
2.43.0
author
#12 lore raw

PATCH 12/16 drm/amd/display: bypass post csc for additional color spaces in dal

In reply to Tom Chung

From: Clay King <[email protected]>

[Why]
For RGB BT2020 full and limited color spaces, overlay adjustments were applied twice (once by MM and once by DAL). This results in incorrect colours and a noticeable difference between mpo and non-mpo cases.

[How]
Add RGB BT2020 full and limited color spaces to list that bypasses post csc adjustment.

---
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  | 21 ++++++++++++++++---
 .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h  |  4 ++++
 .../amd/display/dc/dpp/dcn401/dcn401_dpp.c    |  6 +++---
 3 files changed, 25 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c +18 -3
index ef4a16117181..c7923531da83 100644
@@ -376,10 +376,10 @@ void dpp3_cnv_setup (
 
 		tbl_entry.color_space = input_color_space;
 
-		if (color_space >= COLOR_SPACE_YCBCR601)
-			select = INPUT_CSC_SELECT_ICSC;
-		else
+		if (dpp3_should_bypass_post_csc_for_colorspace(color_space))
 			select = INPUT_CSC_SELECT_BYPASS;
+		else
+			select = INPUT_CSC_SELECT_ICSC;
 
 		dpp3_program_post_csc(dpp_base, color_space, select,
 				      &tbl_entry);
@@ -1541,3 +1541,18 @@ bool dpp3_construct(
 	return true;
 }
 
+bool dpp3_should_bypass_post_csc_for_colorspace(enum dc_color_space dc_color_space)
+{
+	switch (dc_color_space) {
+	case COLOR_SPACE_UNKNOWN:
+	case COLOR_SPACE_SRGB:
+	case COLOR_SPACE_XR_RGB:
+	case COLOR_SPACE_SRGB_LIMITED:
+	case COLOR_SPACE_MSREF_SCRGB:
+	case COLOR_SPACE_2020_RGB_FULLRANGE:
+	case COLOR_SPACE_2020_RGB_LIMITEDRANGE:
+		return true;
+	default:
+		return false;
+	}
+}
drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h +4 -0
index d4a70b4379ea..6a61b99d6a79 100644
@@ -644,4 +644,8 @@ void dpp3_program_cm_dealpha(
 
 void dpp3_cm_get_gamut_remap(struct dpp *dpp_base,
 			     struct dpp_grph_csc_adjustment *adjust);
+
+bool dpp3_should_bypass_post_csc_for_colorspace(
+		enum dc_color_space dc_color_space);
+
 #endif /* __DC_HWSS_DCN30_H__ */
drivers/gpu/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c +3 -3
index 96c2c853de42..2d6a646462e2 100644
@@ -206,10 +206,10 @@ void dpp401_dpp_setup(
 
 		tbl_entry.color_space = input_color_space;
 
-		if (color_space >= COLOR_SPACE_YCBCR601)
-			select = INPUT_CSC_SELECT_ICSC;
-		else
+		if (dpp3_should_bypass_post_csc_for_colorspace(color_space))
 			select = INPUT_CSC_SELECT_BYPASS;
+		else
+			select = INPUT_CSC_SELECT_ICSC;
 
 		dpp3_program_post_csc(dpp_base, color_space, select,
 			&tbl_entry);
Signature · 1 line
2.43.0
author
#13 lore raw

PATCH 13/16 drm/amd/display: Fix system resume lag issue

In reply to Tom Chung

[Why]
System will try to apply idle power optimizations setting during system resume. But system power state is still in D3 state, and it will cause the idle power optimizations command not actually to be sent to DMUB and cause some platforms to go into IPS.

[How]
Set power state to D0 first before calling the dc_dmub_srv_apply_idle_power_optimizations(dm->dc, false)

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +10 -0
index 7af538adac46..3dfbbf66bcd5 100644
@@ -3479,7 +3479,17 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
 	struct dc_commit_streams_params commit_params = {};
 
 	if (dm->dc->caps.ips_support) {
+		if (!amdgpu_in_reset(adev))
+			mutex_lock(&dm->dc_lock);
+
+		/* Need to set POWER_STATE_D0 first or it will not execute
+		 * idle_power_optimizations command to DMUB.
+		 */
+		dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
 		dc_dmub_srv_apply_idle_power_optimizations(dm->dc, false);
+
+		if (!amdgpu_in_reset(adev))
+			mutex_unlock(&dm->dc_lock);
 	}
 
 	if (amdgpu_in_reset(adev)) {
Signature · 1 line
2.43.0
author
#14 lore raw

PATCH 14/16 drm/amd/display: Fix the incorrect type in dml_print

In reply to Tom Chung

From: Alex Hung <[email protected]>

[Why & How]
soc->max_outstanding_reqs is a dml_uint_t, not a dml_float_t.

---
 drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_util.c +1 -1
index 89890c88fd66..4022f91193ed 100644
@@ -655,7 +655,7 @@ __DML_DLL_EXPORT__ void dml_print_soc_bounding_box(const struct soc_bounding_box
 	dml_print("DML: soc_bbox: refclk_mhz = %f\n", soc->refclk_mhz);
 	dml_print("DML: soc_bbox: amclk_mhz = %f\n", soc->amclk_mhz);
 
-	dml_print("DML: soc_bbox: max_outstanding_reqs = %f\n", soc->max_outstanding_reqs);
+	dml_print("DML: soc_bbox: max_outstanding_reqs = %d\n", soc->max_outstanding_reqs);
 	dml_print("DML: soc_bbox: pct_ideal_sdp_bw_after_urgent = %f\n", soc->pct_ideal_sdp_bw_after_urgent);
 	dml_print("DML: soc_bbox: pct_ideal_fabric_bw_after_urgent = %f\n", soc->pct_ideal_fabric_bw_after_urgent);
 	dml_print("DML: soc_bbox: pct_ideal_dram_bw_after_urgent_pixel_only = %f\n", soc->pct_ideal_dram_bw_after_urgent_pixel_only);
Signature · 1 line
2.43.0
author
#15 lore raw

PATCH 15/16 drm/amd/display: [FW Promotion] Release 0.1.46.0

In reply to Tom Chung

From: Taimur Hassan <[email protected]>

Add some struct member and enum for panel replay

---
 drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +15 -0
index 3b4f5e990ec5..6f388c910e18 100644
@@ -1638,6 +1638,11 @@ enum dmub_gpint_command {
 	 * DESC: Initiates IPS wake sequence.
 	 */
 	DMUB_GPINT__IPS_DEBUG_WAKE = 137,
+	/**
+	 * DESC: Do panel power off sequence
+	 * ARGS: 1 - Power off
+	 */
+	DMUB_GPINT__PANEL_POWER_OFF_SEQ = 138,
 };
 
 /**
@@ -4408,6 +4413,7 @@ enum dmub_cmd_panel_replay_type {
 enum dmub_cmd_panel_replay_state_update_subtype {
 	PR_STATE_UPDATE_COASTING_VTOTAL = 0x1,
 	PR_STATE_UPDATE_SYNC_MODE = 0x2,
+	PR_STATE_UPDATE_RUNTIME_FLAGS = 0x3,
 };
 
 enum dmub_cmd_panel_replay_general_subtype {
@@ -6701,6 +6707,13 @@ struct dmub_rb_cmd_pr_copy_settings {
 	struct dmub_cmd_pr_copy_settings_data data;
 };
 
+union dmub_pr_runtime_flags {
+	struct {
+		uint32_t disable_abm_optimization : 1; // Disable ABM optimization for PR
+	} bitfields;
+	uint32_t u32All;
+};
+
 struct dmub_cmd_pr_update_state_data {
 	/**
 	 * Panel Instance.
@@ -6719,6 +6732,8 @@ struct dmub_cmd_pr_update_state_data {
 	 */
 	uint32_t coasting_vtotal;
 	uint32_t sync_mode;
+
+	union dmub_pr_runtime_flags pr_runtime_flags;
 };
 
 struct dmub_cmd_pr_general_cmd_data {
Signature · 1 line
2.43.0
author
#16 lore raw

PATCH 16/16 drm/amd/display: Promote DC to 3.2.369

In reply to Tom Chung

From: Taimur Hassan <[email protected]>

This version brings along following update:
-Fix system resume lag issue
-Correct hubp GfxVersion verification
-Add parse all extension blocks for VSDB
-Increase DCN35 SR enter/exit latency
-Refactor virtual directory reorganize encoder and hwss files -Set enable_legacy_fast_update to false for DCN36 -Avoid updating surface with the same surface under MPO

---
 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 fdfcfa416d16..ce08477d1ccd 100644
@@ -63,7 +63,7 @@ struct dcn_dsc_reg_state;
 struct dcn_optc_reg_state;
 struct dcn_dccg_reg_state;
 
-#define DC_VER "3.2.368"
+#define DC_VER "3.2.369"
 
 /**
  * MAX_SURFACES - representative of the upper bound of surfaces that can be piped to a single CRTC
Signature · 1 line
2.43.0
Tested-by on the v1 series
#17 lore raw
In reply to Tom Chung

[Public]

Hi all,

This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.

APU
* Single Display eDP -> 1080p 60hz, 1920x1200 165hz, 3840x2400 60hz
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* MST DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 2x 4k60hz displays
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* SST PCON -> Club3D CAC-1085 + 1x 4k 144hz, FRL3, at a max resolution supported by the dongle of 4k 120hz YUV420 12bpc.
* MST PCON -> 1x 4k 144hz, FRL3, at a max resolution supported by the adapter of 4k 120hz RGB 8bpc.

DGPU
* Single Display DP (SST DSC) -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* MST DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)

The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)

Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing

The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* Samsung ATNA60YV02-0 3840x2400 60Hz OLED eDP

The patchset consists of the amd-staging-drm-next branch (Head commit - drm/amd/display: Promote DC to 3.2.368) with new patches added on top of it.

Tested on Ubuntu 24.04.3, on Wayland and X11, using Gnome.

Thank you,

Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com

-----Original Message-----
From: Tom Chung <[email protected]>
Sent: Tuesday, February 3, 2026 10:02 AM
To: [email protected]
Cc: Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Pillai, Aurabindo <[email protected]>; Li, Roman <[email protected]>; Lin, Wayne <[email protected]>; Chung, ChiaHsuan (Tom) <[email protected]>; Zuo, Jerry <[email protected]>; Wheeler, Daniel <[email protected]>; Wu, Ray <[email protected]>; LIPSKI, IVAN <[email protected]>; Hung, Alex <[email protected]>
Subject: [PATCH 00/16] DC Patches Feb 09 2026

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

- Fix system resume lag issue
- Correct hubp GfxVersion verification
- Add parse all extension blocks for VSDB
- Increase DCN35 SR enter/exit latency
- Refactor virtual directory reorganize encoder and hwss files
- Set enable_legacy_fast_update to false for DCN36
- Avoid updating surface with the same surface under MPO

Cc Daniel Wheeler <[email protected]>

Alex Hung (1):
drm/amd/display: Fix the incorrect type in dml_print

Bhuvanachandra Pinninti (1):
drm/amd/display: Refactor virtual directory reorganize encoder and
hwss files.

Clay King (1):
drm/amd/display: bypass post csc for additional color spaces in dal

Leo Li (1):
drm/amd/display: Increase DCN35 SR enter/exit latency

Leon Huang (1):
drm/amd/display: Check frame skip capability in Sink side

Muaaz Nisar (1):
Revert "drm/amd/display: mouse event trigger to boost RR when idle"

Nicholas Carbones (2):
drm/amd/display: Correct hubp GfxVersion verification drm/amd/display: Revert "Migrate DCCG register access from hwseq to
dccg component."

Peichen Huang (1):
drm/amd/display: use enum value for panel replay setting

Ray Wu (1):
drm/amd/display: Parse all extension blocks for VSDB

Roman Li (1):
drm/amd/display: Make GPIO HPD path conditional

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

Tom Chung (1):
drm/amd/display: Fix system resume lag issue

Wayne Lin (1):
drm/amd/display: Avoid updating surface with the same surface under
MPO

YiLing Chen (1):
drm/amd/display: set enable_legacy_fast_update to false for DCN36

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 +++++-
 drivers/gpu/drm/amd/display/dc/Makefile       |  2 +-
 .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c  | 16 +++---
 drivers/gpu/drm/amd/display/dc/core/dc.c      |  2 +-
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  4 +-
 .../gpu/drm/amd/display/dc/core/dc_stream.c   | 13 -----
 drivers/gpu/drm/amd/display/dc/dc.h           |  2 +-
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.c    | 54 +------------------
 .../amd/display/dc/dccg/dcn20/dcn20_dccg.h    | 18 ++-----
 drivers/gpu/drm/amd/display/dc/dio/Makefile   |  9 ++++
 .../{ => dio}/virtual/virtual_link_encoder.c  |  2 -  .../{ => dio}/virtual/virtual_link_encoder.h  |  0
 .../virtual/virtual_stream_encoder.c          |  1 -
 .../virtual/virtual_stream_encoder.h          |  0
 .../drm/amd/display/dc/dml/dcn35/dcn35_fpu.c  |  4 +-  .../amd/display/dc/dml2_0/display_mode_util.c |  2 +-  .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c  | 21 ++++++--  .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h  |  4 ++
 .../amd/display/dc/dpp/dcn401/dcn401_dpp.c    |  6 +--
 .../amd/display/dc/hubp/dcn10/dcn10_hubp.c    | 35 ++++++------
 .../amd/display/dc/hubp/dcn20/dcn20_hubp.c    | 28 +++++-----
 .../amd/display/dc/hubp/dcn30/dcn30_hubp.c    | 28 +++++-----
 .../amd/display/dc/hwss/dcn10/dcn10_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn20/dcn20_hwseq.c   | 29 +++++++---
 .../amd/display/dc/hwss/dcn201/dcn201_hwseq.c |  5 +-
 .../amd/display/dc/hwss/dcn21/dcn21_hwseq.c   |  9 ++--
 .../amd/display/dc/hwss/dcn30/dcn30_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn31/dcn31_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn32/dcn32_hwseq.c   |  5 +-
 .../amd/display/dc/hwss/dcn35/dcn35_hwseq.c   |  3 +-
 .../amd/display/dc/hwss/dcn401/dcn401_hwseq.c |  5 +-  drivers/gpu/drm/amd/display/dc/inc/hw/dccg.h  |  4 --  drivers/gpu/drm/amd/display/dc/link/Makefile  |  3 +-
 .../hwss/link_hwss_virtual.c}                 |  2 +-
 .../hwss/link_hwss_virtual.h}                 |  6 +--
 .../drm/amd/display/dc/link/link_factory.c    |  8 +--
 .../dc/link/protocols/link_dp_panel_replay.c  | 14 ++++-  .../amd/display/dc/link/protocols/link_hpd.c  |  9 +++-
 .../dc/resource/dce100/dce100_resource.c      |  2 +-
 .../dc/resource/dce120/dce120_resource.c      |  2 +-
 .../dc/resource/dcn10/dcn10_resource.c        |  2 +-
 .../dc/resource/dcn20/dcn20_resource.c        |  2 +-
 .../dc/resource/dcn201/dcn201_resource.c      |  2 +-
 .../dc/resource/dcn21/dcn21_resource.c        |  2 +-
 .../dc/resource/dcn30/dcn30_resource.c        |  2 +-
 .../dc/resource/dcn301/dcn301_resource.c      |  2 +-
 .../dc/resource/dcn31/dcn31_resource.c        |  2 +-
 .../dc/resource/dcn314/dcn314_resource.c      |  2 +-
 .../dc/resource/dcn315/dcn315_resource.c      |  2 +-
 .../dc/resource/dcn316/dcn316_resource.c      |  2 +-
 .../dc/resource/dcn32/dcn32_resource.c        |  2 +-
 .../dc/resource/dcn321/dcn321_resource.c      |  2 +-
 .../dc/resource/dcn35/dcn35_resource.c        |  2 +-
 .../dc/resource/dcn351/dcn351_resource.c      |  2 +-
 .../dc/resource/dcn36/dcn36_resource.c        |  4 +-
 .../dc/resource/dcn401/dcn401_resource.c      |  2 +-
 .../gpu/drm/amd/display/dc/virtual/Makefile   | 30 -----------
 .../gpu/drm/amd/display/dmub/inc/dmub_cmd.h   | 15 ++++++
 58 files changed, 229 insertions(+), 238 deletions(-)  rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_link_encoder.c (99%)  rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_link_encoder.h (100%)  rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_stream_encoder.c (99%)  rename drivers/gpu/drm/amd/display/dc/{ => dio}/virtual/virtual_stream_encoder.h (100%)  rename drivers/gpu/drm/amd/display/dc/{virtual/virtual_link_hwss.c => link/hwss/link_hwss_virtual.c} (98%)  rename drivers/gpu/drm/amd/display/dc/{virtual/virtual_link_hwss.h => link/hwss/link_hwss_virtual.h} (92%)  delete mode 100644 drivers/gpu/drm/amd/display/dc/virtual/Makefile

--
2.43.0