All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/20] DC Patches Jan 22, 2019
@ 2019-01-22 18:28 sunpeng.li-5C7GfCeVMHo
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Leo Li

From: Leo Li <sunpeng.li@amd.com>

Summary of change:
* Fixes for pageflipping logic
    * Multiplane flipping support
    * Make it more atomic
* Fix CRC capture on pipes with no active vblank reference
* Simplify commit for scaling and ABM changes


David Francis (5):
  drm/amd/display: Simplify underscan and ABM commit
  drm/amd/display: Know what a pageflip is
  drm/amd/display: Call into DC once per multiplane flip
  drm/amd/display: Let updates with no scaling changes be fast
  drm/amd/display: Perform plane updates only when needed

Eric Yang (2):
  revert "drm/amd/display: Add condition to sync eDP SW status and HW
    status"
  drm/amd/display: take dpms_off into account for edp turn off logic

Eryk Brol (2):
  drm/amd/display: Restructure DCN10 hubbub
  drm/amd/display: Introduce DC VM interface

Fatemeh Darbehani (1):
  drm/amd/display: Add Vline1 interrupt source to InterruptManager

John Barberiz (1):
  drm/amd/display: Fix use of uninitialized union

Josip Pavic (3):
  drm/amd/display: Update DMCU versioning mechanism
  drm/amd/display: Create switching mechanism for ABM 2.2
  drm/amd/display: Adjust ABM 2.2 contrast parameters

Krunoslav Kovac (1):
  drm/amd/display: Default to linear output gamma

Martin Tsai (1):
  drm/amd/display: Poll pending down rep before clear payload allocation
    table

Nicholas Kazlauskas (2):
  drm/amd/display: Enable vblank interrupt during CRC capture
  drm/amd/display: Re-enable CRC capture following modeset

Steven Chiu (1):
  drm/amd/display: 3.2.15

hersen wu (1):
  drm/amd/display: Connect dig_fe to otg directly instead of calling
    bios

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 583 +++++++++-----------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c  |  48 +-
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c  |   7 +
 drivers/gpu/drm/amd/display/dc/Makefile            |   3 +-
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  |  14 -
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c |  16 -
 .../drm/amd/display/dc/bios/bios_parser_helper.c   |  93 ----
 .../drm/amd/display/dc/bios/bios_parser_helper.h   |   4 -
 .../gpu/drm/amd/display/dc/bios/command_table.c    | 116 ----
 .../gpu/drm/amd/display/dc/bios/command_table.h    |   3 -
 .../gpu/drm/amd/display/dc/bios/command_table2.c   |  70 ---
 .../gpu/drm/amd/display/dc/bios/command_table2.h   |   3 -
 drivers/gpu/drm/amd/display/dc/core/dc.c           |  12 +-
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      |   5 +
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c   |   2 +-
 drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c | 127 +++++
 drivers/gpu/drm/amd/display/dc/dc.h                |   2 +-
 drivers/gpu/drm/amd/display/dc/dc_bios_types.h     |   9 -
 drivers/gpu/drm/amd/display/dc/dc_hw_types.h       |   2 +
 drivers/gpu/drm/amd/display/dc/dc_stream.h         |  14 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c      |   6 +-
 .../drm/amd/display/dc/dce/dce_stream_encoder.c    |  10 +-
 .../drm/amd/display/dc/dce/dce_stream_encoder.h    |   8 +-
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    |  81 +--
 .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c    | 131 +++--
 .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h    |  23 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c  |   3 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h  |   5 -
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |   3 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c  |  72 +--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h  |  12 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |   9 +-
 .../amd/display/dc/dcn10/dcn10_stream_encoder.c    |   9 +
 .../amd/display/dc/dcn10/dcn10_stream_encoder.h    |  10 +-
 drivers/gpu/drm/amd/display/dc/dm_helpers.h        |   7 +
 drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h   |   4 +
 drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h       |   6 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h       |   3 +-
 .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h |   4 +
 .../drm/amd/display/dc/inc/hw/timing_generator.h   |  13 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h       |  49 ++
 drivers/gpu/drm/amd/display/dc/inc/vm_helper.h     |  55 ++
 drivers/gpu/drm/amd/display/dc/irq_types.h         |   8 +
 .../drm/amd/display/modules/color/color_gamma.c    |  73 +--
 .../drm/amd/display/modules/power/power_helpers.c  | 592 +++++++++++++++------
 45 files changed, 1229 insertions(+), 1100 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/inc/vm_helper.h

-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH 01/20] drm/amd/display: Restructure DCN10 hubbub
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 02/20] drm/amd/display: Introduce DC VM interface sunpeng.li-5C7GfCeVMHo
                     ` (18 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Eryk Brol

From: Eryk Brol <eryk.brol@amd.com>

[Why]
Change DCN10 hubbub to use hubbub as a base and allow all future DCN
hubbubs to do the same instead of using DCN10_hubbub. This increases
readability and doesn't require future hubbubs to inherit anything
other than the base hubbub struct.

[How]
Create separate DCN10_hubbub struct which uses the hubbub struct as
a base.

Signed-off-by: Eryk Brol <eryk.brol@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c    | 131 ++++++++++++---------
 .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h    |   9 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |   8 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h   |   4 +
 4 files changed, 88 insertions(+), 64 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c
index eb31a5e..5a4614c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c
@@ -29,19 +29,20 @@
 #include "reg_helper.h"
 
 #define CTX \
-	hubbub->ctx
+	hubbub1->base.ctx
 #define DC_LOGGER \
-	hubbub->ctx->logger
+	hubbub1->base.ctx->logger
 #define REG(reg)\
-	hubbub->regs->reg
+	hubbub1->regs->reg
 
 #undef FN
 #define FN(reg_name, field_name) \
-	hubbub->shifts->field_name, hubbub->masks->field_name
+	hubbub1->shifts->field_name, hubbub1->masks->field_name
 
 void hubbub1_wm_read_state(struct hubbub *hubbub,
 		struct dcn_hubbub_wm *wm)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
 	struct dcn_hubbub_wm_set *s;
 
 	memset(wm, 0, sizeof(struct dcn_hubbub_wm));
@@ -89,12 +90,14 @@ void hubbub1_wm_read_state(struct hubbub *hubbub,
 
 void hubbub1_disable_allow_self_refresh(struct hubbub *hubbub)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
 	REG_UPDATE(DCHUBBUB_ARB_DRAM_STATE_CNTL,
 			DCHUBBUB_ARB_ALLOW_SELF_REFRESH_FORCE_ENABLE, 0);
 }
 
 bool hububu1_is_allow_self_refresh_enabled(struct hubbub *hubbub)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
 	uint32_t enable = 0;
 
 	REG_GET(DCHUBBUB_ARB_DRAM_STATE_CNTL,
@@ -107,6 +110,8 @@ bool hububu1_is_allow_self_refresh_enabled(struct hubbub *hubbub)
 bool hubbub1_verify_allow_pstate_change_high(
 	struct hubbub *hubbub)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+
 	/* pstate latency is ~20us so if we wait over 40us and pstate allow
 	 * still not asserted, we are probably stuck and going to hang
 	 *
@@ -193,7 +198,7 @@ bool hubbub1_verify_allow_pstate_change_high(
 	 * 31:    SOC pstate change request
 	 */
 
-	REG_WRITE(DCHUBBUB_TEST_DEBUG_INDEX, hubbub->debug_test_index_pstate);
+	REG_WRITE(DCHUBBUB_TEST_DEBUG_INDEX, hubbub1->debug_test_index_pstate);
 
 	for (i = 0; i < pstate_wait_timeout_us; i++) {
 		debug_data = REG_READ(DCHUBBUB_TEST_DEBUG_DATA);
@@ -244,6 +249,8 @@ static uint32_t convert_and_clamp(
 
 void hubbub1_wm_change_req_wa(struct hubbub *hubbub)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+
 	REG_UPDATE_SEQ(DCHUBBUB_ARB_WATERMARK_CHANGE_CNTL,
 			DCHUBBUB_ARB_WATERMARK_CHANGE_REQUEST, 0, 1);
 }
@@ -254,7 +261,9 @@ void hubbub1_program_watermarks(
 		unsigned int refclk_mhz,
 		bool safe_to_lower)
 {
-	uint32_t force_en = hubbub->ctx->dc->debug.disable_stutter ? 1 : 0;
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+
+	uint32_t force_en = hubbub1->base.ctx->dc->debug.disable_stutter ? 1 : 0;
 	/*
 	 * Need to clamp to max of the register values (i.e. no wrap)
 	 * for dcn1, all wm registers are 21-bit wide
@@ -264,8 +273,8 @@ void hubbub1_program_watermarks(
 
 	/* Repeat for water mark set A, B, C and D. */
 	/* clock state A */
-	if (safe_to_lower || watermarks->a.urgent_ns > hubbub->watermarks.a.urgent_ns) {
-		hubbub->watermarks.a.urgent_ns = watermarks->a.urgent_ns;
+	if (safe_to_lower || watermarks->a.urgent_ns > hubbub1->watermarks.a.urgent_ns) {
+		hubbub1->watermarks.a.urgent_ns = watermarks->a.urgent_ns;
 		prog_wm_value = convert_and_clamp(watermarks->a.urgent_ns,
 				refclk_mhz, 0x1fffff);
 		REG_WRITE(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_A, prog_wm_value);
@@ -276,8 +285,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (REG(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_A)) {
-		if (safe_to_lower || watermarks->a.pte_meta_urgent_ns > hubbub->watermarks.a.pte_meta_urgent_ns) {
-			hubbub->watermarks.a.pte_meta_urgent_ns = watermarks->a.pte_meta_urgent_ns;
+		if (safe_to_lower || watermarks->a.pte_meta_urgent_ns > hubbub1->watermarks.a.pte_meta_urgent_ns) {
+			hubbub1->watermarks.a.pte_meta_urgent_ns = watermarks->a.pte_meta_urgent_ns;
 			prog_wm_value = convert_and_clamp(watermarks->a.pte_meta_urgent_ns,
 					refclk_mhz, 0x1fffff);
 			REG_WRITE(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_A, prog_wm_value);
@@ -289,8 +298,8 @@ void hubbub1_program_watermarks(
 
 	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_A)) {
 		if (safe_to_lower || watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns
-				> hubbub->watermarks.a.cstate_pstate.cstate_enter_plus_exit_ns) {
-			hubbub->watermarks.a.cstate_pstate.cstate_enter_plus_exit_ns =
+				> hubbub1->watermarks.a.cstate_pstate.cstate_enter_plus_exit_ns) {
+			hubbub1->watermarks.a.cstate_pstate.cstate_enter_plus_exit_ns =
 					watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns,
@@ -302,8 +311,8 @@ void hubbub1_program_watermarks(
 		}
 
 		if (safe_to_lower || watermarks->a.cstate_pstate.cstate_exit_ns
-				> hubbub->watermarks.a.cstate_pstate.cstate_exit_ns) {
-			hubbub->watermarks.a.cstate_pstate.cstate_exit_ns =
+				> hubbub1->watermarks.a.cstate_pstate.cstate_exit_ns) {
+			hubbub1->watermarks.a.cstate_pstate.cstate_exit_ns =
 					watermarks->a.cstate_pstate.cstate_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->a.cstate_pstate.cstate_exit_ns,
@@ -316,8 +325,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (safe_to_lower || watermarks->a.cstate_pstate.pstate_change_ns
-			> hubbub->watermarks.a.cstate_pstate.pstate_change_ns) {
-		hubbub->watermarks.a.cstate_pstate.pstate_change_ns =
+			> hubbub1->watermarks.a.cstate_pstate.pstate_change_ns) {
+		hubbub1->watermarks.a.cstate_pstate.pstate_change_ns =
 				watermarks->a.cstate_pstate.pstate_change_ns;
 		prog_wm_value = convert_and_clamp(
 				watermarks->a.cstate_pstate.pstate_change_ns,
@@ -329,8 +338,8 @@ void hubbub1_program_watermarks(
 	}
 
 	/* clock state B */
-	if (safe_to_lower || watermarks->b.urgent_ns > hubbub->watermarks.b.urgent_ns) {
-		hubbub->watermarks.b.urgent_ns = watermarks->b.urgent_ns;
+	if (safe_to_lower || watermarks->b.urgent_ns > hubbub1->watermarks.b.urgent_ns) {
+		hubbub1->watermarks.b.urgent_ns = watermarks->b.urgent_ns;
 		prog_wm_value = convert_and_clamp(watermarks->b.urgent_ns,
 				refclk_mhz, 0x1fffff);
 		REG_WRITE(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_B, prog_wm_value);
@@ -341,8 +350,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (REG(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_B)) {
-		if (safe_to_lower || watermarks->b.pte_meta_urgent_ns > hubbub->watermarks.b.pte_meta_urgent_ns) {
-			hubbub->watermarks.b.pte_meta_urgent_ns = watermarks->b.pte_meta_urgent_ns;
+		if (safe_to_lower || watermarks->b.pte_meta_urgent_ns > hubbub1->watermarks.b.pte_meta_urgent_ns) {
+			hubbub1->watermarks.b.pte_meta_urgent_ns = watermarks->b.pte_meta_urgent_ns;
 			prog_wm_value = convert_and_clamp(watermarks->b.pte_meta_urgent_ns,
 					refclk_mhz, 0x1fffff);
 			REG_WRITE(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_B, prog_wm_value);
@@ -354,8 +363,8 @@ void hubbub1_program_watermarks(
 
 	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_B)) {
 		if (safe_to_lower || watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns
-				> hubbub->watermarks.b.cstate_pstate.cstate_enter_plus_exit_ns) {
-			hubbub->watermarks.b.cstate_pstate.cstate_enter_plus_exit_ns =
+				> hubbub1->watermarks.b.cstate_pstate.cstate_enter_plus_exit_ns) {
+			hubbub1->watermarks.b.cstate_pstate.cstate_enter_plus_exit_ns =
 					watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns,
@@ -367,8 +376,8 @@ void hubbub1_program_watermarks(
 		}
 
 		if (safe_to_lower || watermarks->b.cstate_pstate.cstate_exit_ns
-				> hubbub->watermarks.b.cstate_pstate.cstate_exit_ns) {
-			hubbub->watermarks.b.cstate_pstate.cstate_exit_ns =
+				> hubbub1->watermarks.b.cstate_pstate.cstate_exit_ns) {
+			hubbub1->watermarks.b.cstate_pstate.cstate_exit_ns =
 					watermarks->b.cstate_pstate.cstate_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->b.cstate_pstate.cstate_exit_ns,
@@ -381,8 +390,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (safe_to_lower || watermarks->b.cstate_pstate.pstate_change_ns
-			> hubbub->watermarks.b.cstate_pstate.pstate_change_ns) {
-		hubbub->watermarks.b.cstate_pstate.pstate_change_ns =
+			> hubbub1->watermarks.b.cstate_pstate.pstate_change_ns) {
+		hubbub1->watermarks.b.cstate_pstate.pstate_change_ns =
 				watermarks->b.cstate_pstate.pstate_change_ns;
 		prog_wm_value = convert_and_clamp(
 				watermarks->b.cstate_pstate.pstate_change_ns,
@@ -394,8 +403,8 @@ void hubbub1_program_watermarks(
 	}
 
 	/* clock state C */
-	if (safe_to_lower || watermarks->c.urgent_ns > hubbub->watermarks.c.urgent_ns) {
-		hubbub->watermarks.c.urgent_ns = watermarks->c.urgent_ns;
+	if (safe_to_lower || watermarks->c.urgent_ns > hubbub1->watermarks.c.urgent_ns) {
+		hubbub1->watermarks.c.urgent_ns = watermarks->c.urgent_ns;
 		prog_wm_value = convert_and_clamp(watermarks->c.urgent_ns,
 				refclk_mhz, 0x1fffff);
 		REG_WRITE(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_C, prog_wm_value);
@@ -406,8 +415,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (REG(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_C)) {
-		if (safe_to_lower || watermarks->c.pte_meta_urgent_ns > hubbub->watermarks.c.pte_meta_urgent_ns) {
-			hubbub->watermarks.c.pte_meta_urgent_ns = watermarks->c.pte_meta_urgent_ns;
+		if (safe_to_lower || watermarks->c.pte_meta_urgent_ns > hubbub1->watermarks.c.pte_meta_urgent_ns) {
+			hubbub1->watermarks.c.pte_meta_urgent_ns = watermarks->c.pte_meta_urgent_ns;
 			prog_wm_value = convert_and_clamp(watermarks->c.pte_meta_urgent_ns,
 					refclk_mhz, 0x1fffff);
 			REG_WRITE(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_C, prog_wm_value);
@@ -419,8 +428,8 @@ void hubbub1_program_watermarks(
 
 	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_C)) {
 		if (safe_to_lower || watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns
-				> hubbub->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns) {
-			hubbub->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns =
+				> hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns) {
+			hubbub1->watermarks.c.cstate_pstate.cstate_enter_plus_exit_ns =
 					watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
@@ -432,8 +441,8 @@ void hubbub1_program_watermarks(
 		}
 
 		if (safe_to_lower || watermarks->c.cstate_pstate.cstate_exit_ns
-				> hubbub->watermarks.c.cstate_pstate.cstate_exit_ns) {
-			hubbub->watermarks.c.cstate_pstate.cstate_exit_ns =
+				> hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns) {
+			hubbub1->watermarks.c.cstate_pstate.cstate_exit_ns =
 					watermarks->c.cstate_pstate.cstate_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->c.cstate_pstate.cstate_exit_ns,
@@ -446,8 +455,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (safe_to_lower || watermarks->c.cstate_pstate.pstate_change_ns
-			> hubbub->watermarks.c.cstate_pstate.pstate_change_ns) {
-		hubbub->watermarks.c.cstate_pstate.pstate_change_ns =
+			> hubbub1->watermarks.c.cstate_pstate.pstate_change_ns) {
+		hubbub1->watermarks.c.cstate_pstate.pstate_change_ns =
 				watermarks->c.cstate_pstate.pstate_change_ns;
 		prog_wm_value = convert_and_clamp(
 				watermarks->c.cstate_pstate.pstate_change_ns,
@@ -459,8 +468,8 @@ void hubbub1_program_watermarks(
 	}
 
 	/* clock state D */
-	if (safe_to_lower || watermarks->d.urgent_ns > hubbub->watermarks.d.urgent_ns) {
-		hubbub->watermarks.d.urgent_ns = watermarks->d.urgent_ns;
+	if (safe_to_lower || watermarks->d.urgent_ns > hubbub1->watermarks.d.urgent_ns) {
+		hubbub1->watermarks.d.urgent_ns = watermarks->d.urgent_ns;
 		prog_wm_value = convert_and_clamp(watermarks->d.urgent_ns,
 				refclk_mhz, 0x1fffff);
 		REG_WRITE(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_D, prog_wm_value);
@@ -471,8 +480,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (REG(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_D)) {
-		if (safe_to_lower || watermarks->d.pte_meta_urgent_ns > hubbub->watermarks.d.pte_meta_urgent_ns) {
-			hubbub->watermarks.d.pte_meta_urgent_ns = watermarks->d.pte_meta_urgent_ns;
+		if (safe_to_lower || watermarks->d.pte_meta_urgent_ns > hubbub1->watermarks.d.pte_meta_urgent_ns) {
+			hubbub1->watermarks.d.pte_meta_urgent_ns = watermarks->d.pte_meta_urgent_ns;
 			prog_wm_value = convert_and_clamp(watermarks->d.pte_meta_urgent_ns,
 					refclk_mhz, 0x1fffff);
 			REG_WRITE(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_D, prog_wm_value);
@@ -484,8 +493,8 @@ void hubbub1_program_watermarks(
 
 	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_D)) {
 		if (safe_to_lower || watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns
-				> hubbub->watermarks.d.cstate_pstate.cstate_enter_plus_exit_ns) {
-			hubbub->watermarks.d.cstate_pstate.cstate_enter_plus_exit_ns =
+				> hubbub1->watermarks.d.cstate_pstate.cstate_enter_plus_exit_ns) {
+			hubbub1->watermarks.d.cstate_pstate.cstate_enter_plus_exit_ns =
 					watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns,
@@ -497,8 +506,8 @@ void hubbub1_program_watermarks(
 		}
 
 		if (safe_to_lower || watermarks->d.cstate_pstate.cstate_exit_ns
-				> hubbub->watermarks.d.cstate_pstate.cstate_exit_ns) {
-			hubbub->watermarks.d.cstate_pstate.cstate_exit_ns =
+				> hubbub1->watermarks.d.cstate_pstate.cstate_exit_ns) {
+			hubbub1->watermarks.d.cstate_pstate.cstate_exit_ns =
 					watermarks->d.cstate_pstate.cstate_exit_ns;
 			prog_wm_value = convert_and_clamp(
 					watermarks->d.cstate_pstate.cstate_exit_ns,
@@ -511,8 +520,8 @@ void hubbub1_program_watermarks(
 	}
 
 	if (safe_to_lower || watermarks->d.cstate_pstate.pstate_change_ns
-			> hubbub->watermarks.d.cstate_pstate.pstate_change_ns) {
-		hubbub->watermarks.d.cstate_pstate.pstate_change_ns =
+			> hubbub1->watermarks.d.cstate_pstate.pstate_change_ns) {
+		hubbub1->watermarks.d.cstate_pstate.pstate_change_ns =
 				watermarks->d.cstate_pstate.pstate_change_ns;
 		prog_wm_value = convert_and_clamp(
 				watermarks->d.cstate_pstate.pstate_change_ns,
@@ -543,6 +552,8 @@ void hubbub1_update_dchub(
 	struct hubbub *hubbub,
 	struct dchub_init_data *dh_data)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+
 	if (REG(DCHUBBUB_SDPIF_FB_TOP) == 0) {
 		ASSERT(false);
 		/*should not come here*/
@@ -602,6 +613,8 @@ void hubbub1_update_dchub(
 
 void hubbub1_toggle_watermark_change_req(struct hubbub *hubbub)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+
 	uint32_t watermark_change_req;
 
 	REG_GET(DCHUBBUB_ARB_WATERMARK_CHANGE_CNTL,
@@ -618,6 +631,8 @@ void hubbub1_toggle_watermark_change_req(struct hubbub *hubbub)
 
 void hubbub1_soft_reset(struct hubbub *hubbub, bool reset)
 {
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+
 	uint32_t reset_en = reset ? 1 : 0;
 
 	REG_UPDATE(DCHUBBUB_SOFT_RESET,
@@ -760,7 +775,9 @@ static bool hubbub1_get_dcc_compression_cap(struct hubbub *hubbub,
 		const struct dc_dcc_surface_param *input,
 		struct dc_surface_dcc_cap *output)
 {
-	struct dc *dc = hubbub->ctx->dc;
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+	struct dc *dc = hubbub1->base.ctx->dc;
+
 	/* implement section 1.6.2.1 of DCN1_Programming_Guide.docx */
 	enum dcc_control dcc_control;
 	unsigned int bpe;
@@ -772,10 +789,10 @@ static bool hubbub1_get_dcc_compression_cap(struct hubbub *hubbub,
 	if (dc->debug.disable_dcc == DCC_DISABLE)
 		return false;
 
-	if (!hubbub->funcs->dcc_support_pixel_format(input->format, &bpe))
+	if (!hubbub1->base.funcs->dcc_support_pixel_format(input->format, &bpe))
 		return false;
 
-	if (!hubbub->funcs->dcc_support_swizzle(input->swizzle_mode, bpe,
+	if (!hubbub1->base.funcs->dcc_support_swizzle(input->swizzle_mode, bpe,
 			&segment_order_horz, &segment_order_vert))
 		return false;
 
@@ -854,18 +871,20 @@ void hubbub1_construct(struct hubbub *hubbub,
 	const struct dcn_hubbub_shift *hubbub_shift,
 	const struct dcn_hubbub_mask *hubbub_mask)
 {
-	hubbub->ctx = ctx;
+	struct dcn10_hubbub *hubbub1 = TO_DCN10_HUBBUB(hubbub);
+
+	hubbub1->base.ctx = ctx;
 
-	hubbub->funcs = &hubbub1_funcs;
+	hubbub1->base.funcs = &hubbub1_funcs;
 
-	hubbub->regs = hubbub_regs;
-	hubbub->shifts = hubbub_shift;
-	hubbub->masks = hubbub_mask;
+	hubbub1->regs = hubbub_regs;
+	hubbub1->shifts = hubbub_shift;
+	hubbub1->masks = hubbub_mask;
 
-	hubbub->debug_test_index_pstate = 0x7;
+	hubbub1->debug_test_index_pstate = 0x7;
 #if defined(CONFIG_DRM_AMD_DC_DCN1_01)
 	if (ctx->dce_version == DCN_VERSION_1_01)
-		hubbub->debug_test_index_pstate = 0xB;
+		hubbub1->debug_test_index_pstate = 0xB;
 #endif
 }
 
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h
index aca6763..14e23e2 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h
@@ -29,6 +29,9 @@
 #include "core_types.h"
 #include "dchubbub.h"
 
+#define TO_DCN10_HUBBUB(hubbub)\
+	container_of(hubbub, struct dcn10_hubbub, base)
+
 #define HUBHUB_REG_LIST_DCN()\
 	SR(DCHUBBUB_ARB_DATA_URGENCY_WATERMARK_A),\
 	SR(DCHUBBUB_ARB_PTE_META_URGENCY_WATERMARK_A),\
@@ -165,10 +168,8 @@ struct dcn_hubbub_mask {
 
 struct dc;
 
-
-struct hubbub {
-	const struct hubbub_funcs *funcs;
-	struct dc_context *ctx;
+struct dcn10_hubbub {
+	struct hubbub base;
 	const struct dcn_hubbub_registers *regs;
 	const struct dcn_hubbub_shift *shifts;
 	const struct dcn_hubbub_mask *masks;
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
index ea0628b..4f8cbe3 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
@@ -678,18 +678,18 @@ static struct mpc *dcn10_mpc_create(struct dc_context *ctx)
 
 static struct hubbub *dcn10_hubbub_create(struct dc_context *ctx)
 {
-	struct hubbub *hubbub = kzalloc(sizeof(struct hubbub),
+	struct dcn10_hubbub *dcn10_hubbub = kzalloc(sizeof(struct dcn10_hubbub),
 					  GFP_KERNEL);
 
-	if (!hubbub)
+	if (!dcn10_hubbub)
 		return NULL;
 
-	hubbub1_construct(hubbub, ctx,
+	hubbub1_construct(&dcn10_hubbub->base, ctx,
 			&hubbub_reg,
 			&hubbub_shift,
 			&hubbub_mask);
 
-	return hubbub;
+	return &dcn10_hubbub->base;
 }
 
 static struct timing_generator *dcn10_timing_generator_create(
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h
index dc0bb5b..9d2d8e5 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dchubbub.h
@@ -75,5 +75,9 @@ struct hubbub_funcs {
 			struct dcn_hubbub_wm *wm);
 };
 
+struct hubbub {
+	const struct hubbub_funcs *funcs;
+	struct dc_context *ctx;
+};
 
 #endif
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 02/20] drm/amd/display: Introduce DC VM interface
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
  2019-01-22 18:28   ` [PATCH 01/20] drm/amd/display: Restructure DCN10 hubbub sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 03/20] drm/amd/display: Simplify underscan and ABM commit sunpeng.li-5C7GfCeVMHo
                     ` (17 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Eryk Brol

From: Eryk Brol <eryk.brol@amd.com>

Virtual memory allows display to support flipping to surfaces which
are not allocated contiguously in memory with physical addresses,
instead a 1-4 level page table is used.

This is beneficial because it allows the scattering of large surfaces
to improve memory efficiency and security.

Signed-off-by: Eryk Brol <eryk.brol@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/Makefile            |   3 +-
 drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c | 127 +++++++++++++++++++++
 drivers/gpu/drm/amd/display/dc/dc_hw_types.h       |   2 +
 .../gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h    |  14 ++-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c  |   3 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h  |   5 -
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |   3 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h       |   3 +-
 drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h       |  49 ++++++++
 drivers/gpu/drm/amd/display/dc/inc/vm_helper.h     |  55 +++++++++
 10 files changed, 254 insertions(+), 10 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c
 create mode 100644 drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h
 create mode 100644 drivers/gpu/drm/amd/display/dc/inc/vm_helper.h

diff --git a/drivers/gpu/drm/amd/display/dc/Makefile b/drivers/gpu/drm/amd/display/dc/Makefile
index fa24e4c..b8ddb4a 100644
--- a/drivers/gpu/drm/amd/display/dc/Makefile
+++ b/drivers/gpu/drm/amd/display/dc/Makefile
@@ -41,7 +41,8 @@ AMD_DC = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/dc/,$(DC_LI
 include $(AMD_DC)
 
 DISPLAY_CORE = dc.o dc_link.o dc_resource.o dc_hw_sequencer.o dc_sink.o \
-dc_surface.o dc_link_hwss.o dc_link_dp.o dc_link_ddc.o dc_debug.o dc_stream.o
+dc_surface.o dc_link_hwss.o dc_link_dp.o dc_link_ddc.o dc_debug.o dc_stream.o \
+dc_vm_helper.o
 
 AMD_DISPLAY_CORE = $(addprefix $(AMDDALPATH)/dc/core/,$(DISPLAY_CORE))
 
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c b/drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c
new file mode 100644
index 0000000..e54b8ac
--- /dev/null
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_vm_helper.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2018 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#include "vm_helper.h"
+
+static void mark_vmid_used(struct vm_helper *vm_helper, unsigned int pos, uint8_t hubp_idx)
+{
+	struct vmid_usage vmids = vm_helper->hubp_vmid_usage[hubp_idx];
+
+	vmids.vmid_usage[0] = vmids.vmid_usage[1];
+	vmids.vmid_usage[1] = 1 << pos;
+}
+
+static void add_ptb_to_table(struct vm_helper *vm_helper, unsigned int vmid, uint64_t ptb)
+{
+	vm_helper->ptb_assigned_to_vmid[vmid] = ptb;
+	vm_helper->num_vmids_available--;
+}
+
+static void clear_entry_from_vmid_table(struct vm_helper *vm_helper, unsigned int vmid)
+{
+	vm_helper->ptb_assigned_to_vmid[vmid] = 0;
+	vm_helper->num_vmids_available++;
+}
+
+static void evict_vmids(struct vm_helper *vm_helper)
+{
+	int i;
+	uint16_t ord = 0;
+
+	for (i = 0; i < vm_helper->num_vmid; i++)
+		ord |= vm_helper->hubp_vmid_usage[i].vmid_usage[0] | vm_helper->hubp_vmid_usage[i].vmid_usage[1];
+
+	// At this point any positions with value 0 are unused vmids, evict them
+	for (i = 1; i < vm_helper->num_vmid; i++) {
+		if (ord & (1u << i))
+			clear_entry_from_vmid_table(vm_helper, i);
+	}
+}
+
+// Return value of -1 indicates vmid table unitialized or ptb dne in the table
+static int get_existing_vmid_for_ptb(struct vm_helper *vm_helper, uint64_t ptb)
+{
+	int i;
+
+	for (i = 0; i < vm_helper->num_vmid; i++) {
+		if (vm_helper->ptb_assigned_to_vmid[i] == ptb)
+			return i;
+	}
+
+	return -1;
+}
+
+// Expected to be called only when there's an available vmid
+static int get_next_available_vmid(struct vm_helper *vm_helper)
+{
+	int i;
+
+	for (i = 1; i < vm_helper->num_vmid; i++) {
+		if (vm_helper->ptb_assigned_to_vmid[i] == 0)
+			return i;
+	}
+
+	return -1;
+}
+
+uint8_t get_vmid_for_ptb(struct vm_helper *vm_helper, int64_t ptb, uint8_t hubp_idx)
+{
+	unsigned int vmid = 0;
+	int vmid_exists = -1;
+
+	// Physical address gets vmid 0
+	if (ptb == 0)
+		return 0;
+
+	vmid_exists = get_existing_vmid_for_ptb(vm_helper, ptb);
+
+	if (vmid_exists != -1) {
+		mark_vmid_used(vm_helper, vmid_exists, hubp_idx);
+		vmid = vmid_exists;
+	} else {
+		if (vm_helper->num_vmids_available == 0)
+			evict_vmids(vm_helper);
+
+		vmid = get_next_available_vmid(vm_helper);
+		mark_vmid_used(vm_helper, vmid, hubp_idx);
+		add_ptb_to_table(vm_helper, vmid, ptb);
+	}
+
+	return vmid;
+}
+
+struct vm_helper init_vm_helper(unsigned int num_vmid, unsigned int num_hubp)
+{
+	static uint64_t ptb_assigned_to_vmid[MAX_VMID];
+	static struct vmid_usage hubp_vmid_usage[MAX_HUBP];
+
+	return (struct vm_helper){
+		.num_vmid = num_vmid,
+		.num_hubp = num_hubp,
+		.num_vmids_available = num_vmid - 1,
+		.ptb_assigned_to_vmid = ptb_assigned_to_vmid,
+		.hubp_vmid_usage = hubp_vmid_usage
+	};
+}
diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
index 04f279a..da55d62 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
@@ -97,6 +97,8 @@ struct dc_plane_address {
 			union large_integer chroma_dcc_const_color;
 		} video_progressive;
 	};
+
+	union large_integer page_table_base;
 };
 
 struct dc_size {
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h
index 14e23e2..c681e1c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.h
@@ -110,6 +110,12 @@ struct dcn_hubbub_registers {
 	uint32_t DCHUBBUB_SDPIF_AGP_TOP;
 	uint32_t DCHUBBUB_CRC_CTRL;
 	uint32_t DCHUBBUB_SOFT_RESET;
+	uint32_t DCN_VM_FB_LOCATION_BASE;
+	uint32_t DCN_VM_FB_LOCATION_TOP;
+	uint32_t DCN_VM_FB_OFFSET;
+	uint32_t DCN_VM_AGP_BOT;
+	uint32_t DCN_VM_AGP_TOP;
+	uint32_t DCN_VM_AGP_BASE;
 };
 
 /* set field name */
@@ -155,7 +161,13 @@ struct dcn_hubbub_registers {
 		type SDPIF_FB_OFFSET;\
 		type SDPIF_AGP_BASE;\
 		type SDPIF_AGP_BOT;\
-		type SDPIF_AGP_TOP
+		type SDPIF_AGP_TOP;\
+		type FB_BASE;\
+		type FB_TOP;\
+		type FB_OFFSET;\
+		type AGP_BOT;\
+		type AGP_TOP;\
+		type AGP_BASE
 
 
 struct dcn_hubbub_shift {
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c
index fae6247..0ba68d4 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.c
@@ -317,7 +317,8 @@ void hubp1_program_pixel_format(
 bool hubp1_program_surface_flip_and_addr(
 	struct hubp *hubp,
 	const struct dc_plane_address *address,
-	bool flip_immediate)
+	bool flip_immediate,
+	uint8_t vmid)
 {
 	struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
 
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h
index e82ca15..a6d6dfe 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubp.h
@@ -707,11 +707,6 @@ void hubp1_dcc_control(struct hubp *hubp,
 		bool enable,
 		bool independent_64b_blks);
 
-bool hubp1_program_surface_flip_and_addr(
-	struct hubp *hubp,
-	const struct dc_plane_address *address,
-	bool flip_immediate);
-
 bool hubp1_is_flip_pending(struct hubp *hubp);
 
 void hubp1_cursor_set_attributes(
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index 814f597..9cde24d 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -1202,7 +1202,8 @@ static void dcn10_update_plane_addr(const struct dc *dc, struct pipe_ctx *pipe_c
 	pipe_ctx->plane_res.hubp->funcs->hubp_program_surface_flip_and_addr(
 			pipe_ctx->plane_res.hubp,
 			&plane_state->address,
-			plane_state->flip_immediate);
+			plane_state->flip_immediate,
+			0);
 
 	plane_state->status.requested_address = plane_state->address;
 
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h b/drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
index 04c6989..1cd07e9 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
@@ -78,7 +78,8 @@ struct hubp_funcs {
 	bool (*hubp_program_surface_flip_and_addr)(
 		struct hubp *hubp,
 		const struct dc_plane_address *address,
-		bool flip_immediate);
+		bool flip_immediate,
+		uint8_t vmid);
 
 	void (*hubp_program_pte_vm)(
 		struct hubp *hubp,
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h b/drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h
new file mode 100644
index 0000000..037beb0
--- /dev/null
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/vmid.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2018 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef DAL_DC_INC_HW_VMID_H_
+#define DAL_DC_INC_HW_VMID_H_
+
+#include "core_types.h"
+#include "dchubbub.h"
+
+struct dcn_vmid_registers {
+	uint32_t CNTL;
+	uint32_t PAGE_TABLE_BASE_ADDR_HI32;
+	uint32_t PAGE_TABLE_BASE_ADDR_LO32;
+	uint32_t PAGE_TABLE_START_ADDR_HI32;
+	uint32_t PAGE_TABLE_START_ADDR_LO32;
+	uint32_t PAGE_TABLE_END_ADDR_HI32;
+	uint32_t PAGE_TABLE_END_ADDR_LO32;
+};
+
+struct dcn_vmid_page_table_config {
+	uint64_t	page_table_start_addr;
+	uint64_t	page_table_end_addr;
+	enum dcn_hubbub_page_table_depth	depth;
+	enum dcn_hubbub_page_table_block_size	block_size;
+};
+
+#endif /* DAL_DC_INC_HW_VMID_H_ */
diff --git a/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h b/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h
new file mode 100644
index 0000000..a202206
--- /dev/null
+++ b/drivers/gpu/drm/amd/display/dc/inc/vm_helper.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2018 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors: AMD
+ *
+ */
+
+#ifndef DC_INC_VM_HELPER_H_
+#define DC_INC_VM_HELPER_H_
+
+#include "dc_types.h"
+
+#define MAX_VMID 16
+#define MAX_HUBP 6
+
+struct vmid_usage {
+	uint16_t vmid_usage[2];
+};
+
+struct vm_helper {
+	unsigned int num_vmid;
+	unsigned int num_hubp;
+	unsigned int num_vmids_available;
+	uint64_t *ptb_assigned_to_vmid;
+	struct vmid_usage *hubp_vmid_usage;
+};
+
+uint8_t get_vmid_for_ptb(
+		struct vm_helper *vm_helper,
+		int64_t ptb,
+		uint8_t pipe_idx);
+
+struct vm_helper init_vm_helper(
+	unsigned int num_vmid,
+	unsigned int num_hubp);
+
+#endif /* DC_INC_VM_HELPER_H_ */
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 03/20] drm/amd/display: Simplify underscan and ABM commit
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
  2019-01-22 18:28   ` [PATCH 01/20] drm/amd/display: Restructure DCN10 hubbub sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 02/20] drm/amd/display: Introduce DC VM interface sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 04/20] drm/amd/display: Know what a pageflip is sunpeng.li-5C7GfCeVMHo
                     ` (16 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: David Francis

From: David Francis <David.Francis@amd.com>

[Why]
Underscan and ABM are connector properties but require updates
to DC stream state.  Previously, on updates to these properties
the affected stream and all its planes were committed.
This is unnecessary; only a few fields on the stream need
to be changed.

[How]
If scaling or ABM have changed, change the stream and
create a stream update with those changes.  Call
DC with only those fields.

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 49 ++++++++++++++---------
 1 file changed, 31 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 5298a13..405c263 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5262,11 +5262,13 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 		}
 	}
 
-	/* Handle scaling, underscan, and abm changes*/
+	/* Handle connector state changes */
 	for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
 		struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
 		struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state);
 		struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
+		struct dc_surface_update dummy_updates[MAX_SURFACES] = { 0 };
+		struct dc_stream_update stream_update = { 0 };
 		struct dc_stream_status *status = NULL;
 
 		if (acrtc) {
@@ -5278,37 +5280,48 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 		if (!acrtc || drm_atomic_crtc_needs_modeset(new_crtc_state))
 			continue;
 
-
 		dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
 		dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
 
-		/* Skip anything that is not scaling or underscan changes */
 		if (!is_scaling_state_different(dm_new_con_state, dm_old_con_state) &&
 				(dm_new_crtc_state->abm_level == dm_old_crtc_state->abm_level))
 			continue;
 
-		update_stream_scaling_settings(&dm_new_con_state->base.crtc->mode,
-				dm_new_con_state, (struct dc_stream_state *)dm_new_crtc_state->stream);
+		if (is_scaling_state_different(dm_new_con_state, dm_old_con_state)) {
+			update_stream_scaling_settings(&dm_new_con_state->base.crtc->mode,
+					dm_new_con_state, (struct dc_stream_state *)dm_new_crtc_state->stream);
 
-		if (!dm_new_crtc_state->stream)
-			continue;
+			stream_update.src = dm_new_crtc_state->stream->src;
+			stream_update.dst = dm_new_crtc_state->stream->dst;
+		}
+
+		if (dm_new_crtc_state->abm_level != dm_old_crtc_state->abm_level) {
+			dm_new_crtc_state->stream->abm_level = dm_new_crtc_state->abm_level;
+
+			stream_update.abm_level = &dm_new_crtc_state->abm_level;
+		}
 
 		status = dc_stream_get_status(dm_new_crtc_state->stream);
 		WARN_ON(!status);
 		WARN_ON(!status->plane_count);
 
-		dm_new_crtc_state->stream->abm_level = dm_new_crtc_state->abm_level;
+		/*
+		 * TODO: DC refuses to perform stream updates without a dc_surface_update.
+		 * Here we create an empty update on each plane.
+		 * To fix this, DC should permit updating only stream properties.
+		 */
+		for (j = 0; j < status->plane_count; j++)
+			dummy_updates[j].surface = status->plane_states[0];
 
-		/*TODO How it works with MPO ?*/
-		if (!commit_planes_to_stream(
-				dm,
-				dm->dc,
-				status->plane_states,
-				status->plane_count,
-				dm_new_crtc_state,
-				to_dm_crtc_state(old_crtc_state),
-				dc_state))
-			dm_error("%s: Failed to update stream scaling!\n", __func__);
+
+		mutex_lock(&dm->dc_lock);
+		dc_commit_updates_for_stream(dm->dc,
+						     dummy_updates,
+						     status->plane_count,
+						     dm_new_crtc_state->stream,
+						     &stream_update,
+						     dc_state);
+		mutex_unlock(&dm->dc_lock);
 	}
 
 	for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 04/20] drm/amd/display: Know what a pageflip is
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (2 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 03/20] drm/amd/display: Simplify underscan and ABM commit sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
       [not found]     ` <1548181746-23783-5-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
  2019-01-22 18:28   ` [PATCH 05/20] drm/amd/display: Call into DC once per multiplane flip sunpeng.li-5C7GfCeVMHo
                     ` (15 subsequent siblings)
  19 siblings, 1 reply; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: David Francis

