Skip to content

Commit 9608c7b

Browse files
committed
Merge tag 'drm-fixes-2023-09-15' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Regular rc2 fixes pull, mostly made up of amdgpu stuff, one i915, and a bunch of others, one vkms locking violation is reverted. connector: - doc fix exec: - workaround lockdep issue tests: - fix a UAF vkms: - revert hrtimer fix fbdev: - g364fb: fix build failure with mips i915: - Only check eDP HPD when AUX CH is shared. amdgpu: - GC 9.4.3 fixes - Fix white screen issues with S/G display on system with >= 64G of ram - Replay fixes - SMU 13.0.6 fixes - AUX backlight fix - NBIO 4.3 SR-IOV fixes for HDP - RAS fixes - DP MST resume fix - Fix segfault on systems with no vbios - DPIA fixes amdkfd: - CWSR grace period fix - Unaligned doorbell fix - CRIU fix for GFX11 - Add missing TLB flush on gfx10 and newer radeon: - make fence wait in suballocator uninterrruptable gm12u320: - Fix the timeout usage for usb_bulk_msg()" * tag 'drm-fixes-2023-09-15' of git://anongit.freedesktop.org/drm/drm: (29 commits) drm/tests: helpers: Avoid a driver uaf Revert "drm/vkms: Fix race-condition between the hrtimer and the atomic commit" drm/amdkfd: Insert missing TLB flush on GFX10 and later drm/i915: Only check eDP HPD when AUX CH is shared drm/amd/display: Fix 2nd DPIA encoder Assignment drm/amd/display: Add DPIA Link Encoder Assignment Fix drm/amd/display: fix replay_mode kernel-doc warning drm/amdgpu: Handle null atom context in VBIOS info ioctl drm/amdkfd: Checkpoint and restore queues on GFX11 drm/amd/display: Adjust the MST resume flow drm/amdgpu: fallback to old RAS error message for aqua_vanjaram drm/amdgpu/nbio4.3: set proper rmmio_remap.reg_offset for SR-IOV drm/amdgpu/soc21: don't remap HDP registers for SR-IOV drm/amd/display: Don't check registers, if using AUX BL control drm/amdgpu: fix retry loop test drm/amd/display: Add dirty rect support for Replay Revert "drm/amd: Disable S/G for APUs when 64GB or more host memory" drm/amd/display: fix the white screen issue when >= 64GB DRAM drm/amdkfd: Update CU masking for GFX 9.4.3 drm/amdkfd: Update cache info reporting for GFX v9.4.3 ...
2 parents e42bebf + c3c9acb commit 9608c7b

Some content is hidden

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

57 files changed

+464
-235
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,6 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
12931293
void amdgpu_device_pci_config_reset(struct amdgpu_device *adev);
12941294
int amdgpu_device_pci_reset(struct amdgpu_device *adev);
12951295
bool amdgpu_device_need_post(struct amdgpu_device *adev);
1296-
bool amdgpu_sg_display_supported(struct amdgpu_device *adev);
12971296
bool amdgpu_device_pcie_dynamic_switching_supported(void);
12981297
bool amdgpu_device_should_use_aspm(struct amdgpu_device *adev);
12991298
bool amdgpu_device_aspm_support_quirk(void);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ void amdgpu_amdkfd_get_cu_info(struct amdgpu_device *adev, struct kfd_cu_info *c
478478
cu_info->cu_active_number = acu_info.number;
479479
cu_info->cu_ao_mask = acu_info.ao_cu_mask;
480480
memcpy(&cu_info->cu_bitmap[0], &acu_info.bitmap[0],
481-
sizeof(acu_info.bitmap));
481+
sizeof(cu_info->cu_bitmap));
482482
cu_info->num_shader_engines = adev->gfx.config.max_shader_engines;
483483
cu_info->num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
484484
cu_info->num_cu_per_sh = adev->gfx.config.max_cu_per_sh;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,7 @@ void kgd_gfx_v10_build_grace_period_packet_info(struct amdgpu_device *adev,
980980
uint32_t wait_times,
981981
uint32_t grace_period,
982982
uint32_t *reg_offset,
983-
uint32_t *reg_data,
984-
uint32_t inst)
983+
uint32_t *reg_data)
985984
{
986985
*reg_data = wait_times;
987986

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,4 @@ void kgd_gfx_v10_build_grace_period_packet_info(struct amdgpu_device *adev,
5555
uint32_t wait_times,
5656
uint32_t grace_period,
5757
uint32_t *reg_offset,
58-
uint32_t *reg_data,
59-
uint32_t inst);
58+
uint32_t *reg_data);

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,8 +1103,7 @@ void kgd_gfx_v9_build_grace_period_packet_info(struct amdgpu_device *adev,
11031103
uint32_t wait_times,
11041104
uint32_t grace_period,
11051105
uint32_t *reg_offset,
1106-
uint32_t *reg_data,
1107-
uint32_t inst)
1106+
uint32_t *reg_data)
11081107
{
11091108
*reg_data = wait_times;
11101109

@@ -1120,8 +1119,7 @@ void kgd_gfx_v9_build_grace_period_packet_info(struct amdgpu_device *adev,
11201119
SCH_WAVE,
11211120
grace_period);
11221121

1123-
*reg_offset = SOC15_REG_OFFSET(GC, GET_INST(GC, inst),
1124-
mmCP_IQ_WAIT_TIME2);
1122+
*reg_offset = SOC15_REG_OFFSET(GC, 0, mmCP_IQ_WAIT_TIME2);
11251123
}
11261124

