Skip to contentSkip to conversation

DC Linux Patches Oct 16, 2017

PATCH In review Harry Wentland 3 participants 25 messages Oct 16, 2017 5 messages not in the archive

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

cover DC Linux Patches Oct 16, 2017

Mostly Raven (DCN1) work this time around, beside a bunch of minor cleanups and a minor update to DML.

Andrew Jiang (4):
drm/amd/display: Don't set cursor address is 0 logging as errors drm/amd/display: Correct timings in build scaling params drm/amd/display: Add chip mask to HDMI retimer/redriver check drm/amd/display: Add DIGD case when getting retimer settings

Dave Airlie (1):
drm/amd/display: drop display_pipe_clocks.c.

Dmytro Laktyushkin (2):
drm/amd/display: change dml numdpp var to uint
drm/amd/display: Minor update to DML

Eric Bernstein (1):
drm/amd/display: check SR_WATERMARK regs prior to write

Harry Wentland (6):
drm/amd/display: Fix warning about uninitialized variable drm/amd/display: Fix up some whitespace in handle_cursor_update drm/amd/display: Move OS types to os_types.h drm/amd/display: Fix one more place for dc_stream_state leak drm/amd/display: Reduce stack size of commit_planes_to_stream drm/amd/display: Remove redundant condition in dml vba

Hersen Wu (1):
drm/amd/display: LGD panel willl flash line under window

Tony Cheng (3):
drm/amd/display: DAL 3.1.06
drm/amd/display: dal 3.1.07
drm/amd/display: default force_single_disp_pipe_split = 1 on RV

Yongqiang Sun (1):
drm/amd/display: WA for 3 display play video hot plug.

Yue Hin Lau (1):
drm/amd/display: rename dscl functions

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  |  20 +--
 drivers/gpu/drm/amd/display/dc/core/dc.c           |  23 ++--
 drivers/gpu/drm/amd/display/dc/core/dc_link.c      |  20 ++-
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c  |  31 ++---
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c    |   2 +-
 drivers/gpu/drm/amd/display/dc/dc.h                |   8 +-
 drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c |   2 +-
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    |   9 ++
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c   |  10 +-
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h   |   4 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c  |  98 +++++++-------
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  | 147 +++++++++++----------
 .../gpu/drm/amd/display/dc/dcn10/dcn10_resource.c  |   1 +
 drivers/gpu/drm/amd/display/dc/dm_services.h       |  41 ------
 drivers/gpu/drm/amd/display/dc/dml/Makefile        |   2 +-
 .../gpu/drm/amd/display/dc/dml/display_mode_lib.c  |   6 -
 .../gpu/drm/amd/display/dc/dml/display_mode_lib.h  |   2 -
 .../drm/amd/display/dc/dml/display_mode_structs.h  |   7 +-
 .../gpu/drm/amd/display/dc/dml/display_mode_vba.c  |  25 ++--
 .../gpu/drm/amd/display/dc/dml/display_mode_vba.h  |   3 +-
 .../drm/amd/display/dc/dml/display_pipe_clocks.c   | 106 ---------------
 .../drm/amd/display/dc/dml/display_pipe_clocks.h   |  37 ------
 drivers/gpu/drm/amd/display/dc/inc/core_status.h   |  15 ++-
 drivers/gpu/drm/amd/display/dc/os_types.h          |  40 ++++++
 24 files changed, 262 insertions(+), 397 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.h
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171016203154.6401-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 1/20 drm/amd/display: Don't set cursor address is 0 logging as errors

From: Andrew Jiang <[email protected]>

This actually happens quite a bit, and having it as an error causes false positive messages when running tests.

---
 drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/core/dc_stream.c +1 -1
index 97f040a25820..5cf69af9693d 100644
@@ -190,7 +190,7 @@ bool dc_stream_set_cursor_attributes(
 	}
 
 	if (attributes->address.quad_part == 0) {
-		dm_error("DC: Cursor address is 0!\n");
+		dm_output_to_console("DC: Cursor address is 0!\n");
 		return false;
 	}
 
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw

