Skip to contentSkip to conversation

Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

DISCUSSION Michel Dänzer 4 participants 4 messages Mar 30, 2017 – Mar 31, 2017 2 messages not in the archive

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

Hi Rex,

Andy bisected a regression to your commit
91561a39fa74e79b88e0e9d70f3072501c8df2ce, see
https://bugs.freedesktop.org/100395 . Any ideas?

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
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): 4bf14806-e715-5206-bee1-2fb0ffb35e27-otUistvHUpPR7s880joybQ@public.gmane.org

#2 lore raw
Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, March 29, 2017 11:11 PM
To: Zhu, Rex
Cc: Andy Furniss; [email protected]
Subject: Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

Quoted 6 lines

Hi Rex,

Andy bisected a regression to your commit
91561a39fa74e79b88e0e9d70f3072501c8df2ce, see
https://bugs.freedesktop.org/100395 . Any ideas?

http://ontrack-internal.amd.com/browse/SWDEV-117097

Alex

Quoted 9 lines

--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1652A69F5052FDBB3EE89D2EF7340-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw
Quoted 10 lines · Alexander
Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, March 29, 2017 11:11 PM
To: Zhu, Rex
Cc: Andy Furniss; [email protected]
Subject: Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

Quoted 8 lines
Quoted 6 lines

Hi Rex,

Andy bisected a regression to your commit
91561a39fa74e79b88e0e9d70f3072501c8df2ce, see
https://bugs.freedesktop.org/100395 . Any ideas?

http://ontrack-internal.amd.com/browse/SWDEV-117097

Whoops, internal link. Anyway, the issue is dal wasn't filling in some info for older asics for they ended up set to 0.

Alex

Quoted 12 lines

Alex

Quoted 9 lines

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

Quoted 4 lines

_______________________________________________
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

Reviewed-by Rex Zhu Reviewed-by Tony Cheng
#5 lore raw
In reply to a message not in the archive

Hi Andy,

Thanks for bisecting the issue. I've attached a patch which should fix the issue, if you'd like to give it a try.

Thanks,
Jordan

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Deucher, Alexander
Sent: Wednesday, March 29, 2017 11:19 PM
To: 'Michel Dänzer' <[email protected]>; Zhu, Rex <[email protected]>
Cc: Andy Furniss <[email protected]>; [email protected]
Subject: RE: Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

Quoted 10 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, March 29, 2017 11:11 PM
To: Zhu, Rex
Cc: Andy Furniss; [email protected]
Subject: Regression caused by "drm/amdgpu: get display info from DC when DC enabled."

Quoted 6 lines

Hi Rex,

Andy bisected a regression to your commit
91561a39fa74e79b88e0e9d70f3072501c8df2ce, see
https://bugs.freedesktop.org/100395 . Any ideas?

http://ontrack-internal.amd.com/browse/SWDEV-117097

Alex

Quoted 9 lines

--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
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

From de3fab7ca50746385bd07e2a90131019c88fa215 Mon Sep 17 00:00:00 2001
From: Jordan Lazare <[email protected]>
Date: Thu, 30 Mar 2017 13:08:34 -0400
Subject: [PATCH] drm/amd/display: Fill in vrefresh and min_vblank_time for
dce8/dce10

PPLib is now calling into DC to get vrefresh and min_vblank_time, but since full bandwidth calcs are missing for those generations, the pplib structures were never being filled. This change fills the currently required fields to prevent screen corruption.

---
 .../drm/amd/display/dc/dce100/dce100_hw_sequencer.c | 21 +++++++++++++++++++++
 .../drm/amd/display/dc/dce100/dce100_hw_sequencer.h |  5 +++++
 .../drm/amd/display/dc/dce110/dce110_hw_sequencer.c |  8 ++++----
 .../drm/amd/display/dc/dce110/dce110_hw_sequencer.h |  8 ++++++++
 .../drm/amd/display/dc/dce80/dce80_hw_sequencer.c   |  2 ++
 5 files changed, 40 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c +21 -0
index bd8e19f..f11044e 100644
@@ -104,6 +104,26 @@ static bool dce100_enable_display_power_gating(
 		return false;
 }
 
