mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-20 04:23:55 -04:00
Merge tag 'amd-drm-next-5.14-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-5.14-2021-06-02:
amdgpu:
- GC/MM register access macro clean up for SR-IOV
- Beige Goby updates
- W=1 Fixes
- Aldebaran fixes
- Misc display fixes
- ACPI ATCS/ATIF handling rework
- SR-IOV fixes
- RAS fixes
- 16bpc fixed point format support
- Initial smartshift support
- RV/PCO power tuning fixes for suspend/resume
- More buffer object subclassing work
- Add new INFO query for additional vbios information
- Add new placement for preemptable SG buffers
amdkfd:
- Misc fixes
radeon:
- W=1 Fixes
- Misc cleanups
UAPI:
- Add new INFO query for additional vbios information
Useful for debugging vbios related issues. Proposed umr patch:
https://patchwork.freedesktop.org/patch/433297/
- 16bpc fixed point format support
IGT test:
https://lists.freedesktop.org/archives/igt-dev/2021-May/031507.html
Proposed Vulkan patch:
a25d480207
- Add a new GEM flag which is only used internally in the kernel driver. Userspace
is not allowed to set it.
drm:
- 16bpc fixed point format fourcc
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210602214009.4553-1-alexander.deucher@amd.com
This commit is contained in:
@@ -30,7 +30,7 @@ struct IP_BASE_INSTANCE {
|
||||
|
||||
struct IP_BASE {
|
||||
struct IP_BASE_INSTANCE instance[MAX_INSTANCE];
|
||||
};
|
||||
} __maybe_unused;
|
||||
|
||||
static const struct IP_BASE ATHUB_BASE = { { { { 0x00000C20, 0x02408C00, 0, 0, 0, 0 } },
|
||||
{ { 0, 0, 0, 0, 0, 0 } },
|
||||
|
||||
@@ -103,6 +103,13 @@ struct atcs_pref_req_output {
|
||||
u8 ret_val; /* return value */
|
||||
} __packed;
|
||||
|
||||
struct atcs_pwr_shift_input {
|
||||
u16 size; /* structure size in bytes (includes size field) */
|
||||
u16 dgpu_id; /* client id (bit 2-0: func num, 7-3: dev num, 15-8: bus num) */
|
||||
u8 dev_acpi_state; /* D0 = 0, D3 hot = 3 */
|
||||
u8 drv_state; /* 0 = operational, 1 = not operational */
|
||||
} __packed;
|
||||
|
||||
/* AMD hw uses four ACPI control methods:
|
||||
* 1. ATIF
|
||||
* ARG0: (ACPI_INTEGER) function code
|
||||
@@ -418,6 +425,7 @@ struct atcs_pref_req_output {
|
||||
# define ATCS_PCIE_PERFORMANCE_REQUEST_SUPPORTED (1 << 1)
|
||||
# define ATCS_PCIE_DEVICE_READY_NOTIFICATION_SUPPORTED (1 << 2)
|
||||
# define ATCS_SET_PCIE_BUS_WIDTH_SUPPORTED (1 << 3)
|
||||
# define ATCS_SET_POWER_SHIFT_CONTROL_SUPPORTED (1 << 7)
|
||||
#define ATCS_FUNCTION_GET_EXTERNAL_STATE 0x1
|
||||
/* ARG0: ATCS_FUNCTION_GET_EXTERNAL_STATE
|
||||
* ARG1: none
|
||||
@@ -472,4 +480,14 @@ struct atcs_pref_req_output {
|
||||
* BYTE - number of active lanes
|
||||
*/
|
||||
|
||||
#define ATCS_FUNCTION_POWER_SHIFT_CONTROL 0x8
|
||||
/* ARG0: ATCS_FUNCTION_POWER_SHIFT_CONTROL
|
||||
* ARG1:
|
||||
* WORD - structure size in bytes (includes size field)
|
||||
* WORD - dGPU id (bit 2-0: func num, 7-3: dev num, 15-8: bus num)
|
||||
* BYTE - Device ACPI state
|
||||
* BYTE - Driver state
|
||||
* OUTPUT: none
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -197,6 +197,9 @@ enum atom_dp_vs_preemph_def{
|
||||
DP_VS_LEVEL0_PREEMPH_LEVEL3 = 0x18,
|
||||
};
|
||||
|
||||
#define BIOS_ATOM_PREFIX "ATOMBIOS"
|
||||
#define BIOS_VERSION_PREFIX "ATOMBIOSBK-AMD"
|
||||
#define BIOS_STRING_LENGTH 43
|
||||
|
||||
/*
|
||||
enum atom_string_def{
|
||||
@@ -209,12 +212,14 @@ atom_bios_string = "ATOM"
|
||||
#pragma pack(1) /* BIOS data must use byte aligment*/
|
||||
|
||||
enum atombios_image_offset{
|
||||
OFFSET_TO_ATOM_ROM_HEADER_POINTER =0x00000048,
|
||||
OFFSET_TO_ATOM_ROM_IMAGE_SIZE =0x00000002,
|
||||
OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE =0x94,
|
||||
MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE =20, /*including the terminator 0x0!*/
|
||||
OFFSET_TO_GET_ATOMBIOS_NUMBER_OF_STRINGS =0x2f,
|
||||
OFFSET_TO_GET_ATOMBIOS_STRING_START =0x6e,
|
||||
OFFSET_TO_ATOM_ROM_HEADER_POINTER = 0x00000048,
|
||||
OFFSET_TO_ATOM_ROM_IMAGE_SIZE = 0x00000002,
|
||||
OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE = 0x94,
|
||||
MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE = 20, /*including the terminator 0x0!*/
|
||||
OFFSET_TO_GET_ATOMBIOS_NUMBER_OF_STRINGS = 0x2f,
|
||||
OFFSET_TO_GET_ATOMBIOS_STRING_START = 0x6e,
|
||||
OFFSET_TO_VBIOS_PART_NUMBER = 0x80,
|
||||
OFFSET_TO_VBIOS_DATE = 0x50,
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -536,6 +536,75 @@ struct gpu_metrics_v1_2 {
|
||||
uint64_t firmware_timestamp;
|
||||
};
|
||||
|
||||
struct gpu_metrics_v1_3 {
|
||||
struct metrics_table_header common_header;
|
||||
|
||||
/* Temperature */
|
||||
uint16_t temperature_edge;
|
||||
uint16_t temperature_hotspot;
|
||||
uint16_t temperature_mem;
|
||||
uint16_t temperature_vrgfx;
|
||||
uint16_t temperature_vrsoc;
|
||||
uint16_t temperature_vrmem;
|
||||
|
||||
/* Utilization */
|
||||
uint16_t average_gfx_activity;
|
||||
uint16_t average_umc_activity; // memory controller
|
||||
uint16_t average_mm_activity; // UVD or VCN
|
||||
|
||||
/* Power/Energy */
|
||||
uint16_t average_socket_power;
|
||||
uint64_t energy_accumulator;
|
||||
|
||||
/* Driver attached timestamp (in ns) */
|
||||
uint64_t system_clock_counter;
|
||||
|
||||
/* Average clocks */
|
||||
uint16_t average_gfxclk_frequency;
|
||||
uint16_t average_socclk_frequency;
|
||||
uint16_t average_uclk_frequency;
|
||||
uint16_t average_vclk0_frequency;
|
||||
uint16_t average_dclk0_frequency;
|
||||
uint16_t average_vclk1_frequency;
|
||||
uint16_t average_dclk1_frequency;
|
||||
|
||||
/* Current clocks */
|
||||
uint16_t current_gfxclk;
|
||||
uint16_t current_socclk;
|
||||
uint16_t current_uclk;
|
||||
uint16_t current_vclk0;
|
||||
uint16_t current_dclk0;
|
||||
uint16_t current_vclk1;
|
||||
uint16_t current_dclk1;
|
||||
|
||||
/* Throttle status */
|
||||
uint32_t throttle_status;
|
||||
|
||||
/* Fans */
|
||||
uint16_t current_fan_speed;
|
||||
|
||||
/* Link width/speed */
|
||||
uint16_t pcie_link_width;
|
||||
uint16_t pcie_link_speed; // in 0.1 GT/s
|
||||
|
||||
uint16_t padding;
|
||||
|
||||
uint32_t gfx_activity_acc;
|
||||
uint32_t mem_activity_acc;
|
||||
|
||||
uint16_t temperature_hbm[NUM_HBM_INSTANCES];
|
||||
|
||||
/* PMFW attached timestamp (10ns resolution) */
|
||||
uint64_t firmware_timestamp;
|
||||
|
||||
/* Voltage (mV) */
|
||||
uint16_t voltage_soc;
|
||||
uint16_t voltage_gfx;
|
||||
uint16_t voltage_mem;
|
||||
|
||||
uint16_t padding1;
|
||||
};
|
||||
|
||||
/*
|
||||
* gpu_metrics_v2_0 is not recommended as it's not naturally aligned.
|
||||
* Use gpu_metrics_v2_1 or later instead.
|
||||
|
||||
Reference in New Issue
Block a user