PATCH 2/20 drm/amd/display: Fix warning about uninitialized variable

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c +1 -1
index ed301c3b2736..0790f25c7b3b 100644
@@ -361,7 +361,7 @@ static void program_grph_pixel_format(
 	enum surface_pixel_format format)
 {
 	uint32_t red_xbar = 0, blue_xbar = 0; /* no swap */
-	uint32_t grph_depth, grph_format;
+	uint32_t grph_depth = 0, grph_format = 0;
 	uint32_t sign = 0, floating = 0;
 
 	if (format == SURFACE_PIXEL_FORMAT_GRPH_ABGR8888 ||
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#4 lore raw

PATCH 3/20 drm/amd/display: Fix up some whitespace in handle_cursor_update

In reply to a message not in the archive

Use combo of tabs and spaces

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -4
index d34309d32636..d960483150ba 100644
@@ -3816,10 +3816,10 @@ static void handle_cursor_update(struct drm_plane *plane,
 		return;
 
 	DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
-		         __func__,
-		         amdgpu_crtc->crtc_id,
-		         plane->state->crtc_w,
-		         plane->state->crtc_h);
+			 __func__,
+			 amdgpu_crtc->crtc_id,
+			 plane->state->crtc_w,
+			 plane->state->crtc_h);
 
 	ret = get_cursor_position(plane, crtc, &position);
 	if (ret)
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#5 lore raw

PATCH 4/20 drm/amd/display: drop display_pipe_clocks.c.

In reply to a message not in the archive

From: Dave Airlie <[email protected]>

This code isn't used at all in the kernel tree, perhaps it can wait to be imported when it is. It also does a lot of floating point calcs, so probably good to drop it until it's needed and we can ensure proper fpu accessors.

---
 drivers/gpu/drm/amd/display/dc/dml/Makefile        |   2 +-
 .../gpu/drm/amd/display/dc/dml/display_mode_lib.h  |   1 -
 .../drm/amd/display/dc/dml/display_pipe_clocks.c   | 106 ---------------------
 .../drm/amd/display/dc/dml/display_pipe_clocks.h   |  37 -------
 4 files changed, 1 insertion(+), 145 deletions(-)
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.c
 delete mode 100644 drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.h
drivers/gpu/drm/amd/display/dc/dml/Makefile +1 -1
index c6d9d9530d75..87bab8e8139f 100644
@@ -13,7 +13,7 @@ CFLAGS_soc_bounding_box.o := -mhard-float -msse -mpreferred-stack-boundary=4
 CFLAGS_dml_common_defs.o := -mhard-float -msse -mpreferred-stack-boundary=4
 
 
-DML = display_mode_lib.o display_pipe_clocks.o display_rq_dlg_calc.o \
+DML = display_mode_lib.o display_rq_dlg_calc.o \
 	  display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o \
 	  soc_bounding_box.o dml_common_defs.o display_mode_vba.o
 
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h +0 -1
index 57f49d29c6b9..ed77f96016dd 100644
@@ -29,7 +29,6 @@
 #include "dml_common_defs.h"
 #include "soc_bounding_box.h"
 #include "display_mode_vba.h"
-#include "display_pipe_clocks.h"
 #include "display_rq_dlg_calc.h"
 #include "dml1_display_rq_dlg_calc.h"
 
drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.c deleted +0 -106

106 lines not on this page · raw message

drivers/gpu/drm/amd/display/dc/dml/display_pipe_clocks.h deleted +0 -37
deleted file mode 100644
index a712dc3ecf4b..000000000000
@@ -1,37 +0,0 @@
-/*
- * Copyright 2017 Advanced Micro Devices, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- *
- * Authors: AMD
- *
- */
-#ifndef __DISPLAY_PIPE_CLOCKS_H__
-#define __DISPLAY_PIPE_CLOCKS_H__
-
-#include "dml_common_defs.h"
-
-struct display_mode_lib;
-
-display_pipe_clock_st dml_clks_get_pipe_clocks(
-		struct display_mode_lib *mode_lib,
-		display_e2e_pipe_params_st *e2e,
-		unsigned int num_pipes);
-
-#endif
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#6 lore raw

PATCH 5/20 drm/amd/display: check SR_WATERMARK regs prior to write

In reply to a message not in the archive

From: Eric Bernstein <[email protected]>

---
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  | 144 +++++++++++----------
 1 file changed, 74 insertions(+), 70 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +74 -70
index 6e2cec643f31..741b5e06d314 100644
@@ -481,27 +481,26 @@ static void program_watermarks(
 		"HW register value = 0x%x\n",
 		watermarks->a.pte_meta_urgent_ns, prog_wm_value);
 
-
-	prog_wm_value = convert_and_clamp(
-			watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns,
-			refclk_mhz, 0x1fffff);
-
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_A, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_ENTER_EXIT_WATERMARK_A calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
-
-
-	prog_wm_value = convert_and_clamp(
-			watermarks->a.cstate_pstate.cstate_exit_ns,
-			refclk_mhz, 0x1fffff);
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_A, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_EXIT_WATERMARK_A calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->a.cstate_pstate.cstate_exit_ns, prog_wm_value);
-
+	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_A)) {
+		prog_wm_value = convert_and_clamp(
+				watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_A, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_ENTER_EXIT_WATERMARK_A calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->a.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
+
+
+		prog_wm_value = convert_and_clamp(
+				watermarks->a.cstate_pstate.cstate_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_A, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_EXIT_WATERMARK_A calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->a.cstate_pstate.cstate_exit_ns, prog_wm_value);
+	}
 
 	prog_wm_value = convert_and_clamp(
 			watermarks->a.cstate_pstate.pstate_change_ns,
@@ -533,24 +532,26 @@ static void program_watermarks(
 		watermarks->b.pte_meta_urgent_ns, prog_wm_value);
 
 
-	prog_wm_value = convert_and_clamp(
-			watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns,
-			refclk_mhz, 0x1fffff);
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_B, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_ENTER_WATERMARK_B calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
+	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_B)) {
+		prog_wm_value = convert_and_clamp(
+				watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_B, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_ENTER_WATERMARK_B calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->b.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
 
 
-	prog_wm_value = convert_and_clamp(
-			watermarks->b.cstate_pstate.cstate_exit_ns,
-			refclk_mhz, 0x1fffff);
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_B, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_EXIT_WATERMARK_B calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->b.cstate_pstate.cstate_exit_ns, prog_wm_value);
+		prog_wm_value = convert_and_clamp(
+				watermarks->b.cstate_pstate.cstate_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_B, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_EXIT_WATERMARK_B calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->b.cstate_pstate.cstate_exit_ns, prog_wm_value);
+	}
 
 	prog_wm_value = convert_and_clamp(
 			watermarks->b.cstate_pstate.pstate_change_ns,
@@ -581,25 +582,26 @@ static void program_watermarks(
 		watermarks->c.pte_meta_urgent_ns, prog_wm_value);
 
 
-	prog_wm_value = convert_and_clamp(
-			watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
-			refclk_mhz, 0x1fffff);
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_C, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_ENTER_WATERMARK_C calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
+	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_C)) {
+		prog_wm_value = convert_and_clamp(
+				watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_C, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_ENTER_WATERMARK_C calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->c.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
 
 
-	prog_wm_value = convert_and_clamp(
-			watermarks->c.cstate_pstate.cstate_exit_ns,
-			refclk_mhz, 0x1fffff);
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_C, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_EXIT_WATERMARK_C calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->c.cstate_pstate.cstate_exit_ns, prog_wm_value);
-
+		prog_wm_value = convert_and_clamp(
+				watermarks->c.cstate_pstate.cstate_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_C, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_EXIT_WATERMARK_C calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->c.cstate_pstate.cstate_exit_ns, prog_wm_value);
+	}
 
 	prog_wm_value = convert_and_clamp(
 			watermarks->c.cstate_pstate.pstate_change_ns,
@@ -629,24 +631,26 @@ static void program_watermarks(
 		watermarks->d.pte_meta_urgent_ns, prog_wm_value);
 
 
-	prog_wm_value = convert_and_clamp(
-			watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns,
-			refclk_mhz, 0x1fffff);
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_D, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_ENTER_WATERMARK_D calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
+	if (REG(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_D)) {
+		prog_wm_value = convert_and_clamp(
+				watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_ENTER_WATERMARK_D, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_ENTER_WATERMARK_D calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->d.cstate_pstate.cstate_enter_plus_exit_ns, prog_wm_value);
 
 
-	prog_wm_value = convert_and_clamp(
-			watermarks->d.cstate_pstate.cstate_exit_ns,
-			refclk_mhz, 0x1fffff);
-	REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_D, prog_wm_value);
-	dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
-		"SR_EXIT_WATERMARK_D calculated =%d\n"
-		"HW register value = 0x%x\n",
-		watermarks->d.cstate_pstate.cstate_exit_ns, prog_wm_value);
+		prog_wm_value = convert_and_clamp(
+				watermarks->d.cstate_pstate.cstate_exit_ns,
+				refclk_mhz, 0x1fffff);
+		REG_WRITE(DCHUBBUB_ARB_ALLOW_SR_EXIT_WATERMARK_D, prog_wm_value);
+		dm_logger_write(hws->ctx->logger, LOG_BANDWIDTH_CALCS,
+			"SR_EXIT_WATERMARK_D calculated =%d\n"
+			"HW register value = 0x%x\n",
+			watermarks->d.cstate_pstate.cstate_exit_ns, prog_wm_value);
+	}
 
 
 	prog_wm_value = convert_and_clamp(
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#7 lore raw

PATCH 6/20 drm/amd/display: Correct timings in build scaling params

In reply to a message not in the archive

From: Andrew Jiang <[email protected]>

A previous patch set the addressable timing as active + border, when in fact, the VESA standard specifies active as equal to addressable + border.

This patch makes the fix more correct and in line with the standard.

---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +3 -14
index 55feb16b1fd7..0aca7a3d3dd6 100644
@@ -850,22 +850,11 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
 	 */
 	pipe_ctx->plane_res.scl_data.lb_params.depth = LB_PIXEL_DEPTH_30BPP;
 
-	/**
-	 * KMD sends us h and v_addressable without the borders, which causes us sometimes to draw
-	 * the blank region on-screen. Correct for this by adding the borders back to their
-	 * respective addressable values, and by shifting recout.
-	 */
-	timing->h_addressable += timing->h_border_left + timing->h_border_right;
-	timing->v_addressable += timing->v_border_top + timing->v_border_bottom;
-	pipe_ctx->plane_res.scl_data.recout.y += timing->v_border_top;
 	pipe_ctx->plane_res.scl_data.recout.x += timing->h_border_left;
-	timing->v_border_top = 0;
-	timing->v_border_bottom = 0;
-	timing->h_border_left = 0;
-	timing->h_border_right = 0;
+	pipe_ctx->plane_res.scl_data.recout.y += timing->v_border_top;
 
-	pipe_ctx->plane_res.scl_data.h_active = timing->h_addressable;
-	pipe_ctx->plane_res.scl_data.v_active = timing->v_addressable;
+	pipe_ctx->plane_res.scl_data.h_active = timing->h_addressable + timing->h_border_left + timing->h_border_right;
+	pipe_ctx->plane_res.scl_data.v_active = timing->v_addressable + timing->v_border_top + timing->v_border_bottom;
 
 	/* Taps calculations */
 	if (pipe_ctx->plane_res.xfm != NULL)
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#8 lore raw

PATCH 7/20 drm/amd/display: Add chip mask to HDMI retimer/redriver check

In reply to a message not in the archive

From: Andrew Jiang <[email protected]>

There were cases where the chip caps held additional bits that led to the retimer/redriver check failing; use the proper mask to ensure that we have only the bits that we care about for the check in question.

---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +5 -3
index 72e56fbe4a42..004e0b0aad8a 100644
@@ -45,6 +45,7 @@
 #include "dce/dce_11_0_enum.h"
 #include "dce/dce_11_0_sh_mask.h"
 
+#define EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK	0x007C /* Copied from atombios.h */
 #define LINK_INFO(...) \
 	dm_logger_write(dc_ctx->logger, LOG_HW_HOTPLUG, \
 		__VA_ARGS__)
@@ -1345,7 +1346,6 @@ static bool get_ext_hdmi_settings(struct pipe_ctx *pipe_ctx,
 					sizeof(integrated_info->dp2_ext_hdmi_6g_reg_settings));
 			result = true;
 			break;
-
 		default:
 			break;
 		}
