[PATCH umr] Add AI sensors to --top

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 04/07/2017 08:47 PM, Tom St Denis wrote:
> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
> ---
>  src/app/top.c | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/src/app/top.c b/src/app/top.c
> index b8a91e317ba5..96e33ff2e1da 100644
> --- a/src/app/top.c
> +++ b/src/app/top.c
> @@ -252,6 +252,15 @@ static struct umr_bitfield stat_si_sensor_bits[] = {
>  	{ NULL, 0, 0, NULL },
>  };
>  
> +static struct umr_bitfield stat_ai_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 },
> +};
> +
> +
>  #define AMDGPU_INFO_NUM_BYTES_MOVED		0x0f
>  #define AMDGPU_INFO_VRAM_USAGE			0x10
>  #define AMDGPU_INFO_GTT_USAGE			0x11
> @@ -794,7 +803,10 @@ static void top_build_vi_program(struct umr_asic *asic)
>  		ENTRY(i++, "mmRLC_GPM_STAT", &stat_rlc_gpm_bits[0], &top_options.vi.gfxpwr, "GFX PWR");
>  
>  	// sensors
> -	if (asic->config.gfx.family == 135) {
> +	if (asic->config.gfx.family == 141) {
> +		// Arctic Island Family
> +		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_ai_sensor_bits[0], &top_options.vi.sensors, "Sensors");
> +	} else if (asic->config.gfx.family == 135) {
>  		// Carrizo/Stoney family
>  		ENTRY_SENSOR(i++, "GFX_SCLK", &stat_carrizo_sensor_bits[0], &top_options.vi.sensors, "Sensors");
>  	} else if (asic->config.gfx.family == 130) {
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20170408/fd27e53d/attachment-0001.sig>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux