# Misc AMDGPU driver information

_Peios Kernel / Hardware and drivers / Graphics / amdgpu_

> Information about the GPU can be obtained on certain cards via sysfs

<a id="rst-misc-amdgpu-driver-information"></a>

<a id="rst-gpu-product-information"></a>

## GPU Product Information

Information about the GPU can be obtained on certain cards via sysfs

<a id="rst-product-name"></a>

### product_name


The amdgpu driver provides a sysfs API for reporting the product name
for the device
The file product_name is used for this and returns the product name
as returned from the FRU.
NOTE: This is only available for certain server cards


<a id="rst-product-number"></a>

### product_number


The amdgpu driver provides a sysfs API for reporting the part number
for the device
The file product_number is used for this and returns the part number
as returned from the FRU.
NOTE: This is only available for certain server cards


<a id="rst-serial-number"></a>

### serial_number


The amdgpu driver provides a sysfs API for reporting the serial number
for the device
The file serial_number is used for this and returns the serial number
as returned from the FRU.
NOTE: This is only available for certain server cards


<a id="rst-fru-id"></a>

### fru_id


The amdgpu driver provides a sysfs API for reporting FRU File Id
for the device.
The file fru_id is used for this and returns the File Id value
as returned from the FRU.
NOTE: This is only available for certain server cards


<a id="rst-manufacturer"></a>

### manufacturer


The amdgpu driver provides a sysfs API for reporting manufacturer name from
FRU information.
The file manufacturer returns the value as returned from the FRU.
NOTE: This is only available for certain server cards


<a id="rst-unique-id"></a>

### unique_id


The amdgpu driver provides a sysfs API for providing a unique ID for the GPU
The file unique_id is used for this.
This will provide a Unique ID that will persist from machine to machine

NOTE: This will only work for GFX9 and newer. This file will be absent
on unsupported ASICs (GFX8 and older)


<a id="rst-board-info"></a>

### board_info


The amdgpu driver provides a sysfs API for giving board related information.
It provides the form factor information in the format

type : form factor

Possible form factor values

- "cem"              - PCIE CEM card
- "oam"              - Open Compute Accelerator Module
- "unknown"  - Not known


<a id="rst-gpu-memory-usage-information"></a>

## GPU Memory Usage Information

Various memory accounting can be accessed via sysfs

<a id="rst-mem-info-vram-total"></a>

### mem_info_vram_total


The amdgpu driver provides a sysfs API for reporting current total VRAM
available on the device
The file mem_info_vram_total is used for this and returns the total
amount of VRAM in bytes


<a id="rst-mem-info-vram-used"></a>

### mem_info_vram_used


The amdgpu driver provides a sysfs API for reporting current total VRAM
available on the device
The file mem_info_vram_used is used for this and returns the total
amount of currently used VRAM in bytes


<a id="rst-mem-info-vis-vram-total"></a>

### mem_info_vis_vram_total


The amdgpu driver provides a sysfs API for reporting current total
visible VRAM available on the device
The file mem_info_vis_vram_total is used for this and returns the total
amount of visible VRAM in bytes


<a id="rst-mem-info-vis-vram-used"></a>

### mem_info_vis_vram_used


The amdgpu driver provides a sysfs API for reporting current total of
used visible VRAM
The file mem_info_vis_vram_used is used for this and returns the total
amount of currently used visible VRAM in bytes


<a id="rst-mem-info-gtt-total"></a>

### mem_info_gtt_total


The amdgpu driver provides a sysfs API for reporting current total size of
the GTT.
The file mem_info_gtt_total is used for this, and returns the total size of
the GTT block, in bytes


<a id="rst-mem-info-gtt-used"></a>

### mem_info_gtt_used


The amdgpu driver provides a sysfs API for reporting current total amount of
used GTT.
The file mem_info_gtt_used is used for this, and returns the current used
size of the GTT block, in bytes


<a id="rst-pcie-accounting-information"></a>

## PCIe Accounting Information

<a id="rst-pcie-bw"></a>

### pcie_bw


The amdgpu driver provides a sysfs API for estimating how much data
has been received and sent by the GPU in the last second through PCIe.
The file pcie_bw is used for this.
The Perf counters count the number of received and sent messages and return
those values, as well as the maximum payload size of a PCIe packet (mps).
Note that it is not possible to easily and quickly obtain the size of each
packet transmitted, so we output the max payload size (mps) to allow for
quick estimation of the PCIe bandwidth usage


<a id="rst-pcie-replay-count"></a>

### pcie_replay_count


The amdgpu driver provides a sysfs API for reporting the total number
of PCIe replays (NAKs).
The file pcie_replay_count is used for this and returns the total
number of replays as a sum of the NAKs generated and NAKs received.


<a id="rst-gpu-smartshift-information"></a>

## GPU SmartShift Information

GPU SmartShift information via sysfs

<a id="rst-smartshift-apu-power"></a>

### smartshift_apu_power


The amdgpu driver provides a sysfs API for reporting APU power
shift in percentage if platform supports smartshift. Value 0 means that
there is no powershift and values between \[1-100\] means that the power
is shifted to APU, the percentage of boost is with respect to APU power
limit on the platform.


<a id="rst-smartshift-dgpu-power"></a>

### smartshift_dgpu_power


The amdgpu driver provides a sysfs API for reporting dGPU power
shift in percentage if platform supports smartshift. Value 0 means that
there is no powershift and values between \[1-100\] means that the power is
shifted to dGPU, the percentage of boost is with respect to dGPU power
limit on the platform.


<a id="rst-smartshift-bias"></a>

### smartshift_bias


The amdgpu driver provides a sysfs API for reporting the
smartshift(SS2.0) bias level. The value ranges from -100 to 100
and the default is 0. -100 sets maximum preference to APU
and 100 sets max perference to dGPU.


<a id="rst-uma-carveout"></a>

## UMA Carveout

Some versions of Atom ROM expose available options for the VRAM carveout sizes, and allow changes to the carveout size via the ATCS function code 0xA on supported BIOS implementations.

For those platforms, users can use the following files under uma/ to set the carveout size, in a way similar to what Windows users can do in the "Tuning" tab in AMD Adrenalin.

Note that for BIOS implementations that don't support this, these files will not be created at all.

<a id="rst-uma-carveout-options"></a>

### uma/carveout_options


This is a read-only file that lists all available UMA allocation
options and their corresponding indices. Example output:

```text
$ cat uma/carveout_options
0: Minimum (512 MB)
1:  (1 GB)
2:  (2 GB)
3:  (4 GB)
4:  (6 GB)
5:  (8 GB)
6:  (12 GB)
7: Medium (16 GB)
8:  (24 GB)
9: High (32 GB)
```


<a id="rst-uma-carveout-1"></a>

### uma/carveout


This file is both readable and writable. When read, it shows the
index of the current setting. Writing a valid index to this file
allows users to change the UMA carveout size to the selected option
on the next boot.

The available options and their corresponding indices can be read
from the uma/carveout_options file.