@@ -1682,7 +1682,9 @@ static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
 		is_over_340mhz = true;
 
 	if (dc_is_hdmi_signal(pipe_ctx->stream->signal)) {
-		if ((pipe_ctx->stream->sink->link->chip_caps >> 2) == 0x2) {
+		unsigned short masked_chip_caps = pipe_ctx->stream->sink->link->chip_caps &
+				EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK;
+		if (masked_chip_caps == (0x2 << 2)) {
 			/* DP159, Retimer settings */
 			eng_id = pipe_ctx->stream_res.stream_enc->id;
 
@@ -1693,7 +1695,7 @@ static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
 				write_i2c_default_retimer_setting(pipe_ctx,
 						is_vga_mode, is_over_340mhz);
 			}
-		} else if ((pipe_ctx->stream->sink->link->chip_caps >> 2) == 0x1) {
+		} else if (masked_chip_caps == (0x1 << 2)) {
 			/* PI3EQX1204, Redriver settings */
 			write_i2c_redriver_setting(pipe_ctx, is_over_340mhz);
 		}
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171016203154.6401-8-harry.wentland-5C7GfCeVMHo@public.gmane.org

#10 lore raw

Re: [PATCH 07/20] drm/amd/display: Add chip mask to HDMI retimer/redriver check

Quoted 46 lines · Harry Wentland

From: Andrew Jiang <[email protected]>

There were cases where the chip caps held additional bits that led to the retimer/redriver check failing; use the proper mask to ensure that we have only the bits that we care about for the check in question.

---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +4 -2
index 72e56fbe4a42..004e0b0aad8a 100644
@@ -45,6 +45,7 @@
 #include "dce/dce_11_0_enum.h"
 #include "dce/dce_11_0_sh_mask.h"
 
+#define EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK   0x007C /* Copied from atombios.h */
 #define LINK_INFO(...) \
        dm_logger_write(dc_ctx->logger, LOG_HW_HOTPLUG, \
                __VA_ARGS__)
@@ -1345,7 +1346,6 @@ static bool get_ext_hdmi_settings(struct pipe_ctx *pipe_ctx,
                                        sizeof(integrated_info->dp2_ext_hdmi_6g_reg_settings));
                        result = true;
                        break;
-
                default:
                        break;
                }
@@ -1682,7 +1682,9 @@ static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
                is_over_340mhz = true;
 
        if (dc_is_hdmi_signal(pipe_ctx->stream->signal)) {
-               if ((pipe_ctx->stream->sink->link->chip_caps >> 2) == 0x2) {
+               unsigned short masked_chip_caps = pipe_ctx->stream->sink->link->chip_caps &
+                               EXT_DISPLAY_PATH_CAPS__EXT_CHIP_MASK;
+               if (masked_chip_caps == (0x2 << 2)) {
                        /* DP159, Retimer settings */
                        eng_id = pipe_ctx->stream_res.stream_enc->id;
 

drivers/gpu/drm/amd/display/dc/core/dc_link.c static void enable_link_hdmi(struct pipe_ctx *pipe_ctx) · line 1698

Quoted 5 lines
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1 -1
@@ -1693,7 +1695,7 @@ static void enable_link_hdmi(struct pipe_ctx *pipe_ctx)
                                write_i2c_default_retimer_setting(pipe_ctx,
                                                is_vga_mode, is_over_340mhz);
                        }
-               } else if ((pipe_ctx->stream->sink->link->chip_caps >> 2) == 0x1) {
+               } else if (masked_chip_caps == (0x1 << 2)) {

Maybe define these caps at some point? Or use the atombios ones directly.

Alex

Quoted 10 lines
drivers/gpu/drm/amd/display/dc/core/dc_link.c +0 -1
                        /* PI3EQX1204, Redriver settings */
                        write_i2c_redriver_setting(pipe_ctx, is_over_340mhz);
                }
--

2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#11 lore raw

PATCH 8/20 drm/amd/display: Add DIGD case when getting retimer settings

In reply to a message not in the archive

From: Andrew Jiang <[email protected]>

One of the HDMI ports map to DIGD, which we did not map to DP3 ext HDMI settings. Add the DIGD case so that we can get proper retimer settings from SBIOS for that port.

---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +12 -0
index 004e0b0aad8a..c47da645d3b8 100644
@@ -1346,6 +1346,18 @@ static bool get_ext_hdmi_settings(struct pipe_ctx *pipe_ctx,
 					sizeof(integrated_info->dp2_ext_hdmi_6g_reg_settings));
 			result = true;
 			break;
+		case ENGINE_ID_DIGD:
+			settings->slv_addr = integrated_info->dp3_ext_hdmi_slv_addr;
+			settings->reg_num = integrated_info->dp3_ext_hdmi_6g_reg_num;
+			settings->reg_num_6g = integrated_info->dp3_ext_hdmi_6g_reg_num;
+			memmove(settings->reg_settings,
+					integrated_info->dp3_ext_hdmi_reg_settings,
+					sizeof(integrated_info->dp3_ext_hdmi_reg_settings));
+			memmove(settings->reg_settings_6g,
+					integrated_info->dp3_ext_hdmi_6g_reg_settings,
+					sizeof(integrated_info->dp3_ext_hdmi_6g_reg_settings));
+			result = true;
+			break;
 		default:
 			break;
 		}
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#12 lore raw

PATCH 9/20 drm/amd/display: WA for 3 display play video hot plug.

In reply to a message not in the archive

From: Yongqiang Sun <[email protected]>

Three monitor connected and playing a video will occupy all 4 pipes, if hot plug forth display, commit streams will be failed due to no free pipe can be found.
Work around:
When forth monitor connected, mark video plane as a fake plane, remove it in dc, keep it in dm and report address to OS, until OS turn off MPO.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 +++++-----
 drivers/gpu/drm/amd/display/dc/core/dc.c          |  4 ++--
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++++++++------
 drivers/gpu/drm/amd/display/dc/dc.h               |  6 +++---
 drivers/gpu/drm/amd/display/dc/inc/core_status.h  | 15 ++++++++-------
 5 files changed, 26 insertions(+), 23 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +5 -5