+void dce100_pplib_apply_display_requirements(
+	struct core_dc *dc,
+	struct validate_context *context)
+{
+	struct dm_pp_display_configuration *pp_display_cfg = &context->pp_display_cfg;
+
+	pp_display_cfg->avail_mclk_switch_time_us =
+						dce110_get_min_vblank_time_us(context);
+
+	dce110_fill_display_configs(context, pp_display_cfg);
+
+	if (memcmp(&dc->prev_display_config, pp_display_cfg, sizeof(
+			struct dm_pp_display_configuration)) !=  0)
+		dm_pp_apply_display_requirements(dc->ctx, pp_display_cfg);
+
+	dc->prev_display_config = *pp_display_cfg;
+}
+
+
+
 static void set_displaymarks(
 		const struct core_dc *dc, struct validate_context *context)
 {
@@ -116,6 +136,7 @@ static void set_bandwidth(
 		bool decrease_allowed)
 {
 	dc->hwss.set_displaymarks(dc, context);
+	dce100_pplib_apply_display_requirements(dc, context);
 }
 
 
drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h +5 -0
index cf497ea..f51d04a 100644
@@ -29,8 +29,13 @@
 #include "core_types.h"
 
 struct core_dc;
+struct validate_context;
 
 bool dce100_hw_sequencer_construct(struct core_dc *dc);
 
+void dce100_pplib_apply_display_requirements(
+	struct core_dc *dc,
+	struct validate_context *context);
+
 #endif /* __DC_HWSS_DCE100_H__ */
 
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +4 -4
index 2a3a39e..839c344 100644
@@ -2097,7 +2097,7 @@ static void init_hw(struct core_dc *dc)
 	}
 }
 
-static void fill_display_configs(
+void dce110_fill_display_configs(
 	const struct validate_context *context,
 	struct dm_pp_display_configuration *pp_display_cfg)
 {
@@ -2146,7 +2146,7 @@ static void fill_display_configs(
 	pp_display_cfg->display_count = num_cfgs;
 }
 
-static uint32_t get_min_vblank_time_us(const struct validate_context *context)
+uint32_t dce110_get_min_vblank_time_us(const struct validate_context *context)
 {
 	uint8_t j;
 	uint32_t min_vertical_blank_time = -1;
@@ -2224,13 +2224,13 @@ static void pplib_apply_display_requirements(
 			= context->bw_results.required_sclk_deep_sleep;
 
 	pp_display_cfg->avail_mclk_switch_time_us =
-						get_min_vblank_time_us(context);
+						dce110_get_min_vblank_time_us(context);
 	/* TODO: dce11.2*/
 	pp_display_cfg->avail_mclk_switch_time_in_disp_active_us = 0;
 
 	pp_display_cfg->disp_clk_khz = context->dispclk_khz;
 
-	fill_display_configs(context, pp_display_cfg);
+	dce110_fill_display_configs(context, pp_display_cfg);
 
 	/* TODO: is this still applicable?*/
 	if (pp_display_cfg->display_count == 1) {
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.h +8 -0
index a6b4d0d..52462c1 100644
@@ -30,6 +30,8 @@
 
 #define GAMMA_HW_POINTS_NUM 256
 struct core_dc;
+struct validate_context;
+struct dm_pp_display_configuration;
 
 bool dce110_hw_sequencer_construct(struct core_dc *dc);
 
@@ -58,5 +60,11 @@ void dce110_unblank_stream(struct pipe_ctx *pipe_ctx,
 
 void dce110_update_pending_status(struct pipe_ctx *pipe_ctx);
 
+void dce110_fill_display_configs(
+	const struct validate_context *context,
+	struct dm_pp_display_configuration *pp_display_cfg);
+
+uint32_t dce110_get_min_vblank_time_us(const struct validate_context *context);
+
 #endif /* __DC_HWSS_DCE110_H__ */
 
drivers/gpu/drm/amd/display/dc/dce80/dce80_hw_sequencer.c +2 -0
index 85a54d9..9d4e7d8 100644
@@ -31,6 +31,7 @@
 
 #include "dce/dce_hwseq.h"
 #include "dce110/dce110_hw_sequencer.h"
+#include "dce100/dce100_hw_sequencer.h"
 
 /* include DCE8 register header files */
 #include "dce/dce_8_0_d.h"
@@ -118,6 +119,7 @@ static void set_bandwidth(
 		bool decrease_allowed)
 {
 	dc->hwss.set_displaymarks(dc, context);
+	dce100_pplib_apply_display_requirements(dc, context);
 }
 
 
Signature · 1 line
1.9.1

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