Skip to content

Commit a8b273a

Browse files
committed
Merge tag 'amd-drm-next-6.6-2023-08-11' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amdgpu: - SDMA 6.1.0 support - SMU 13.x fixes - PSP 13.x fixes - HDP 6.1 support - SMUIO 14.0 support - IH 6.1 support - Coding style cleanups - Misc display fixes - Initial Freesync panel replay support - RAS fixes - SDMA 5.2 MGCG updates - SR-IOV fixes - DCN3+ gamma fix - Revert zpos properly until IGT regression is fixed - NBIO 7.9 fixes - Use TTM to manage the doorbell BAR - Async flip fix - DPIA tracing support - DCN 3.x TMDS HDMI fixes - FRU fixes amdkfd: - Coding style cleanups - SVM fixes - Trap handler fixes - Convert older APUs to use dGPU path like newer APUs - Drop IOMMUv2 path as it is no longer used radeon: - Coding style cleanups drm buddy: - Fix debugging output UAPI: - A new memory pool was added to amdgpu_drm.h since we converted doorbell BAR management to use TTM, but userspace is blocked from allocating from it at this point, so kind of not really anything new here per se Signed-off-by: Dave Airlie <airlied@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZNahZwAKCRC93/aFa7yZ # 2KNjAP0UV2vJZjrze7OQI/YoI+40UlGjS81nKGlMIN3eR8nzvAD/c9McLJViL82R # idEAK7tsr/MaCKoPAlED7CkUZiHNlQw= # =4w7I # -----END PGP SIGNATURE----- # gpg: Signature made Sat 12 Aug 2023 07:00:23 AEST # gpg: using EDDSA key 203B921D836B5735349902BDBDDFF6856BBC99D8 # gpg: Can't check signature: No public key From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230811211554.7804-1-alexander.deucher@amd.com
2 parents 73c98bf + 6be2ad4 commit a8b273a

File tree

248 files changed

+6320
-3828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+6320
-3828
lines changed

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ amdgpu-y += \
129129
vega10_ih.o \
130130
vega20_ih.o \
131131
navi10_ih.o \
132-
ih_v6_0.o
132+
ih_v6_0.o \
133+
ih_v6_1.o
133134

134135
# add PSP block
135136
amdgpu-y += \

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
12941294
void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
12951295
int amdgpu_device_pci_reset(struct amdgpu_device *adev);
12961296
bool amdgpu_device_need_post(struct amdgpu_device *adev);
1297+
bool amdgpu_sg_display_supported(struct amdgpu_device *adev);
12971298
bool amdgpu_device_pcie_dynamic_switching_supported(void);
12981299
bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
12991300
bool amdgpu_device_aspm_support_quirk(void);

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,6 @@ void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool run_pm)
226226
kgd2kfd_suspend(adev->kfd.dev, run_pm);
227227
}
228228

229-
int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev)
230-
{
231-
int r = 0;
232-
233-
if (adev->kfd.dev)
234-
r = kgd2kfd_resume_iommu(adev->kfd.dev);
235-
236-
return r;
237-
}
238-
239229
int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm)
240230
{
241231
int r = 0;

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ int amdgpu_amdkfd_init(void);
148148
void amdgpu_amdkfd_fini(void);
149149

150150
void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool run_pm);
151-
int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev);
152151
int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm);
153152
void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev,
154153
const void *ih_ring_entry);
@@ -399,7 +398,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
399398
const struct kgd2kfd_shared_resources *gpu_resources);
400399
void kgd2kfd_device_exit(struct kfd_dev *kfd);
401400
void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm);
402-
int kgd2kfd_resume_iommu(struct kfd_dev *kfd);
403401
int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm);
404402
int kgd2kfd_pre_reset(struct kfd_dev *kfd);
405403
int kgd2kfd_post_reset(struct kfd_dev *kfd);
@@ -439,11 +437,6 @@ static inline void kgd2kfd_suspend(struct kfd_dev *kfd, bool run_pm)
439437
{
440438
}
441439

442-
static int __maybe_unused kgd2kfd_resume_iommu(struct kfd_dev *kfd)
443-
{
444-
return 0;
445-
}
446-
447440
static inline int kgd2kfd_resume(struct kfd_dev *kfd, bool run_pm)
448441
{
449442
return 0;

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,9 +1133,9 @@ void kgd_gfx_v9_program_trap_handler_settings(struct amdgpu_device *adev,
11331133
* Program TBA registers
11341134
*/
11351135
WREG32_SOC15(GC, GET_INST(GC, inst), mmSQ_SHADER_TBA_LO,
1136-
lower_32_bits(tba_addr >> 8));
1136+
lower_32_bits(tba_addr >> 8));
11371137
WREG32_SOC15(GC, GET_INST(GC, inst), mmSQ_SHADER_TBA_HI,
1138-
upper_32_bits(tba_addr >> 8));
1138+
upper_32_bits(tba_addr >> 8));
11391139

11401140
/*
11411141
* Program TMA registers

drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ static ssize_t amdgpu_atombios_get_vbios_version(struct device *dev,
17761776
struct amdgpu_device *adev = drm_to_adev(ddev);
17771777
struct atom_context *ctx = adev->mode_info.atom_context;
17781778

1779-
return sysfs_emit(buf, "%s\n", ctx->vbios_pn);
1779+
return sysfs_emit(buf, "%s\n", ctx->vbios_ver_str);
17801780
}
17811781

17821782
static DEVICE_ATTR(vbios_version, 0444, amdgpu_atombios_get_vbios_version,

drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ struct atom_memory_info {
8989

9090
#define MAX_AC_TIMING_ENTRIES 16
9191

92-
struct atom_memory_clock_range_table
93-
{
92+
struct atom_memory_clock_range_table {
9493
u8 num_entries;
9594
u8 rsv[3];
9695
u32 mclk[MAX_AC_TIMING_ENTRIES];
@@ -118,14 +117,12 @@ struct atom_mc_reg_table {
118117

119118
#define MAX_VOLTAGE_ENTRIES 32
120119

121-
struct atom_voltage_table_entry
122-
{
120+
struct atom_voltage_table_entry {
123121
u16 value;
124122
u32 smio_low;
125123
};
126124

127-
struct atom_voltage_table
128-
{
125+
struct atom_voltage_table {
129126
u32 count;
130127
u32 mask_low;
131128
u32 phase_delay;

drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ uint32_t amdgpu_atomfirmware_query_firmware_capability(struct amdgpu_device *ade
5858
if (amdgpu_atom_parse_data_header(adev->mode_info.atom_context,
5959
index, &size, &frev, &crev, &data_offset)) {
6060
/* support firmware_info 3.1 + */
61-
if ((frev == 3 && crev >=1) || (frev > 3)) {
61+
if ((frev == 3 && crev >= 1) || (frev > 3)) {
6262
firmware_info = (union firmware_info *)
6363
(mode_info->atom_context->bios + data_offset);
6464
fw_cap = le32_to_cpu(firmware_info->v31.firmware_capability);
@@ -597,7 +597,7 @@ bool amdgpu_atomfirmware_ras_rom_addr(struct amdgpu_device *adev,
597597
index, &size, &frev, &crev,
598598
&data_offset)) {
599599
/* support firmware_info 3.4 + */
600-
if ((frev == 3 && crev >=4) || (frev > 3)) {
600+
if ((frev == 3 && crev >= 4) || (frev > 3)) {
601601
firmware_info = (union firmware_info *)
602602
(mode_info->atom_context->bios + data_offset);
603603
/* The ras_rom_i2c_slave_addr should ideally
@@ -850,7 +850,7 @@ int amdgpu_atomfirmware_get_fw_reserved_fb_size(struct amdgpu_device *adev)
850850

851851
firmware_info = (union firmware_info *)(ctx->bios + data_offset);
852852

853-
if (frev !=3)
853+
if (frev != 3)
854854
return -EINVAL;
855855

856856
switch (crev) {
@@ -909,7 +909,7 @@ int amdgpu_atomfirmware_asic_init(struct amdgpu_device *adev, bool fb_reset)
909909
}
910910

911911
index = get_index_into_master_table(atom_master_list_of_command_functions_v2_1,
912-
asic_init);
912+
asic_init);
913913
if (amdgpu_atom_parse_cmd_header(mode_info->atom_context, index, &frev, &crev)) {
914914
if (frev == 2 && crev >= 1) {
915915
memset(&asic_init_ps_v2_1, 0, sizeof(asic_init_ps_v2_1));

drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ static union acpi_object *amdgpu_atpx_call(acpi_handle handle, int function,
118118
union acpi_object atpx_arg_elements[2];
119119
struct acpi_object_list atpx_arg;
120120
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
121-
struct acpi_device *adev = container_of(handle, struct acpi_device, handle);
122-
struct device *dev = &adev->dev;
123121

124122
atpx_arg.count = 2;
125123
atpx_arg.pointer = &atpx_arg_elements[0];
@@ -141,8 +139,8 @@ static union acpi_object *amdgpu_atpx_call(acpi_handle handle, int function,
141139

142140
/* Fail only if calling the method fails and ATPX is supported */
143141
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
144-
dev_err(dev, "failed to evaluate ATPX got %s\n",
145-
acpi_format_exception(status));
142+
pr_err("failed to evaluate ATPX got %s\n",
143+
acpi_format_exception(status));
146144
kfree(buffer.pointer);
147145
return NULL;
148146
}
@@ -183,8 +181,6 @@ static void amdgpu_atpx_parse_functions(struct amdgpu_atpx_functions *f, u32 mas
183181
static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)
184182
{
185183
u32 valid_bits = 0;
186-
struct acpi_device *adev = container_of(atpx->handle, struct acpi_device, handle);
187-
struct device *dev = &adev->dev;
188184

189185
if (atpx->functions.px_params) {
190186
union acpi_object *info;
@@ -199,7 +195,7 @@ static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)
199195

200196
size = *(u16 *) info->buffer.pointer;
201197
if (size < 10) {
202-
dev_err(dev, "ATPX buffer is too small: %zu\n", size);
198+
pr_err("ATPX buffer is too small: %zu\n", size);
203199
kfree(info);
204200
return -EINVAL;
205201
}
@@ -232,11 +228,11 @@ static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)
232228
atpx->is_hybrid = false;
233229
if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
234230
if (amdgpu_atpx_priv.quirks & AMDGPU_PX_QUIRK_FORCE_ATPX) {
235-
dev_info(dev, "ATPX Hybrid Graphics, forcing to ATPX\n");
231+
pr_warn("ATPX Hybrid Graphics, forcing to ATPX\n");
236232
atpx->functions.power_cntl = true;
237233
atpx->is_hybrid = false;
238234
} else {
239-
dev_info(dev, "ATPX Hybrid Graphics\n");
235+
pr_notice("ATPX Hybrid Graphics\n");
240236
/*
241237
* Disable legacy PM methods only when pcie port PM is usable,
242238
* otherwise the device might fail to power off or power on.
@@ -269,8 +265,6 @@ static int amdgpu_atpx_verify_interface(struct amdgpu_atpx *atpx)
269265
struct atpx_verify_interface output;
270266
size_t size;
271267
int err = 0;
272-
struct acpi_device *adev = container_of(atpx->handle, struct acpi_device, handle);
273-
struct device *dev = &adev->dev;
274268

275269
info = amdgpu_atpx_call(atpx->handle, ATPX_FUNCTION_VERIFY_INTERFACE, NULL);
276270
if (!info)
@@ -280,7 +274,7 @@ static int amdgpu_atpx_verify_interface(struct amdgpu_atpx *atpx)
280274

281275
size = *(u16 *) info->buffer.pointer;
282276
if (size < 8) {
283-
printk("ATPX buffer is too small: %zu\n", size);
277+
pr_err("ATPX buffer is too small: %zu\n", size);
284278
err = -EINVAL;
285279
goto out;
286280
}
@@ -289,8 +283,8 @@ static int amdgpu_atpx_verify_interface(struct amdgpu_atpx *atpx)
289283
memcpy(&output, info->buffer.pointer, size);
290284

291285
/* TODO: check version? */
292-
dev_info(dev, "ATPX version %u, functions 0x%08x\n",
293-
output.version, output.function_bits);
286+
pr_notice("ATPX version %u, functions 0x%08x\n",
287+
output.version, output.function_bits);
294288

295289
amdgpu_atpx_parse_functions(&atpx->functions, output.function_bits);
296290

drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
460460
return false;
461461

462462
success:
463-
adev->is_atom_fw = (adev->asic_type >= CHIP_VEGA10) ? true : false;
463+
adev->is_atom_fw = adev->asic_type >= CHIP_VEGA10;
464464
return true;
465465
}
466466

0 commit comments

Comments
 (0)