All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel"
@ 2021-01-08 10:48 Konstantin Kharlamov
  2021-01-08 10:58 ` Konstantin Kharlamov
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Kharlamov @ 2021-01-08 10:48 UTC (permalink / raw)
  To: amd-gfx; +Cc: alexander.deucher, Naveed.Ashfaq

This reverts commit a861736dae644a0d7abbca0c638ae6aad28feeb8.

This commit led to a power regression where AMD cards draw lots of power
while being idle.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1407
Cc: <stable@vger.kernel.org> # 5.10
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
---
 .../amd/display/dc/dml/dcn20/display_mode_vba_20v2.c  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
index 860e72a51534..80170f9721ce 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
@@ -2635,14 +2635,15 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
 	}
 
 	if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
-			mode_lib->vba.MinActiveDRAMClockChangeMargin > 60 &&
-			mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
+			mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
 		mode_lib->vba.DRAMClockChangeWatermark += 25;
 
 		for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
-			if (mode_lib->vba.DRAMClockChangeWatermark >
-			dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark))
-				mode_lib->vba.MinTTUVBlank[k] += 25;
+			if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
+				if (mode_lib->vba.DRAMClockChangeWatermark >
+				dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark))
+					mode_lib->vba.MinTTUVBlank[k] += 25;
+			}
 		}
 
 		mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
-- 
2.30.0

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

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

* Re: [PATCH] Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel"
  2021-01-08 10:48 [PATCH] Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel" Konstantin Kharlamov
@ 2021-01-08 10:58 ` Konstantin Kharlamov
  0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Kharlamov @ 2021-01-08 10:58 UTC (permalink / raw)
  To: amd-gfx; +Cc: alexander.deucher, Naveed.Ashfaq

Oh, I just found on ML archive that the revert already was sent. Disregard then
this email. It's just that nobody mentioned on the gitlab thread that revert was
sent, so I decided to go ahead. Nice to know revert is on ML already ☺

On Fri, 2021-01-08 at 13:48 +0300, Konstantin Kharlamov wrote:
> This reverts commit a861736dae644a0d7abbca0c638ae6aad28feeb8.
> 
> This commit led to a power regression where AMD cards draw lots of power
> while being idle.
> 
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1407
> Cc: <stable@vger.kernel.org> # 5.10
> Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> ---
>  .../amd/display/dc/dml/dcn20/display_mode_vba_20v2.c  | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
> b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
> index 860e72a51534..80170f9721ce 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
> @@ -2635,14 +2635,15 @@ static void
> dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
>         }
>  
>         if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
> -                       mode_lib->vba.MinActiveDRAMClockChangeMargin > 60 &&
> -                       mode_lib->vba.PrefetchMode[mode_lib-
> >vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
> +                       mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
>                 mode_lib->vba.DRAMClockChangeWatermark += 25;
>  
>                 for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
> -                       if (mode_lib->vba.DRAMClockChangeWatermark >
> -                       dml_max(mode_lib->vba.StutterEnterPlusExitWatermark,
> mode_lib->vba.UrgentWatermark))
> -                               mode_lib->vba.MinTTUVBlank[k] += 25;
> +                       if (mode_lib->vba.PrefetchMode[mode_lib-
> >vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
> +                               if (mode_lib->vba.DRAMClockChangeWatermark >
> +                               dml_max(mode_lib-
> >vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark))
> +                                       mode_lib->vba.MinTTUVBlank[k] += 25;
> +                       }
>                 }
>  
>                 mode_lib->vba.DRAMClockChangeSupport[0][0] =
> dm_dram_clock_change_vactive;


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

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

* Re: [PATCH] Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel"
  2021-01-07 21:23 Rodrigo Siqueira
@ 2021-01-07 22:15 ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2021-01-07 22:15 UTC (permalink / raw)
  To: Rodrigo Siqueira
  Cc: Naveed Ashfaq, Roman Li, amd-gfx list, Aurabindo Pillai,
	Hersen Wu, Alex Deucher, Harry Wentland

On Thu, Jan 7, 2021 at 4:23 PM Rodrigo Siqueira
<Rodrigo.Siqueira@amd.com> wrote:
>
> The patch
>
> commit a861736dae64 ("drm/amd/display: Fixed Intermittent blue screen on OLED panel")
>
> causes power regression for many users. It seems that this change causes
> the MCLK to get forced high; this creates a regression for many users
> since their devices were not able to drop to a low state after this
> change. For this reason, this reverts commit
> a861736dae644a0d7abbca0c638ae6aad28feeb8.
>
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1407
> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Naveed Ashfaq <Naveed.Ashfaq@amd.com>
> Cc: Hersen Wu <hersenxs.wu@amd.com>
> Cc: Roman Li <roman.li@amd.com>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  .../amd/display/dc/dml/dcn20/display_mode_vba_20v2.c  | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
> index 860e72a51534..80170f9721ce 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
> @@ -2635,14 +2635,15 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
>         }
>
>         if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
> -                       mode_lib->vba.MinActiveDRAMClockChangeMargin > 60 &&
> -                       mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
> +                       mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
>                 mode_lib->vba.DRAMClockChangeWatermark += 25;
>
>                 for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
> -                       if (mode_lib->vba.DRAMClockChangeWatermark >
> -                       dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark))
> -                               mode_lib->vba.MinTTUVBlank[k] += 25;
> +                       if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
> +                               if (mode_lib->vba.DRAMClockChangeWatermark >
> +                               dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark))
> +                                       mode_lib->vba.MinTTUVBlank[k] += 25;
> +                       }
>                 }
>
>                 mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
> --
> 2.25.1
>
> _______________________________________________
> 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] 4+ messages in thread