index d960483150ba..adc76ecb84f5 100644
@@ -2890,7 +2890,7 @@ int amdgpu_dm_connector_mode_valid(struct drm_connector *connector,
 	stream->src.height = mode->vdisplay;
 	stream->dst = stream->src;
 
-	if (dc_validate_stream(adev->dm.dc, stream))
+	if (dc_validate_stream(adev->dm.dc, stream) == DC_OK)
 		result = MODE_OK;
 
 	dc_stream_release(stream);
@@ -2935,7 +2935,7 @@ static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
 	if (!dm_crtc_state->stream)
 		return 0;
 
-	if (dc_validate_stream(dc, dm_crtc_state->stream))
+	if (dc_validate_stream(dc, dm_crtc_state->stream) == DC_OK)
 		return 0;
 
 	return ret;
@@ -3130,7 +3130,7 @@ static int dm_plane_atomic_check(struct drm_plane *plane,
 	if (!dm_plane_state->dc_state)
 		return 0;
 
-	if (dc_validate_plane(dc, dm_plane_state->dc_state))
+	if (dc_validate_plane(dc, dm_plane_state->dc_state) == DC_OK)
 		return 0;
 
 	return -EINVAL;
@@ -4569,10 +4569,10 @@ static int dm_update_crtcs_state(struct dc *dc,
 					crtc->base.id);
 
 			/* i.e. reset mode */
-			if (!dc_remove_stream_from_ctx(
+			if (dc_remove_stream_from_ctx(
 					dc,
 					dm_state->context,
-					old_acrtc_state->stream)) {
+					old_acrtc_state->stream) != DC_OK) {
 				ret = -EINVAL;
 				goto fail;
 			}
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -2
index 9d750fa29a87..ff6bd384aece 100644
@@ -793,7 +793,7 @@ bool dc_enable_stereo(
  * Applies given context to HW and copy it into current context.
  * It's up to the user to release the src context afterwards.
  */
-static bool dc_commit_state_no_check(struct dc *dc, struct dc_state *context)
+static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *context)
 {
 	struct dc_bios *dcb = dc->ctx->dc_bios;
 	enum dc_status result = DC_ERROR_UNEXPECTED;
@@ -869,7 +869,7 @@ static bool dc_commit_state_no_check(struct dc *dc, struct dc_state *context)
 
 	dc->hwss.optimize_shared_resources(dc);
 
-	return (result == DC_OK);
+	return result;
 }
 
 bool dc_commit_state(struct dc *dc, struct dc_state *context)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +8 -6
index 0aca7a3d3dd6..d1cdf9f8853d 100644
@@ -1503,7 +1503,7 @@ enum dc_status dc_add_stream_to_ctx(
 	return res;
 }
 
-bool dc_remove_stream_from_ctx(
+enum dc_status dc_remove_stream_from_ctx(
 			struct dc *dc,
 			struct dc_state *new_ctx,
 			struct dc_stream_state *stream)
@@ -2756,7 +2756,7 @@ void resource_build_bit_depth_reduction_params(struct dc_stream_state *stream,
 	fmt_bit_depth->pixel_encoding = pixel_encoding;
 }
 
-bool dc_validate_stream(struct dc *dc, struct dc_stream_state *stream)
+enum dc_status dc_validate_stream(struct dc *dc, struct dc_stream_state *stream)
 {
 	struct dc  *core_dc = dc;
 	struct dc_link *link = stream->sink->link;
@@ -2780,14 +2780,16 @@ bool dc_validate_stream(struct dc *dc, struct dc_stream_state *stream)
 		      link,
 		      &stream->timing);
 
-	return res == DC_OK;
+	return res;
 }
 
-bool dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state)
+enum dc_status dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state)
 {
+	enum dc_status res = DC_OK;
+
 	/* TODO For now validates pixel format only */
 	if (dc->res_pool->funcs->validate_plane)
-		return dc->res_pool->funcs->validate_plane(plane_state, &dc->caps) == DC_OK;
+		return dc->res_pool->funcs->validate_plane(plane_state, &dc->caps);
 
-	return true;
+	return res;
 }
drivers/gpu/drm/amd/display/dc/dc.h +3 -3
index f60191d9c7e5..6c0de093a59e 100644
@@ -686,7 +686,7 @@ enum dc_status dc_add_stream_to_ctx(
 		struct dc_state *new_ctx,
 		struct dc_stream_state *stream);
 
-bool dc_remove_stream_from_ctx(
+enum dc_status dc_remove_stream_from_ctx(
 		struct dc *dc,
 			struct dc_state *new_ctx,
 			struct dc_stream_state *stream);
@@ -725,9 +725,9 @@ struct dc_validation_set {
 	uint8_t plane_count;
 };
 
-bool dc_validate_stream(struct dc *dc, struct dc_stream_state *stream);
+enum dc_status dc_validate_stream(struct dc *dc, struct dc_stream_state *stream);
 
-bool dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state);
+enum dc_status dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state);
 
 enum dc_status dc_validate_global_state(
 		struct dc *dc,
drivers/gpu/drm/amd/display/dc/inc/core_status.h +8 -7
index b5759c0e5a2f..01df85641684 100644
@@ -35,13 +35,14 @@ enum dc_status {
 	DC_FAIL_CONTROLLER_VALIDATE = 5,
 	DC_FAIL_ENC_VALIDATE = 6,
 	DC_FAIL_ATTACH_SURFACES = 7,
-	DC_FAIL_SURFACE_VALIDATE = 8,
-	DC_NO_DP_LINK_BANDWIDTH = 9,
-	DC_EXCEED_DONGLE_MAX_CLK = 10,
-	DC_SURFACE_PIXEL_FORMAT_UNSUPPORTED = 11,
-	DC_FAIL_BANDWIDTH_VALIDATE = 12, /* BW and Watermark validation */
-	DC_FAIL_SCALING = 13,
-	DC_FAIL_DP_LINK_TRAINING = 14,
+	DC_FAIL_DETACH_SURFACES = 8,
+	DC_FAIL_SURFACE_VALIDATE = 9,
+	DC_NO_DP_LINK_BANDWIDTH = 10,
+	DC_EXCEED_DONGLE_MAX_CLK = 11,
+	DC_SURFACE_PIXEL_FORMAT_UNSUPPORTED = 12,
+	DC_FAIL_BANDWIDTH_VALIDATE = 13, /* BW and Watermark validation */
+	DC_FAIL_SCALING = 14,
+	DC_FAIL_DP_LINK_TRAINING = 15,
 
 	DC_ERROR_UNEXPECTED = -1
 };
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#13 lore raw

PATCH 10/20 drm/amd/display: rename dscl functions

In reply to a message not in the archive

From: Yue Hin Lau <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c   | 10 +--
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h   |  4 +-
 .../gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c  | 98 +++++++++++-----------
 3 files changed, 56 insertions(+), 56 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.c +5 -5
index 5960e491159d..74e7c82bdc76 100644
@@ -372,7 +372,7 @@ void dpp1_cnv_setup (
 	}
 }
 