11271125
void kgd_gfx_v9_program_trap_handler_settings(struct amdgpu_device *adev,

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,4 @@ void kgd_gfx_v9_build_grace_period_packet_info(struct amdgpu_device *adev,
100100
uint32_t wait_times,
101101
uint32_t grace_period,
102102
uint32_t *reg_offset,
103-
uint32_t *reg_data,
104-
uint32_t inst);
103+
uint32_t *reg_data);

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,32 +1244,6 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)
12441244
return true;
12451245
}
12461246

1247-
/*
1248-
* On APUs with >= 64GB white flickering has been observed w/ SG enabled.
1249-
* Disable S/G on such systems until we have a proper fix.
1250-
* https://gitlab.freedesktop.org/drm/amd/-/issues/2354
1251-
* https://gitlab.freedesktop.org/drm/amd/-/issues/2735
1252-
*/
1253-
bool amdgpu_sg_display_supported(struct amdgpu_device *adev)
1254-
{
1255-
switch (amdgpu_sg_display) {
1256-
case -1:
1257-
break;
1258-
case 0:
1259-
return false;
1260-
case 1:
1261-
return true;
1262-
default:
1263-
return false;
1264-
}
1265-
if ((totalram_pages() << (PAGE_SHIFT - 10)) +
1266-
(adev->gmc.real_vram_size / 1024) >= 64000000) {
1267-
DRM_WARN("Disabling S/G due to >=64GB RAM\n");
1268-
return false;
1269-
}
1270-
return true;
1271-
}
1272-
12731247
/*
12741248
* Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic
12751249
* speed switching. Until we have confirmation from Intel that a specific host

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define AMDGPU_GFX_LBPW_DISABLED_MODE 0x00000008L
4444

4545
#define AMDGPU_MAX_GC_INSTANCES 8
46+
#define KGD_MAX_QUEUES 128
4647

4748
#define AMDGPU_MAX_GFX_QUEUES KGD_MAX_QUEUES
4849
#define AMDGPU_MAX_COMPUTE_QUEUES KGD_MAX_QUEUES
@@ -257,7 +258,7 @@ struct amdgpu_cu_info {
257258
uint32_t number;
258259
uint32_t ao_cu_mask;
259260
uint32_t ao_cu_bitmap[4][4];
260-
uint32_t bitmap[4][4];
261+
uint32_t bitmap[AMDGPU_MAX_GC_INSTANCES][4][4];
261262
};
262263

263264
struct amdgpu_gfx_ras {

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
839839
memcpy(&dev_info->cu_ao_bitmap[0], &adev->gfx.cu_info.ao_cu_bitmap[0],
840840
sizeof(adev->gfx.cu_info.ao_cu_bitmap));
841841
memcpy(&dev_info->cu_bitmap[0], &adev->gfx.cu_info.bitmap[0],
842-
sizeof(adev->gfx.cu_info.bitmap));
842+
sizeof(dev_info->cu_bitmap));
843843
dev_info->vram_type = adev->gmc.vram_type;
844844
dev_info->vram_bit_width = adev->gmc.vram_width;
845845
dev_info->vce_harvest_config = adev->vce.harvest_config;
@@ -940,12 +940,17 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
940940
struct atom_context *atom_context;
941941

942942
atom_context = adev->mode_info.atom_context;
943-
memcpy(vbios_info.name, atom_context->name, sizeof(atom_context->name));
944-
memcpy(vbios_info.vbios_pn, atom_context->vbios_pn, sizeof(atom_context->vbios_pn));
945-
vbios_info.version = atom_context->version;
946-
memcpy(vbios_info.vbios_ver_str, atom_context->vbios_ver_str,
947-
sizeof(atom_context->vbios_ver_str));
948-
memcpy(vbios_info.date, atom_context->date, sizeof(atom_context->date));
943+
if (atom_context) {
944+
memcpy(vbios_info.name, atom_context->name,
945+
sizeof(atom_context->name));
946+
memcpy(vbios_info.vbios_pn, atom_context->vbios_pn,
947+
sizeof(atom_context->vbios_pn));
948+
vbios_info.version = atom_context->version;
949+
memcpy(vbios_info.vbios_ver_str, atom_context->vbios_ver_str,
950+
sizeof(atom_context->vbios_ver_str));
951+
memcpy(vbios_info.date, atom_context->date,
952+
sizeof(atom_context->date));
953+
}
949954

950955
return copy_to_user(out, &vbios_info,
951956
min((size_t)size, sizeof(vbios_info))) ? -EFAULT : 0;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,8 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
10521052
info->ce_count = obj->err_data.ce_count;
10531053

10541054
if (err_data.ce_count) {
1055-
if (adev->smuio.funcs &&
1055+
if (!adev->aid_mask &&
1056+
adev->smuio.funcs &&
10561057
adev->smuio.funcs->get_socket_id &&
10571058
adev->smuio.funcs->get_die_id) {
10581059
dev_info(adev->dev, "socket: %d, die: %d "
@@ -1072,7 +1073,8 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
10721073
}
10731074
}
10741075
if (err_data.ue_count) {
1075-
if (adev->smuio.funcs &&
1076+
if (!adev->aid_mask &&
1077+
adev->smuio.funcs &&
10761078
adev->smuio.funcs->get_socket_id &&
10771079
adev->smuio.funcs->get_die_id) {
10781080
dev_info(adev->dev, "socket: %d, die: %d "

0 commit comments

Comments
 (0)