drm/amd/powerplay: convert the sclk/mclk into Mhz for comparation
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: convert the sclk/mclk into Mhz for comparation
Convert the clocks into right Mhz unit. Otherwise, it will miss the equal situation.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +2 -2
@@ -1881,7 +1881,7 @@ static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 == now /100 ) ?"*" :"" );break ;case PP_MCLK :
@@ -1897,7 +1897,7 @@ static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 == now /100 ) ?"*" :"" );break ;case PP_PCIE :
Signature · 6 lines
2.18.0 _______________________________________________ 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): [email protected]
Huang Rui
Reviewed-byQuoted 5 lines · Evan Quan
Convert the clocks into right Mhz unit. Otherwise, it will miss the equal situation.
Change-Id I80e1af975715712f5ddef4ca6a6e356d90932613Signed-off-by Evan Quan <[email protected]>
Quoted 33 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +2
-2@@ -1881,7 +1881,7 @@ static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 == now /100 ) ?"*" :"" );break ;case PP_MCLK :@@ -1897,7 +1897,7 @@ static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 == now /100 ) ?"*" :"" );break ;case PP_PCIE :Signature · 6 lines
2.18.0 _______________________________________________ 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
Alex Deucher
Reviewed-byQuoted 14 lines · Evan Quan
Convert the clocks into right Mhz unit. Otherwise, it will miss the equal situation.
Change-Id I80e1af975715712f5ddef4ca6a6e356d90932613Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-0
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr, · line 1884
Quoted 5 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +1
-1@@ -1881,7 +1881,7 @@ static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 == now /100 ) ?"*" :"" );
You could simplify this to:
(clocks.data[i].clocks_in_khz / 10 == now) ? "*" : "");
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr, · line 1900
Quoted 9 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +1
-1break ;case PP_MCLK :@@ -1897,7 +1897,7 @@ static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 == now /100 ) ?"*" :"" );
Same here. Either way:
Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-1break ;case PP_PCIE : --2.18.0
_______________________________________________
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): CADnq5_M+OQDMjaHbXHoOMHVfSrQbGSLoz4gHNvYZiJCCjtwe7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 3 lines
You could simplify this to:
(clocks.data[i].clocks_in_khz / 10 == now) ? "*" : "");
It cannot be simplified as this. Since we need to do comparation in Mhz. Otherwise we will miss the 'equal' situation.
Regards,
Evan
Quoted 48 lines
-----Original Message-----
From: Alex Deucher [mailto:[email protected]]
Sent: Wednesday, July 11, 2018 11:35 PM
To: Quan, Evan <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amd/powerplay: convert the sclk/mclk into Mhz for comparationdrivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct
Quoted 15 lines · Evan Quan
Convert the clocks into right Mhz unit. Otherwise, it will miss the equal situation.
Change-Id I80e1af975715712f5ddef4ca6a6e356d90932613Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-0@@ -1881,7 +1881,7 @@ static int vega12_print_clock_levels(struct
pp_hwmgr*hwmgr,drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,
Quoted 6 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +2
-1for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 + == now /100 ) ?"*" :"" );You could simplify this to:
(clocks.data[i].clocks_in_khz / 10 == now) ? "*" : "");drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-0break ;case PP_MCLK :@@ -1897,7 +1897,7 @@ static int vega12_print_clock_levels(struct
pp_hwmgr*hwmgr,drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,
Quoted 6 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +2
-1for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 + == now /100 ) ?"*" :"" );
Quoted 13 lines
Same here. Either way:
Reviewed-by Alex Deucher <[email protected]>Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-1break ;case PP_PCIE : --2.18.0
_______________________________________________
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): SN6PR12MB265670F9019D1B6B213E4B30E4590-kxOKjb6HO/FeL/[email protected]
Alex Deucher
Reviewed-byQuoted 5 lines · Evan
Quoted 3 lines
You could simplify this to:
(clocks.data[i].clocks_in_khz / 10 == now) ? "*" : "");It cannot be simplified as this. Since we need to do comparation in Mhz. Otherwise we will miss the 'equal' situation.
Ah I see,
Alex
Quoted 64 lines
Regards,
EvanQuoted 61 lines
-----Original Message-----
From: Alex Deucher [mailto:[email protected]]
Sent: Wednesday, July 11, 2018 11:35 PM
To: Quan, Evan <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH] drm/amd/powerplay: convert the sclk/mclk into Mhz for comparationdrivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct
Quoted 15 lines · Evan Quan
Convert the clocks into right Mhz unit. Otherwise, it will miss the equal situation.
Change-Id I80e1af975715712f5ddef4ca6a6e356d90932613Signed-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-0@@ -1881,7 +1881,7 @@ static int vega12_print_clock_levels(struct
pp_hwmgr*hwmgr,drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,
Quoted 6 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +2
-1for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 + == now /100 ) ?"*" :"" );You could simplify this to:
(clocks.data[i].clocks_in_khz / 10 == now) ? "*" : "");drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct
Quoted 4 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-0break ;case PP_MCLK :@@ -1897,7 +1897,7 @@ static int vega12_print_clock_levels(struct
pp_hwmgr*hwmgr,drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,
Quoted 6 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +2
-1for (i =0 ; i < clocks.num_levels; i++) size +=sprintf (buf + size,"%d: %uMhz %s\n" , i, clocks.data[i].clocks_in_khz /1000 , - (clocks.data[i].clocks_in_khz /1000 == now) ?"*" :"" ); + (clocks.data[i].clocks_in_khz /1000 + == now /100 ) ?"*" :"" );Same here. Either way:
Reviewed-by Alex Deucher <[email protected]>Quoted 10 lines
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +0
-1break ;case PP_PCIE : --2.18.0
_______________________________________________
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