All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH umr] Add SENSOR for SI/CIK/KV systems.
@ 2017-02-17 19:26 Tom St Denis
       [not found] ` <20170217192644.4554-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Tom St Denis @ 2017-02-17 19:26 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
 src/app/top.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/src/app/top.c b/src/app/top.c
index 92ab8ab854af..c97a0c9d93ab 100644
--- a/src/app/top.c
+++ b/src/app/top.c
@@ -231,6 +231,27 @@ static struct umr_bitfield stat_vi_sensor_bits[] = {
 	{ NULL, 0, 0, NULL },
 };
 
+static struct umr_bitfield stat_cik_sensor_bits[] = {
+	{ "GFX_SCLK", AMDGPU_PP_SENSOR_GFX_SCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
+	{ "GFX_MCLK", AMDGPU_PP_SENSOR_GFX_MCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
+	{ "GPU_LOAD", AMDGPU_PP_SENSOR_GPU_LOAD, SENSOR_PERCENT<<4, &umr_bitfield_default },
+	{ "GPU_TEMP", AMDGPU_PP_SENSOR_GPU_TEMP, SENSOR_D1000|(SENSOR_TEMP<<4), &umr_bitfield_default },
+	{ NULL, 0, 0, NULL },
+};
+
+static struct umr_bitfield stat_kaveri_sensor_bits[] = {
+	{ "GFX_SCLK", AMDGPU_PP_SENSOR_GFX_SCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
+	{ "GPU_TEMP", AMDGPU_PP_SENSOR_GPU_TEMP, SENSOR_D1000|(SENSOR_TEMP<<4), &umr_bitfield_default },
+	{ NULL, 0, 0, NULL },
+};
+
+static struct umr_bitfield stat_si_sensor_bits[] = {
+	{ "GFX_SCLK", AMDGPU_PP_SENSOR_GFX_SCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
+	{ "GFX_MCLK", AMDGPU_PP_SENSOR_GFX_MCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
+	{ "GPU_TEMP", AMDGPU_PP_SENSOR_GPU_TEMP, SENSOR_D1000|(SENSOR_TEMP<<4), &umr_bitfield_default },
+	{ NULL, 0, 0, NULL },
+};
+
 #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f
 #define AMDGPU_INFO_VRAM_USAGE			0x10
 #define AMDGPU_INFO_GTT_USAGE			0x11
@@ -774,6 +795,15 @@ static void top_build_vi_program(struct umr_asic *asic)
 	} else if (asic->config.gfx.family == 130) {
 		// Volcanic Islands Family
 		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_vi_sensor_bits[0], &top_options.vi.sensors, "Sensors");
+	} else if (asic->config.gfx.family == 125) {
+		// Fusion
+		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_kaveri_sensor_bits[0], &top_options.vi.sensors, "Sensors");
+	} else if (asic->config.gfx.family == 120) {
+		// CIK
+		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_cik_sensor_bits[0], &top_options.vi.sensors, "Sensors");
+	} else if (asic->config.gfx.family == 110) {
+		// SI
+		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_si_sensor_bits[0], &top_options.vi.sensors, "Sensors");
 	}
 
 	// More GFX bits
-- 
2.11.0

_______________________________________________
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 umr] Add SENSOR for SI/CIK/KV systems.
       [not found] ` <20170217192644.4554-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
@ 2017-02-18  0:30   ` Edward O'Callaghan
  0 siblings, 0 replies; 2+ messages in thread
From: Edward O'Callaghan @ 2017-02-18  0:30 UTC (permalink / raw)
  To: Tom St Denis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis


[-- Attachment #1.1.1: Type: text/plain, Size: 2669 bytes --]

Reviewed-by: Edward O'Callaghan <funfunctor-dczkZgxz+BNUPWh3PAxdjQ@public.gmane.org>

On 02/18/2017 06:26 AM, Tom St Denis wrote:
> Signed-off-by: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
> ---
>  src/app/top.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/src/app/top.c b/src/app/top.c
> index 92ab8ab854af..c97a0c9d93ab 100644
> --- a/src/app/top.c
> +++ b/src/app/top.c
> @@ -231,6 +231,27 @@ static struct umr_bitfield stat_vi_sensor_bits[] = {
>  	{ NULL, 0, 0, NULL },
>  };
>  
> +static struct umr_bitfield stat_cik_sensor_bits[] = {
> +	{ "GFX_SCLK", AMDGPU_PP_SENSOR_GFX_SCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
> +	{ "GFX_MCLK", AMDGPU_PP_SENSOR_GFX_MCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
> +	{ "GPU_LOAD", AMDGPU_PP_SENSOR_GPU_LOAD, SENSOR_PERCENT<<4, &umr_bitfield_default },
> +	{ "GPU_TEMP", AMDGPU_PP_SENSOR_GPU_TEMP, SENSOR_D1000|(SENSOR_TEMP<<4), &umr_bitfield_default },
> +	{ NULL, 0, 0, NULL },
> +};
> +
> +static struct umr_bitfield stat_kaveri_sensor_bits[] = {
> +	{ "GFX_SCLK", AMDGPU_PP_SENSOR_GFX_SCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
> +	{ "GPU_TEMP", AMDGPU_PP_SENSOR_GPU_TEMP, SENSOR_D1000|(SENSOR_TEMP<<4), &umr_bitfield_default },
> +	{ NULL, 0, 0, NULL },
> +};
> +
> +static struct umr_bitfield stat_si_sensor_bits[] = {
> +	{ "GFX_SCLK", AMDGPU_PP_SENSOR_GFX_SCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
> +	{ "GFX_MCLK", AMDGPU_PP_SENSOR_GFX_MCLK, SENSOR_D100|(SENSOR_MHZ<<4), &umr_bitfield_default },
> +	{ "GPU_TEMP", AMDGPU_PP_SENSOR_GPU_TEMP, SENSOR_D1000|(SENSOR_TEMP<<4), &umr_bitfield_default },
> +	{ NULL, 0, 0, NULL },
> +};
> +
>  #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f
>  #define AMDGPU_INFO_VRAM_USAGE			0x10
>  #define AMDGPU_INFO_GTT_USAGE			0x11
> @@ -774,6 +795,15 @@ static void top_build_vi_program(struct umr_asic *asic)
>  	} else if (asic->config.gfx.family == 130) {
>  		// Volcanic Islands Family
>  		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_vi_sensor_bits[0], &top_options.vi.sensors, "Sensors");
> +	} else if (asic->config.gfx.family == 125) {
> +		// Fusion
> +		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_kaveri_sensor_bits[0], &top_options.vi.sensors, "Sensors");
> +	} else if (asic->config.gfx.family == 120) {
> +		// CIK
> +		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_cik_sensor_bits[0], &top_options.vi.sensors, "Sensors");
> +	} else if (asic->config.gfx.family == 110) {
> +		// SI
> +		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_si_sensor_bits[0], &top_options.vi.sensors, "Sensors");
>  	}
>  
>  	// More GFX bits
> 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
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:[~2017-02-18  0:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-17 19:26 [PATCH umr] Add SENSOR for SI/CIK/KV systems Tom St Denis
     [not found] ` <20170217192644.4554-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-02-18  0:30   ` Edward O'Callaghan

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.