-void dcn10_set_cursor_attributes(
+void dpp1_set_cursor_attributes(
 		struct dpp *dpp_base,
 		const struct dc_cursor_attributes *attr)
 {
@@ -400,7 +400,7 @@ void dcn10_set_cursor_attributes(
 }
 
 
-void dcn10_set_cursor_position(
+void dpp1_set_cursor_position(
 		struct dpp *dpp_base,
 		const struct dc_cursor_position *pos,
 		const struct dc_cursor_mi_param *param,
@@ -440,13 +440,13 @@ static const struct dpp_funcs dcn10_dpp_funcs = {
 		.ipp_program_degamma_pwl	= dpp1_set_degamma_pwl,
 		.ipp_setup			= dpp1_cnv_setup,
 		.ipp_full_bypass		= dpp1_full_bypass,
-		.set_cursor_attributes = dcn10_set_cursor_attributes,
-		.set_cursor_position = dcn10_set_cursor_position,
+		.set_cursor_attributes = dpp1_set_cursor_attributes,
+		.set_cursor_position = dpp1_set_cursor_position,
 };
 
 static struct dpp_caps dcn10_dpp_cap = {
 	.dscl_data_proc_format = DSCL_DATA_PRCESSING_FIXED_FORMAT,
-	.dscl_calc_lb_num_partitions = dscl1_calc_lb_num_partitions,
+	.dscl_calc_lb_num_partitions = dpp1_dscl_calc_lb_num_partitions,
 };
 
 /*****************************************/
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h +2 -2
index fe6c0aa13da4..a9782b1aba47 100644
@@ -1274,12 +1274,12 @@ enum dcn10_input_csc_select {
 	INPUT_CSC_SELECT_COMA
 };
 
-bool is_lb_conf_valid(
+bool dpp1_dscl_is_lb_conf_valid(
 		int ceil_vratio,
 		int num_partitions,
 		int vtaps);
 
-void dscl1_calc_lb_num_partitions(
+void dpp1_dscl_calc_lb_num_partitions(
 		const struct scaler_data *scl_data,
 		enum lb_memory_config lb_config,
 		int *num_part_y,
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +49 -49

320 lines not on this page · raw message

Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#14 lore raw

PATCH 11/20 drm/amd/display: DAL 3.1.06

In reply to a message not in the archive

From: Tony Cheng <[email protected]>

Raven bug fixes
- RS3 MPO stability improvement
- SLS fixes
- AM4 fixes

DAL 3.1
- merge in upstream patches from DRM maintainer Dave Arilie
- hubp, dpp HW objects

---
 drivers/gpu/drm/amd/display/dc/dc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dc.h +2 -1
index 6c0de093a59e..37a779ead4fb 100644
@@ -38,7 +38,8 @@
 #include "inc/compressor.h"
 #include "dml/display_mode_lib.h"
 
-#define DC_VER "3.1.05"
+#define DC_VER "3.1.06"
+
 
 #define MAX_SURFACES 3
 #define MAX_STREAMS 6
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#15 lore raw

PATCH 12/20 drm/amd/display: LGD panel willl flash line under window

In reply to a message not in the archive

From: Hersen Wu <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +9 -0
index 5e5763c0ee94..e8b8daeeed97 100644
@@ -1399,6 +1399,15 @@ static void power_down_encoders(struct dc *dc)
 	int i;
 	enum connector_id connector_id;
 	enum signal_type signal = SIGNAL_TYPE_NONE;
+
+	/* do not know BIOS back-front mapping, simply blank all. It will not
+	 * hurt for non-DP
+	 */
+	for (i = 0; i < dc->res_pool->stream_enc_count; i++) {
+		dc->res_pool->stream_enc[i]->funcs->dp_blank(
+					dc->res_pool->stream_enc[i]);
+	}
+
 	for (i = 0; i < dc->link_count; i++) {
 		connector_id = dal_graphics_object_id_get_connector_id(dc->links[i]->link_id);
 		if ((connector_id == CONNECTOR_ID_DISPLAY_PORT) ||
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#16 lore raw

PATCH 13/20 drm/amd/display: Move OS types to os_types.h

In reply to a message not in the archive

Some of this stuff is not really dm_services

---
 drivers/gpu/drm/amd/display/dc/dm_services.h | 41 ----------------------------
 drivers/gpu/drm/amd/display/dc/os_types.h    | 40 +++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 41 deletions(-)
drivers/gpu/drm/amd/display/dc/dm_services.h +0 -41
index 0f01ca225d83..c8190c38a644 100644
@@ -38,47 +38,6 @@
 
 #undef DEPRECATED
 
-/*
- *
- * general debug capabilities
- *
- */
-#if defined(CONFIG_DEBUG_KERNEL) || defined(CONFIG_DEBUG_DRIVER)
-
-#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)
-#define ASSERT_CRITICAL(expr) do {	\
-	if (WARN_ON(!(expr))) { \
-		kgdb_breakpoint(); \
-	} \
-} while (0)
-#else
-#define ASSERT_CRITICAL(expr) do {	\
-	if (WARN_ON(!(expr))) { \
-		; \
-	} \
-} while (0)
-#endif
-
-#if defined(CONFIG_DEBUG_KERNEL_DC)
-#define ASSERT(expr) ASSERT_CRITICAL(expr)
-
-#else
-#define ASSERT(expr) WARN_ON(!(expr))
-#endif
-
-#define BREAK_TO_DEBUGGER() ASSERT(0)
-
-#endif /* CONFIG_DEBUG_KERNEL || CONFIG_DEBUG_DRIVER */
-
-#define DC_ERR(...)  do { \
-	dm_error(__VA_ARGS__); \
-	BREAK_TO_DEBUGGER(); \
-} while (0)
-
-#if defined(CONFIG_DRM_AMD_DC_DCN1_0)
-#include <asm/fpu/api.h>
-#endif
-
 irq_handler_idx dm_register_interrupt(
 	struct dc_context *ctx,
 	struct dc_interrupt_params *int_params,
drivers/gpu/drm/amd/display/dc/os_types.h +40 -0
index e0cd5278aae8..86170b40b5c5 100644
@@ -56,5 +56,45 @@
 
 #endif
 
+/*
+ *
+ * general debug capabilities
+ *
+ */
+#if defined(CONFIG_DEBUG_KERNEL) || defined(CONFIG_DEBUG_DRIVER)
+
+#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)
+#define ASSERT_CRITICAL(expr) do {	\
+	if (WARN_ON(!(expr))) { \
+		kgdb_breakpoint(); \
+	} \
+} while (0)
+#else
+#define ASSERT_CRITICAL(expr) do {	\
+	if (WARN_ON(!(expr))) { \
+		; \
+	} \
+} while (0)
+#endif
+
+#if defined(CONFIG_DEBUG_KERNEL_DC)
+#define ASSERT(expr) ASSERT_CRITICAL(expr)
+
+#else
+#define ASSERT(expr) WARN_ON(!(expr))
+#endif
+
+#define BREAK_TO_DEBUGGER() ASSERT(0)
+
+#endif /* CONFIG_DEBUG_KERNEL || CONFIG_DEBUG_DRIVER */
+
+#define DC_ERR(...)  do { \
+	dm_error(__VA_ARGS__); \
+	BREAK_TO_DEBUGGER(); \
+} while (0)
+
+#if defined(CONFIG_DRM_AMD_DC_DCN1_0)
+#include <asm/fpu/api.h>
+#endif
 
 #endif /* _OS_TYPES_H_ */
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#17 lore raw

PATCH 14/20 drm/amd/display: Fix one more place for dc_stream_state leak

In reply to a message not in the archive

One more thing that happened due to uneven applying of patches. This mirrors what Darren Salt fixed.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index adc76ecb84f5..048b3c52ab27 100644
@@ -4589,7 +4589,7 @@ static int dm_update_crtcs_state(struct dc *dc,
 			 * TODO: need to dig out the root cause of that
 			 */
 			if (!aconnector || (!aconnector->dc_sink && aconnector->mst_port))
-				continue;
+				goto next_crtc;
 
 			if (modereset_required(crtc_state))
 				goto next_crtc;
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#18 lore raw

PATCH 15/20 drm/amd/display: Reduce stack size of commit_planes_to_stream

In reply to a message not in the archive

This function likes to blow 1024 stack size when something is added to the addr struct. For now just dynamically allocate.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +13 -6
index ff6bd384aece..7a0593d4ca62 100644
@@ -926,9 +926,9 @@ bool dc_commit_planes_to_stream(
 		struct dc_state *state)
 {
 	struct dc_surface_update updates[MAX_SURFACES];
-	struct dc_flip_addrs flip_addr[MAX_SURFACES];
-	struct dc_plane_info plane_info[MAX_SURFACES];
-	struct dc_scaling_info scaling_info[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_update *stream_update =
 			kzalloc(sizeof(struct dc_stream_update), GFP_KERNEL);
@@ -938,10 +938,14 @@ bool dc_commit_planes_to_stream(
 		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);
+
 	memset(updates, 0, sizeof(updates));
-	memset(flip_addr, 0, sizeof(flip_addr));
-	memset(plane_info, 0, sizeof(plane_info));
-	memset(scaling_info, 0, sizeof(scaling_info));
 
 	stream_update->src = dc_stream->src;
 	stream_update->dst = dc_stream->dst;
@@ -980,6 +984,9 @@ bool dc_commit_planes_to_stream(
 			new_plane_count,
 			dc_stream, stream_update, plane_states, state);
 
+	kfree(flip_addr);
+	kfree(plane_info);
+	kfree(scaling_info);
 	kfree(stream_update);
 	return true;
 }
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171016203154.6401-16-harry.wentland-5C7GfCeVMHo@public.gmane.org

#20 lore raw

Re: [PATCH 15/20] drm/amd/display: Reduce stack size of commit_planes_to_stream

Quoted 15 lines · Harry Wentland

This function likes to blow 1024 stack size when something is added to the addr struct. For now just dynamically allocate.

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 19 +++++++++++++------
  1 file changed, 13 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index ff6bd384aece..7a0593d4ca62 100644

drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_commit_planes_to_stream( · line 928

Quoted 3 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
@@ -926,9 +926,9 @@ bool dc_commit_planes_to_stream(
  		struct dc_state *state)
  {
  	struct dc_surface_update updates[MAX_SURFACES];

Why this one is left on the stack then ?

Thanks,
Andrey

Quoted 28 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +10 -6
-	struct dc_flip_addrs flip_addr[MAX_SURFACES];
-	struct dc_plane_info plane_info[MAX_SURFACES];
-	struct dc_scaling_info scaling_info[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_update *stream_update =
  			kzalloc(sizeof(struct dc_stream_update), GFP_KERNEL);
@@ -938,10 +938,14 @@ bool dc_commit_planes_to_stream(
  		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);
+
  	memset(updates, 0, sizeof(updates));
-	memset(flip_addr, 0, sizeof(flip_addr));
-	memset(plane_info, 0, sizeof(plane_info));
-	memset(scaling_info, 0, sizeof(scaling_info));
 
  	stream_update->src = dc_stream->src;
  	stream_update->dst = dc_stream->dst;

drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_commit_planes_to_stream( · line 992

Quoted 9 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
@@ -980,6 +984,9 @@ bool dc_commit_planes_to_stream(
  			new_plane_count,
  			dc_stream, stream_update, plane_states, state);
 
+	kfree(flip_addr);
+	kfree(plane_info);
+	kfree(scaling_info);
  	kfree(stream_update);
  	return true;
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): a2afd3f2-8f39-97e3-cdf5-7707c8920c42-5C7GfCeVMHo@public.gmane.org

#22 lore raw

Re: [PATCH 15/20] drm/amd/display: Reduce stack size of commit_planes_to_stream

Quoted 13 lines · andrey
Quoted 10 lines · Harry Wentland

This function likes to blow 1024 stack size when something is added to the addr struct. For now just dynamically allocate.

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 19 +++++++++++++------

  1 file changed, 13 insertions(+), 6 deletions(-)
Quoted 10 lines

drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_commit_planes_to_stream( · line 928

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index ff6bd384aece..7a0593d4ca62 100644
@@ -926,9 +926,9 @@ bool dc_commit_planes_to_stream(
           struct dc_state *state)
   {
       struct dc_surface_update updates[MAX_SURFACES];

Why this one is left on the stack then ?

This one is just tracking a bunch of pointers to more flip_addr, plane_info, and scaling_info structs, so it's quite small.

This whole function is quite ugly and eventually needs to go anyways, along with that whole dc_surface_update struct.

Harry

Quoted 30 lines

Thanks,
Andrey

Quoted 26 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -3
-    struct dc_flip_addrs flip_addr[MAX_SURFACES];
-    struct dc_plane_info plane_info[MAX_SURFACES];
-    struct dc_scaling_info scaling_info[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_update *stream_update = kzalloc(sizeof(struct dc_stream_update), GFP_KERNEL);

drivers/gpu/drm/amd/display/dc/core/dc.c +6 -3
@@ -938,10 +938,14 @@ bool dc_commit_planes_to_stream(
           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);
+
       memset(updates, 0, sizeof(updates));
-    memset(flip_addr, 0, sizeof(flip_addr));
-    memset(plane_info, 0, sizeof(plane_info));
-    memset(scaling_info, 0, sizeof(scaling_info));
         stream_update->src = dc_stream->src;
       stream_update->dst = dc_stream->dst;
@@ -980,6 +984,9 @@ bool dc_commit_planes_to_stream(
Quoted 9 lines

drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_commit_planes_to_stream( · line 992

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
               new_plane_count,
               dc_stream, stream_update, plane_states, state);
   +    kfree(flip_addr);
+    kfree(plane_info);
+    kfree(scaling_info);
       kfree(stream_update);
       return true;
   }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): f7302914-7193-f1e0-9c63-72aececf61f1-5C7GfCeVMHo@public.gmane.org

#24 lore raw

Re: [PATCH 15/20] drm/amd/display: Reduce stack size of commit_planes_to_stream

Quoted 22 lines · Harry Wentland
Quoted 12 lines · andrey
Quoted 10 lines · Harry Wentland

This function likes to blow 1024 stack size when something is added to the addr struct. For now just dynamically allocate.

---
   drivers/gpu/drm/amd/display/dc/core/dc.c | 19 +++++++++++++------
   1 file changed, 13 insertions(+), 6 deletions(-)
Quoted 9 lines

drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_commit_planes_to_stream( · line 928

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index ff6bd384aece..7a0593d4ca62 100644
@@ -926,9 +926,9 @@ bool dc_commit_planes_to_stream(
           struct dc_state *state)
   {
       struct dc_surface_update updates[MAX_SURFACES];

Why this one is left on the stack then ?

Quoted 5 lines

This one is just tracking a bunch of pointers to more flip_addr, plane_info, and scaling_info structs, so it's quite small.

This whole function is quite ugly and eventually needs to go anyways, along with that whole dc_surface_update struct.

Maybe put some comment with TODO explainig this, cause it's confusing why 3 structures are allocated dynamically while one is on the stack.

Andrey

Quoted 32 lines

Harry

Quoted 29 lines

Thanks,
Andrey

Quoted 26 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +9 -6
-    struct dc_flip_addrs flip_addr[MAX_SURFACES];
-    struct dc_plane_info plane_info[MAX_SURFACES];
-    struct dc_scaling_info scaling_info[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_update *stream_update =
               kzalloc(sizeof(struct dc_stream_update), GFP_KERNEL);
@@ -938,10 +938,14 @@ bool dc_commit_planes_to_stream(
           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);
+
       memset(updates, 0, sizeof(updates));
-    memset(flip_addr, 0, sizeof(flip_addr));
-    memset(plane_info, 0, sizeof(plane_info));
-    memset(scaling_info, 0, sizeof(scaling_info));
         stream_update->src = dc_stream->src;
       stream_update->dst = dc_stream->dst;
@@ -980,6 +984,9 @@ bool dc_commit_planes_to_stream(
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/amd/display/dc/core/dc.c bool dc_commit_planes_to_stream( · line 992

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
               new_plane_count,
               dc_stream, stream_update, plane_states, state);
   +    kfree(flip_addr);
+    kfree(plane_info);
+    kfree(scaling_info);
       kfree(stream_update);
       return true;
   }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#25 lore raw

PATCH 16/20 drm/amd/display: dal 3.1.07

In reply to a message not in the archive

From: Tony Cheng <[email protected]>

- regression fixes in dal 3.1.06
- more linux upstream backport

---
 drivers/gpu/drm/amd/display/dc/dc.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dc.h +1 -2
index 37a779ead4fb..9d8f4a55c74e 100644
@@ -38,8 +38,7 @@
 #include "inc/compressor.h"
 #include "dml/display_mode_lib.h"
 
-#define DC_VER "3.1.06"
-
+#define DC_VER "3.1.07"
 
 #define MAX_SURFACES 3
 #define MAX_STREAMS 6
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#26 lore raw

PATCH 17/20 drm/amd/display: Remove redundant condition in dml vba

In reply to a message not in the archive

Found by 0-day
https://lists.freedesktop.org/archives/dri-devel/2017-October/154698.html

---
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c +1 -1
index a11b37c50d96..117ec11ef304 100644
@@ -3463,7 +3463,7 @@ bool Calculate256BBlockSizes(
 		unsigned int *BlockWidth256BytesC)
 {
 	if ((SourcePixelFormat == dm_444_64 || SourcePixelFormat == dm_444_32
-			|| SourcePixelFormat == dm_444_16 || SourcePixelFormat == dm_444_16
+			|| SourcePixelFormat == dm_444_16
 			|| SourcePixelFormat == dm_444_8)) {
 		if (SurfaceTiling == dm_sw_linear) {
 			*BlockHeight256BytesY = 1;
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#27 lore raw

PATCH 18/20 drm/amd/display: default force_single_disp_pipe_split = 1 on RV

In reply to a message not in the archive

From: Tony Cheng <[email protected]>

1080p idle, stutter efficiency goes up from 95.8% to 97.8% result in 5mW saving from APU and 8mW saving from DDR4

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c +1 -0
index d47ff7e6a525..d911590d08bc 100644
@@ -430,6 +430,7 @@ static const struct dc_debug debug_defaults_drv = {
 		.disable_pplib_wm_range = false,
 		.pplib_wm_report_mode = WM_REPORT_DEFAULT,
 		.pipe_split_policy = MPC_SPLIT_AVOID_MULT_DISP,
+		.force_single_disp_pipe_split = true,
 		.disable_dcc = DCC_ENABLE,
 		.voltage_align_fclk = true,
 		.disable_stereo_support = true,
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#28 lore raw

PATCH 19/20 drm/amd/display: change dml numdpp var to uint

In reply to a message not in the archive

From: Dmytro Laktyushkin <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c | 14 +++++++-------
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c +7 -7
index 117ec11ef304..ffd1d8d10bdf 100644
@@ -1158,7 +1158,7 @@ static bool CalculatePrefetchSchedule(
 		else if (PageTableLevels == 3)
 			*Tno_bw = UrgentExtraLatency;
 		else
-			Tno_bw = 0;
+			*Tno_bw = 0;
 	} else if (DCCEnable)
 		*Tno_bw = LineTime;
 	else
@@ -4721,14 +4721,14 @@ static void ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_
 					&& mode_lib->vba.SwathWidthYSingleDPP[k]
 							<= mode_lib->vba.MaximumSwathWidth[k]
 					&& mode_lib->vba.ODMCombineEnablePerState[i][k] == false) {
-				mode_lib->vba.NoOfDPP[i][k] = 1.0;
+				mode_lib->vba.NoOfDPP[i][k] = 1;
 				mode_lib->vba.RequiredDPPCLK[i][k] =
 						mode_lib->vba.MinDPPCLKUsingSingleDPP[k]
 								* (1.0
 										+ mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading
 												/ 100.0);
 			} else {
-				mode_lib->vba.NoOfDPP[i][k] = 2.0;
+				mode_lib->vba.NoOfDPP[i][k] = 2;
 				mode_lib->vba.RequiredDPPCLK[i][k] =
 						mode_lib->vba.MinDPPCLKUsingSingleDPP[k]
 								* (1.0
@@ -4790,14 +4790,14 @@ static void ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_
 								<= mode_lib->vba.MaximumSwathWidth[k]
 						&& mode_lib->vba.ODMCombineEnablePerState[i][k]
 								== false) {
-					mode_lib->vba.NoOfDPP[i][k] = 1.0;
+					mode_lib->vba.NoOfDPP[i][k] = 1;
 					mode_lib->vba.RequiredDPPCLK[i][k] =
 							mode_lib->vba.MinDPPCLKUsingSingleDPP[k]
 									* (1.0
 											+ mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading
 													/ 100.0);
 				} else {
-					mode_lib->vba.NoOfDPP[i][k] = 2.0;
+					mode_lib->vba.NoOfDPP[i][k] = 2;
 					mode_lib->vba.RequiredDPPCLK[i][k] =
 							mode_lib->vba.MinDPPCLKUsingSingleDPP[k]
 									* (1.0
@@ -4833,14 +4833,14 @@ static void ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_
 				mode_lib->vba.ODMCombineEnablePerState[i][k] = false;
 				if (mode_lib->vba.SwathWidthYSingleDPP[k]
 						<= mode_lib->vba.MaximumSwathWidth[k]) {
-					mode_lib->vba.NoOfDPP[i][k] = 1.0;
+					mode_lib->vba.NoOfDPP[i][k] = 1;
 					mode_lib->vba.RequiredDPPCLK[i][k] =
 							mode_lib->vba.MinDPPCLKUsingSingleDPP[k]
 									* (1.0
 											+ mode_lib->vba.DISPCLKDPPCLKDSCCLKDownSpreading
 													/ 100.0);
 				} else {
-					mode_lib->vba.NoOfDPP[i][k] = 2.0;
+					mode_lib->vba.NoOfDPP[i][k] = 2;
 					mode_lib->vba.RequiredDPPCLK[i][k] =
 							mode_lib->vba.MinDPPCLKUsingSingleDPP[k]
 									* (1.0
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +1 -1
index 63ad4a7bfeb5..4b8c1b911f17 100644
@@ -489,7 +489,7 @@ struct vba_vars_st {
 	double CursorBufferSize;
 	double CursorChunkSize;
 	unsigned int Mode;
-	double NoOfDPP[DC__VOLTAGE_STATES + 1][DC__NUM_DPP__MAX];
+	unsigned int NoOfDPP[DC__VOLTAGE_STATES + 1][DC__NUM_DPP__MAX];
 	double OutputLinkDPLanes[DC__NUM_DPP__MAX];
 	double SwathWidthYPerState[DC__VOLTAGE_STATES + 1][DC__NUM_DPP__MAX];
 	double SwathHeightYPerState[DC__VOLTAGE_STATES + 1][DC__NUM_DPP__MAX];
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#29 lore raw

PATCH 20/20 drm/amd/display: Minor update to DML

In reply to a message not in the archive

From: Dmytro Laktyushkin <[email protected]>

---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ++-
 drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c     | 6 ------
 drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h     | 1 -
 drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h | 7 ++-----
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c     | 9 +--------
 drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h     | 1 -
 6 files changed, 5 insertions(+), 22 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +2 -1
index 741b5e06d314..63c2f5266142 100644
@@ -2015,10 +2015,11 @@ static void dcn10_power_on_fe(
 				plane_state->dst_rect.height);
 
 		dm_logger_write(dc->ctx->logger, LOG_DC,
-				"Pipe %d: width, height, x, y\n"
+				"Pipe %d: width, height, x, y         format:%d\n"
 				"viewport:%d, %d, %d, %d\n"
 				"recout:  %d, %d, %d, %d\n",
 				pipe_ctx->pipe_idx,
+				plane_state->format,
 				pipe_ctx->plane_res.scl_data.viewport.width,
 				pipe_ctx->plane_res.scl_data.viewport.height,
 				pipe_ctx->plane_res.scl_data.viewport.x,
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.c +0 -6
index 09d232806de7..4c31fa54af39 100644
@@ -127,17 +127,11 @@ static void set_ip_params(struct _vcs_dpi_ip_params_st *ip, enum dml_project pro
 	}
 }
 
-static void set_mode_evaluation(struct _vcs_dpi_mode_evaluation_st *me, enum dml_project project)
-{
-	me->voltage_override = dm_vmin;
-}
-
 void dml_init_instance(struct display_mode_lib *lib, enum dml_project project)
 {
 	if (lib->project != project) {
 		set_soc_bounding_box(&lib->soc, project);
 		set_ip_params(&lib->ip, project);
-		set_mode_evaluation(&lib->me, project);
 		lib->project = project;
 	}
 }
drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h +0 -1
index ed77f96016dd..26f4f2a3d90d 100644
@@ -40,7 +40,6 @@ enum dml_project {
 struct display_mode_lib {
 	struct _vcs_dpi_ip_params_st ip;
 	struct _vcs_dpi_soc_bounding_box_st soc;
-	struct _vcs_dpi_mode_evaluation_st me;
 	enum dml_project project;
 	struct vba_vars_st vba;
 	struct dal_logger *logger;
drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h +2 -5
index 27e20460c71b..baf182177736 100644
@@ -27,7 +27,6 @@
 
 typedef struct _vcs_dpi_voltage_scaling_st	voltage_scaling_st;
 typedef struct _vcs_dpi_soc_bounding_box_st	soc_bounding_box_st;
-typedef struct _vcs_dpi_mode_evaluation_st	mode_evaluation_st;
 typedef struct _vcs_dpi_ip_params_st	ip_params_st;
 typedef struct _vcs_dpi_display_pipe_source_params_st	display_pipe_source_params_st;
 typedef struct _vcs_dpi_display_output_params_st	display_output_params_st;
@@ -60,10 +59,6 @@ typedef struct _vcs_dpi_display_dlg_prefetch_param_st	display_dlg_prefetch_param
 typedef struct _vcs_dpi_display_pipe_clock_st	display_pipe_clock_st;
 typedef struct _vcs_dpi_display_arb_params_st	display_arb_params_st;
 
-struct _vcs_dpi_mode_evaluation_st {
-	int voltage_override;
-};
-
 struct _vcs_dpi_voltage_scaling_st {
 	int state;
 	double dscclk_mhz;
@@ -96,6 +91,7 @@ struct	_vcs_dpi_soc_bounding_box_st	{
 	double fabric_datapath_to_dcn_data_return_bytes;
 	double dcn_downspread_percent;
 	double dispclk_dppclk_vco_speed_mhz;
+	double dfs_vco_period_ps;
 	unsigned int	round_trip_ping_latency_dcfclk_cycles;
 	unsigned int	urgent_out_of_order_return_per_channel_bytes;
 	unsigned int	channel_interleave_bytes;
@@ -105,6 +101,7 @@ struct	_vcs_dpi_soc_bounding_box_st	{
 	double	dram_clock_change_latency_us;
 	double	writeback_dram_clock_change_latency_us;
 	unsigned int	return_bus_width_bytes;
+	unsigned int	voltage_override;
 	double	xfc_bus_transport_time_us;
 	double	xfc_xbuf_latency_tolerance_us;
 	struct _vcs_dpi_voltage_scaling_st clock_limits[7];
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.c +1 -8
index ffd1d8d10bdf..e337c2cf2c09 100644
@@ -251,19 +251,14 @@ unsigned int dml_get_voltage_level(
 		const display_e2e_pipe_params_st *pipes,
 		unsigned int num_pipes)
 {
-	bool need_recalculate = memcmp(
-			&mode_lib->soc,
-			&mode_lib->vba.soc,
-			sizeof(mode_lib->vba.soc)) != 0
+	bool need_recalculate = memcmp(&mode_lib->soc, &mode_lib->vba.soc, sizeof(mode_lib->vba.soc)) != 0
 			|| memcmp(&mode_lib->ip, &mode_lib->vba.ip, sizeof(mode_lib->vba.ip)) != 0
-			|| memcmp(&mode_lib->me, &mode_lib->vba.me, sizeof(mode_lib->vba.me)) != 0
 			|| num_pipes != mode_lib->vba.cache_num_pipes
 			|| memcmp(pipes, mode_lib->vba.cache_pipes,
 					sizeof(display_e2e_pipe_params_st) * num_pipes) != 0;
 
 	mode_lib->vba.soc = mode_lib->soc;
 	mode_lib->vba.ip = mode_lib->ip;
-	mode_lib->vba.me = mode_lib->me;
 	memcpy(mode_lib->vba.cache_pipes, pipes, sizeof(*pipes) * num_pipes);
 	mode_lib->vba.cache_num_pipes = num_pipes;
 
@@ -772,7 +767,6 @@ static void recalculate_params(
 	// This is only safe to use memcmp because there are non-POD types in struct display_mode_lib
 	if (memcmp(&mode_lib->soc, &mode_lib->vba.soc, sizeof(mode_lib->vba.soc)) != 0
 			|| memcmp(&mode_lib->ip, &mode_lib->vba.ip, sizeof(mode_lib->vba.ip)) != 0
-			|| memcmp(&mode_lib->me, &mode_lib->vba.me, sizeof(mode_lib->vba.me)) != 0
 			|| num_pipes != mode_lib->vba.cache_num_pipes
 			|| memcmp(
 					pipes,
@@ -780,7 +774,6 @@ static void recalculate_params(
 					sizeof(display_e2e_pipe_params_st) * num_pipes) != 0) {
 		mode_lib->vba.soc = mode_lib->soc;
 		mode_lib->vba.ip = mode_lib->ip;
-		mode_lib->vba.me = mode_lib->me;
 		memcpy(mode_lib->vba.cache_pipes, pipes, sizeof(*pipes) * num_pipes);
 		mode_lib->vba.cache_num_pipes = num_pipes;
 		recalculate(mode_lib);
drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +0 -1
index 4b8c1b911f17..c8d1a0539541 100644
@@ -98,7 +98,6 @@ bool Calculate256BBlockSizes(
 struct vba_vars_st {
 	ip_params_st	ip;
 	soc_bounding_box_st	soc;
-	mode_evaluation_st me;
 
 	unsigned int MaximumMaxVStartupLines;
 	double cursor_bw[DC__NUM_DPP__MAX];
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx