All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Include names of all PP clock types
@ 2019-01-13 13:24 Rafał Miłecki
       [not found] ` <20190113132407.13169-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Rafał Miłecki @ 2019-01-13 13:24 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher
  Cc: Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

This fixes printing clock names in cases like:
[    5.352311] [drm] DM_PPLIB: values for Invalid clock
[    5.352313] [drm] DM_PPLIB:   400000 in kHz
[    5.352313] [drm] DM_PPLIB:   933000 in kHz
[    5.352314] [drm] DM_PPLIB:   1067000 in kHz
[    5.352315] [drm] DM_PPLIB:   1200000 in kHz
[    5.352317] [drm] DM_PPLIB: values for Invalid clock
[    5.352318] [drm] DM_PPLIB:   300000 in kHz
[    5.352318] [drm] DM_PPLIB:   600000 in kHz
[    5.352319] [drm] DM_PPLIB:   626000 in kHz
[    5.352320] [drm] DM_PPLIB:   654000 in kHz
(source: HP EliteBook 745 G5 w. RAVEN 0x1002:0x15DD 0x103C:0x83D5 0xD1)

On my system above "Invalid" names got replaced by "F" and "DCF".

The same problem was occurring on Huawei Matebook D with just 667000 kHz
instead of 400000 kHz.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 drivers/gpu/drm/amd/display/dc/dm_services_types.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dm_services_types.h b/drivers/gpu/drm/amd/display/dc/dm_services_types.h
index 1af8c777b3ac..9afd36a031a9 100644
--- a/drivers/gpu/drm/amd/display/dc/dm_services_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dm_services_types.h
@@ -82,7 +82,15 @@ enum dm_pp_clock_type {
 #define DC_DECODE_PP_CLOCK_TYPE(clk_type) \
 	(clk_type) == DM_PP_CLOCK_TYPE_DISPLAY_CLK ? "Display" : \
 	(clk_type) == DM_PP_CLOCK_TYPE_ENGINE_CLK ? "Engine" : \
-	(clk_type) == DM_PP_CLOCK_TYPE_MEMORY_CLK ? "Memory" : "Invalid"
+	(clk_type) == DM_PP_CLOCK_TYPE_MEMORY_CLK ? "Memory" : \
+	(clk_type) == DM_PP_CLOCK_TYPE_DCFCLK ? "DCF" : \
+	(clk_type) == DM_PP_CLOCK_TYPE_DCEFCLK ? "DCEF" : \
+	(clk_type) == DM_PP_CLOCK_TYPE_SOCCLK ? "SoC" : \
+	(clk_type) == DM_PP_CLOCK_TYPE_PIXELCLK ? "Pixel" : \
+	(clk_type) == DM_PP_CLOCK_TYPE_DISPLAYPHYCLK ? "Display PHY" : \
+	(clk_type) == DM_PP_CLOCK_TYPE_DPPCLK ? "DPP" : \
+	(clk_type) == DM_PP_CLOCK_TYPE_FCLK ? "F" : \
+	"Invalid"
 
 #define DM_PP_MAX_CLOCK_LEVELS 8
 
-- 
2.20.1

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

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

* Re: [PATCH] drm/amd/display: Include names of all PP clock types
       [not found] ` <20190113132407.13169-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2019-01-14 17:47   ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2019-01-14 17:47 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: Rafał Miłecki, amd-gfx list

On Sun, Jan 13, 2019 at 8:24 AM Rafał Miłecki <zajec5@gmail.com> wrote:
>
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This fixes printing clock names in cases like:
> [    5.352311] [drm] DM_PPLIB: values for Invalid clock
> [    5.352313] [drm] DM_PPLIB:   400000 in kHz
> [    5.352313] [drm] DM_PPLIB:   933000 in kHz
> [    5.352314] [drm] DM_PPLIB:   1067000 in kHz
> [    5.352315] [drm] DM_PPLIB:   1200000 in kHz
> [    5.352317] [drm] DM_PPLIB: values for Invalid clock
> [    5.352318] [drm] DM_PPLIB:   300000 in kHz
> [    5.352318] [drm] DM_PPLIB:   600000 in kHz
> [    5.352319] [drm] DM_PPLIB:   626000 in kHz
> [    5.352320] [drm] DM_PPLIB:   654000 in kHz
> (source: HP EliteBook 745 G5 w. RAVEN 0x1002:0x15DD 0x103C:0x83D5 0xD1)
>
> On my system above "Invalid" names got replaced by "F" and "DCF".
>
> The same problem was occurring on Huawei Matebook D with just 667000 kHz
> instead of 400000 kHz.
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/display/dc/dm_services_types.h | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dm_services_types.h b/drivers/gpu/drm/amd/display/dc/dm_services_types.h
> index 1af8c777b3ac..9afd36a031a9 100644
> --- a/drivers/gpu/drm/amd/display/dc/dm_services_types.h
> +++ b/drivers/gpu/drm/amd/display/dc/dm_services_types.h
> @@ -82,7 +82,15 @@ enum dm_pp_clock_type {
>  #define DC_DECODE_PP_CLOCK_TYPE(clk_type) \
>         (clk_type) == DM_PP_CLOCK_TYPE_DISPLAY_CLK ? "Display" : \
>         (clk_type) == DM_PP_CLOCK_TYPE_ENGINE_CLK ? "Engine" : \
> -       (clk_type) == DM_PP_CLOCK_TYPE_MEMORY_CLK ? "Memory" : "Invalid"
> +       (clk_type) == DM_PP_CLOCK_TYPE_MEMORY_CLK ? "Memory" : \
> +       (clk_type) == DM_PP_CLOCK_TYPE_DCFCLK ? "DCF" : \
> +       (clk_type) == DM_PP_CLOCK_TYPE_DCEFCLK ? "DCEF" : \
> +       (clk_type) == DM_PP_CLOCK_TYPE_SOCCLK ? "SoC" : \
> +       (clk_type) == DM_PP_CLOCK_TYPE_PIXELCLK ? "Pixel" : \
> +       (clk_type) == DM_PP_CLOCK_TYPE_DISPLAYPHYCLK ? "Display PHY" : \
> +       (clk_type) == DM_PP_CLOCK_TYPE_DPPCLK ? "DPP" : \
> +       (clk_type) == DM_PP_CLOCK_TYPE_FCLK ? "F" : \
> +       "Invalid"
>
>  #define DM_PP_MAX_CLOCK_LEVELS 8
>
> --
> 2.20.1
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-13 13:24 [PATCH] drm/amd/display: Include names of all PP clock types Rafał Miłecki
     [not found] ` <20190113132407.13169-1-zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-01-14 17:47   ` 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.