* [PATCH] Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel"
@ 2021-01-07 21:23 Rodrigo Siqueira
  2021-01-07 22:15 ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Siqueira @ 2021-01-07 21:23 UTC (permalink / raw)
  To: amd-gfx
  Cc: Naveed Ashfaq, Roman Li, Aurabindo Pillai, Hersen Wu,
	Alex Deucher, Harry Wentland

The patch

commit a861736dae64 ("drm/amd/display: Fixed Intermittent blue screen on OLED panel")

causes power regression for many users. It seems that this change causes
the MCLK to get forced high; this creates a regression for many users
since their devices were not able to drop to a low state after this
change. For this reason, this reverts commit
a861736dae644a0d7abbca0c638ae6aad28feeb8.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1407
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Naveed Ashfaq <Naveed.Ashfaq@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Cc: Roman Li <roman.li@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
---
 .../amd/display/dc/dml/dcn20/display_mode_vba_20v2.c  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
index 860e72a51534..80170f9721ce 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20v2.c
@@ -2635,14 +2635,15 @@ static void dml20v2_DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndP
 	}
 
 	if (mode_lib->vba.DRAMClockChangeSupportsVActive &&
-			mode_lib->vba.MinActiveDRAMClockChangeMargin > 60 &&
-			mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
+			mode_lib->vba.MinActiveDRAMClockChangeMargin > 60) {
 		mode_lib->vba.DRAMClockChangeWatermark += 25;
 
 		for (k = 0; k < mode_lib->vba.NumberOfActivePlanes; ++k) {
-			if (mode_lib->vba.DRAMClockChangeWatermark >
-			dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark))
-				mode_lib->vba.MinTTUVBlank[k] += 25;
+			if (mode_lib->vba.PrefetchMode[mode_lib->vba.VoltageLevel][mode_lib->vba.maxMpcComb] == 0) {
+				if (mode_lib->vba.DRAMClockChangeWatermark >
+				dml_max(mode_lib->vba.StutterEnterPlusExitWatermark, mode_lib->vba.UrgentWatermark))
+					mode_lib->vba.MinTTUVBlank[k] += 25;
+			}
 		}
 
 		mode_lib->vba.DRAMClockChangeSupport[0][0] = dm_dram_clock_change_vactive;
-- 
2.25.1

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

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

end of thread, other threads:[~2021-01-08 10:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 10:48 [PATCH] Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel" Konstantin Kharlamov
2021-01-08 10:58 ` Konstantin Kharlamov
  -- strict thread matches above, loose matches on Subject: below --
2021-01-07 21:23 Rodrigo Siqueira
2021-01-07 22:15 ` Alex Deucher

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.