From: David Francis <David.Francis@amd.com>

[Why]
We were assuming that any commit with allow_modeset == false
was a pageflip.  This was against drm intention and only
worked by sheer luck

[How]
A pageflip is the change from one framebuffer to another

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 405c263..db060da 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4995,6 +4995,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		struct drm_crtc *crtc = new_plane_state->crtc;
 		struct drm_crtc_state *new_crtc_state;
 		struct drm_framebuffer *fb = new_plane_state->fb;
+		struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
+		struct amdgpu_framebuffer *old_afb = to_amdgpu_framebuffer(old_plane_state->fb);
 		bool pflip_needed;
 		struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state);
 
@@ -5010,7 +5012,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		if (!new_crtc_state->active)
 			continue;
 
-		pflip_needed = !state->allow_modeset;
+		pflip_needed = old_plane_state->fb &&
+			(old_plane_state->fb != new_plane_state->fb || afb->address != old_afb->address);
 
 		spin_lock_irqsave(&crtc->dev->event_lock, flags);
 		if (acrtc_attach->pflip_status != AMDGPU_FLIP_NONE) {
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 05/20] drm/amd/display: Call into DC once per multiplane flip
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (3 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 04/20] drm/amd/display: Know what a pageflip is sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
       [not found]     ` <1548181746-23783-6-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
  2019-01-22 18:28   ` [PATCH 06/20] drm/amd/display: Let updates with no scaling changes be fast sunpeng.li-5C7GfCeVMHo
                     ` (14 subsequent siblings)
  19 siblings, 1 reply; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: David Francis

From: David Francis <David.Francis@amd.com>

[Why]
amdgpu_dm_commit_planes was performing multi-plane
flips incorrectly:

It waited for vblank once per flipped plane

It prepared flip ISR and acquired the corresponding vblank ref
once per plane, although it closed ISR and put the ref once
per crtc

It called into dc once per flipped plane, duplicating some work

[How]
Wait for vblank, get vblank ref, prepare flip ISR, and call into
DC only once, and only if there is a pageflip

Make freesync continue to update planes even if vrr information
has already been changed

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 335 ++++++++++------------
 1 file changed, 154 insertions(+), 181 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index db060da..818a2a1 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4691,12 +4691,12 @@ static void update_freesync_state_on_stream(
 		TRANSFER_FUNC_UNKNOWN,
 		&vrr_infopacket);
 
-	new_crtc_state->freesync_timing_changed =
+	new_crtc_state->freesync_timing_changed |=
 		(memcmp(&new_crtc_state->vrr_params.adjust,
 			&vrr_params.adjust,
 			sizeof(vrr_params.adjust)) != 0);
 
-	new_crtc_state->freesync_vrr_info_changed =
+	new_crtc_state->freesync_vrr_info_changed |=
 		(memcmp(&new_crtc_state->vrr_infopacket,
 			&vrr_infopacket,
 			sizeof(vrr_infopacket)) != 0);
@@ -4721,156 +4721,6 @@ static void update_freesync_state_on_stream(
 }
 
 /*
- * Executes flip
- *
- * Waits on all BO's fences and for proper vblank count
- */
-static void amdgpu_dm_do_flip(struct drm_crtc *crtc,
-			      struct drm_framebuffer *fb,
-			      uint32_t target,
-			      struct dc_state *state)
-{
-	unsigned long flags;
-	uint64_t timestamp_ns;
-	uint32_t target_vblank;
-	int r, vpos, hpos;
-	struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
-	struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
-	struct amdgpu_bo *abo = gem_to_amdgpu_bo(fb->obj[0]);
-	struct amdgpu_device *adev = crtc->dev->dev_private;
-	bool async_flip = (crtc->state->pageflip_flags & DRM_MODE_PAGE_FLIP_ASYNC) != 0;
-	struct dc_flip_addrs addr = { {0} };
-	/* TODO eliminate or rename surface_update */
-	struct dc_surface_update surface_updates[1] = { {0} };
-	struct dc_stream_update stream_update = {0};
-	struct dm_crtc_state *acrtc_state = to_dm_crtc_state(crtc->state);
-	struct dc_stream_status *stream_status;
-	struct dc_plane_state *surface;
-	uint64_t tiling_flags, dcc_address;
-
-
-	/* Prepare wait for target vblank early - before the fence-waits */
-	target_vblank = target - (uint32_t)drm_crtc_vblank_count(crtc) +
-			amdgpu_get_vblank_counter_kms(crtc->dev, acrtc->crtc_id);
-
-	/*
-	 * TODO This might fail and hence better not used, wait
-	 * explicitly on fences instead
-	 * and in general should be called for
-	 * blocking commit to as per framework helpers
-	 */
-	r = amdgpu_bo_reserve(abo, true);
-	if (unlikely(r != 0)) {
-		DRM_ERROR("failed to reserve buffer before flip\n");
-		WARN_ON(1);
-	}
-
-	/* Wait for all fences on this FB */
-	WARN_ON(reservation_object_wait_timeout_rcu(abo->tbo.resv, true, false,
-								    MAX_SCHEDULE_TIMEOUT) < 0);
-
-	amdgpu_bo_get_tiling_flags(abo, &tiling_flags);
-
-	amdgpu_bo_unreserve(abo);
-
-	/*
-	 * Wait until we're out of the vertical blank period before the one
-	 * targeted by the flip
-	 */
-	while ((acrtc->enabled &&
-		(amdgpu_display_get_crtc_scanoutpos(adev->ddev, acrtc->crtc_id,
-						    0, &vpos, &hpos, NULL,
-						    NULL, &crtc->hwmode)
-		 & (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) ==
-		(DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK) &&
-		(int)(target_vblank -
-		  amdgpu_get_vblank_counter_kms(adev->ddev, acrtc->crtc_id)) > 0)) {
-		usleep_range(1000, 1100);
-	}
-
-	/* Flip */
-	spin_lock_irqsave(&crtc->dev->event_lock, flags);
-
-	WARN_ON(acrtc->pflip_status != AMDGPU_FLIP_NONE);
-	WARN_ON(!acrtc_state->stream);
-
-	addr.address.grph.addr.low_part = lower_32_bits(afb->address);
-	addr.address.grph.addr.high_part = upper_32_bits(afb->address);
-
-	dcc_address = get_dcc_address(afb->address, tiling_flags);
-	addr.address.grph.meta_addr.low_part = lower_32_bits(dcc_address);
-	addr.address.grph.meta_addr.high_part = upper_32_bits(dcc_address);
-
-	addr.flip_immediate = async_flip;
-
-	timestamp_ns = ktime_get_ns();
-	addr.flip_timestamp_in_us = div_u64(timestamp_ns, 1000);
-
-
-	if (acrtc->base.state->event)
-		prepare_flip_isr(acrtc);
-
-	spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-
-	stream_status = dc_stream_get_status(acrtc_state->stream);
-	if (!stream_status) {
-		DRM_ERROR("No stream status for CRTC: id=%d\n",
-			acrtc->crtc_id);
-		return;
-	}
-
-	surface = stream_status->plane_states[0];
-	surface_updates->surface = surface;
-
-	if (!surface) {
-		DRM_ERROR("No surface for CRTC: id=%d\n",
-			acrtc->crtc_id);
-		return;
-	}
-	surface_updates->flip_addr = &addr;
-
-	if (acrtc_state->stream) {
-		update_freesync_state_on_stream(
-			&adev->dm,
-			acrtc_state,
-			acrtc_state->stream,
-			surface,
-			addr.flip_timestamp_in_us);
-
-		if (acrtc_state->freesync_timing_changed)
-			stream_update.adjust =
-				&acrtc_state->stream->adjust;
-
-		if (acrtc_state->freesync_vrr_info_changed)
-			stream_update.vrr_infopacket =
-				&acrtc_state->stream->vrr_infopacket;
-	}
-
-	/* Update surface timing information. */
-	surface->time.time_elapsed_in_us[surface->time.index] =
-		addr.flip_timestamp_in_us - surface->time.prev_update_time_in_us;
-	surface->time.prev_update_time_in_us = addr.flip_timestamp_in_us;
-	surface->time.index++;
-	if (surface->time.index >= DC_PLANE_UPDATE_TIMES_MAX)
-		surface->time.index = 0;
-
-	mutex_lock(&adev->dm.dc_lock);
-
-	dc_commit_updates_for_stream(adev->dm.dc,
-					     surface_updates,
-					     1,
-					     acrtc_state->stream,
-					     &stream_update,
-					     state);
-	mutex_unlock(&adev->dm.dc_lock);
-
-	DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x \n",
-			 __func__,
-			 addr.address.grph.addr.high_part,
-			 addr.address.grph.addr.low_part);
-}
-
-/*
  * TODO this whole function needs to go
  *
  * dc_surface_update is needlessly complex. See if we can just replace this
@@ -4976,10 +4826,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 				    struct drm_crtc *pcrtc,
 				    bool *wait_for_vblank)
 {
-	uint32_t i;
+	uint32_t i, r;
+	uint64_t timestamp_ns;
 	struct drm_plane *plane;
 	struct drm_plane_state *old_plane_state, *new_plane_state;
-	struct dc_stream_state *dc_stream_attach;
 	struct dc_plane_state *plane_states_constructed[MAX_SURFACES];
 	struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc);
 	struct drm_crtc_state *new_pcrtc_state =
@@ -4987,8 +4837,23 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 	struct dm_crtc_state *acrtc_state = to_dm_crtc_state(new_pcrtc_state);
 	struct dm_crtc_state *dm_old_crtc_state =
 			to_dm_crtc_state(drm_atomic_get_old_crtc_state(state, pcrtc));
-	int planes_count = 0;
+	int flip_count = 0, planes_count = 0, vpos, hpos;
 	unsigned long flags;
+	struct amdgpu_bo *abo;
+	uint64_t tiling_flags, dcc_address;
+	struct dc_stream_status *stream_status;
+	uint32_t target, target_vblank;
+
+	struct {
+		struct dc_surface_update surface_updates[MAX_SURFACES];
+		struct dc_flip_addrs flip_addrs[MAX_SURFACES];
+		struct dc_stream_update stream_update;
+	} *flip;
+
+	flip = kzalloc(sizeof(*flip), GFP_KERNEL);
+
+	if (!flip)
+		dm_error("Failed to allocate update bundles\n");
 
 	/* update planes when needed */
 	for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
@@ -4998,8 +4863,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
 		struct amdgpu_framebuffer *old_afb = to_amdgpu_framebuffer(old_plane_state->fb);
 		bool pflip_needed;
+		struct dc_plane_state *surface;
 		struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state);
 
+
 		if (plane->type == DRM_PLANE_TYPE_CURSOR) {
 			handle_cursor_update(plane, old_plane_state);
 			continue;
@@ -5015,44 +4882,150 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		pflip_needed = old_plane_state->fb &&
 			(old_plane_state->fb != new_plane_state->fb || afb->address != old_afb->address);
 
-		spin_lock_irqsave(&crtc->dev->event_lock, flags);
-		if (acrtc_attach->pflip_status != AMDGPU_FLIP_NONE) {
-			DRM_ERROR("%s: acrtc %d, already busy\n",
-				  __func__,
-				  acrtc_attach->crtc_id);
-			/* In commit tail framework this cannot happen */
-			WARN_ON(1);
-		}
-		spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
-
 		if (!pflip_needed || plane->type == DRM_PLANE_TYPE_OVERLAY) {
 			WARN_ON(!dm_new_plane_state->dc_state);
 
 			plane_states_constructed[planes_count] = dm_new_plane_state->dc_state;
 
-			dc_stream_attach = acrtc_state->stream;
 			planes_count++;
 
 		} else if (new_crtc_state->planes_changed) {
-			/* Assume even ONE crtc with immediate flip means
+			/*
+			 * Assume even ONE crtc with immediate flip means
 			 * entire can't wait for VBLANK
 			 * TODO Check if it's correct
 			 */
-			*wait_for_vblank =
-					new_pcrtc_state->pageflip_flags & DRM_MODE_PAGE_FLIP_ASYNC ?
-				false : true;
-
-			/* TODO: Needs rework for multiplane flip */
-			if (plane->type == DRM_PLANE_TYPE_PRIMARY)
-				drm_crtc_vblank_get(crtc);
-
-			amdgpu_dm_do_flip(
-				crtc,
-				fb,
-				(uint32_t)drm_crtc_vblank_count(crtc) + *wait_for_vblank,
-				dc_state);
+			if (new_pcrtc_state->pageflip_flags & DRM_MODE_PAGE_FLIP_ASYNC)
+				*wait_for_vblank = false;
+
+			/*
+			 * TODO This might fail and hence better not used, wait
+			 * explicitly on fences instead
+			 * and in general should be called for
+			 * blocking commit to as per framework helpers
+			 */
+			abo = gem_to_amdgpu_bo(fb->obj[0]);
+			r = amdgpu_bo_reserve(abo, true);
+			if (unlikely(r != 0)) {
+				DRM_ERROR("failed to reserve buffer before flip\n");
+				WARN_ON(1);
+			}
+
+			/* Wait for all fences on this FB */
+			WARN_ON(reservation_object_wait_timeout_rcu(abo->tbo.resv, true, false,
+										    MAX_SCHEDULE_TIMEOUT) < 0);
+
+			amdgpu_bo_get_tiling_flags(abo, &tiling_flags);
+
+			amdgpu_bo_unreserve(abo);
+
+			flip->flip_addrs[flip_count].address.grph.addr.low_part = lower_32_bits(afb->address);
+			flip->flip_addrs[flip_count].address.grph.addr.high_part = upper_32_bits(afb->address);
+
+			dcc_address = get_dcc_address(afb->address, tiling_flags);
+			flip->flip_addrs[flip_count].address.grph.meta_addr.low_part = lower_32_bits(dcc_address);
+			flip->flip_addrs[flip_count].address.grph.meta_addr.high_part = upper_32_bits(dcc_address);
+
+			flip->flip_addrs[flip_count].flip_immediate =
+					(crtc->state->pageflip_flags & DRM_MODE_PAGE_FLIP_ASYNC) != 0;
+
+			timestamp_ns = ktime_get_ns();
+			flip->flip_addrs[flip_count].flip_timestamp_in_us = div_u64(timestamp_ns, 1000);
+			flip->surface_updates[flip_count].flip_addr = &flip->flip_addrs[flip_count];
+
+			stream_status = dc_stream_get_status(acrtc_state->stream);
+			if (!stream_status) {
+				DRM_ERROR("No stream status for CRTC: id=%d\n",
+						acrtc_attach->crtc_id);
+				continue;
+			}
+
+			surface = stream_status->plane_states[0];
+			flip->surface_updates[flip_count].surface = surface;
+			if (!flip->surface_updates[flip_count].surface) {
+				DRM_ERROR("No surface for CRTC: id=%d\n",
+						acrtc_attach->crtc_id);
+				continue;
+			}
+
+			if (acrtc_state->stream)
+				update_freesync_state_on_stream(
+					dm,
+					acrtc_state,
+					acrtc_state->stream,
+					surface,
+					flip->flip_addrs[flip_count].flip_timestamp_in_us);
+
+			/* Update surface timing information. */
+			surface->time.time_elapsed_in_us[surface->time.index] =
+				flip->flip_addrs[flip_count].flip_timestamp_in_us -
+				surface->time.prev_update_time_in_us;
+			surface->time.prev_update_time_in_us = flip->flip_addrs[flip_count].flip_timestamp_in_us;
+			surface->time.index++;
+			if (surface->time.index >= DC_PLANE_UPDATE_TIMES_MAX)
+				surface->time.index = 0;
+
+			DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x\n",
+					 __func__,
+					 flip->flip_addrs[flip_count].address.grph.addr.high_part,
+					 flip->flip_addrs[flip_count].address.grph.addr.low_part);
+
+			flip_count += 1;
+		}
+
+	}
+
+	if (flip_count) {
+		target = (uint32_t)drm_crtc_vblank_count(pcrtc) + *wait_for_vblank;
+		/* Prepare wait for target vblank early - before the fence-waits */
+		target_vblank = target - (uint32_t)drm_crtc_vblank_count(pcrtc) +
+				amdgpu_get_vblank_counter_kms(pcrtc->dev, acrtc_attach->crtc_id);
+
+		/*
+		 * Wait until we're out of the vertical blank period before the one
+		 * targeted by the flip
+		 */
+		while ((acrtc_attach->enabled &&
+			(amdgpu_display_get_crtc_scanoutpos(dm->ddev, acrtc_attach->crtc_id,
+							    0, &vpos, &hpos, NULL,
+							    NULL, &pcrtc->hwmode)
+			 & (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) ==
+			(DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK) &&
+			(int)(target_vblank -
+			  amdgpu_get_vblank_counter_kms(dm->ddev, acrtc_attach->crtc_id)) > 0)) {
+			usleep_range(1000, 1100);
 		}
 
+		if (acrtc_attach->base.state->event) {
+			drm_crtc_vblank_get(pcrtc);
+
+			spin_lock_irqsave(&pcrtc->dev->event_lock, flags);
+
+			WARN_ON(acrtc_attach->pflip_status != AMDGPU_FLIP_NONE);
+			prepare_flip_isr(acrtc_attach);
+
+			spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags);
+		}
+
+		if (acrtc_state->stream) {
+
+			if (acrtc_state->freesync_timing_changed)
+				flip->stream_update.adjust =
+					&acrtc_state->stream->adjust;
+
+			if (acrtc_state->freesync_vrr_info_changed)
+				flip->stream_update.vrr_infopacket =
+					&acrtc_state->stream->vrr_infopacket;
+		}
+
+		mutex_lock(&dm->dc_lock);
+		dc_commit_updates_for_stream(dm->dc,
+						     flip->surface_updates,
+						     flip_count,
+						     acrtc_state->stream,
+						     &flip->stream_update,
+						     dc_state);
+		mutex_unlock(&dm->dc_lock);
 	}
 
 	if (planes_count) {
@@ -5067,7 +5040,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 			spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags);
 		}
 
-		dc_stream_attach->abm_level = acrtc_state->abm_level;
+		acrtc_state->stream->abm_level = acrtc_state->abm_level;
 
 		if (false == commit_planes_to_stream(dm,
 							dm->dc,
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 06/20] drm/amd/display: Let updates with no scaling changes be fast
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (4 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 05/20] drm/amd/display: Call into DC once per multiplane flip sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 07/20] drm/amd/display: Perform plane updates only when needed sunpeng.li-5C7GfCeVMHo
                     ` (13 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: David Francis

From: David Francis <David.Francis@amd.com>

[Why]
DC was assuming that any surface_update->scaling_info
meant the update was at least medium.  However, if nothing
has changed there is no scaling to program, so there is
no problem with the update being fast

[How]
If every update flag is not set, the update is fast

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 5670284..1dabafc 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1240,7 +1240,7 @@ static enum surface_update_type get_plane_info_update_type(const struct dc_surfa
 			|| update_flags->bits.output_tf_change)
 		return UPDATE_TYPE_FULL;
 
-	return UPDATE_TYPE_MED;
+	return update_flags->raw ? UPDATE_TYPE_MED : UPDATE_TYPE_FAST;
 }
 
 static enum surface_update_type get_scaling_info_update_type(
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 07/20] drm/amd/display: Perform plane updates only when needed
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (5 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 06/20] drm/amd/display: Let updates with no scaling changes be fast sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 08/20] drm/amd/display: Update DMCU versioning mechanism sunpeng.li-5C7GfCeVMHo
                     ` (12 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: David Francis

From: David Francis <David.Francis@amd.com>

[Why]
Our old logic: if pageflip, update freesync and plane address.
Otherwise, update everything.
This over-updated on non-pageflip cases, and it failed to
update if pageflip and non-pageflip changes occurred on
the same commit

[How]
Update flip_addrs on pageflips.
Update scaling_info when it changes.
Update color fields on color changes.
Updates plane_info always because we don't have a good way of
knowing when it needs to be updated.

Unfortunately, this means that every stream commit involves two
calls into DC.  In particular, on pageflips there is a second,
pointless update that changes nothing but costs several
microseconds (about a 50% increase in time taken). The update is
fast, but there are comparisons and some useless programming.

Leave TODOs indicating dissatisfaction.

Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 193 +++++++---------------
 1 file changed, 63 insertions(+), 130 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 818a2a1..f1de7c8 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -4720,105 +4720,6 @@ static void update_freesync_state_on_stream(
 				  vrr_params.adjust.v_total_max);
 }
 
-/*
- * TODO this whole function needs to go
- *
- * dc_surface_update is needlessly complex. See if we can just replace this
- * with a dc_plane_state and follow the atomic model a bit more closely here.
- */
-static bool commit_planes_to_stream(
-		struct amdgpu_display_manager *dm,
-		struct dc *dc,
-		struct dc_plane_state **plane_states,
-		uint8_t new_plane_count,
-		struct dm_crtc_state *dm_new_crtc_state,
-		struct dm_crtc_state *dm_old_crtc_state,
-		struct dc_state *state)
-{
-	/* no need to dynamically allocate this. it's pretty small */
-	struct dc_surface_update updates[MAX_SURFACES];
-	struct dc_flip_addrs *flip_addr;
-	struct dc_plane_info *plane_info;
-	struct dc_scaling_info *scaling_info;
-	int i;
-	struct dc_stream_state *dc_stream = dm_new_crtc_state->stream;
-	struct dc_stream_update *stream_update =
-			kzalloc(sizeof(struct dc_stream_update), GFP_KERNEL);
-	unsigned int abm_level;
-
-	if (!stream_update) {
-		BREAK_TO_DEBUGGER();
-		return false;
-	}
-
-	flip_addr = kcalloc(MAX_SURFACES, sizeof(struct dc_flip_addrs),
-			    GFP_KERNEL);
-	plane_info = kcalloc(MAX_SURFACES, sizeof(struct dc_plane_info),
-			     GFP_KERNEL);
-	scaling_info = kcalloc(MAX_SURFACES, sizeof(struct dc_scaling_info),
-			       GFP_KERNEL);
-
-	if (!flip_addr || !plane_info || !scaling_info) {
-		kfree(flip_addr);
-		kfree(plane_info);
-		kfree(scaling_info);
-		kfree(stream_update);
-		return false;
-	}
-
-	memset(updates, 0, sizeof(updates));
-
-	stream_update->src = dc_stream->src;
-	stream_update->dst = dc_stream->dst;
-	stream_update->out_transfer_func = dc_stream->out_transfer_func;
-
-	if (dm_new_crtc_state->abm_level != dm_old_crtc_state->abm_level) {
-		abm_level = dm_new_crtc_state->abm_level;
-		stream_update->abm_level = &abm_level;
-	}
-
-	for (i = 0; i < new_plane_count; i++) {
-		updates[i].surface = plane_states[i];
-		updates[i].gamma =
-			(struct dc_gamma *)plane_states[i]->gamma_correction;
-		updates[i].in_transfer_func = plane_states[i]->in_transfer_func;
-		flip_addr[i].address = plane_states[i]->address;
-		flip_addr[i].flip_immediate = plane_states[i]->flip_immediate;
-		plane_info[i].color_space = plane_states[i]->color_space;
-		plane_info[i].format = plane_states[i]->format;
-		plane_info[i].plane_size = plane_states[i]->plane_size;
-		plane_info[i].rotation = plane_states[i]->rotation;
-		plane_info[i].horizontal_mirror = plane_states[i]->horizontal_mirror;
-		plane_info[i].stereo_format = plane_states[i]->stereo_format;
-		plane_info[i].tiling_info = plane_states[i]->tiling_info;
-		plane_info[i].visible = plane_states[i]->visible;
-		plane_info[i].per_pixel_alpha = plane_states[i]->per_pixel_alpha;
-		plane_info[i].dcc = plane_states[i]->dcc;
-		scaling_info[i].scaling_quality = plane_states[i]->scaling_quality;
-		scaling_info[i].src_rect = plane_states[i]->src_rect;
-		scaling_info[i].dst_rect = plane_states[i]->dst_rect;
-		scaling_info[i].clip_rect = plane_states[i]->clip_rect;
-
-		updates[i].flip_addr = &flip_addr[i];
-		updates[i].plane_info = &plane_info[i];
-		updates[i].scaling_info = &scaling_info[i];
-	}
-
-	mutex_lock(&dm->dc_lock);
-	dc_commit_updates_for_stream(
-			dc,
-			updates,
-			new_plane_count,
-			dc_stream, stream_update, state);
-	mutex_unlock(&dm->dc_lock);
-
-	kfree(flip_addr);
-	kfree(plane_info);
-	kfree(scaling_info);
-	kfree(stream_update);
-	return true;
-}
-
 static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 				    struct dc_state *dc_state,
 				    struct drm_device *dev,
@@ -4830,7 +4731,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 	uint64_t timestamp_ns;
 	struct drm_plane *plane;
 	struct drm_plane_state *old_plane_state, *new_plane_state;
-	struct dc_plane_state *plane_states_constructed[MAX_SURFACES];
 	struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc);
 	struct drm_crtc_state *new_pcrtc_state =
 			drm_atomic_get_new_crtc_state(state, pcrtc);
@@ -4850,9 +4750,17 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		struct dc_stream_update stream_update;
 	} *flip;
 
+	struct {
+		struct dc_surface_update surface_updates[MAX_SURFACES];
+		struct dc_plane_info plane_infos[MAX_SURFACES];
+		struct dc_scaling_info scaling_infos[MAX_SURFACES];
+		struct dc_stream_update stream_update;
+	} *full;
+
 	flip = kzalloc(sizeof(*flip), GFP_KERNEL);
+	full = kzalloc(sizeof(*full), GFP_KERNEL);
 
-	if (!flip)
+	if (!flip || !full)
 		dm_error("Failed to allocate update bundles\n");
 
 	/* update planes when needed */
@@ -4863,10 +4771,9 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
 		struct amdgpu_framebuffer *old_afb = to_amdgpu_framebuffer(old_plane_state->fb);
 		bool pflip_needed;
-		struct dc_plane_state *surface;
+		struct dc_plane_state *surface, *dc_plane;
 		struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state);
 
-
 		if (plane->type == DRM_PLANE_TYPE_CURSOR) {
 			handle_cursor_update(plane, old_plane_state);
 			continue;
@@ -4879,17 +4786,12 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 		if (!new_crtc_state->active)
 			continue;
 
+		dc_plane = dm_new_plane_state->dc_state;
+
 		pflip_needed = old_plane_state->fb &&
 			(old_plane_state->fb != new_plane_state->fb || afb->address != old_afb->address);
 
-		if (!pflip_needed || plane->type == DRM_PLANE_TYPE_OVERLAY) {
-			WARN_ON(!dm_new_plane_state->dc_state);
-
-			plane_states_constructed[planes_count] = dm_new_plane_state->dc_state;
-
-			planes_count++;
-
-		} else if (new_crtc_state->planes_changed) {
+		if (pflip_needed) {
 			/*
 			 * Assume even ONE crtc with immediate flip means
 			 * entire can't wait for VBLANK
@@ -4973,8 +4875,42 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 			flip_count += 1;
 		}
 
+		full->surface_updates[planes_count].surface = dc_plane;
+		if (new_pcrtc_state->color_mgmt_changed) {
+			full->surface_updates[planes_count].gamma = dc_plane->gamma_correction;
+			full->surface_updates[planes_count].in_transfer_func = dc_plane->in_transfer_func;
+		}
+
+
+		full->scaling_infos[planes_count].scaling_quality = dc_plane->scaling_quality;
+		full->scaling_infos[planes_count].src_rect = dc_plane->src_rect;
+		full->scaling_infos[planes_count].dst_rect = dc_plane->dst_rect;
+		full->scaling_infos[planes_count].clip_rect = dc_plane->clip_rect;
+		full->surface_updates[planes_count].scaling_info = &full->scaling_infos[planes_count];
+
+
+		full->plane_infos[planes_count].color_space = dc_plane->color_space;
+		full->plane_infos[planes_count].format = dc_plane->format;
+		full->plane_infos[planes_count].plane_size = dc_plane->plane_size;
+		full->plane_infos[planes_count].rotation = dc_plane->rotation;
+		full->plane_infos[planes_count].horizontal_mirror = dc_plane->horizontal_mirror;
+		full->plane_infos[planes_count].stereo_format = dc_plane->stereo_format;
+		full->plane_infos[planes_count].tiling_info = dc_plane->tiling_info;
+		full->plane_infos[planes_count].visible = dc_plane->visible;
+		full->plane_infos[planes_count].per_pixel_alpha = dc_plane->per_pixel_alpha;
+		full->plane_infos[planes_count].dcc = dc_plane->dcc;
+		full->surface_updates[planes_count].plane_info = &full->plane_infos[planes_count];
+
+		planes_count += 1;
+
 	}
 
+	/*
+	 * TODO: For proper atomic behaviour, we should be calling into DC once with
+	 * all the changes.  However, DC refuses to do pageflips and non-pageflip
+	 * changes in the same call.  Change DC to respect atomic behaviour,
+	 * hopefully eliminating dc_*_update structs in their entirety.
+	 */
 	if (flip_count) {
 		target = (uint32_t)drm_crtc_vblank_count(pcrtc) + *wait_for_vblank;
 		/* Prepare wait for target vblank early - before the fence-waits */
@@ -5029,29 +4965,26 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 	}
 
 	if (planes_count) {
-		unsigned long flags;
-
-		if (new_pcrtc_state->event) {
-
-			drm_crtc_vblank_get(pcrtc);
-
-			spin_lock_irqsave(&pcrtc->dev->event_lock, flags);
-			prepare_flip_isr(acrtc_attach);
-			spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags);
+		if (new_pcrtc_state->mode_changed) {
+			full->stream_update.src = acrtc_state->stream->src;
+			full->stream_update.dst = acrtc_state->stream->dst;
 		}
 
+		if (new_pcrtc_state->color_mgmt_changed)
+			full->stream_update.out_transfer_func = acrtc_state->stream->out_transfer_func;
+
 		acrtc_state->stream->abm_level = acrtc_state->abm_level;
+		if (acrtc_state->abm_level != dm_old_crtc_state->abm_level)
+			full->stream_update.abm_level = &acrtc_state->abm_level;
 
-		if (false == commit_planes_to_stream(dm,
-							dm->dc,
-							plane_states_constructed,
-							planes_count,
-							acrtc_state,
-							dm_old_crtc_state,
-							dc_state))
-			dm_error("%s: Failed to attach plane!\n", __func__);
-	} else {
-		/*TODO BUG Here should go disable planes on CRTC. */
+		mutex_lock(&dm->dc_lock);
+		dc_commit_updates_for_stream(dm->dc,
+						     full->surface_updates,
+						     planes_count,
+						     acrtc_state->stream,
+						     &full->stream_update,
+						     dc_state);
+		mutex_unlock(&dm->dc_lock);
 	}
 }
 
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 08/20] drm/amd/display: Update DMCU versioning mechanism
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (6 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 07/20] drm/amd/display: Perform plane updates only when needed sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 09/20] drm/amd/display: Create switching mechanism for ABM 2.2 sunpeng.li-5C7GfCeVMHo
                     ` (11 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Josip Pavic

From: Josip Pavic <Josip.Pavic@amd.com>

[Why]
Current date based versioning doesn't tell us about feature version
and build version, and is not useful for debug.

[How]
Add versioning based on feature and build

Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c             | 6 +++---
 drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h              | 6 +++---
 drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 9 ++++-----
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
index e927c89..c2926cf 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
@@ -331,10 +331,10 @@ static void dcn10_get_dmcu_version(struct dmcu *dmcu)
 	/* Write address to IRAM_RD_ADDR and read from DATA register */
 	REG_WRITE(DMCU_IRAM_RD_CTRL, dmcu_version_offset);
 	dmcu->dmcu_version.interface_version = REG_READ(DMCU_IRAM_RD_DATA);
-	dmcu->dmcu_version.year = ((REG_READ(DMCU_IRAM_RD_DATA) << 8) |
+	dmcu->dmcu_version.abm_version = REG_READ(DMCU_IRAM_RD_DATA);
+	dmcu->dmcu_version.psr_version = REG_READ(DMCU_IRAM_RD_DATA);
+	dmcu->dmcu_version.build_version = ((REG_READ(DMCU_IRAM_RD_DATA) << 8) |
 						REG_READ(DMCU_IRAM_RD_DATA));
-	dmcu->dmcu_version.month = REG_READ(DMCU_IRAM_RD_DATA);
-	dmcu->dmcu_version.date = REG_READ(DMCU_IRAM_RD_DATA);
 
 	/* Disable write access to IRAM to allow dynamic sleep state */
 	REG_UPDATE_2(DMCU_RAM_ACCESS_CTRL,
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
index ed32a75..cbaa438 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dmcu.h
@@ -39,10 +39,10 @@ enum dmcu_state {
 };
 
 struct dmcu_version {
-	unsigned int date;
-	unsigned int month;
-	unsigned int year;
 	unsigned int interface_version;
+	unsigned int abm_version;
+	unsigned int psr_version;
+	unsigned int build_version;
 };
 
 struct dmcu {
diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
index 89b082b..5432183 100644
--- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
+++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
@@ -87,11 +87,10 @@ struct iram_table_v_2 {
 
 	/* For reading PSR State directly from IRAM */
 	uint8_t psr_state;						/* 0xf0       */
-	uint8_t dmcu_interface_version;					/* 0xf1       */
-	uint8_t dmcu_date_version_year_b0;				/* 0xf2       */
-	uint8_t dmcu_date_version_year_b1;				/* 0xf3       */
-	uint8_t dmcu_date_version_month;				/* 0xf4       */
-	uint8_t dmcu_date_version_day;					/* 0xf5       */
+	uint8_t dmcu_mcp_interface_version;							/* 0xf1       */
+	uint8_t dmcu_abm_feature_version;							/* 0xf2       */
+	uint8_t dmcu_psr_feature_version;							/* 0xf3       */
+	uint16_t dmcu_version;										/* 0xf4       */
 	uint8_t dmcu_state;						/* 0xf6       */
 
 	uint16_t blRampReduction;					/* 0xf7       */
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 09/20] drm/amd/display: Create switching mechanism for ABM 2.2
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (7 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 08/20] drm/amd/display: Update DMCU versioning mechanism sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 10/20] drm/amd/display: Fix use of uninitialized union sunpeng.li-5C7GfCeVMHo
                     ` (10 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Josip Pavic

From: Josip Pavic <Josip.Pavic@amd.com>

[Why]
Need method of detecting which version of the DMCU FW is loaded and
load the appropriate iRAM.

[How]
Create definition for ABM 2.2 iRAM, and load it if the DMCU FW version
number matches the ABM 2.2 version; otherwise load ABM 2.1 iRAM.

Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 .../drm/amd/display/modules/power/power_helpers.c  | 583 +++++++++++++++------
 1 file changed, 418 insertions(+), 165 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
index 5432183..29b7a26 100644
--- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
+++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
@@ -41,6 +41,17 @@ static const unsigned char min_reduction_table[13] = {
 static const unsigned char max_reduction_table[13] = {
 0xf5, 0xe5, 0xd9, 0xcd, 0xb1, 0xa5, 0xa5, 0x80, 0x65, 0x4d, 0x4d, 0x4d, 0x32};
 
+/* ABM 2.2 Min Reduction effectively disabled (100% for all configs)*/
+static const unsigned char min_reduction_table_v_2_2[13] = {
+0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+
+/* Possible ABM 2.2 Max Reduction configs from least aggressive to most aggressive
+ *  0    1     2     3     4     5     6     7     8     9     10    11   12
+ * 96.1 89.8 85.1  80.3  69.4  64.7  54.9  45.1  30.2  25.1  19.6  12.5  12.5 %
+ */
+static const unsigned char max_reduction_table_v_2_2[13] = {
+0xf5, 0xe5, 0xd9, 0xcd, 0xb1, 0xa5, 0x8c, 0x73, 0x4d, 0x40, 0x32, 0x20, 0x20};
+
 /* Predefined ABM configuration sets. We may have different configuration sets
  * in order to satisfy different power/quality requirements.
  */
@@ -57,6 +68,7 @@ static const unsigned char abm_config[abm_defines_max_config][abm_defines_max_le
 #define NUM_POWER_FN_SEGS 8
 #define NUM_BL_CURVE_SEGS 16
 #define IRAM_RESERVE_AREA_START 0xF0  // reserve 0xF0~0xFF are write by DMCU only
+#define IRAM_SIZE 256
 
 #pragma pack(push, 1)
 /* NOTE: iRAM is 256B in size */
@@ -101,6 +113,49 @@ struct iram_table_v_2 {
 	uint8_t dummy8;							/* 0xfe       */
 	uint8_t dummy9;							/* 0xff       */
 };
+
+struct iram_table_v_2_2 {
+	/* flags                      */
+	uint16_t flags;							/* 0x00 U16  */
+
+	/* parameters for ABM2.2 algorithm */
+	uint8_t min_reduction[NUM_AMBI_LEVEL][NUM_AGGR_LEVEL];		/* 0x02 U0.8 */
+	uint8_t max_reduction[NUM_AMBI_LEVEL][NUM_AGGR_LEVEL];		/* 0x16 U0.8 */
+	uint8_t bright_pos_gain[NUM_AMBI_LEVEL][NUM_AGGR_LEVEL];	/* 0x2a U2.6 */
+	uint8_t dark_pos_gain[NUM_AMBI_LEVEL][NUM_AGGR_LEVEL];		/* 0x3e U2.6 */
+	uint8_t hybridFactor[NUM_AGGR_LEVEL];						/* 0x52 U0.8 */
+	uint8_t contrastFactor[NUM_AGGR_LEVEL];						/* 0x56 U0.8 */
+	uint8_t deviation_gain[NUM_AGGR_LEVEL];						/* 0x5a U0.8 */
+	uint8_t iir_curve[NUM_AMBI_LEVEL];							/* 0x5e U0.8 */
+	uint8_t pad[29];											/* 0x63 U0.8 */
+
+	/* parameters for crgb conversion */
+	uint16_t crgb_thresh[NUM_POWER_FN_SEGS];					/* 0x80 U3.13 */
+	uint16_t crgb_offset[NUM_POWER_FN_SEGS];					/* 0x90 U1.15 */
+	uint16_t crgb_slope[NUM_POWER_FN_SEGS];						/* 0xa0 U4.12 */
+
+	/* parameters for custom curve */
+	/* thresholds for brightness --> backlight */
+	uint16_t backlight_thresholds[NUM_BL_CURVE_SEGS];			/* 0xb0 U16.0 */
+	/* offsets for brightness --> backlight */
+	uint16_t backlight_offsets[NUM_BL_CURVE_SEGS];				/* 0xd0 U16.0 */
+
+	/* For reading PSR State directly from IRAM */
+	uint8_t psr_state;											/* 0xf0       */
+	uint8_t dmcu_mcp_interface_version;							/* 0xf1       */
+	uint8_t dmcu_abm_feature_version;							/* 0xf2       */
+	uint8_t dmcu_psr_feature_version;							/* 0xf3       */
+	uint16_t dmcu_version;										/* 0xf4       */
+	uint8_t dmcu_state;											/* 0xf6       */
+
+	uint16_t blRampReduction;									/* 0xf7       */
+	uint16_t blRampStart;										/* 0xf9       */
+	uint8_t dummy5;												/* 0xfb       */
+	uint8_t dummy6;												/* 0xfc       */
+	uint8_t dummy7;												/* 0xfd       */
+	uint8_t dummy8;												/* 0xfe       */
+	uint8_t dummy9;												/* 0xff       */
+};
 #pragma pack(pop)
 
 static uint16_t backlight_8_to_16(unsigned int backlight_8bit)
@@ -145,11 +200,367 @@ static void fill_backlight_transform_table(struct dmcu_iram_parameters params,
 	}
 }
 
+static void fill_backlight_transform_table_v_2_2(struct dmcu_iram_parameters params,
+		struct iram_table_v_2_2 *table)
+{
+	unsigned int i;
+	unsigned int num_entries = NUM_BL_CURVE_SEGS;
+	unsigned int query_input_8bit;
+	unsigned int query_output_8bit;
+	unsigned int lut_index;
+
+	table->backlight_thresholds[0] = 0;
+	table->backlight_offsets[0] = params.backlight_lut_array[0];
+	table->backlight_thresholds[num_entries-1] = 0xFFFF;
+	table->backlight_offsets[num_entries-1] =
+		params.backlight_lut_array[params.backlight_lut_array_size - 1];
+
+	/* Setup all brightness levels between 0% and 100% exclusive
+	 * Fills brightness-to-backlight transform table. Backlight custom curve
+	 * describes transform from brightness to backlight. It will be defined
+	 * as set of thresholds and set of offsets, together, implying
+	 * extrapolation of custom curve into 16 uniformly spanned linear
+	 * segments.  Each threshold/offset represented by 16 bit entry in
+	 * format U4.10.
+	 */
+	for (i = 1; i+1 < num_entries; i++) {
+		query_input_8bit = DIV_ROUNDUP((i * 256), num_entries);
+
+		lut_index = (params.backlight_lut_array_size - 1) * i / (num_entries - 1);
+		ASSERT(lut_index < params.backlight_lut_array_size);
+		query_output_8bit = params.backlight_lut_array[lut_index] >> 8;
+
+		table->backlight_thresholds[i] =
+				backlight_8_to_16(query_input_8bit);
+		table->backlight_offsets[i] =
+				backlight_8_to_16(query_output_8bit);
+	}
+}
+
+void fill_iram_v_2(struct iram_table_v_2 *ram_table, struct dmcu_iram_parameters params)
+{
+	unsigned int set = params.set;
+
+	ram_table->flags = 0x0;
+	ram_table->deviation_gain = 0xb3;
+
+	ram_table->blRampReduction =
+		cpu_to_be16(params.backlight_ramping_reduction);
+	ram_table->blRampStart =
+		cpu_to_be16(params.backlight_ramping_start);
+
+	ram_table->min_reduction[0][0] = min_reduction_table[abm_config[set][0]];
+	ram_table->min_reduction[1][0] = min_reduction_table[abm_config[set][0]];
+	ram_table->min_reduction[2][0] = min_reduction_table[abm_config[set][0]];
+	ram_table->min_reduction[3][0] = min_reduction_table[abm_config[set][0]];
+	ram_table->min_reduction[4][0] = min_reduction_table[abm_config[set][0]];
+	ram_table->max_reduction[0][0] = max_reduction_table[abm_config[set][0]];
+	ram_table->max_reduction[1][0] = max_reduction_table[abm_config[set][0]];
+	ram_table->max_reduction[2][0] = max_reduction_table[abm_config[set][0]];
+	ram_table->max_reduction[3][0] = max_reduction_table[abm_config[set][0]];
+	ram_table->max_reduction[4][0] = max_reduction_table[abm_config[set][0]];
+
+	ram_table->min_reduction[0][1] = min_reduction_table[abm_config[set][1]];
+	ram_table->min_reduction[1][1] = min_reduction_table[abm_config[set][1]];
+	ram_table->min_reduction[2][1] = min_reduction_table[abm_config[set][1]];
+	ram_table->min_reduction[3][1] = min_reduction_table[abm_config[set][1]];
+	ram_table->min_reduction[4][1] = min_reduction_table[abm_config[set][1]];
+	ram_table->max_reduction[0][1] = max_reduction_table[abm_config[set][1]];
+	ram_table->max_reduction[1][1] = max_reduction_table[abm_config[set][1]];
+	ram_table->max_reduction[2][1] = max_reduction_table[abm_config[set][1]];
+	ram_table->max_reduction[3][1] = max_reduction_table[abm_config[set][1]];
+	ram_table->max_reduction[4][1] = max_reduction_table[abm_config[set][1]];
+
+	ram_table->min_reduction[0][2] = min_reduction_table[abm_config[set][2]];
+	ram_table->min_reduction[1][2] = min_reduction_table[abm_config[set][2]];
+	ram_table->min_reduction[2][2] = min_reduction_table[abm_config[set][2]];
+	ram_table->min_reduction[3][2] = min_reduction_table[abm_config[set][2]];
+	ram_table->min_reduction[4][2] = min_reduction_table[abm_config[set][2]];
+	ram_table->max_reduction[0][2] = max_reduction_table[abm_config[set][2]];
+	ram_table->max_reduction[1][2] = max_reduction_table[abm_config[set][2]];
+	ram_table->max_reduction[2][2] = max_reduction_table[abm_config[set][2]];
+	ram_table->max_reduction[3][2] = max_reduction_table[abm_config[set][2]];
+	ram_table->max_reduction[4][2] = max_reduction_table[abm_config[set][2]];
+
+	ram_table->min_reduction[0][3] = min_reduction_table[abm_config[set][3]];
+	ram_table->min_reduction[1][3] = min_reduction_table[abm_config[set][3]];
+	ram_table->min_reduction[2][3] = min_reduction_table[abm_config[set][3]];
+	ram_table->min_reduction[3][3] = min_reduction_table[abm_config[set][3]];
+	ram_table->min_reduction[4][3] = min_reduction_table[abm_config[set][3]];
+	ram_table->max_reduction[0][3] = max_reduction_table[abm_config[set][3]];
+	ram_table->max_reduction[1][3] = max_reduction_table[abm_config[set][3]];
+	ram_table->max_reduction[2][3] = max_reduction_table[abm_config[set][3]];
+	ram_table->max_reduction[3][3] = max_reduction_table[abm_config[set][3]];
+	ram_table->max_reduction[4][3] = max_reduction_table[abm_config[set][3]];
+
+	ram_table->bright_pos_gain[0][0] = 0x20;
+	ram_table->bright_pos_gain[0][1] = 0x20;
+	ram_table->bright_pos_gain[0][2] = 0x20;
+	ram_table->bright_pos_gain[0][3] = 0x20;
+	ram_table->bright_pos_gain[1][0] = 0x20;
+	ram_table->bright_pos_gain[1][1] = 0x20;
+	ram_table->bright_pos_gain[1][2] = 0x20;
+	ram_table->bright_pos_gain[1][3] = 0x20;
+	ram_table->bright_pos_gain[2][0] = 0x20;
+	ram_table->bright_pos_gain[2][1] = 0x20;
+	ram_table->bright_pos_gain[2][2] = 0x20;
+	ram_table->bright_pos_gain[2][3] = 0x20;
+	ram_table->bright_pos_gain[3][0] = 0x20;
+	ram_table->bright_pos_gain[3][1] = 0x20;
+	ram_table->bright_pos_gain[3][2] = 0x20;
+	ram_table->bright_pos_gain[3][3] = 0x20;
+	ram_table->bright_pos_gain[4][0] = 0x20;
+	ram_table->bright_pos_gain[4][1] = 0x20;
+	ram_table->bright_pos_gain[4][2] = 0x20;
+	ram_table->bright_pos_gain[4][3] = 0x20;
+	ram_table->bright_neg_gain[0][1] = 0x00;
+	ram_table->bright_neg_gain[0][2] = 0x00;
+	ram_table->bright_neg_gain[0][3] = 0x00;
+	ram_table->bright_neg_gain[1][0] = 0x00;
+	ram_table->bright_neg_gain[1][1] = 0x00;
+	ram_table->bright_neg_gain[1][2] = 0x00;
+	ram_table->bright_neg_gain[1][3] = 0x00;
+	ram_table->bright_neg_gain[2][0] = 0x00;
+	ram_table->bright_neg_gain[2][1] = 0x00;
+	ram_table->bright_neg_gain[2][2] = 0x00;
+	ram_table->bright_neg_gain[2][3] = 0x00;
+	ram_table->bright_neg_gain[3][0] = 0x00;
+	ram_table->bright_neg_gain[3][1] = 0x00;
+	ram_table->bright_neg_gain[3][2] = 0x00;
+	ram_table->bright_neg_gain[3][3] = 0x00;
+	ram_table->bright_neg_gain[4][0] = 0x00;
+	ram_table->bright_neg_gain[4][1] = 0x00;
+	ram_table->bright_neg_gain[4][2] = 0x00;
+	ram_table->bright_neg_gain[4][3] = 0x00;
+	ram_table->dark_pos_gain[0][0] = 0x00;
+	ram_table->dark_pos_gain[0][1] = 0x00;
+	ram_table->dark_pos_gain[0][2] = 0x00;
+	ram_table->dark_pos_gain[0][3] = 0x00;
+	ram_table->dark_pos_gain[1][0] = 0x00;
+	ram_table->dark_pos_gain[1][1] = 0x00;
+	ram_table->dark_pos_gain[1][2] = 0x00;
+	ram_table->dark_pos_gain[1][3] = 0x00;
+	ram_table->dark_pos_gain[2][0] = 0x00;
+	ram_table->dark_pos_gain[2][1] = 0x00;
+	ram_table->dark_pos_gain[2][2] = 0x00;
+	ram_table->dark_pos_gain[2][3] = 0x00;
+	ram_table->dark_pos_gain[3][0] = 0x00;
+	ram_table->dark_pos_gain[3][1] = 0x00;
+	ram_table->dark_pos_gain[3][2] = 0x00;
+	ram_table->dark_pos_gain[3][3] = 0x00;
+	ram_table->dark_pos_gain[4][0] = 0x00;
+	ram_table->dark_pos_gain[4][1] = 0x00;
+	ram_table->dark_pos_gain[4][2] = 0x00;
+	ram_table->dark_pos_gain[4][3] = 0x00;
+	ram_table->dark_neg_gain[0][0] = 0x00;
+	ram_table->dark_neg_gain[0][1] = 0x00;
+	ram_table->dark_neg_gain[0][2] = 0x00;
+	ram_table->dark_neg_gain[0][3] = 0x00;
+	ram_table->dark_neg_gain[1][0] = 0x00;
+	ram_table->dark_neg_gain[1][1] = 0x00;
+	ram_table->dark_neg_gain[1][2] = 0x00;
+	ram_table->dark_neg_gain[1][3] = 0x00;
+	ram_table->dark_neg_gain[2][0] = 0x00;
+	ram_table->dark_neg_gain[2][1] = 0x00;
+	ram_table->dark_neg_gain[2][2] = 0x00;
+	ram_table->dark_neg_gain[2][3] = 0x00;
+	ram_table->dark_neg_gain[3][0] = 0x00;
+	ram_table->dark_neg_gain[3][1] = 0x00;
+	ram_table->dark_neg_gain[3][2] = 0x00;
+	ram_table->dark_neg_gain[3][3] = 0x00;
+	ram_table->dark_neg_gain[4][0] = 0x00;
+	ram_table->dark_neg_gain[4][1] = 0x00;
+	ram_table->dark_neg_gain[4][2] = 0x00;
+	ram_table->dark_neg_gain[4][3] = 0x00;
+
+	ram_table->iir_curve[0] = 0x65;
+	ram_table->iir_curve[1] = 0x65;
+	ram_table->iir_curve[2] = 0x65;
+	ram_table->iir_curve[3] = 0x65;
+	ram_table->iir_curve[4] = 0x65;
+
+	//Gamma 2.4
+	ram_table->crgb_thresh[0] = cpu_to_be16(0x13b6);
+	ram_table->crgb_thresh[1] = cpu_to_be16(0x1648);
+	ram_table->crgb_thresh[2] = cpu_to_be16(0x18e3);
+	ram_table->crgb_thresh[3] = cpu_to_be16(0x1b41);
+	ram_table->crgb_thresh[4] = cpu_to_be16(0x1d46);
+	ram_table->crgb_thresh[5] = cpu_to_be16(0x1f21);
+	ram_table->crgb_thresh[6] = cpu_to_be16(0x2167);
+	ram_table->crgb_thresh[7] = cpu_to_be16(0x2384);
+	ram_table->crgb_offset[0] = cpu_to_be16(0x2999);
+	ram_table->crgb_offset[1] = cpu_to_be16(0x3999);
+	ram_table->crgb_offset[2] = cpu_to_be16(0x4666);
+	ram_table->crgb_offset[3] = cpu_to_be16(0x5999);
+	ram_table->crgb_offset[4] = cpu_to_be16(0x6333);
+	ram_table->crgb_offset[5] = cpu_to_be16(0x7800);
+	ram_table->crgb_offset[6] = cpu_to_be16(0x8c00);
+	ram_table->crgb_offset[7] = cpu_to_be16(0xa000);
+	ram_table->crgb_slope[0]  = cpu_to_be16(0x3147);
+	ram_table->crgb_slope[1]  = cpu_to_be16(0x2978);
+	ram_table->crgb_slope[2]  = cpu_to_be16(0x23a2);
+	ram_table->crgb_slope[3]  = cpu_to_be16(0x1f55);
+	ram_table->crgb_slope[4]  = cpu_to_be16(0x1c63);
+	ram_table->crgb_slope[5]  = cpu_to_be16(0x1a0f);
+	ram_table->crgb_slope[6]  = cpu_to_be16(0x178d);
+	ram_table->crgb_slope[7]  = cpu_to_be16(0x15ab);
+
+	fill_backlight_transform_table(
+			params, ram_table);
+}
+
+void fill_iram_v_2_2(struct iram_table_v_2_2 *ram_table, struct dmcu_iram_parameters params)
+{
+	unsigned int set = params.set;
+
+	ram_table->flags = 0x0;
+
+	ram_table->deviation_gain[0] = 0xb3;
+	ram_table->deviation_gain[1] = 0xb3;
+	ram_table->deviation_gain[2] = 0xb3;
+	ram_table->deviation_gain[3] = 0xb3;
+
+	ram_table->blRampReduction =
+		cpu_to_be16(params.backlight_ramping_reduction);
+	ram_table->blRampStart =
+		cpu_to_be16(params.backlight_ramping_start);
+
+	ram_table->min_reduction[0][0] = min_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->min_reduction[1][0] = min_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->min_reduction[2][0] = min_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->min_reduction[3][0] = min_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->min_reduction[4][0] = min_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->max_reduction[0][0] = max_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->max_reduction[1][0] = max_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->max_reduction[2][0] = max_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->max_reduction[3][0] = max_reduction_table_v_2_2[abm_config[set][0]];
+	ram_table->max_reduction[4][0] = max_reduction_table_v_2_2[abm_config[set][0]];
+
+	ram_table->min_reduction[0][1] = min_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->min_reduction[1][1] = min_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->min_reduction[2][1] = min_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->min_reduction[3][1] = min_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->min_reduction[4][1] = min_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->max_reduction[0][1] = max_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->max_reduction[1][1] = max_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->max_reduction[2][1] = max_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->max_reduction[3][1] = max_reduction_table_v_2_2[abm_config[set][1]];
+	ram_table->max_reduction[4][1] = max_reduction_table_v_2_2[abm_config[set][1]];
+
+	ram_table->min_reduction[0][2] = min_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->min_reduction[1][2] = min_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->min_reduction[2][2] = min_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->min_reduction[3][2] = min_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->min_reduction[4][2] = min_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->max_reduction[0][2] = max_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->max_reduction[1][2] = max_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->max_reduction[2][2] = max_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->max_reduction[3][2] = max_reduction_table_v_2_2[abm_config[set][2]];
+	ram_table->max_reduction[4][2] = max_reduction_table_v_2_2[abm_config[set][2]];
+
+	ram_table->min_reduction[0][3] = min_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->min_reduction[1][3] = min_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->min_reduction[2][3] = min_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->min_reduction[3][3] = min_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->min_reduction[4][3] = min_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->max_reduction[0][3] = max_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->max_reduction[1][3] = max_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->max_reduction[2][3] = max_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->max_reduction[3][3] = max_reduction_table_v_2_2[abm_config[set][3]];
+	ram_table->max_reduction[4][3] = max_reduction_table_v_2_2[abm_config[set][3]];
+
+	ram_table->bright_pos_gain[0][0] = 0x20;
+	ram_table->bright_pos_gain[0][1] = 0x20;
+	ram_table->bright_pos_gain[0][2] = 0x20;
+	ram_table->bright_pos_gain[0][3] = 0x20;
+	ram_table->bright_pos_gain[1][0] = 0x20;
+	ram_table->bright_pos_gain[1][1] = 0x20;
+	ram_table->bright_pos_gain[1][2] = 0x20;
+	ram_table->bright_pos_gain[1][3] = 0x20;
+	ram_table->bright_pos_gain[2][0] = 0x20;
+	ram_table->bright_pos_gain[2][1] = 0x20;
+	ram_table->bright_pos_gain[2][2] = 0x20;
+	ram_table->bright_pos_gain[2][3] = 0x20;
+	ram_table->bright_pos_gain[3][0] = 0x20;
+	ram_table->bright_pos_gain[3][1] = 0x20;
+	ram_table->bright_pos_gain[3][2] = 0x20;
+	ram_table->bright_pos_gain[3][3] = 0x20;
+	ram_table->bright_pos_gain[4][0] = 0x20;
+	ram_table->bright_pos_gain[4][1] = 0x20;
+	ram_table->bright_pos_gain[4][2] = 0x20;
+	ram_table->bright_pos_gain[4][3] = 0x20;
+
+	ram_table->dark_pos_gain[0][0] = 0x00;
+	ram_table->dark_pos_gain[0][1] = 0x00;
+	ram_table->dark_pos_gain[0][2] = 0x00;
+	ram_table->dark_pos_gain[0][3] = 0x00;
+	ram_table->dark_pos_gain[1][0] = 0x00;
+	ram_table->dark_pos_gain[1][1] = 0x00;
+	ram_table->dark_pos_gain[1][2] = 0x00;
+	ram_table->dark_pos_gain[1][3] = 0x00;
+	ram_table->dark_pos_gain[2][0] = 0x00;
+	ram_table->dark_pos_gain[2][1] = 0x00;
+	ram_table->dark_pos_gain[2][2] = 0x00;
+	ram_table->dark_pos_gain[2][3] = 0x00;
+	ram_table->dark_pos_gain[3][0] = 0x00;
+	ram_table->dark_pos_gain[3][1] = 0x00;
+	ram_table->dark_pos_gain[3][2] = 0x00;
+	ram_table->dark_pos_gain[3][3] = 0x00;
+	ram_table->dark_pos_gain[4][0] = 0x00;
+	ram_table->dark_pos_gain[4][1] = 0x00;
+	ram_table->dark_pos_gain[4][2] = 0x00;
+	ram_table->dark_pos_gain[4][3] = 0x00;
+
+	ram_table->hybridFactor[0] = 0xff;
+	ram_table->hybridFactor[1] = 0xff;
+	ram_table->hybridFactor[2] = 0xff;
+	ram_table->hybridFactor[3] = 0xc0;
+
+	ram_table->contrastFactor[0] = 0x99;
+	ram_table->contrastFactor[1] = 0x80;
+	ram_table->contrastFactor[2] = 0x80;
+	ram_table->contrastFactor[3] = 0x4D;
+
+	ram_table->iir_curve[0] = 0x65;
+	ram_table->iir_curve[1] = 0x65;
+	ram_table->iir_curve[2] = 0x65;
+	ram_table->iir_curve[3] = 0x65;
+	ram_table->iir_curve[4] = 0x65;
+
+	//Gamma 2.2
+	ram_table->crgb_thresh[0] = cpu_to_be16(0x127c);
+	ram_table->crgb_thresh[1] = cpu_to_be16(0x151b);
+	ram_table->crgb_thresh[2] = cpu_to_be16(0x17d5);
+	ram_table->crgb_thresh[3] = cpu_to_be16(0x1a56);
+	ram_table->crgb_thresh[4] = cpu_to_be16(0x1c83);
+	ram_table->crgb_thresh[5] = cpu_to_be16(0x1e72);
+	ram_table->crgb_thresh[6] = cpu_to_be16(0x20f0);
+	ram_table->crgb_thresh[7] = cpu_to_be16(0x232b);
+	ram_table->crgb_offset[0] = cpu_to_be16(0x2999);
+	ram_table->crgb_offset[1] = cpu_to_be16(0x3999);
+	ram_table->crgb_offset[2] = cpu_to_be16(0x4666);
+	ram_table->crgb_offset[3] = cpu_to_be16(0x5999);
+	ram_table->crgb_offset[4] = cpu_to_be16(0x6333);
+	ram_table->crgb_offset[5] = cpu_to_be16(0x7800);
+	ram_table->crgb_offset[6] = cpu_to_be16(0x8c00);
+	ram_table->crgb_offset[7] = cpu_to_be16(0xa000);
+	ram_table->crgb_slope[0]  = cpu_to_be16(0x3609);
+	ram_table->crgb_slope[1]  = cpu_to_be16(0x2dfa);
+	ram_table->crgb_slope[2]  = cpu_to_be16(0x27ea);
+	ram_table->crgb_slope[3]  = cpu_to_be16(0x235d);
+	ram_table->crgb_slope[4]  = cpu_to_be16(0x2042);
+	ram_table->crgb_slope[5]  = cpu_to_be16(0x1dc3);
+	ram_table->crgb_slope[6]  = cpu_to_be16(0x1b1a);
+	ram_table->crgb_slope[7]  = cpu_to_be16(0x1910);
+
+	fill_backlight_transform_table_v_2_2(
+			params, ram_table);
+}
+
 bool dmcu_load_iram(struct dmcu *dmcu,
 	struct dmcu_iram_parameters params)
 {
-	struct iram_table_v_2 ram_table;
-	unsigned int set = params.set;
+	unsigned char ram_table[IRAM_SIZE];
 
 	if (dmcu == NULL)
 		return false;
@@ -159,169 +570,11 @@ bool dmcu_load_iram(struct dmcu *dmcu,
 
 	memset(&ram_table, 0, sizeof(ram_table));
 
-	ram_table.flags = 0x0;
-	ram_table.deviation_gain = 0xb3;
-
-	ram_table.blRampReduction =
-		cpu_to_be16(params.backlight_ramping_reduction);
-	ram_table.blRampStart =
-		cpu_to_be16(params.backlight_ramping_start);
-
-	ram_table.min_reduction[0][0] = min_reduction_table[abm_config[set][0]];
-	ram_table.min_reduction[1][0] = min_reduction_table[abm_config[set][0]];
-	ram_table.min_reduction[2][0] = min_reduction_table[abm_config[set][0]];
-	ram_table.min_reduction[3][0] = min_reduction_table[abm_config[set][0]];
-	ram_table.min_reduction[4][0] = min_reduction_table[abm_config[set][0]];
-	ram_table.max_reduction[0][0] = max_reduction_table[abm_config[set][0]];
-	ram_table.max_reduction[1][0] = max_reduction_table[abm_config[set][0]];
-	ram_table.max_reduction[2][0] = max_reduction_table[abm_config[set][0]];
-	ram_table.max_reduction[3][0] = max_reduction_table[abm_config[set][0]];
-	ram_table.max_reduction[4][0] = max_reduction_table[abm_config[set][0]];
-
-	ram_table.min_reduction[0][1] = min_reduction_table[abm_config[set][1]];
-	ram_table.min_reduction[1][1] = min_reduction_table[abm_config[set][1]];
-	ram_table.min_reduction[2][1] = min_reduction_table[abm_config[set][1]];
-	ram_table.min_reduction[3][1] = min_reduction_table[abm_config[set][1]];
-	ram_table.min_reduction[4][1] = min_reduction_table[abm_config[set][1]];
-	ram_table.max_reduction[0][1] = max_reduction_table[abm_config[set][1]];
-	ram_table.max_reduction[1][1] = max_reduction_table[abm_config[set][1]];
-	ram_table.max_reduction[2][1] = max_reduction_table[abm_config[set][1]];
-	ram_table.max_reduction[3][1] = max_reduction_table[abm_config[set][1]];
-	ram_table.max_reduction[4][1] = max_reduction_table[abm_config[set][1]];
-
-	ram_table.min_reduction[0][2] = min_reduction_table[abm_config[set][2]];
-	ram_table.min_reduction[1][2] = min_reduction_table[abm_config[set][2]];
-	ram_table.min_reduction[2][2] = min_reduction_table[abm_config[set][2]];
-	ram_table.min_reduction[3][2] = min_reduction_table[abm_config[set][2]];
-	ram_table.min_reduction[4][2] = min_reduction_table[abm_config[set][2]];
-	ram_table.max_reduction[0][2] = max_reduction_table[abm_config[set][2]];
-	ram_table.max_reduction[1][2] = max_reduction_table[abm_config[set][2]];
-	ram_table.max_reduction[2][2] = max_reduction_table[abm_config[set][2]];
-	ram_table.max_reduction[3][2] = max_reduction_table[abm_config[set][2]];
-	ram_table.max_reduction[4][2] = max_reduction_table[abm_config[set][2]];
-
-	ram_table.min_reduction[0][3] = min_reduction_table[abm_config[set][3]];
-	ram_table.min_reduction[1][3] = min_reduction_table[abm_config[set][3]];
-	ram_table.min_reduction[2][3] = min_reduction_table[abm_config[set][3]];
-	ram_table.min_reduction[3][3] = min_reduction_table[abm_config[set][3]];
-	ram_table.min_reduction[4][3] = min_reduction_table[abm_config[set][3]];
-	ram_table.max_reduction[0][3] = max_reduction_table[abm_config[set][3]];
-	ram_table.max_reduction[1][3] = max_reduction_table[abm_config[set][3]];
-	ram_table.max_reduction[2][3] = max_reduction_table[abm_config[set][3]];
-	ram_table.max_reduction[3][3] = max_reduction_table[abm_config[set][3]];
-	ram_table.max_reduction[4][3] = max_reduction_table[abm_config[set][3]];
-
-	ram_table.bright_pos_gain[0][0] = 0x20;
-	ram_table.bright_pos_gain[0][1] = 0x20;
-	ram_table.bright_pos_gain[0][2] = 0x20;
-	ram_table.bright_pos_gain[0][3] = 0x20;
-	ram_table.bright_pos_gain[1][0] = 0x20;
-	ram_table.bright_pos_gain[1][1] = 0x20;
-	ram_table.bright_pos_gain[1][2] = 0x20;
-	ram_table.bright_pos_gain[1][3] = 0x20;
-	ram_table.bright_pos_gain[2][0] = 0x20;
-	ram_table.bright_pos_gain[2][1] = 0x20;
-	ram_table.bright_pos_gain[2][2] = 0x20;
-	ram_table.bright_pos_gain[2][3] = 0x20;
-	ram_table.bright_pos_gain[3][0] = 0x20;
-	ram_table.bright_pos_gain[3][1] = 0x20;
-	ram_table.bright_pos_gain[3][2] = 0x20;
-	ram_table.bright_pos_gain[3][3] = 0x20;
-	ram_table.bright_pos_gain[4][0] = 0x20;
-	ram_table.bright_pos_gain[4][1] = 0x20;
-	ram_table.bright_pos_gain[4][2] = 0x20;
-	ram_table.bright_pos_gain[4][3] = 0x20;
-	ram_table.bright_neg_gain[0][1] = 0x00;
-	ram_table.bright_neg_gain[0][2] = 0x00;
-	ram_table.bright_neg_gain[0][3] = 0x00;
-	ram_table.bright_neg_gain[1][0] = 0x00;
-	ram_table.bright_neg_gain[1][1] = 0x00;
-	ram_table.bright_neg_gain[1][2] = 0x00;
-	ram_table.bright_neg_gain[1][3] = 0x00;
-	ram_table.bright_neg_gain[2][0] = 0x00;
-	ram_table.bright_neg_gain[2][1] = 0x00;
-	ram_table.bright_neg_gain[2][2] = 0x00;
-	ram_table.bright_neg_gain[2][3] = 0x00;
-	ram_table.bright_neg_gain[3][0] = 0x00;
-	ram_table.bright_neg_gain[3][1] = 0x00;
-	ram_table.bright_neg_gain[3][2] = 0x00;
-	ram_table.bright_neg_gain[3][3] = 0x00;
-	ram_table.bright_neg_gain[4][0] = 0x00;
-	ram_table.bright_neg_gain[4][1] = 0x00;
-	ram_table.bright_neg_gain[4][2] = 0x00;
-	ram_table.bright_neg_gain[4][3] = 0x00;
-	ram_table.dark_pos_gain[0][0] = 0x00;
-	ram_table.dark_pos_gain[0][1] = 0x00;
-	ram_table.dark_pos_gain[0][2] = 0x00;
-	ram_table.dark_pos_gain[0][3] = 0x00;
-	ram_table.dark_pos_gain[1][0] = 0x00;
-	ram_table.dark_pos_gain[1][1] = 0x00;
-	ram_table.dark_pos_gain[1][2] = 0x00;
-	ram_table.dark_pos_gain[1][3] = 0x00;
-	ram_table.dark_pos_gain[2][0] = 0x00;
-	ram_table.dark_pos_gain[2][1] = 0x00;
-	ram_table.dark_pos_gain[2][2] = 0x00;
-	ram_table.dark_pos_gain[2][3] = 0x00;
-	ram_table.dark_pos_gain[3][0] = 0x00;
-	ram_table.dark_pos_gain[3][1] = 0x00;
-	ram_table.dark_pos_gain[3][2] = 0x00;
-	ram_table.dark_pos_gain[3][3] = 0x00;
-	ram_table.dark_pos_gain[4][0] = 0x00;
-	ram_table.dark_pos_gain[4][1] = 0x00;
-	ram_table.dark_pos_gain[4][2] = 0x00;
-	ram_table.dark_pos_gain[4][3] = 0x00;
-	ram_table.dark_neg_gain[0][0] = 0x00;
-	ram_table.dark_neg_gain[0][1] = 0x00;
-	ram_table.dark_neg_gain[0][2] = 0x00;
-	ram_table.dark_neg_gain[0][3] = 0x00;
-	ram_table.dark_neg_gain[1][0] = 0x00;
-	ram_table.dark_neg_gain[1][1] = 0x00;
-	ram_table.dark_neg_gain[1][2] = 0x00;
-	ram_table.dark_neg_gain[1][3] = 0x00;
-	ram_table.dark_neg_gain[2][0] = 0x00;
-	ram_table.dark_neg_gain[2][1] = 0x00;
-	ram_table.dark_neg_gain[2][2] = 0x00;
-	ram_table.dark_neg_gain[2][3] = 0x00;
-	ram_table.dark_neg_gain[3][0] = 0x00;
-	ram_table.dark_neg_gain[3][1] = 0x00;
-	ram_table.dark_neg_gain[3][2] = 0x00;
-	ram_table.dark_neg_gain[3][3] = 0x00;
-	ram_table.dark_neg_gain[4][0] = 0x00;
-	ram_table.dark_neg_gain[4][1] = 0x00;
-	ram_table.dark_neg_gain[4][2] = 0x00;
-	ram_table.dark_neg_gain[4][3] = 0x00;
-	ram_table.iir_curve[0] = 0x65;
-	ram_table.iir_curve[1] = 0x65;
-	ram_table.iir_curve[2] = 0x65;
-	ram_table.iir_curve[3] = 0x65;
-	ram_table.iir_curve[4] = 0x65;
-	ram_table.crgb_thresh[0] = cpu_to_be16(0x13b6);
-	ram_table.crgb_thresh[1] = cpu_to_be16(0x1648);
-	ram_table.crgb_thresh[2] = cpu_to_be16(0x18e3);
-	ram_table.crgb_thresh[3] = cpu_to_be16(0x1b41);
-	ram_table.crgb_thresh[4] = cpu_to_be16(0x1d46);
-	ram_table.crgb_thresh[5] = cpu_to_be16(0x1f21);
-	ram_table.crgb_thresh[6] = cpu_to_be16(0x2167);
-	ram_table.crgb_thresh[7] = cpu_to_be16(0x2384);
-	ram_table.crgb_offset[0] = cpu_to_be16(0x2999);
-	ram_table.crgb_offset[1] = cpu_to_be16(0x3999);
-	ram_table.crgb_offset[2] = cpu_to_be16(0x4666);
-	ram_table.crgb_offset[3] = cpu_to_be16(0x5999);
-	ram_table.crgb_offset[4] = cpu_to_be16(0x6333);
-	ram_table.crgb_offset[5] = cpu_to_be16(0x7800);
-	ram_table.crgb_offset[6] = cpu_to_be16(0x8c00);
-	ram_table.crgb_offset[7] = cpu_to_be16(0xa000);
-	ram_table.crgb_slope[0]  = cpu_to_be16(0x3147);
-	ram_table.crgb_slope[1]  = cpu_to_be16(0x2978);
-	ram_table.crgb_slope[2]  = cpu_to_be16(0x23a2);
-	ram_table.crgb_slope[3]  = cpu_to_be16(0x1f55);
-	ram_table.crgb_slope[4]  = cpu_to_be16(0x1c63);
-	ram_table.crgb_slope[5]  = cpu_to_be16(0x1a0f);
-	ram_table.crgb_slope[6]  = cpu_to_be16(0x178d);
-	ram_table.crgb_slope[7]  = cpu_to_be16(0x15ab);
-
-	fill_backlight_transform_table(
-			params, &ram_table);
+	if (dmcu->dmcu_version.abm_version == 0x22) {
+		fill_iram_v_2_2((struct iram_table_v_2_2 *)ram_table, params);
+	} else {
+		fill_iram_v_2((struct iram_table_v_2 *)ram_table, params);
+	}
 
 	return dmcu->funcs->load_iram(
 			dmcu, 0, (char *)(&ram_table), IRAM_RESERVE_AREA_START);
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 10/20] drm/amd/display: Fix use of uninitialized union
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (8 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 09/20] drm/amd/display: Create switching mechanism for ABM 2.2 sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 11/20] drm/amd/display: Default to linear output gamma sunpeng.li-5C7GfCeVMHo
                     ` (9 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: John Barberiz

From: John Barberiz <John.Barberiz@amd.com>

[Why]
An uninitialized variable would randomly initialize to a large
value. This caused enough delay to fail DP Compliance Test 400.2.1.

[How]
Initialize the variable.

Signed-off-by: John Barberiz <John.Barberiz@amd.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index 431805c..92f565c 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -47,7 +47,7 @@ static void wait_for_training_aux_rd_interval(
 	struct dc_link *link,
 	uint32_t default_wait_in_micro_secs)
 {
-	union training_aux_rd_interval training_rd_interval;
+	union training_aux_rd_interval training_rd_interval = {0};
 
 	/* overwrite the delay if rev > 1.1*/
 	if (link->dpcd_caps.dpcd_rev.raw >= DPCD_REV_12) {
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 11/20] drm/amd/display: Default to linear output gamma
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (9 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 10/20] drm/amd/display: Fix use of uninitialized union sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 12/20] drm/amd/display: Adjust ABM 2.2 contrast parameters sunpeng.li-5C7GfCeVMHo
                     ` (8 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Krunoslav Kovac

From: Krunoslav Kovac <Krunoslav.Kovac@amd.com>

[Why] Our output TF calculation doesn't work if no user-specified gamma
correction. Normally, user provides this, but driver sohuld just assume
default (linear) gamma otherwise.

[How] Remove output TF dependency on user gamma being provided.

Signed-off-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Sivapiriyan Kumarasamy <Sivapiriyan.Kumarasamy@amd.com>
---
 .../drm/amd/display/modules/color/color_gamma.c    | 73 ++++++++++++----------
 1 file changed, 40 insertions(+), 33 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 4cee084..eefb8592 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -1508,7 +1508,7 @@ static bool map_regamma_hw_to_x_user(
 	struct hw_x_point *coords = coords_x;
 	const struct pwl_float_data_ex *regamma = rgb_regamma;
 
-	if (mapUserRamp) {
+	if (ramp && mapUserRamp) {
 		copy_rgb_regamma_to_coordinates_x(coords,
 				hw_points_num,
 				rgb_regamma);
@@ -1545,7 +1545,7 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
 
 	struct pwl_float_data *rgb_user = NULL;
 	struct pwl_float_data_ex *rgb_regamma = NULL;
-	struct gamma_pixel *axix_x = NULL;
+	struct gamma_pixel *axis_x = NULL;
 	struct pixel_gamma_point *coeff = NULL;
 	enum dc_transfer_func_predefined tf = TRANSFER_FUNCTION_SRGB;
 	bool ret = false;
@@ -1555,47 +1555,54 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
 
 	/* we can use hardcoded curve for plain SRGB TF */
 	if (output_tf->type == TF_TYPE_PREDEFINED && canRomBeUsed == true &&
-			output_tf->tf == TRANSFER_FUNCTION_SRGB &&
-			(ramp->is_identity || (!mapUserRamp && ramp->type == GAMMA_RGB_256)))
-		return true;
+			output_tf->tf == TRANSFER_FUNCTION_SRGB) {
+		if (ramp == NULL)
+			return true;
+		if (ramp->is_identity || (!mapUserRamp && ramp->type == GAMMA_RGB_256))
+			return true;
+	}
 
 	output_tf->type = TF_TYPE_DISTRIBUTED_POINTS;
 
-	rgb_user = kvcalloc(ramp->num_entries + _EXTRA_POINTS,
+	if (ramp && (mapUserRamp || ramp->type != GAMMA_RGB_256)) {
+		rgb_user = kvcalloc(ramp->num_entries + _EXTRA_POINTS,
 			    sizeof(*rgb_user),
 			    GFP_KERNEL);
-	if (!rgb_user)
-		goto rgb_user_alloc_fail;
+		if (!rgb_user)
+			goto rgb_user_alloc_fail;
+
+		axis_x = kvcalloc(ramp->num_entries + 3, sizeof(*axis_x),
+				GFP_KERNEL);
+		if (!axis_x)
+			goto axis_x_alloc_fail;
+
+		dividers.divider1 = dc_fixpt_from_fraction(3, 2);
+		dividers.divider2 = dc_fixpt_from_int(2);
+		dividers.divider3 = dc_fixpt_from_fraction(5, 2);
+
+		build_evenly_distributed_points(
+				axis_x,
+				ramp->num_entries,
+				dividers);
+
+		if (ramp->type == GAMMA_RGB_256 && mapUserRamp)
+			scale_gamma(rgb_user, ramp, dividers);
+		else if (ramp->type == GAMMA_RGB_FLOAT_1024)
+			scale_gamma_dx(rgb_user, ramp, dividers);
+	}
+
 	rgb_regamma = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS,
 			       sizeof(*rgb_regamma),
 			       GFP_KERNEL);
 	if (!rgb_regamma)
 		goto rgb_regamma_alloc_fail;
-	axix_x = kvcalloc(ramp->num_entries + 3, sizeof(*axix_x),
-			  GFP_KERNEL);
-	if (!axix_x)
-		goto axix_x_alloc_fail;
+
 	coeff = kvcalloc(MAX_HW_POINTS + _EXTRA_POINTS, sizeof(*coeff),
 			 GFP_KERNEL);
 	if (!coeff)
 		goto coeff_alloc_fail;
 
-	dividers.divider1 = dc_fixpt_from_fraction(3, 2);
-	dividers.divider2 = dc_fixpt_from_int(2);
-	dividers.divider3 = dc_fixpt_from_fraction(5, 2);
-
 	tf = output_tf->tf;
-
-	build_evenly_distributed_points(
-			axix_x,
-			ramp->num_entries,
-			dividers);
-
-	if (ramp->type == GAMMA_RGB_256 && mapUserRamp)
-		scale_gamma(rgb_user, ramp, dividers);
-	else if (ramp->type == GAMMA_RGB_FLOAT_1024)
-		scale_gamma_dx(rgb_user, ramp, dividers);
-
 	if (tf == TRANSFER_FUNCTION_PQ) {
 		tf_pts->end_exponent = 7;
 		tf_pts->x_point_at_y1_red = 125;
@@ -1623,22 +1630,22 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf,
 				coordinates_x, tf == TRANSFER_FUNCTION_SRGB ? true:false);
 	}
 	map_regamma_hw_to_x_user(ramp, coeff, rgb_user,
-			coordinates_x, axix_x, rgb_regamma,
+			coordinates_x, axis_x, rgb_regamma,
 			MAX_HW_POINTS, tf_pts,
-			(mapUserRamp || ramp->type != GAMMA_RGB_256) &&
-			ramp->type != GAMMA_CS_TFM_1D);
+			(mapUserRamp || (ramp && ramp->type != GAMMA_RGB_256)) &&
+			(ramp && ramp->type != GAMMA_CS_TFM_1D));
 
-	if (ramp->type == GAMMA_CS_TFM_1D)
+	if (ramp && ramp->type == GAMMA_CS_TFM_1D)
 		apply_lut_1d(ramp, MAX_HW_POINTS, tf_pts);
 
 	ret = true;
 
 	kvfree(coeff);
 coeff_alloc_fail:
-	kvfree(axix_x);
-axix_x_alloc_fail:
 	kvfree(rgb_regamma);
 rgb_regamma_alloc_fail:
+	kvfree(axis_x);
+axis_x_alloc_fail:
 	kvfree(rgb_user);
 rgb_user_alloc_fail:
 	return ret;
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 12/20] drm/amd/display: Adjust ABM 2.2 contrast parameters
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (10 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 11/20] drm/amd/display: Default to linear output gamma sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:28   ` [PATCH 13/20] revert "drm/amd/display: Add condition to sync eDP SW status and HW status" sunpeng.li-5C7GfCeVMHo
                     ` (7 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Josip Pavic

From: Josip Pavic <Josip.Pavic@amd.com>

[Why]
Improved contrast in ABM 2.2 is desired

[How]
Increase the contrast factor for ABM levels 2, 3 and 4

Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
index 29b7a26..baab6c4 100644
--- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
+++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
@@ -517,9 +517,9 @@ void fill_iram_v_2_2(struct iram_table_v_2_2 *ram_table, struct dmcu_iram_parame
 	ram_table->hybridFactor[3] = 0xc0;
 
 	ram_table->contrastFactor[0] = 0x99;
-	ram_table->contrastFactor[1] = 0x80;
-	ram_table->contrastFactor[2] = 0x80;
-	ram_table->contrastFactor[3] = 0x4D;
+	ram_table->contrastFactor[1] = 0x99;
+	ram_table->contrastFactor[2] = 0x99;
+	ram_table->contrastFactor[3] = 0x80;
 
 	ram_table->iir_curve[0] = 0x65;
 	ram_table->iir_curve[1] = 0x65;
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 13/20] revert "drm/amd/display: Add condition to sync eDP SW status and HW status"
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (11 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 12/20] drm/amd/display: Adjust ABM 2.2 contrast parameters sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:28   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 14/20] drm/amd/display: take dpms_off into account for edp turn off logic sunpeng.li-5C7GfCeVMHo
                     ` (6 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:28 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Eric Yang

From: Eric Yang <Eric.Yang2@amd.com>

[Why]
This change causes regression for S4 resume where gamma is not
programmed. The change incorrectly updates the requested dpms_off
state.

This reverts commit d2b1d6bbc56afab8ebae9d52d7ca0ea3569bd600.

Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c |  2 -
 .../drm/amd/display/dc/bios/bios_parser_helper.c   | 93 ----------------------
 .../drm/amd/display/dc/bios/bios_parser_helper.h   |  4 -
 drivers/gpu/drm/amd/display/dc/dc_bios_types.h     |  5 --
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    | 15 ----
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |  1 -
 6 files changed, 120 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index c513ab6..190b8c4 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -1899,8 +1899,6 @@ static const struct dc_vbios_funcs vbios_funcs = {
 
 	.is_accelerated_mode = bios_parser_is_accelerated_mode,
 
-	.is_active_display = bios_is_active_display,
-
 	.set_scratch_critical_state = bios_parser_set_scratch_critical_state,
 
 
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c
index d8275ceb..fce46ab 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.c
@@ -87,96 +87,3 @@ uint32_t bios_get_vga_enabled_displays(
 	return active_disp;
 }
 
-bool bios_is_active_display(
-		struct dc_bios *bios,
-		enum signal_type signal,
-		const struct connector_device_tag_info *device_tag)
-{
-	uint32_t active = 0;
-	uint32_t connected = 0;
-	uint32_t bios_scratch_0 = 0;
-	uint32_t bios_scratch_3 = 0;
-
-	switch (signal)	{
-	case SIGNAL_TYPE_DVI_SINGLE_LINK:
-	case SIGNAL_TYPE_DVI_DUAL_LINK:
-	case SIGNAL_TYPE_HDMI_TYPE_A:
-	case SIGNAL_TYPE_DISPLAY_PORT:
-	case SIGNAL_TYPE_DISPLAY_PORT_MST:
-		{
-			if (device_tag->dev_id.device_type == DEVICE_TYPE_DFP) {
-				switch (device_tag->dev_id.enum_id)	{
-				case 1:
-					{
-						active    = ATOM_S3_DFP1_ACTIVE;
-						connected = 0x0008;	//ATOM_DISPLAY_DFP1_CONNECT
-					}
-					break;
-
-				case 2:
-					{
-						active    = ATOM_S3_DFP2_ACTIVE;
-						connected = 0x0080; //ATOM_DISPLAY_DFP2_CONNECT
-					}
-					break;
-
-				case 3:
-					{
-						active    = ATOM_S3_DFP3_ACTIVE;
-						connected = 0x0200; //ATOM_DISPLAY_DFP3_CONNECT
-					}
-					break;
-
-				case 4:
-					{
-						active    = ATOM_S3_DFP4_ACTIVE;
-						connected = 0x0400;	//ATOM_DISPLAY_DFP4_CONNECT
-					}
-					break;
-
-				case 5:
-					{
-						active    = ATOM_S3_DFP5_ACTIVE;
-						connected = 0x0800; //ATOM_DISPLAY_DFP5_CONNECT
-					}
-					break;
-
-				case 6:
-					{
-						active    = ATOM_S3_DFP6_ACTIVE;
-						connected = 0x0040; //ATOM_DISPLAY_DFP6_CONNECT
-					}
-					break;
-
-				default:
-					break;
-				}
-				}
-			}
-			break;
-
-	case SIGNAL_TYPE_LVDS:
-	case SIGNAL_TYPE_EDP:
-		{
-			active    = ATOM_S3_LCD1_ACTIVE;
-			connected = 0x0002;	//ATOM_DISPLAY_LCD1_CONNECT
-		}
-		break;
-
-	default:
-		break;
-	}
-
-
-	if (bios->regs->BIOS_SCRATCH_0) /*follow up with other asic, todo*/
-		bios_scratch_0 = REG_READ(BIOS_SCRATCH_0);
-	if (bios->regs->BIOS_SCRATCH_3) /*follow up with other asic, todo*/
-		bios_scratch_3 = REG_READ(BIOS_SCRATCH_3);
-
-	bios_scratch_3 &= ATOM_S3_DEVICE_ACTIVE_MASK;
-	if ((active & bios_scratch_3) && (connected & bios_scratch_0))
-		return true;
-
-	return false;
-}
-
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h b/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h
index f33cac2..75a29e6 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser_helper.h
@@ -35,10 +35,6 @@ bool bios_is_accelerated_mode(struct dc_bios *bios);
 void bios_set_scratch_acc_mode_change(struct dc_bios *bios);
 void bios_set_scratch_critical_state(struct dc_bios *bios, bool state);
 uint32_t bios_get_vga_enabled_displays(struct dc_bios *bios);
-bool bios_is_active_display(
-	struct dc_bios *bios,
-	enum signal_type signal,
-	const struct connector_device_tag_info *device_tag);
 
 #define GET_IMAGE(type, offset) ((type *) bios_get_image(&bp->base, offset, sizeof(type)))
 
diff --git a/drivers/gpu/drm/amd/display/dc/dc_bios_types.h b/drivers/gpu/drm/amd/display/dc/dc_bios_types.h
index a8b3ced..8130b95 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_bios_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_bios_types.h
@@ -86,10 +86,6 @@ struct dc_vbios_funcs {
 
 	bool (*is_accelerated_mode)(
 		struct dc_bios *bios);
-	bool (*is_active_display)(
-		struct dc_bios *bios,
-		enum signal_type signal,
-		const struct connector_device_tag_info *device_tag);
 	void (*set_scratch_critical_state)(
 		struct dc_bios *bios,
 		bool state);
@@ -145,7 +141,6 @@ struct dc_vbios_funcs {
 };
 
 struct bios_registers {
-	uint32_t BIOS_SCRATCH_0;
 	uint32_t BIOS_SCRATCH_3;
 	uint32_t BIOS_SCRATCH_6;
 };
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 144a1c8..97796fa2 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -1557,7 +1557,6 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 	int i;
 	struct dc_link *edp_link_to_turnoff = NULL;
 	struct dc_link *edp_link = get_link_for_edp(dc);
-	struct dc_bios *bios = dc->ctx->dc_bios;
 	bool can_edp_fast_boot_optimize = false;
 	bool apply_edp_fast_boot_optimization = false;
 
@@ -1584,20 +1583,6 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 			if (context->streams[i]->signal == SIGNAL_TYPE_EDP) {
 				context->streams[i]->apply_edp_fast_boot_optimization = true;
 				apply_edp_fast_boot_optimization = true;
-
-				/* When after S4 and S5, vbios may post edp and previous dpms_off
-				 * doesn't make sense.
-				 * Update dpms_off state to align hw and sw state via check
-				 * vBios scratch register.
-				 */
-				if (bios->funcs->is_active_display)	{
-					const struct connector_device_tag_info *device_tag = &(edp_link->device_tag);
-
-					if (bios->funcs->is_active_display(bios,
-							context->streams[i]->signal,
-							device_tag))
-						context->streams[i]->dpms_off = false;
-				}
 			}
 		}
 	}
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
index 4f8cbe3..09d7407 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
@@ -436,7 +436,6 @@ static const struct dcn_optc_mask tg_mask = {
 };
 
 static const struct bios_registers bios_regs = {
-		NBIO_SR(BIOS_SCRATCH_0),
 		NBIO_SR(BIOS_SCRATCH_3),
 		NBIO_SR(BIOS_SCRATCH_6)
 };
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 14/20] drm/amd/display: take dpms_off into account for edp turn off logic
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (12 preceding siblings ...)
  2019-01-22 18:28   ` [PATCH 13/20] revert "drm/amd/display: Add condition to sync eDP SW status and HW status" sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:29   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 15/20] drm/amd/display: 3.2.15 sunpeng.li-5C7GfCeVMHo
                     ` (5 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Eric Yang

From: Eric Yang <Eric.Yang2@amd.com>

[why]
Previously we incorrectly skipped backlight control when stream is
present but dpms_off = true. This causes backlight to remain on in
the we boot up or resume into a external display only configuration
where VBIOS posted on the eDP.

[How]
Add dpms_off into the condition for edp need to turn off.

Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 97796fa2..026d973 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -1520,7 +1520,7 @@ static struct dc_link *get_link_for_edp(struct dc *dc)
 	return NULL;
 }
 
-static struct dc_link *get_link_for_edp_not_in_use(
+static struct dc_link *get_link_for_edp_to_turn_off(
 		struct dc *dc,
 		struct dc_state *context)
 {
@@ -1529,8 +1529,12 @@ static struct dc_link *get_link_for_edp_not_in_use(
 
 	/* check if eDP panel is suppose to be set mode, if yes, no need to disable */
 	for (i = 0; i < context->stream_count; i++) {
-		if (context->streams[i]->signal == SIGNAL_TYPE_EDP)
-			return NULL;
+		if (context->streams[i]->signal == SIGNAL_TYPE_EDP) {
+			if (context->streams[i]->dpms_off == true)
+				return context->streams[i]->sink->link;
+			else
+				return NULL;
+		}
 	}
 
 	/* check if there is an eDP panel not in use */
@@ -1572,7 +1576,7 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 	}
 
 	if (can_edp_fast_boot_optimize)
-		edp_link_to_turnoff = get_link_for_edp_not_in_use(dc, context);
+		edp_link_to_turnoff = get_link_for_edp_to_turn_off(dc, context);
 
 	/* if OS doesn't light up eDP and eDP link is available, we want to disable
 	 * If resume from S4/S5, should optimization.
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 15/20] drm/amd/display: 3.2.15
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (13 preceding siblings ...)
  2019-01-22 18:29   ` [PATCH 14/20] drm/amd/display: take dpms_off into account for edp turn off logic sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:29   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 16/20] drm/amd/display: Connect dig_fe to otg directly instead of calling bios sunpeng.li-5C7GfCeVMHo
                     ` (4 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Steven Chiu

From: Steven Chiu <steven.chiu@amd.com>

Signed-off-by: Steven Chiu <steven.chiu@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index f362b04..8391bc3 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -39,7 +39,7 @@
 #include "inc/hw/dmcu.h"
 #include "dml/display_mode_lib.h"
 
-#define DC_VER "3.2.14"
+#define DC_VER "3.2.15"
 
 #define MAX_SURFACES 3
 #define MAX_STREAMS 6
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 16/20] drm/amd/display: Connect dig_fe to otg directly instead of calling bios
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (14 preceding siblings ...)
  2019-01-22 18:29   ` [PATCH 15/20] drm/amd/display: 3.2.15 sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:29   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 17/20] drm/amd/display: Poll pending down rep before clear payload allocation table sunpeng.li-5C7GfCeVMHo
                     ` (3 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: hersen wu

From: hersen wu <hersenxs.wu@amd.com>

[Why] After call bios table crtc_source_select, dal will program fmt
again. The bios table program dig_source_select and other fmt register
for bios usage which is redundancy and uncessary.

[How] Program dig_soruce_select register directly

Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  |  14 ---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c |  14 ---
 .../gpu/drm/amd/display/dc/bios/command_table.c    | 116 ---------------------
 .../gpu/drm/amd/display/dc/bios/command_table.h    |   3 -
 .../gpu/drm/amd/display/dc/bios/command_table2.c   |  70 -------------
 .../gpu/drm/amd/display/dc/bios/command_table2.h   |   3 -
 drivers/gpu/drm/amd/display/dc/dc_bios_types.h     |   4 -
 .../drm/amd/display/dc/dce/dce_stream_encoder.c    |  10 +-
 .../drm/amd/display/dc/dce/dce_stream_encoder.h    |   8 +-
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    |  54 +---------
 .../amd/display/dc/dcn10/dcn10_stream_encoder.c    |   9 ++
 .../amd/display/dc/dcn10/dcn10_stream_encoder.h    |  10 +-
 .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h |   4 +
 13 files changed, 39 insertions(+), 280 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index c2ab026..a4c97d3 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -835,18 +835,6 @@ static enum bp_result bios_parser_enable_crtc(
 	return bp->cmd_tbl.enable_crtc(bp, id, enable);
 }
 
-static enum bp_result bios_parser_crtc_source_select(
-	struct dc_bios *dcb,
-	struct bp_crtc_source_select *bp_params)
-{
-	struct bios_parser *bp = BP_FROM_DCB(dcb);
-
-	if (!bp->cmd_tbl.select_crtc_source)
-		return BP_RESULT_FAILURE;
-
-	return bp->cmd_tbl.select_crtc_source(bp, bp_params);
-}
-
 static enum bp_result bios_parser_enable_disp_power_gating(
 	struct dc_bios *dcb,
 	enum controller_id controller_id,
@@ -2842,8 +2830,6 @@ static const struct dc_vbios_funcs vbios_funcs = {
 
 	.program_crtc_timing = bios_parser_program_crtc_timing, /* still use.  should probably retire and program directly */
 
-	.crtc_source_select = bios_parser_crtc_source_select,  /* still use.  should probably retire and program directly */
-
 	.program_display_engine_pll = bios_parser_program_display_engine_pll,
 
 	.enable_disp_power_gating = bios_parser_enable_disp_power_gating,
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 190b8c4..a1c56f2 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -1083,18 +1083,6 @@ static enum bp_result bios_parser_enable_crtc(
 	return bp->cmd_tbl.enable_crtc(bp, id, enable);
 }
 
-static enum bp_result bios_parser_crtc_source_select(
-	struct dc_bios *dcb,
-	struct bp_crtc_source_select *bp_params)
-{
-	struct bios_parser *bp = BP_FROM_DCB(dcb);
-
-	if (!bp->cmd_tbl.select_crtc_source)
-		return BP_RESULT_FAILURE;
-
-	return bp->cmd_tbl.select_crtc_source(bp, bp_params);
-}
-
 static enum bp_result bios_parser_enable_disp_power_gating(
 	struct dc_bios *dcb,
 	enum controller_id controller_id,
@@ -1915,8 +1903,6 @@ static const struct dc_vbios_funcs vbios_funcs = {
 
 	.program_crtc_timing = bios_parser_program_crtc_timing,
 
-	.crtc_source_select = bios_parser_crtc_source_select,
-
 	.enable_disp_power_gating = bios_parser_enable_disp_power_gating,
 
 	.bios_parser_destroy = firmware_parser_destroy,
diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.c b/drivers/gpu/drm/amd/display/dc/bios/command_table.c
index 67c119b..5815983 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/command_table.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.c
@@ -55,7 +55,6 @@ static void init_adjust_display_pll(struct bios_parser *bp);
 static void init_dac_encoder_control(struct bios_parser *bp);
 static void init_dac_output_control(struct bios_parser *bp);
 static void init_set_crtc_timing(struct bios_parser *bp);
-static void init_select_crtc_source(struct bios_parser *bp);
 static void init_enable_crtc(struct bios_parser *bp);
 static void init_enable_crtc_mem_req(struct bios_parser *bp);
 static void init_external_encoder_control(struct bios_parser *bp);
@@ -73,7 +72,6 @@ void dal_bios_parser_init_cmd_tbl(struct bios_parser *bp)
 	init_dac_encoder_control(bp);
 	init_dac_output_control(bp);
 	init_set_crtc_timing(bp);
-	init_select_crtc_source(bp);
 	init_enable_crtc(bp);
 	init_enable_crtc_mem_req(bp);
 	init_program_clock(bp);
@@ -1898,120 +1896,6 @@ static enum bp_result set_crtc_using_dtd_timing_v3(
 /*******************************************************************************
  ********************************************************************************
  **
- **                  SELECT CRTC SOURCE
- **
- ********************************************************************************
- *******************************************************************************/
-
-static enum bp_result select_crtc_source_v2(
-	struct bios_parser *bp,
-	struct bp_crtc_source_select *bp_params);
-static enum bp_result select_crtc_source_v3(
-	struct bios_parser *bp,
-	struct bp_crtc_source_select *bp_params);
-
-static void init_select_crtc_source(struct bios_parser *bp)
-{
-	switch (BIOS_CMD_TABLE_PARA_REVISION(SelectCRTC_Source)) {
-	case 2:
-		bp->cmd_tbl.select_crtc_source = select_crtc_source_v2;
-		break;
-	case 3:
-		bp->cmd_tbl.select_crtc_source = select_crtc_source_v3;
-		break;
-	default:
-		dm_output_to_console("Don't select_crtc_source enable_crtc for v%d\n",
-			 BIOS_CMD_TABLE_PARA_REVISION(SelectCRTC_Source));
-		bp->cmd_tbl.select_crtc_source = NULL;
-		break;
-	}
-}
-
-static enum bp_result select_crtc_source_v2(
-	struct bios_parser *bp,
-	struct bp_crtc_source_select *bp_params)
-{
-	enum bp_result result = BP_RESULT_FAILURE;
-	SELECT_CRTC_SOURCE_PARAMETERS_V2 params;
-	uint8_t atom_controller_id;
-	uint32_t atom_engine_id;
-	enum signal_type s = bp_params->signal;
-
-	memset(&params, 0, sizeof(params));
-
-	/* set controller id */
-	if (bp->cmd_helper->controller_id_to_atom(
-			bp_params->controller_id, &atom_controller_id))
-		params.ucCRTC = atom_controller_id;
-	else
-		return BP_RESULT_FAILURE;
-
-	/* set encoder id */
-	if (bp->cmd_helper->engine_bp_to_atom(
-			bp_params->engine_id, &atom_engine_id))
-		params.ucEncoderID = (uint8_t)atom_engine_id;
-	else
-		return BP_RESULT_FAILURE;
-
-	if (SIGNAL_TYPE_EDP == s ||
-			(SIGNAL_TYPE_DISPLAY_PORT == s &&
-					SIGNAL_TYPE_LVDS == bp_params->sink_signal))
-		s = SIGNAL_TYPE_LVDS;
-
-	params.ucEncodeMode =
-			(uint8_t)bp->cmd_helper->encoder_mode_bp_to_atom(
-					s, bp_params->enable_dp_audio);
-
-	if (EXEC_BIOS_CMD_TABLE(SelectCRTC_Source, params))
-		result = BP_RESULT_OK;
-
-	return result;
-}
-
-static enum bp_result select_crtc_source_v3(
-	struct bios_parser *bp,
-	struct bp_crtc_source_select *bp_params)
-{
-	bool result = BP_RESULT_FAILURE;
-	SELECT_CRTC_SOURCE_PARAMETERS_V3 params;
-	uint8_t atom_controller_id;
-	uint32_t atom_engine_id;
-	enum signal_type s = bp_params->signal;
-
-	memset(&params, 0, sizeof(params));
-
-	if (bp->cmd_helper->controller_id_to_atom(bp_params->controller_id,
-			&atom_controller_id))
-		params.ucCRTC = atom_controller_id;
-	else
-		return result;
-
-	if (bp->cmd_helper->engine_bp_to_atom(bp_params->engine_id,
-			&atom_engine_id))
-		params.ucEncoderID = (uint8_t)atom_engine_id;
-	else
-		return result;
-
-	if (SIGNAL_TYPE_EDP == s ||
-			(SIGNAL_TYPE_DISPLAY_PORT == s &&
-					SIGNAL_TYPE_LVDS == bp_params->sink_signal))
-		s = SIGNAL_TYPE_LVDS;
-
-	params.ucEncodeMode =
-			bp->cmd_helper->encoder_mode_bp_to_atom(
-					s, bp_params->enable_dp_audio);
-	/* Needed for VBIOS Random Spatial Dithering feature */
-	params.ucDstBpc = (uint8_t)(bp_params->display_output_bit_depth);
-
-	if (EXEC_BIOS_CMD_TABLE(SelectCRTC_Source, params))
-		result = BP_RESULT_OK;
-
-	return result;
-}
-
-/*******************************************************************************
- ********************************************************************************
- **
  **                  ENABLE CRTC
  **
  ********************************************************************************
diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table.h b/drivers/gpu/drm/amd/display/dc/bios/command_table.h
index 94f3d43..ad53377 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/command_table.h
+++ b/drivers/gpu/drm/amd/display/dc/bios/command_table.h
@@ -71,9 +71,6 @@ struct cmd_tbl {
 	enum bp_result (*set_crtc_timing)(
 		struct bios_parser *bp,
 		struct bp_hw_crtc_timing_parameters *bp_params);
-	enum bp_result (*select_crtc_source)(
-		struct bios_parser *bp,
-		struct bp_crtc_source_select *bp_params);
 	enum bp_result (*enable_crtc)(
 		struct bios_parser *bp,
 		enum controller_id controller_id,
diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table2.c b/drivers/gpu/drm/amd/display/dc/bios/command_table2.c
index 63206a4..bb2e810 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/command_table2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/command_table2.c
@@ -463,75 +463,6 @@ static enum bp_result set_crtc_using_dtd_timing_v3(
 /******************************************************************************
  ******************************************************************************
  **
- **                  SELECT CRTC SOURCE
- **
- ******************************************************************************
- *****************************************************************************/
-
-
-static enum bp_result select_crtc_source_v3(
-	struct bios_parser *bp,
-	struct bp_crtc_source_select *bp_params);
-
-static void init_select_crtc_source(struct bios_parser *bp)
-{
-	switch (BIOS_CMD_TABLE_PARA_REVISION(selectcrtc_source)) {
-	case 3:
-		bp->cmd_tbl.select_crtc_source = select_crtc_source_v3;
-		break;
-	default:
-		dm_output_to_console("Don't select_crtc_source enable_crtc for v%d\n",
-			 BIOS_CMD_TABLE_PARA_REVISION(selectcrtc_source));
-		bp->cmd_tbl.select_crtc_source = NULL;
-		break;
-	}
-}
-
-
-static enum bp_result select_crtc_source_v3(
-	struct bios_parser *bp,
-	struct bp_crtc_source_select *bp_params)
-{
-	bool result = BP_RESULT_FAILURE;
-	struct select_crtc_source_parameters_v2_3 params;
-	uint8_t atom_controller_id;
-	uint32_t atom_engine_id;
-	enum signal_type s = bp_params->signal;
-
-	memset(&params, 0, sizeof(params));
-
-	if (bp->cmd_helper->controller_id_to_atom(bp_params->controller_id,
-			&atom_controller_id))
-		params.crtc_id = atom_controller_id;
-	else
-		return result;
-
-	if (bp->cmd_helper->engine_bp_to_atom(bp_params->engine_id,
-			&atom_engine_id))
-		params.encoder_id = (uint8_t)atom_engine_id;
-	else
-		return result;
-
-	if (s == SIGNAL_TYPE_EDP ||
-		(s == SIGNAL_TYPE_DISPLAY_PORT && bp_params->sink_signal ==
-							SIGNAL_TYPE_LVDS))
-		s = SIGNAL_TYPE_LVDS;
-
-	params.encode_mode =
-			bp->cmd_helper->encoder_mode_bp_to_atom(
-					s, bp_params->enable_dp_audio);
-	/* Needed for VBIOS Random Spatial Dithering feature */
-	params.dst_bpc = (uint8_t)(bp_params->display_output_bit_depth);
-
-	if (EXEC_BIOS_CMD_TABLE(selectcrtc_source, params))
-		result = BP_RESULT_OK;
-
-	return result;
-}
-
-/******************************************************************************
- ******************************************************************************
- **
  **                  ENABLE CRTC
  **
  ******************************************************************************
@@ -808,7 +739,6 @@ void dal_firmware_parser_init_cmd_tbl(struct bios_parser *bp)
 
 	init_set_crtc_timing(bp);
 
-	init_select_crtc_source(bp);
 	init_enable_crtc(bp);
 
 	init_external_encoder_control(bp);
diff --git a/drivers/gpu/drm/amd/display/dc/bios/command_table2.h b/drivers/gpu/drm/amd/display/dc/bios/command_table2.h
index ec1c0c9..7a2af24 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/command_table2.h
+++ b/drivers/gpu/drm/amd/display/dc/bios/command_table2.h
@@ -71,9 +71,6 @@ struct cmd_tbl {
 	enum bp_result (*set_crtc_timing)(
 		struct bios_parser *bp,
 		struct bp_hw_crtc_timing_parameters *bp_params);
-	enum bp_result (*select_crtc_source)(
-		struct bios_parser *bp,
-		struct bp_crtc_source_select *bp_params);
 	enum bp_result (*enable_crtc)(
 		struct bios_parser *bp,
 		enum controller_id controller_id,
diff --git a/drivers/gpu/drm/amd/display/dc/dc_bios_types.h b/drivers/gpu/drm/amd/display/dc/dc_bios_types.h
index 8130b95..78c3b30 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_bios_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_bios_types.h
@@ -121,10 +121,6 @@ struct dc_vbios_funcs {
 	enum bp_result (*program_crtc_timing)(
 		struct dc_bios *bios,
 		struct bp_hw_crtc_timing_parameters *bp_params);
-
-	enum bp_result (*crtc_source_select)(
-		struct dc_bios *bios,
-		struct bp_crtc_source_select *bp_params);
 	enum bp_result (*program_display_engine_pll)(
 		struct dc_bios *bios,
 		struct bp_pixel_clock_parameters *bp_params);
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
index 4a49fd6..1fa2d4f 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
@@ -1584,6 +1584,14 @@ static void setup_stereo_sync(
 	REG_UPDATE(DIG_FE_CNTL, DIG_STEREOSYNC_GATE_EN, !enable);
 }
 
+static void dig_connect_to_otg(
+	struct stream_encoder *enc,
+	int tg_inst)
+{
+	struct dce110_stream_encoder *enc110 = DCE110STRENC_FROM_STRENC(enc);
+
+	REG_UPDATE(DIG_FE_CNTL, DIG_SOURCE_SELECT, tg_inst);
+}
 
 static const struct stream_encoder_funcs dce110_str_enc_funcs = {
 	.dp_set_stream_attribute =
@@ -1618,7 +1626,7 @@ static const struct stream_encoder_funcs dce110_str_enc_funcs = {
 	.hdmi_audio_disable = dce110_se_hdmi_audio_disable,
 	.setup_stereo_sync  = setup_stereo_sync,
 	.set_avmute = dce110_stream_encoder_set_avmute,
-
+	.dig_connect_to_otg  = dig_connect_to_otg,
 };
 
 void dce110_stream_encoder_construct(
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h
index 6c28229..f9cdf2b 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h
@@ -199,7 +199,8 @@
 	SE_SF(DP_SEC_CNTL, DP_SEC_ATP_ENABLE, mask_sh),\
 	SE_SF(DP_SEC_CNTL, DP_SEC_AIP_ENABLE, mask_sh),\
 	SE_SF(DP_SEC_CNTL, DP_SEC_ACM_ENABLE, mask_sh),\
-	SE_SF(AFMT_AUDIO_PACKET_CONTROL, AFMT_AUDIO_SAMPLE_SEND, mask_sh)
+	SE_SF(AFMT_AUDIO_PACKET_CONTROL, AFMT_AUDIO_SAMPLE_SEND, mask_sh),\
+	SE_SF(DIG_FE_CNTL, DIG_SOURCE_SELECT, mask_sh)
 
 #define SE_COMMON_MASK_SH_LIST_DCE_COMMON(mask_sh)\
 	SE_COMMON_MASK_SH_LIST_DCE_COMMON_BASE(mask_sh)
@@ -284,7 +285,8 @@
 	SE_SF(DIG0_DIG_FE_CNTL, TMDS_PIXEL_ENCODING, mask_sh),\
 	SE_SF(DIG0_DIG_FE_CNTL, TMDS_COLOR_FORMAT, mask_sh),\
 	SE_SF(DIG0_DIG_FE_CNTL, DIG_STEREOSYNC_SELECT, mask_sh),\
-	SE_SF(DIG0_DIG_FE_CNTL, DIG_STEREOSYNC_GATE_EN, mask_sh)
+	SE_SF(DIG0_DIG_FE_CNTL, DIG_STEREOSYNC_GATE_EN, mask_sh),\
+	SE_SF(DIG0_DIG_FE_CNTL, DIG_SOURCE_SELECT, mask_sh)
 
 #define SE_COMMON_MASK_SH_LIST_SOC(mask_sh)\
 	SE_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh)
@@ -494,6 +496,7 @@ struct dce_stream_encoder_shift {
 	uint8_t HDMI_DB_DISABLE;
 	uint8_t DP_VID_N_MUL;
 	uint8_t DP_VID_M_DOUBLE_VALUE_EN;
+	uint8_t DIG_SOURCE_SELECT;
 };
 
 struct dce_stream_encoder_mask {
@@ -624,6 +627,7 @@ struct dce_stream_encoder_mask {
 	uint32_t HDMI_DB_DISABLE;
 	uint32_t DP_VID_N_MUL;
 	uint32_t DP_VID_M_DOUBLE_VALUE_EN;
+	uint32_t DIG_SOURCE_SELECT;
 };
 
 struct dce110_stream_enc_registers {
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 026d973..db0ef41 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -614,52 +614,6 @@ dce110_set_output_transfer_func(struct pipe_ctx *pipe_ctx,
 	return true;
 }
 
-static enum dc_status bios_parser_crtc_source_select(
-		struct pipe_ctx *pipe_ctx)
-{
-	struct dc_bios *dcb = pipe_ctx->stream->ctx->dc_bios;
-	/* call VBIOS table to set CRTC source for the HW
-	 * encoder block
-	 * note: video bios clears all FMT setting here. */
-	struct bp_crtc_source_select crtc_source_select = {0};
-
-	crtc_source_select.engine_id = pipe_ctx->stream_res.stream_enc->id;
-	crtc_source_select.controller_id = pipe_ctx->stream_res.tg->inst + 1;
-	/*TODO: Need to un-hardcode color depth, dp_audio and account for
-	 * the case where signal and sink signal is different (translator
-	 * encoder)*/
-	crtc_source_select.signal = pipe_ctx->stream->signal;
-	crtc_source_select.enable_dp_audio = false;
-	crtc_source_select.sink_signal = pipe_ctx->stream->signal;
-
-	switch (pipe_ctx->stream->timing.display_color_depth) {
-	case COLOR_DEPTH_666:
-		crtc_source_select.display_output_bit_depth = PANEL_6BIT_COLOR;
-		break;
-	case COLOR_DEPTH_888:
-		crtc_source_select.display_output_bit_depth = PANEL_8BIT_COLOR;
-		break;
-	case COLOR_DEPTH_101010:
-		crtc_source_select.display_output_bit_depth = PANEL_10BIT_COLOR;
-		break;
-	case COLOR_DEPTH_121212:
-		crtc_source_select.display_output_bit_depth = PANEL_12BIT_COLOR;
-		break;
-	default:
-		BREAK_TO_DEBUGGER();
-		crtc_source_select.display_output_bit_depth = PANEL_8BIT_COLOR;
-		break;
-	}
-
-	if (BP_RESULT_OK != dcb->funcs->crtc_source_select(
-		dcb,
-		&crtc_source_select)) {
-		return DC_ERROR_UNEXPECTED;
-	}
-
-	return DC_OK;
-}
-
 void dce110_update_info_frame(struct pipe_ctx *pipe_ctx)
 {
 	bool is_hdmi;
@@ -1387,12 +1341,10 @@ static enum dc_status apply_single_controller_ctx_to_hw(
 	/*  */
 	dc->hwss.enable_stream_timing(pipe_ctx, context, dc);
 
-	/* TODO: move to stream encoder */
 	if (pipe_ctx->stream->signal != SIGNAL_TYPE_VIRTUAL)
-		if (DC_OK != bios_parser_crtc_source_select(pipe_ctx)) {
-			BREAK_TO_DEBUGGER();
-			return DC_ERROR_UNEXPECTED;
-		}
+		pipe_ctx->stream_res.stream_enc->funcs->dig_connect_to_otg(
+			pipe_ctx->stream_res.stream_enc,
+			pipe_ctx->stream_res.tg->inst);
 
 	pipe_ctx->stream_res.opp->funcs->opp_set_dyn_expansion(
 			pipe_ctx->stream_res.opp,
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
index 0fb43c9..b082541 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
@@ -1425,6 +1425,14 @@ void enc1_setup_stereo_sync(
 	REG_UPDATE(DIG_FE_CNTL, DIG_STEREOSYNC_GATE_EN, !enable);
 }
 
+void enc1_dig_connect_to_otg(
+	struct stream_encoder *enc,
+	int tg_inst)
+{
+	struct dcn10_stream_encoder *enc1 = DCN10STRENC_FROM_STRENC(enc);
+
+	REG_UPDATE(DIG_FE_CNTL, DIG_SOURCE_SELECT, tg_inst);
+}
 
 static const struct stream_encoder_funcs dcn10_str_enc_funcs = {
 	.dp_set_stream_attribute =
@@ -1457,6 +1465,7 @@ static const struct stream_encoder_funcs dcn10_str_enc_funcs = {
 	.hdmi_audio_disable = enc1_se_hdmi_audio_disable,
 	.setup_stereo_sync  = enc1_setup_stereo_sync,
 	.set_avmute = enc1_stream_encoder_set_avmute,
+	.dig_connect_to_otg  = enc1_dig_connect_to_otg,
 };
 
 void dcn10_stream_encoder_construct(
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h
index 67f3e4d..b7c800e 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.h
@@ -274,7 +274,8 @@ struct dcn10_stream_enc_registers {
 	SE_SF(DP0_DP_MSA_TIMING_PARAM4, DP_MSA_HWIDTH, mask_sh),\
 	SE_SF(DP0_DP_MSA_TIMING_PARAM4, DP_MSA_VHEIGHT, mask_sh),\
 	SE_SF(DIG0_HDMI_DB_CONTROL, HDMI_DB_DISABLE, mask_sh),\
-	SE_SF(DP0_DP_VID_TIMING, DP_VID_N_MUL, mask_sh)
+	SE_SF(DP0_DP_VID_TIMING, DP_VID_N_MUL, mask_sh),\
+	SE_SF(DIG0_DIG_FE_CNTL, DIG_SOURCE_SELECT, mask_sh)
 
 #define SE_COMMON_MASK_SH_LIST_SOC(mask_sh)\
 	SE_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh)
@@ -426,7 +427,8 @@ struct dcn10_stream_enc_registers {
 	type DP_MSA_VHEIGHT;\
 	type HDMI_DB_DISABLE;\
 	type DP_VID_N_MUL;\
-	type DP_VID_M_DOUBLE_VALUE_EN
+	type DP_VID_M_DOUBLE_VALUE_EN;\
+	type DIG_SOURCE_SELECT
 
 struct dcn10_stream_encoder_shift {
 	SE_REG_FIELD_LIST_DCN1_0(uint8_t);
@@ -523,4 +525,8 @@ void enc1_se_hdmi_audio_setup(
 void enc1_se_hdmi_audio_disable(
 	struct stream_encoder *enc);
 
+void enc1_dig_connect_to_otg(
+	struct stream_encoder *enc,
+	int tg_inst);
+
 #endif /* __DC_STREAM_ENCODER_DCN10_H__ */
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h b/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
index 53a9b64d..4051493 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h
@@ -161,6 +161,10 @@ struct stream_encoder_funcs {
 	void (*set_avmute)(
 		struct stream_encoder *enc, bool enable);
 
+	void (*dig_connect_to_otg)(
+		struct stream_encoder *enc,
+		int tg_inst);
+
 };
 
 #endif /* STREAM_ENCODER_H_ */
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 17/20] drm/amd/display: Poll pending down rep before clear payload allocation table
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (15 preceding siblings ...)
  2019-01-22 18:29   ` [PATCH 16/20] drm/amd/display: Connect dig_fe to otg directly instead of calling bios sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:29   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 18/20] drm/amd/display: Enable vblank interrupt during CRC capture sunpeng.li-5C7GfCeVMHo
                     ` (2 subsequent siblings)
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Martin Tsai

From: Martin Tsai <martin.tsai@amd.com>

[Why]
On current design, driver cannot handle the interrupt for
down reply when link training is processing. The DOWN REQ
send before link training will keep in the pending DOWN REP
state in the queue.
It makes the next DOWN REQ be queued until time out.

[How]
To add a polling sequence before clear payload allocation table
to make sure the pending DOWN REP can be handled.

Signed-off-by: Martin Tsai <martin.tsai@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 7 +++++++
 drivers/gpu/drm/amd/display/dc/core/dc_link.c             | 5 +++++
 drivers/gpu/drm/amd/display/dc/dm_helpers.h               | 7 +++++++
 3 files changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index e6ab018..cae16b6 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -263,6 +263,13 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
 	return true;
 }
 
+/*
+ * poll pending down reply before clear payload allocation table
+ */
+void dm_helpers_dp_mst_poll_pending_down_reply(
+	struct dc_context *ctx,
+	const struct dc_link *link)
+{}
 
 /*
  * Clear payload allocation table before enable MST DP link.
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 3dd5f27..8ff5d42 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1467,6 +1467,11 @@ static enum dc_status enable_link_dp_mst(
 	if (link->cur_link_settings.lane_count != LANE_COUNT_UNKNOWN)
 		return DC_OK;
 
+	/* to make sure the pending down rep can be processed
+	 * before clear payload table
+	 */
+	dm_helpers_dp_mst_poll_pending_down_reply(link->ctx, link);
+
 	/* clear payload table */
 	dm_helpers_dp_mst_clear_payload_allocation_table(link->ctx, link);
 
diff --git a/drivers/gpu/drm/amd/display/dc/dm_helpers.h b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
index 5d4527d..e81b243 100644
--- a/drivers/gpu/drm/amd/display/dc/dm_helpers.h
+++ b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
@@ -58,6 +58,13 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
 		bool enable);
 
 /*
+ * poll pending down reply before clear payload allocation table
+ */
+void dm_helpers_dp_mst_poll_pending_down_reply(
+	struct dc_context *ctx,
+	const struct dc_link *link);
+
+/*
  * Clear payload allocation table before enable MST DP link.
  */
 void dm_helpers_dp_mst_clear_payload_allocation_table(
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 18/20] drm/amd/display: Enable vblank interrupt during CRC capture
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (16 preceding siblings ...)
  2019-01-22 18:29   ` [PATCH 17/20] drm/amd/display: Poll pending down rep before clear payload allocation table sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:29   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 19/20] drm/amd/display: Re-enable CRC capture following modeset sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 20/20] drm/amd/display: Add Vline1 interrupt source to InterruptManager sunpeng.li-5C7GfCeVMHo
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Nicholas Kazlauskas

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

[Why]
In order to read CRC events when CRC capture is enabled the vblank
interrput handler needs to be running for the CRTC. The handler is
enabled while there is an active vblank reference.

When running IGT tests there will often be no active vblank reference
but the test expects to read a CRC value. This is valid usage (and
works on i915 since they have a CRC interrupt handler) so the reference
to the vblank should be grabbed while capture is active.

This issue was found running:

igt@kms_plane_multiple@atomic-pipe-b-tiling-none

The pipe-b is the only one in the initial commit and was not previously
active so no vblank reference is grabbed. The vblank interrupt is
not enabled and the test times out.

[How]
Keep a reference to the vblank as long as CRC capture is enabled.
If userspace never explicitly disables it then the reference is
also dropped when removing the CRTC from the context (stream = NULL).

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Sun peng Li <Sunpeng.Li@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 14 +++++++-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c  | 42 +++++++++++-----------
 2 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f1de7c8..68355ed 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5020,10 +5020,22 @@ static int amdgpu_dm_atomic_commit(struct drm_device *dev,
 	 */
 	for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
 		struct dm_crtc_state *dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
+		struct dm_crtc_state *dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
 		struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
 
-		if (drm_atomic_crtc_needs_modeset(new_crtc_state) && dm_old_crtc_state->stream)
+		if (drm_atomic_crtc_needs_modeset(new_crtc_state)
+		    && dm_old_crtc_state->stream) {
+			/*
+			 * CRC capture was enabled but not disabled.
+			 * Release the vblank reference.
+			 */
+			if (dm_new_crtc_state->crc_enabled) {
+				drm_crtc_vblank_put(crtc);
+				dm_new_crtc_state->crc_enabled = false;
+			}
+
 			manage_dm_interrupts(adev, acrtc, false);
+		}
 	}
 	/*
 	 * Add check here for SoC's that support hardware cursor plane, to
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
index f088ac5..26b6511 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
@@ -66,6 +66,7 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
 {
 	struct dm_crtc_state *crtc_state = to_dm_crtc_state(crtc->state);
 	struct dc_stream_state *stream_state = crtc_state->stream;
+	bool enable;
 
 	enum amdgpu_dm_pipe_crc_source source = dm_parse_crc_source(src_name);
 
@@ -80,28 +81,27 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
 		return -EINVAL;
 	}
 
+	enable = (source == AMDGPU_DM_PIPE_CRC_SOURCE_AUTO);
+
+	if (!dc_stream_configure_crc(stream_state->ctx->dc, stream_state,
+				     enable, enable))
+		return -EINVAL;
+
 	/* When enabling CRC, we should also disable dithering. */
-	if (source == AMDGPU_DM_PIPE_CRC_SOURCE_AUTO) {
-		if (dc_stream_configure_crc(stream_state->ctx->dc,
-					    stream_state,
-					    true, true)) {
-			crtc_state->crc_enabled = true;
-			dc_stream_set_dither_option(stream_state,
-						    DITHER_OPTION_TRUN8);
-		}
-		else
-			return -EINVAL;
-	} else {
-		if (dc_stream_configure_crc(stream_state->ctx->dc,
-					    stream_state,
-					    false, false)) {
-			crtc_state->crc_enabled = false;
-			dc_stream_set_dither_option(stream_state,
-						    DITHER_OPTION_DEFAULT);
-		}
-		else
-			return -EINVAL;
-	}
+	dc_stream_set_dither_option(stream_state,
+				    enable ? DITHER_OPTION_TRUN8
+					   : DITHER_OPTION_DEFAULT);
+
+	/*
+	 * Reading the CRC requires the vblank interrupt handler to be
+	 * enabled. Keep a reference until CRC capture stops.
+	 */
+	if (!crtc_state->crc_enabled && enable)
+		drm_crtc_vblank_get(crtc);
+	else if (crtc_state->crc_enabled && !enable)
+		drm_crtc_vblank_put(crtc);
+
+	crtc_state->crc_enabled = enable;
 
 	/* Reset crc_skipped on dm state */
 	crtc_state->crc_skip_count = 0;
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 19/20] drm/amd/display: Re-enable CRC capture following modeset
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (17 preceding siblings ...)
  2019-01-22 18:29   ` [PATCH 18/20] drm/amd/display: Enable vblank interrupt during CRC capture sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:29   ` sunpeng.li-5C7GfCeVMHo
  2019-01-22 18:29   ` [PATCH 20/20] drm/amd/display: Add Vline1 interrupt source to InterruptManager sunpeng.li-5C7GfCeVMHo
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Nicholas Kazlauskas

From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

[Why]
During any modeset the CRTC stream is removed and a new stream is added.
This new stream doesn't carry over CRC capture state if it was
previously set.

[How]
Re-program the stream for CRC capture. The existing DRM callback can
be re-used here for the most part - the only modification needed is
additional locking now that it's called from within commit tail.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Sun peng Li <Sunpeng.Li@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c     | 13 ++++++++++---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c |  8 +++++++-
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 68355ed..95ec8d8 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5026,10 +5026,13 @@ static int amdgpu_dm_atomic_commit(struct drm_device *dev,
 		if (drm_atomic_crtc_needs_modeset(new_crtc_state)
 		    && dm_old_crtc_state->stream) {
 			/*
-			 * CRC capture was enabled but not disabled.
-			 * Release the vblank reference.
+			 * If the stream is removed and CRC capture was
+			 * enabled on the CRTC the extra vblank reference
+			 * needs to be dropped since CRC capture will be
+			 * disabled.
 			 */
-			if (dm_new_crtc_state->crc_enabled) {
+			if (!dm_new_crtc_state->stream
+			    && dm_new_crtc_state->crc_enabled) {
 				drm_crtc_vblank_put(crtc);
 				dm_new_crtc_state->crc_enabled = false;
 			}
@@ -5267,6 +5270,10 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 			continue;
 
 		manage_dm_interrupts(adev, acrtc, true);
+
+		/* The stream has changed so CRC capture needs to re-enabled. */
+		if (dm_new_crtc_state->crc_enabled)
+			amdgpu_dm_crtc_set_crc_source(crtc, "auto");
 	}
 
 	/* update planes when needed per crtc*/
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
index 26b6511..a10e3a5 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
@@ -64,6 +64,7 @@ amdgpu_dm_crtc_verify_crc_source(struct drm_crtc *crtc, const char *src_name,
 
 int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
 {
+	struct amdgpu_device *adev = crtc->dev->dev_private;
 	struct dm_crtc_state *crtc_state = to_dm_crtc_state(crtc->state);
 	struct dc_stream_state *stream_state = crtc_state->stream;
 	bool enable;
@@ -83,15 +84,20 @@ int amdgpu_dm_crtc_set_crc_source(struct drm_crtc *crtc, const char *src_name)
 
 	enable = (source == AMDGPU_DM_PIPE_CRC_SOURCE_AUTO);
 
+	mutex_lock(&adev->dm.dc_lock);
 	if (!dc_stream_configure_crc(stream_state->ctx->dc, stream_state,
-				     enable, enable))
+				     enable, enable)) {
+		mutex_unlock(&adev->dm.dc_lock);
 		return -EINVAL;
+	}
 
 	/* When enabling CRC, we should also disable dithering. */
 	dc_stream_set_dither_option(stream_state,
 				    enable ? DITHER_OPTION_TRUN8
 					   : DITHER_OPTION_DEFAULT);
 
+	mutex_unlock(&adev->dm.dc_lock);
+
 	/*
 	 * Reading the CRC requires the vblank interrupt handler to be
 	 * enabled. Keep a reference until CRC capture stops.
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 20/20] drm/amd/display: Add Vline1 interrupt source to InterruptManager
       [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
                     ` (18 preceding siblings ...)
  2019-01-22 18:29   ` [PATCH 19/20] drm/amd/display: Re-enable CRC capture following modeset sunpeng.li-5C7GfCeVMHo
@ 2019-01-22 18:29   ` sunpeng.li-5C7GfCeVMHo
  19 siblings, 0 replies; 26+ messages in thread
From: sunpeng.li-5C7GfCeVMHo @ 2019-01-22 18:29 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Fatemeh Darbehani

From: Fatemeh Darbehani <fatemeh.darbehani@amd.com>

[Why]
Enhanced sync need to use vertical_interrupt1.

[How]
Add vertical_interrupt1 source to irq manger,
Implment setup vline interrupt interface.

Signed-off-by: Fatemeh Darbehani <fatemeh.darbehani@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c           | 10 +--
 drivers/gpu/drm/amd/display/dc/dc_stream.h         | 14 ++++-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c  | 72 +++++-----------------
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h  | 12 +++-
 .../drm/amd/display/dc/inc/hw/timing_generator.h   | 13 +++-
 drivers/gpu/drm/amd/display/dc/irq_types.h         |  8 +++
 6 files changed, 61 insertions(+), 68 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 1dabafc..e22be0a 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -1463,11 +1463,13 @@ static void commit_planes_do_stream_update(struct dc *dc,
 					stream_update->adjust->v_total_min,
 					stream_update->adjust->v_total_max);
 
-			if (stream_update->periodic_fn_vsync_delta &&
-					pipe_ctx->stream_res.tg->funcs->program_vline_interrupt)
+			if (stream_update->vline0_config && pipe_ctx->stream_res.tg->funcs->program_vline_interrupt)
 				pipe_ctx->stream_res.tg->funcs->program_vline_interrupt(
-					pipe_ctx->stream_res.tg, &pipe_ctx->stream->timing,
-					pipe_ctx->stream->periodic_fn_vsync_delta);
+					pipe_ctx->stream_res.tg, VLINE0, stream->vline0_config);
+
+			if (stream_update->vline1_config && pipe_ctx->stream_res.tg->funcs->program_vline_interrupt)
+				pipe_ctx->stream_res.tg->funcs->program_vline_interrupt(
+					pipe_ctx->stream_res.tg, VLINE1, stream->vline1_config);
 
 			if ((stream_update->hdr_static_metadata && !stream->use_dynamic_meta) ||
 					stream_update->vrr_infopacket ||
diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h
index 7bb1da1..0de6d7f 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_stream.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h
@@ -45,6 +45,11 @@ struct freesync_context {
 	bool dummy;
 };
 
+struct vline_config {
+	unsigned int start_line;
+	unsigned int end_line;
+};
+
 struct dc_stream_state {
 	// sink is deprecated, new code should not reference
 	// this pointer
@@ -85,8 +90,6 @@ struct dc_stream_state {
 	uint8_t qs_bit;
 	uint8_t qy_bit;
 
-	unsigned long long periodic_fn_vsync_delta;
-
 	/* TODO: custom INFO packets */
 	/* TODO: ABM info (DMCU) */
 	/* PSR info */
@@ -96,6 +99,9 @@ struct dc_stream_state {
 	/* DMCU info */
 	unsigned int abm_level;
 
+	struct vline_config vline0_config;
+	struct vline_config vline1_config;
+
 	/* from core_stream struct */
 	struct dc_context *ctx;
 
@@ -143,7 +149,9 @@ struct dc_stream_update {
 	struct dc_info_packet *hdr_static_metadata;
 	unsigned int *abm_level;
 
-	unsigned long long *periodic_fn_vsync_delta;
+	struct vline_config *vline0_config;
+	struct vline_config *vline1_config;
+
 	struct dc_crtc_timing_adjust *adjust;
 	struct dc_info_packet *vrr_infopacket;
 	struct dc_info_packet *vsc_infopacket;
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
index eb019d4..1d4f9b4 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
@@ -92,68 +92,26 @@ static void optc1_disable_stereo(struct timing_generator *optc)
 		OTG_3D_STRUCTURE_STEREO_SEL_OVR, 0);
 }
 
-static uint32_t get_start_vline(struct timing_generator *optc, const struct dc_crtc_timing *dc_crtc_timing)
-{
-	struct dc_crtc_timing patched_crtc_timing;
-	int vesa_sync_start;
-	int asic_blank_end;
-	int vertical_line_start;
-
-	patched_crtc_timing = *dc_crtc_timing;
-	optc1_apply_front_porch_workaround(optc, &patched_crtc_timing);
-
-	vesa_sync_start = patched_crtc_timing.v_addressable +
-			patched_crtc_timing.v_border_bottom +
-			patched_crtc_timing.v_front_porch;
-
-	asic_blank_end = (patched_crtc_timing.v_total -
-			vesa_sync_start -
-			patched_crtc_timing.v_border_top);
-
-	vertical_line_start = asic_blank_end - optc->dlg_otg_param.vstartup_start + 1;
-	if (vertical_line_start < 0)
-		vertical_line_start = 0;
-
-	return vertical_line_start;
-}
-
 void optc1_program_vline_interrupt(
 		struct timing_generator *optc,
-		const struct dc_crtc_timing *dc_crtc_timing,
-		unsigned long long vsync_delta)
+		enum vline_select vline,
+		struct vline_config vline_config)
 {
-
 	struct optc *optc1 = DCN10TG_FROM_TG(optc);
 
-	unsigned long long req_delta_tens_of_usec = div64_u64((vsync_delta + 9999), 10000);
-	unsigned long long pix_clk_hundreds_khz = div64_u64((dc_crtc_timing->pix_clk_100hz + 999), 1000);
-	uint32_t req_delta_lines = (uint32_t) div64_u64(
-			(req_delta_tens_of_usec * pix_clk_hundreds_khz + dc_crtc_timing->h_total - 1),
-								dc_crtc_timing->h_total);
-
-	uint32_t vsync_line = get_start_vline(optc, dc_crtc_timing);
-	uint32_t start_line = 0;
-	uint32_t end_line = 0;
-
-	if (req_delta_lines != 0)
-		req_delta_lines--;
-
-	if (req_delta_lines > vsync_line)
-		start_line = dc_crtc_timing->v_total - (req_delta_lines - vsync_line) + 2;
-	else
-		start_line = vsync_line - req_delta_lines;
-
-	end_line = start_line + 2;
-
-	if (start_line >= dc_crtc_timing->v_total)
-		start_line = start_line % dc_crtc_timing->v_total;
-
-	if (end_line >= dc_crtc_timing->v_total)
-		end_line = end_line % dc_crtc_timing->v_total;
-
-	REG_SET_2(OTG_VERTICAL_INTERRUPT0_POSITION, 0,
-			OTG_VERTICAL_INTERRUPT0_LINE_START, start_line,
-			OTG_VERTICAL_INTERRUPT0_LINE_END, end_line);
+	switch (vline) {
+	case VLINE0:
+		REG_SET_2(OTG_VERTICAL_INTERRUPT0_POSITION, 0,
+				OTG_VERTICAL_INTERRUPT0_LINE_START, vline_config.start_line,
+				OTG_VERTICAL_INTERRUPT0_LINE_END, vline_config.end_line);
+		break;
+	case VLINE1:
+		REG_SET(OTG_VERTICAL_INTERRUPT1_POSITION, 0,
+					OTG_VERTICAL_INTERRUPT1_LINE_START, vline_config.start_line);
+		break;
+	default:
+		break;
+	}
 }
 
 /**
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
index 8bacf0b..8eb71c0 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.h
@@ -67,6 +67,8 @@
 	SRI(OTG_CLOCK_CONTROL, OTG, inst),\
 	SRI(OTG_VERTICAL_INTERRUPT0_CONTROL, OTG, inst),\
 	SRI(OTG_VERTICAL_INTERRUPT0_POSITION, OTG, inst),\
+	SRI(OTG_VERTICAL_INTERRUPT1_CONTROL, OTG, inst),\
+	SRI(OTG_VERTICAL_INTERRUPT1_POSITION, OTG, inst),\
 	SRI(OTG_VERTICAL_INTERRUPT2_CONTROL, OTG, inst),\
 	SRI(OTG_VERTICAL_INTERRUPT2_POSITION, OTG, inst),\
 	SRI(OPTC_INPUT_CLOCK_CONTROL, ODM, inst),\
@@ -135,6 +137,8 @@ struct dcn_optc_registers {
 	uint32_t OTG_CLOCK_CONTROL;
 	uint32_t OTG_VERTICAL_INTERRUPT0_CONTROL;
 	uint32_t OTG_VERTICAL_INTERRUPT0_POSITION;
+	uint32_t OTG_VERTICAL_INTERRUPT1_CONTROL;
+	uint32_t OTG_VERTICAL_INTERRUPT1_POSITION;
 	uint32_t OTG_VERTICAL_INTERRUPT2_CONTROL;
 	uint32_t OTG_VERTICAL_INTERRUPT2_POSITION;
 	uint32_t OPTC_INPUT_CLOCK_CONTROL;
@@ -227,6 +231,8 @@ struct dcn_optc_registers {
 	SF(OTG0_OTG_VERTICAL_INTERRUPT0_CONTROL, OTG_VERTICAL_INTERRUPT0_INT_ENABLE, mask_sh),\
 	SF(OTG0_OTG_VERTICAL_INTERRUPT0_POSITION, OTG_VERTICAL_INTERRUPT0_LINE_START, mask_sh),\
 	SF(OTG0_OTG_VERTICAL_INTERRUPT0_POSITION, OTG_VERTICAL_INTERRUPT0_LINE_END, mask_sh),\
+	SF(OTG0_OTG_VERTICAL_INTERRUPT1_CONTROL, OTG_VERTICAL_INTERRUPT1_INT_ENABLE, mask_sh),\
+	SF(OTG0_OTG_VERTICAL_INTERRUPT1_POSITION, OTG_VERTICAL_INTERRUPT1_LINE_START, mask_sh),\
 	SF(OTG0_OTG_VERTICAL_INTERRUPT2_CONTROL, OTG_VERTICAL_INTERRUPT2_INT_ENABLE, mask_sh),\
 	SF(OTG0_OTG_VERTICAL_INTERRUPT2_POSITION, OTG_VERTICAL_INTERRUPT2_LINE_START, mask_sh),\
 	SF(ODM0_OPTC_INPUT_CLOCK_CONTROL, OPTC_INPUT_CLK_EN, mask_sh),\
@@ -361,6 +367,8 @@ struct dcn_optc_registers {
 	type OTG_VERTICAL_INTERRUPT0_INT_ENABLE;\
 	type OTG_VERTICAL_INTERRUPT0_LINE_START;\
 	type OTG_VERTICAL_INTERRUPT0_LINE_END;\
+	type OTG_VERTICAL_INTERRUPT1_INT_ENABLE;\
+	type OTG_VERTICAL_INTERRUPT1_LINE_START;\
 	type OTG_VERTICAL_INTERRUPT2_INT_ENABLE;\
 	type OTG_VERTICAL_INTERRUPT2_LINE_START;\
 	type OPTC_INPUT_CLK_EN;\
@@ -476,8 +484,8 @@ void optc1_program_timing(
 	bool use_vbios);
 
 void optc1_program_vline_interrupt(struct timing_generator *optc,
-		const struct dc_crtc_timing *dc_crtc_timing,
-		unsigned long long vsync_delta);
+		enum vline_select vline,
+		struct vline_config vline_config);
 
 void optc1_program_global_sync(
 		struct timing_generator *optc);
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h b/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
index af700c7..df64cf7 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
@@ -134,6 +134,15 @@ struct dc_crtc_timing;
 
 struct drr_params;
 
+struct vline_config;
+
+
+enum vline_select {
+	VLINE0,
+	VLINE1,
+	VLINE2
+};
+
 struct timing_generator_funcs {
 	bool (*validate_timing)(struct timing_generator *tg,
 							const struct dc_crtc_timing *timing);
@@ -141,8 +150,8 @@ struct timing_generator_funcs {
 							const struct dc_crtc_timing *timing,
 							bool use_vbios);
 	void (*program_vline_interrupt)(struct timing_generator *optc,
-			const struct dc_crtc_timing *dc_crtc_timing,
-			unsigned long long vsync_delta);
+			enum vline_select vline,
+			struct vline_config vline_config);
 	bool (*enable_crtc)(struct timing_generator *tg);
 	bool (*disable_crtc)(struct timing_generator *tg);
 	bool (*is_counter_moving)(struct timing_generator *tg);
diff --git a/drivers/gpu/drm/amd/display/dc/irq_types.h b/drivers/gpu/drm/amd/display/dc/irq_types.h
index 0b5f3a2..d0ccd81 100644
--- a/drivers/gpu/drm/amd/display/dc/irq_types.h
+++ b/drivers/gpu/drm/amd/display/dc/irq_types.h
@@ -144,6 +144,14 @@ enum dc_irq_source {
 	DC_IRQ_SOURCE_DC5_VLINE0,
 	DC_IRQ_SOURCE_DC6_VLINE0,
 
+	DC_IRQ_SOURCE_DC1_VLINE1,
+	DC_IRQ_SOURCE_DC2_VLINE1,
+	DC_IRQ_SOURCE_DC3_VLINE1,
+	DC_IRQ_SOURCE_DC4_VLINE1,
+	DC_IRQ_SOURCE_DC5_VLINE1,
+	DC_IRQ_SOURCE_DC6_VLINE1,
+
+
 	DAL_IRQ_SOURCES_NUMBER
 };
 
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH 04/20] drm/amd/display: Know what a pageflip is
       [not found]     ` <1548181746-23783-5-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
@ 2019-01-23  9:20       ` Michel Dänzer
  2019-01-23 16:08       ` Grodzovsky, Andrey
  1 sibling, 0 replies; 26+ messages in thread
From: Michel Dänzer @ 2019-01-23  9:20 UTC (permalink / raw)
  To: sunpeng.li-5C7GfCeVMHo
  Cc: David Francis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 2019-01-22 7:28 p.m., sunpeng.li@amd.com wrote:
> From: David Francis <David.Francis@amd.com>
> 
> [Why]
> We were assuming that any commit with allow_modeset == false
> was a pageflip.  This was against drm intention and only
> worked by sheer luck
> 
> [How]
> A pageflip is the change from one framebuffer to another
> 
> Signed-off-by: David Francis <David.Francis@amd.com>
> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
> Acked-by: Leo Li <sunpeng.li@amd.com>
> 
> [...]
>  
> @@ -5010,7 +5012,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>  		if (!new_crtc_state->active)
>  			continue;
>  
> -		pflip_needed = !state->allow_modeset;
> +		pflip_needed = old_plane_state->fb &&
> +			(old_plane_state->fb != new_plane_state->fb || afb->address != old_afb->address);

The second check after the || cannot be true if old_plane_state->fb ==
new_plane_state->fb, so it's dead code.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 04/20] drm/amd/display: Know what a pageflip is
       [not found]     ` <1548181746-23783-5-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
  2019-01-23  9:20       ` Michel Dänzer
@ 2019-01-23 16:08       ` Grodzovsky, Andrey
       [not found]         ` <f91f0b7f-6a8c-2efb-ed5d-7fb0d6e38bab-5C7GfCeVMHo@public.gmane.org>
  1 sibling, 1 reply; 26+ messages in thread
From: Grodzovsky, Andrey @ 2019-01-23 16:08 UTC (permalink / raw)
  To: Li, Sun peng (Leo), amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Francis, David



On 01/22/2019 01:28 PM, sunpeng.li@amd.com wrote:
> From: David Francis <David.Francis@amd.com>
>
> [Why]
> We were assuming that any commit with allow_modeset == false
> was a pageflip.  This was against drm intention and only
> worked by sheer luck
>
> [How]
> A pageflip is the change from one framebuffer to another

What about other references to state->allow_modeset in DM code ? You 
have one in  dm_determine_update_type_for_commit which will actually 
cause you to assume fast update because of state->allow_modeset == false.
Also - what about other types of plane updates which are more drastic 
(require full update) but will also have different FB, can't you wrongly 
assume they require page flip while it's actually needs 
commit_planes_to_stream ?

Andrey

>
> Signed-off-by: David Francis <David.Francis@amd.com>
> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
> Acked-by: Leo Li <sunpeng.li@amd.com>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 405c263..db060da 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4995,6 +4995,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>   		struct drm_crtc *crtc = new_plane_state->crtc;
>   		struct drm_crtc_state *new_crtc_state;
>   		struct drm_framebuffer *fb = new_plane_state->fb;
> +		struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
> +		struct amdgpu_framebuffer *old_afb = to_amdgpu_framebuffer(old_plane_state->fb);
>   		bool pflip_needed;
>   		struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state);
>   
> @@ -5010,7 +5012,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>   		if (!new_crtc_state->active)
>   			continue;
>   
> -		pflip_needed = !state->allow_modeset;
> +		pflip_needed = old_plane_state->fb &&
> +			(old_plane_state->fb != new_plane_state->fb || afb->address != old_afb->address);
>   
>   		spin_lock_irqsave(&crtc->dev->event_lock, flags);
>   		if (acrtc_attach->pflip_status != AMDGPU_FLIP_NONE) {

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 04/20] drm/amd/display: Know what a pageflip is
       [not found]         ` <f91f0b7f-6a8c-2efb-ed5d-7fb0d6e38bab-5C7GfCeVMHo@public.gmane.org>
@ 2019-01-23 19:23           ` Kazlauskas, Nicholas
  0 siblings, 0 replies; 26+ messages in thread
From: Kazlauskas, Nicholas @ 2019-01-23 19:23 UTC (permalink / raw)
  To: Grodzovsky, Andrey, Li, Sun peng (Leo),
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Francis, David

On 1/23/19 11:08 AM, Grodzovsky, Andrey wrote:
> 
> 
> On 01/22/2019 01:28 PM, sunpeng.li@amd.com wrote:
>> From: David Francis <David.Francis@amd.com>
>>
>> [Why]
>> We were assuming that any commit with allow_modeset == false
>> was a pageflip.  This was against drm intention and only
>> worked by sheer luck
>>
>> [How]
>> A pageflip is the change from one framebuffer to another
> 
> What about other references to state->allow_modeset in DM code ? You
> have one in  dm_determine_update_type_for_commit which will actually
> cause you to assume fast update because of state->allow_modeset == false.
> Also - what about other types of plane updates which are more drastic
> (require full update) but will also have different FB, can't you wrongly
> assume they require page flip while it's actually needs
> commit_planes_to_stream ?
> 
> Andrey

Other references (in atomic check) will still need to be addressed after 
this patch. This patch only fixes page-flips not working when 
state->allow_modeset = true. Everything else is mostly just about 
enabling us to do fast updates more frequently for better performance.

You're right about the fast vs full update bit (since we won't be 
waiting for vblank) but this gets addressed with another patch in this 
series, "drm/amd/display: Call into DC once per multiplane flip".

I don't remember the ordering of which these patches were originally 
applied but they may have changed when sent out to the mailing list.

For bisection purposes I think the ordering of:

[PATCH 06/20] drm/amd/display: Let updates with no scaling changes be fast
[PATCH 03/20] drm/amd/display: Simplify underscan and ABM commit
[PATCH 05/20] drm/amd/display: Call into DC once per multiplane flip
[PATCH 07/20] drm/amd/display: Perform plane updates only when needed
[PATCH 04/20] drm/amd/display: Know what a pageflip is

...probably makes the most logical sense.

Nicholas Kazlauskas

> 
>>
>> Signed-off-by: David Francis <David.Francis@amd.com>
>> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
>> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
>> Acked-by: Leo Li <sunpeng.li@amd.com>
>> ---
>>    drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++++-
>>    1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index 405c263..db060da 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -4995,6 +4995,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>>    		struct drm_crtc *crtc = new_plane_state->crtc;
>>    		struct drm_crtc_state *new_crtc_state;
>>    		struct drm_framebuffer *fb = new_plane_state->fb;
>> +		struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(fb);
>> +		struct amdgpu_framebuffer *old_afb = to_amdgpu_framebuffer(old_plane_state->fb);
>>    		bool pflip_needed;
>>    		struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state);
>>    
>> @@ -5010,7 +5012,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>>    		if (!new_crtc_state->active)
>>    			continue;
>>    
>> -		pflip_needed = !state->allow_modeset;
>> +		pflip_needed = old_plane_state->fb &&
>> +			(old_plane_state->fb != new_plane_state->fb || afb->address != old_afb->address);
>>    
>>    		spin_lock_irqsave(&crtc->dev->event_lock, flags);
>>    		if (acrtc_attach->pflip_status != AMDGPU_FLIP_NONE) {
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> 

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 05/20] drm/amd/display: Call into DC once per multiplane flip
       [not found]     ` <1548181746-23783-6-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
@ 2019-01-28 11:59       ` Michel Dänzer
       [not found]         ` <90388e58-87dc-2033-5c36-cf9c903d6b0b-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Michel Dänzer @ 2019-01-28 11:59 UTC (permalink / raw)
  To: sunpeng.li-5C7GfCeVMHo
  Cc: David Francis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

[-- Attachment #1: Type: text/plain, Size: 2330 bytes --]

On 2019-01-22 7:28 p.m., sunpeng.li-5C7GfCeVMHo@public.gmane.org wrote:
> From: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>
> 
> [Why]
> amdgpu_dm_commit_planes was performing multi-plane
> flips incorrectly:
> 
> It waited for vblank once per flipped plane
> 
> It prepared flip ISR and acquired the corresponding vblank ref
> once per plane, although it closed ISR and put the ref once
> per crtc
> 
> It called into dc once per flipped plane, duplicating some work
> 
> [How]
> Wait for vblank, get vblank ref, prepare flip ISR, and call into
> DC only once, and only if there is a pageflip
> 
> Make freesync continue to update planes even if vrr information
> has already been changed
> 
> Signed-off-by: David Francis <David.Francis-5C7GfCeVMHo@public.gmane.org>
> Reviewed-by: Harry Wentland <Harry.Wentland-5C7GfCeVMHo@public.gmane.org>
> Acked-by: Leo Li <sunpeng.li-5C7GfCeVMHo@public.gmane.org>

This commit introduced a memory leak, see the attached report from kmemleak.


> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index db060da..818a2a1 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -4987,8 +4837,23 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>  	struct dm_crtc_state *acrtc_state = to_dm_crtc_state(new_pcrtc_state);
>  	struct dm_crtc_state *dm_old_crtc_state =
>  			to_dm_crtc_state(drm_atomic_get_old_crtc_state(state, pcrtc));
> -	int planes_count = 0;
> +	int flip_count = 0, planes_count = 0, vpos, hpos;
>  	unsigned long flags;
> +	struct amdgpu_bo *abo;
> +	uint64_t tiling_flags, dcc_address;
> +	struct dc_stream_status *stream_status;
> +	uint32_t target, target_vblank;
> +
> +	struct {
> +		struct dc_surface_update surface_updates[MAX_SURFACES];
> +		struct dc_flip_addrs flip_addrs[MAX_SURFACES];
> +		struct dc_stream_update stream_update;
> +	} *flip;
> +
> +	flip = kzalloc(sizeof(*flip), GFP_KERNEL);
> +
> +	if (!flip)
> +		dm_error("Failed to allocate update bundles\n");

I can't see where this memory is freed, maybe this is the leak?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

[-- Attachment #2: kmemleak.txt --]
[-- Type: text/plain, Size: 94294 bytes --]

unreferenced object 0xffff888360e3ec00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894821 (age 60.444s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000e5150c0c>] drm_fb_helper_restore_fbdev_mode_unlocked+0x7d/0x100 [drm_kms_helper]
    [<0000000016144800>] drm_fb_helper_set_par+0xab/0xf0 [drm_kms_helper]
    [<00000000e0b7e12f>] set_con2fb_map+0x422/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
    [<000000002ae9de48>] amdgpu_driver_load_kms+0x1aa/0xab0 [amdgpu]
    [<000000003808688f>] drm_dev_register+0x311/0x4e0 [drm]
    [<00000000cccb95b3>] amdgpu_pci_probe+0x144/0x200 [amdgpu]
unreferenced object 0xffff888362ad6780 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894822 (age 60.440s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<00000000357c437d>] fbcon_set_disp+0x9f0/0xf40
    [<000000003f5ebd54>] set_con2fb_map+0x4e6/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
unreferenced object 0xffff888362ad3180 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894824 (age 60.432s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883770d4380 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894826 (age 60.440s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883793b7500 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894829 (age 60.428s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883793b7080 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894831 (age 60.420s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888371546780 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894833 (age 60.428s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888371541b00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894835 (age 60.420s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883630f5a00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894838 (age 60.408s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837860e780 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894840 (age 60.416s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837abb2400 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894842 (age 60.408s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888363d17080 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894844 (age 60.400s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888363d13600 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894847 (age 60.404s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837638c800 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894849 (age 60.396s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88836896c380 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894851 (age 60.388s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88836896de80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894853 (age 60.396s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888371489200 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894856 (age 60.384s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837148f500 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894858 (age 60.376s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837148ba80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894860 (age 60.384s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888377fd4380 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894863 (age 60.372s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888377fd3f00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894865 (age 60.364s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837779a880 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894867 (age 60.368s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837779e780 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894869 (age 60.364s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888377e90d80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894872 (age 60.352s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888377e94c80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894874 (age 60.356s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888218603180 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894876 (age 60.352s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888361235a00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894879 (age 60.340s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888377e91200 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894881 (age 60.348s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888363e83180 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894883 (age 60.340s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888363e82400 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894886 (age 60.328s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88821869a880 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894888 (age 60.332s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888364398480 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894890 (age 60.324s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88836fc90000 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894892 (age 60.320s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88835377d100 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894894 (age 60.324s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88835377f500 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894897 (age 60.312s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837a307080 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894899 (age 60.308s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837a307500 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894901 (age 60.312s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837a306300 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894903 (age 60.304s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837b3abf00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894905 (age 60.296s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837b3af500 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894907 (age 60.304s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837a2dba80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894909 (age 60.296s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837a2da880 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894911 (age 60.288s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837a2da400 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894914 (age 60.292s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883796d0480 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894916 (age 60.284s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883796d0900 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894919 (age 60.272s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883796d2d00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894921 (age 60.280s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888379876300 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894923 (age 60.272s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888379873180 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894926 (age 60.260s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888350d66780 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894928 (age 60.268s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888350d61200 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894930 (age 60.260s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888350d60480 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894932 (age 60.252s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351b9a880 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894934 (age 60.260s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351b9e780 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894936 (age 60.252s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888379888900 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894938 (age 60.244s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888379888d80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894940 (age 60.252s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837988b600 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894942 (age 60.244s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351bde300 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894944 (age 60.236s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351bdde80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894947 (age 60.240s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351bdd580 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894949 (age 60.232s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883483ab600 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894951 (age 60.224s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff8883483af980 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894954 (age 60.228s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351cd4c80 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894956 (age 60.220s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351cd6300 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894958 (age 60.212s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff888351cd3180 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894960 (age 60.220s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88837a351b00 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894962 (age 60.212s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000e5150c0c>] drm_fb_helper_restore_fbdev_mode_unlocked+0x7d/0x100 [drm_kms_helper]
    [<0000000016144800>] drm_fb_helper_set_par+0xab/0xf0 [drm_kms_helper]
    [<0000000099bfb98c>] con2fb_release_oldinfo.isra.15+0x2b7/0x580
    [<000000000f22b4a4>] set_con2fb_map+0x7ec/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
    [<000000002ae9de48>] amdgpu_driver_load_kms+0x1aa/0xab0 [amdgpu]
    [<000000003808688f>] drm_dev_register+0x311/0x4e0 [drm]
unreferenced object 0xffff88837a353180 (size 1024):
  comm "systemd-udevd", pid 512, jiffies 4294894963 (age 60.208s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000009414ae54>] restore_fbdev_mode_atomic+0x510/0x690 [drm_kms_helper]
    [<00000000598ba992>] drm_fb_helper_pan_display+0x344/0xc30 [drm_kms_helper]
    [<00000000283d586f>] fb_pan_display+0x2d1/0x630
    [<000000000789d670>] bit_update_start+0x45/0x1f0
    [<00000000bd9230a0>] fbcon_switch+0xaea/0x1650
    [<000000007c60ef32>] redraw_screen+0x319/0x6f0
    [<0000000016fa0f33>] set_con2fb_map+0x55d/0xbd0
    [<00000000e5f764f7>] fbcon_event_notify+0x4ed/0x1af7
    [<00000000fe2e547f>] notifier_call_chain+0xbf/0x130
    [<00000000939192cf>] blocking_notifier_call_chain+0x6b/0xa0
    [<00000000a3d79bdf>] register_framebuffer+0x53b/0x8b0
    [<000000001fee0be1>] __drm_fb_helper_initial_config_and_unlock+0x6d1/0xf80 [drm_kms_helper]
    [<00000000124527b4>] amdgpu_fbdev_init+0x1e8/0x2c0 [amdgpu]
    [<0000000026fb5338>] amdgpu_device_init.cold.32+0x3907/0x4eb5 [amdgpu]
unreferenced object 0xffff88835d1e0480 (size 1024):
  comm "gnome-shell", pid 1042, jiffies 4294896698 (age 53.356s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<00000000e8ac7e05>] drm_atomic_helper_update_plane+0x2a0/0x350 [drm_kms_helper]
    [<0000000017af7934>] drm_mode_cursor_universal+0x3e6/0xb30 [drm]
    [<000000006416a338>] drm_mode_cursor_common+0x4d0/0x8c0 [drm]
    [<00000000d40d6920>] drm_ioctl_kernel+0x1c6/0x260 [drm]
    [<000000008937573b>] drm_ioctl+0x403/0x850 [drm]
    [<00000000ee519aa4>] amdgpu_drm_ioctl+0xcc/0x1b0 [amdgpu]
    [<0000000037e0f957>] do_vfs_ioctl+0x193/0xfd0
    [<000000002f38bdb6>] ksys_ioctl+0x60/0x90
    [<0000000045ea2cb6>] __x64_sys_ioctl+0x6f/0xb0
    [<0000000054f3dba2>] do_syscall_64+0x9c/0x3d0
    [<0000000064da94d6>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [<00000000f3b7ee76>] 0xffffffffffffffff
unreferenced object 0xffff88835d1e4c80 (size 1024):
  comm "gnome-shell", pid 1042, jiffies 4294896698 (age 53.356s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<00000000e8ac7e05>] drm_atomic_helper_update_plane+0x2a0/0x350 [drm_kms_helper]
    [<0000000017af7934>] drm_mode_cursor_universal+0x3e6/0xb30 [drm]
    [<000000006416a338>] drm_mode_cursor_common+0x4d0/0x8c0 [drm]
    [<00000000d40d6920>] drm_ioctl_kernel+0x1c6/0x260 [drm]
    [<000000008937573b>] drm_ioctl+0x403/0x850 [drm]
    [<00000000ee519aa4>] amdgpu_drm_ioctl+0xcc/0x1b0 [amdgpu]
    [<0000000037e0f957>] do_vfs_ioctl+0x193/0xfd0
    [<000000002f38bdb6>] ksys_ioctl+0x60/0x90
    [<0000000045ea2cb6>] __x64_sys_ioctl+0x6f/0xb0
    [<0000000054f3dba2>] do_syscall_64+0x9c/0x3d0
    [<0000000064da94d6>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [<00000000f3b7ee76>] 0xffffffffffffffff
unreferenced object 0xffff888363d13180 (size 1024):
  comm "kworker/u32:6", pid 281, jiffies 4294897313 (age 50.916s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<00000000da5a2420>] process_one_work+0x7be/0x1420
    [<000000001872df90>] worker_thread+0x87/0xb10
    [<00000000b875dcc3>] kthread+0x2e2/0x3a0
    [<00000000d18ba280>] ret_from_fork+0x27/0x50
    [<00000000f3b7ee76>] 0xffffffffffffffff
unreferenced object 0xffff888308b3a880 (size 1024):
  comm "gnome-shell", pid 1042, jiffies 4294897375 (age 50.668s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<00000000961d3e86>] drm_atomic_connector_commit_dpms+0x2ca/0x4b0 [drm]
    [<00000000964d87c2>] set_property_atomic+0x1b3/0x290 [drm]
    [<0000000022110c6b>] drm_mode_obj_set_property_ioctl+0x41b/0x670 [drm]
    [<00000000d40d6920>] drm_ioctl_kernel+0x1c6/0x260 [drm]
    [<000000008937573b>] drm_ioctl+0x403/0x850 [drm]
    [<00000000ee519aa4>] amdgpu_drm_ioctl+0xcc/0x1b0 [amdgpu]
    [<0000000037e0f957>] do_vfs_ioctl+0x193/0xfd0
    [<000000002f38bdb6>] ksys_ioctl+0x60/0x90
    [<0000000045ea2cb6>] __x64_sys_ioctl+0x6f/0xb0
    [<0000000054f3dba2>] do_syscall_64+0x9c/0x3d0
    [<0000000064da94d6>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [<00000000f3b7ee76>] 0xffffffffffffffff
unreferenced object 0xffff888308b3ec00 (size 1024):
  comm "gnome-shell", pid 1042, jiffies 4294897375 (age 50.704s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<00000000961d3e86>] drm_atomic_connector_commit_dpms+0x2ca/0x4b0 [drm]
    [<00000000964d87c2>] set_property_atomic+0x1b3/0x290 [drm]
    [<0000000022110c6b>] drm_mode_obj_set_property_ioctl+0x41b/0x670 [drm]
    [<00000000d40d6920>] drm_ioctl_kernel+0x1c6/0x260 [drm]
    [<000000008937573b>] drm_ioctl+0x403/0x850 [drm]
    [<00000000ee519aa4>] amdgpu_drm_ioctl+0xcc/0x1b0 [amdgpu]
    [<0000000037e0f957>] do_vfs_ioctl+0x193/0xfd0
    [<000000002f38bdb6>] ksys_ioctl+0x60/0x90
    [<0000000045ea2cb6>] __x64_sys_ioctl+0x6f/0xb0
    [<0000000054f3dba2>] do_syscall_64+0x9c/0x3d0
    [<0000000064da94d6>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [<00000000f3b7ee76>] 0xffffffffffffffff
unreferenced object 0xffff888313929b00 (size 1024):
  comm "gnome-shell", pid 1042, jiffies 4294897425 (age 50.504s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<00000000aa8c33dc>] commit_tail+0x96/0xe0 [drm_kms_helper]
    [<000000005008c59b>] drm_atomic_helper_commit+0x177/0x240 [drm_kms_helper]
    [<000000007916151a>] drm_atomic_helper_legacy_gamma_set+0x2d4/0x510 [drm_kms_helper]
    [<00000000502067ef>] drm_mode_gamma_set_ioctl+0x415/0x590 [drm]
    [<00000000d40d6920>] drm_ioctl_kernel+0x1c6/0x260 [drm]
    [<000000008937573b>] drm_ioctl+0x403/0x850 [drm]
    [<00000000ee519aa4>] amdgpu_drm_ioctl+0xcc/0x1b0 [amdgpu]
    [<0000000037e0f957>] do_vfs_ioctl+0x193/0xfd0
    [<000000002f38bdb6>] ksys_ioctl+0x60/0x90
    [<0000000045ea2cb6>] __x64_sys_ioctl+0x6f/0xb0
    [<0000000054f3dba2>] do_syscall_64+0x9c/0x3d0
    [<0000000064da94d6>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [<00000000f3b7ee76>] 0xffffffffffffffff

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 05/20] drm/amd/display: Call into DC once per multiplane flip
       [not found]         ` <90388e58-87dc-2033-5c36-cf9c903d6b0b-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2019-01-28 13:47           ` Kazlauskas, Nicholas
  0 siblings, 0 replies; 26+ messages in thread
From: Kazlauskas, Nicholas @ 2019-01-28 13:47 UTC (permalink / raw)
  To: Michel Dänzer, Li, Sun peng (Leo)
  Cc: Francis, David, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 1/28/19 6:59 AM, Michel Dänzer wrote:
> On 2019-01-22 7:28 p.m., sunpeng.li@amd.com wrote:
>> From: David Francis <David.Francis@amd.com>
>>
>> [Why]
>> amdgpu_dm_commit_planes was performing multi-plane
>> flips incorrectly:
>>
>> It waited for vblank once per flipped plane
>>
>> It prepared flip ISR and acquired the corresponding vblank ref
>> once per plane, although it closed ISR and put the ref once
>> per crtc
>>
>> It called into dc once per flipped plane, duplicating some work
>>
>> [How]
>> Wait for vblank, get vblank ref, prepare flip ISR, and call into
>> DC only once, and only if there is a pageflip
>>
>> Make freesync continue to update planes even if vrr information
>> has already been changed
>>
>> Signed-off-by: David Francis <David.Francis@amd.com>
>> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
>> Acked-by: Leo Li <sunpeng.li@amd.com>
> 
> This commit introduced a memory leak, see the attached report from kmemleak.
> 
> 
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index db060da..818a2a1 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -4987,8 +4837,23 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>>   	struct dm_crtc_state *acrtc_state = to_dm_crtc_state(new_pcrtc_state);
>>   	struct dm_crtc_state *dm_old_crtc_state =
>>   			to_dm_crtc_state(drm_atomic_get_old_crtc_state(state, pcrtc));
>> -	int planes_count = 0;
>> +	int flip_count = 0, planes_count = 0, vpos, hpos;
>>   	unsigned long flags;
>> +	struct amdgpu_bo *abo;
>> +	uint64_t tiling_flags, dcc_address;
>> +	struct dc_stream_status *stream_status;
>> +	uint32_t target, target_vblank;
>> +
>> +	struct {
>> +		struct dc_surface_update surface_updates[MAX_SURFACES];
>> +		struct dc_flip_addrs flip_addrs[MAX_SURFACES];
>> +		struct dc_stream_update stream_update;
>> +	} *flip;
>> +
>> +	flip = kzalloc(sizeof(*flip), GFP_KERNEL);
>> +
>> +	if (!flip)
>> +		dm_error("Failed to allocate update bundles\n");
> 
> I can't see where this memory is freed, maybe this is the leak?

Yeah, I don't think this or the other allocation in a later patch is 
ever freed. Thanks for the heads up, I'll make a quick patch addressing 
these.

Nicholas Kazlauskas

> 
> 
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> 

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2019-01-28 13:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-22 18:28 [PATCH 00/20] DC Patches Jan 22, 2019 sunpeng.li-5C7GfCeVMHo
     [not found] ` <1548181746-23783-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-01-22 18:28   ` [PATCH 01/20] drm/amd/display: Restructure DCN10 hubbub sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 02/20] drm/amd/display: Introduce DC VM interface sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 03/20] drm/amd/display: Simplify underscan and ABM commit sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 04/20] drm/amd/display: Know what a pageflip is sunpeng.li-5C7GfCeVMHo
     [not found]     ` <1548181746-23783-5-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-01-23  9:20       ` Michel Dänzer
2019-01-23 16:08       ` Grodzovsky, Andrey
     [not found]         ` <f91f0b7f-6a8c-2efb-ed5d-7fb0d6e38bab-5C7GfCeVMHo@public.gmane.org>
2019-01-23 19:23           ` Kazlauskas, Nicholas
2019-01-22 18:28   ` [PATCH 05/20] drm/amd/display: Call into DC once per multiplane flip sunpeng.li-5C7GfCeVMHo
     [not found]     ` <1548181746-23783-6-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-01-28 11:59       ` Michel Dänzer
     [not found]         ` <90388e58-87dc-2033-5c36-cf9c903d6b0b-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-01-28 13:47           ` Kazlauskas, Nicholas
2019-01-22 18:28   ` [PATCH 06/20] drm/amd/display: Let updates with no scaling changes be fast sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 07/20] drm/amd/display: Perform plane updates only when needed sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 08/20] drm/amd/display: Update DMCU versioning mechanism sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 09/20] drm/amd/display: Create switching mechanism for ABM 2.2 sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 10/20] drm/amd/display: Fix use of uninitialized union sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 11/20] drm/amd/display: Default to linear output gamma sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 12/20] drm/amd/display: Adjust ABM 2.2 contrast parameters sunpeng.li-5C7GfCeVMHo
2019-01-22 18:28   ` [PATCH 13/20] revert "drm/amd/display: Add condition to sync eDP SW status and HW status" sunpeng.li-5C7GfCeVMHo
2019-01-22 18:29   ` [PATCH 14/20] drm/amd/display: take dpms_off into account for edp turn off logic sunpeng.li-5C7GfCeVMHo
2019-01-22 18:29   ` [PATCH 15/20] drm/amd/display: 3.2.15 sunpeng.li-5C7GfCeVMHo
2019-01-22 18:29   ` [PATCH 16/20] drm/amd/display: Connect dig_fe to otg directly instead of calling bios sunpeng.li-5C7GfCeVMHo
2019-01-22 18:29   ` [PATCH 17/20] drm/amd/display: Poll pending down rep before clear payload allocation table sunpeng.li-5C7GfCeVMHo
2019-01-22 18:29   ` [PATCH 18/20] drm/amd/display: Enable vblank interrupt during CRC capture sunpeng.li-5C7GfCeVMHo
2019-01-22 18:29   ` [PATCH 19/20] drm/amd/display: Re-enable CRC capture following modeset sunpeng.li-5C7GfCeVMHo
2019-01-22 18:29   ` [PATCH 20/20] drm/amd/display: Add Vline1 interrupt source to InterruptManager sunpeng.li-5C7GfCeVMHo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.