Skip to content

Commit 7dd1be3

Browse files
committed
Merge tag 'amd-drm-next-6.3-2023-01-20' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.3-2023-01-20: amdgpu: - Secure display fixes - Fix scaling - Misc code cleanups - Display BW alloc logic updates - DCN 3.2 fixes - Fix power reporting on certain firmwares for CZN/RN - SR-IOV fixes - Link training cleanup and code rework - HDCP fixes - Reserved VMID fix - Documentation updates - Colorspace fixes - RAS updates - GC11.0 fixes - VCN instance harvesting fixes - DCN 3.1.4/5 workarounds for S/G displays - Add PCIe info to the INFO IOCTL amdkfd: - XNACK fix UAPI: - Add PCIe gen/lanes info to the amdgpu INFO IOCTL Nesa ultimately plans to use this to make decisions about buffer placement optimizations Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20790 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230120234523.7610-1-alexander.deucher@amd.com
2 parents b8f55f2 + b4a9b36 commit 7dd1be3

166 files changed

Lines changed: 9765 additions & 8198 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
Product Name, Code Reference, DCN/DCE version, GC version, VCE/UVD/VCN version, SDMA version
2-
Radeon R* Graphics, CARRIZO/STONEY, DCE 11, 8, VCE 3 / UVD 6, 3
3-
Ryzen 3000 series / AMD Ryzen Embedded V1*/R1* with Radeon Vega Gfx, RAVEN/PICASSO, DCN 1.0, 9.1.0, VCN 1.0, 4.1.0
4-
Ryzen 4000 series, RENOIR, DCN 2.1, 9.3, VCN 2.2, 4.1.2
5-
Ryzen 3000 series / AMD Ryzen Embedded V1*/R1* with Radeon Vega Gfx, RAVEN2, DCN 1.0, 9.2.2, VCN 1.0.1, 4.1.1
6-
SteamDeck, VANGOGH, DCN 3.0.1, 10.3.1, VCN 3.1.0, 5.2.1
7-
Ryzen 5000 series, GREEN SARDINE, DCN 2.1, 9.3, VCN 2.2, 4.1.1
8-
Ryzen 6000 Zen, YELLOW CARP, 3.1.2, 10.3.3, VCN 3.1.1, 5.2.3
1+
Product Name, Code Reference, DCN/DCE version, GC version, VCE/UVD/VCN version, SDMA version, MP0 version
2+
Radeon R* Graphics, CARRIZO/STONEY, DCE 11, 8, VCE 3 / UVD 6, 3, n/a
3+
Ryzen 3000 series / AMD Ryzen Embedded V1*/R1* with Radeon Vega Gfx, RAVEN/PICASSO, DCN 1.0, 9.1.0, VCN 1.0, 4.1.0, 10.0.0
4+
Ryzen 4000 series, RENOIR, DCN 2.1, 9.3, VCN 2.2, 4.1.2, 11.0.3
5+
Ryzen 3000 series / AMD Ryzen Embedded V1*/R1* with Radeon Vega Gfx, RAVEN2, DCN 1.0, 9.2.2, VCN 1.0.1, 4.1.1, 10.0.1
6+
SteamDeck, VANGOGH, DCN 3.0.1, 10.3.1, VCN 3.1.0, 5.2.1, 11.5.0
7+
Ryzen 5000 series / Ryzen 7x30 series, GREEN SARDINE / Cezanne / Barcelo / Barcelo-R, DCN 2.1, 9.3, VCN 2.2, 4.1.1, 12.0.1
8+
Ryzen 6000 series / Ryzen 7x35 series, YELLOW CARP / Rembrandt / Rembrandt+, 3.1.2, 10.3.3, VCN 3.1.1, 5.2.3, 13.0.3
9+
Ryzen 7000 series (AM5), Raphael, 3.1.5, 10.3.6, 3.1.2, 5.2.6, 13.0.5
10+
Ryzen 7x20 series, Mendocino, 3.1.6, 10.3.7, 3.1.1, 5.2.7, 13.0.8

Documentation/gpu/amdgpu/dgpu-asic-info-table.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ AMD Radeon RX 6800(XT) /6900(XT) /W6800, SIENNA_CICHLID, DCN 3.0.0, 10.3.0, VCN
2222
AMD Radeon RX 6700 XT / 6800M / 6700M, NAVY_FLOUNDER, DCN 3.0.0, 10.3.2, VCN 3.0.0, 5.2.2
2323
AMD Radeon RX 6600(XT) /6600M /W6600 /W6600M, DIMGREY_CAVEFISH, DCN 3.0.2, 10.3.4, VCN 3.0.16, 5.2.4
2424
AMD Radeon RX 6500M /6300M /W6500M /W6300M, BEIGE_GOBY, DCN 3.0.3, 10.3.5, VCN 3.0.33, 5.2.5
25+
AMD Radeon RX 7900 XT /XTX, , DCN 3.2.0, 11.0.0, VCN 4.0.0, 6.0.0
26+
AMD Radeon RX 7600M (XT) /7700S /7600S, , DCN 3.2.1, 11.0.2, VCN 4.0.4, 6.0.2

Documentation/gpu/amdgpu/driver-misc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Accelerated Processing Units (APU) Info
3737

3838
.. csv-table::
3939
:header-rows: 1
40-
:widths: 3, 2, 2, 1, 1, 1
40+
:widths: 3, 2, 2, 1, 1, 1, 1
4141
:file: ./apu-asic-info-table.csv
4242

4343
Discrete GPU Info

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ amdgpu-y += \
137137
gfx_v10_0.o \
138138
imu_v11_0.o \
139139
gfx_v11_0.o \
140+
gfx_v11_0_3.o \
140141
imu_v11_0_3.o
141142

142143
# add async DMA block

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,6 +2076,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
20762076
struct drm_device *dev = adev_to_drm(adev);
20772077
struct pci_dev *parent;
20782078
int i, r;
2079+
bool total;
20792080

20802081
amdgpu_device_enable_virtual_display(adev);
20812082

@@ -2159,6 +2160,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
21592160
if (amdgpu_sriov_vf(adev) && adev->asic_type == CHIP_SIENNA_CICHLID)
21602161
adev->pm.pp_feature &= ~PP_OVERDRIVE_MASK;
21612162

2163+
total = true;
21622164
for (i = 0; i < adev->num_ip_blocks; i++) {
21632165
if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
21642166
DRM_ERROR("disabled ip block: %d <%s>\n",
@@ -2172,7 +2174,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
21722174
} else if (r) {
21732175
DRM_ERROR("early_init of IP block <%s> failed %d\n",
21742176
adev->ip_blocks[i].version->funcs->name, r);
2175-
return r;
2177+
total = false;
21762178
} else {
21772179
adev->ip_blocks[i].status.valid = true;
21782180
}
@@ -2203,6 +2205,8 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
22032205

22042206
}
22052207
}
2208+
if (!total)
2209+
return -ENODEV;
22062210

22072211
adev->cg_flags &= amdgpu_cg_mask;
22082212
adev->pg_flags &= amdgpu_pg_mask;
@@ -5854,8 +5858,8 @@ void amdgpu_device_invalidate_hdp(struct amdgpu_device *adev,
58545858
int amdgpu_in_reset(struct amdgpu_device *adev)
58555859
{
58565860
return atomic_read(&adev->reset_domain->in_gpu_reset);
5857-
}
5858-
5861+
}
5862+
58595863
/**
58605864
* amdgpu_device_halt() - bring hardware to some kind of halt state
58615865
*

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@
106106
* - 3.49.0 - Add gang submit into CS IOCTL
107107
* - 3.50.0 - Update AMDGPU_INFO_DEV_INFO IOCTL for minimum engine and memory clock
108108
* Update AMDGPU_INFO_SENSOR IOCTL for PEAK_PSTATE engine and memory clock
109+
* 3.51.0 - Return the PCIe gen and lanes from the INFO ioctl
109110
*/
110111
#define KMS_DRIVER_MAJOR 3
111-
#define KMS_DRIVER_MINOR 50
112+
#define KMS_DRIVER_MINOR 51
112113
#define KMS_DRIVER_PATCHLEVEL 0
113114

114115
unsigned int amdgpu_vram_limit = UINT_MAX;

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

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ static bool amdgpu_gfx_is_compute_multipipe_capable(struct amdgpu_device *adev)
156156
return amdgpu_compute_multipipe == 1;
157157
}
158158

159+
if (adev->ip_versions[GC_HWIP][0] > IP_VERSION(9, 0, 0))
160+
return true;
161+
159162
/* FIXME: spreading the queues across pipes causes perf regressions
160163
* on POLARIS11 compute workloads */
161164
if (adev->asic_type == CHIP_POLARIS11)
@@ -696,6 +699,50 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
696699
return r;
697700
}
698701

702+
int amdgpu_gfx_ras_sw_init(struct amdgpu_device *adev)
703+
{
704+
int err = 0;
705+
struct amdgpu_gfx_ras *ras = NULL;
706+
707+
/* adev->gfx.ras is NULL, which means gfx does not
708+
* support ras function, then do nothing here.
709+
*/
710+
if (!adev->gfx.ras)
711+
return 0;
712+
713+
ras = adev->gfx.ras;
714+
715+
err = amdgpu_ras_register_ras_block(adev, &ras->ras_block);
716+
if (err) {
717+
dev_err(adev->dev, "Failed to register gfx ras block!\n");
718+
return err;
719+
}
720+
721+
strcpy(ras->ras_block.ras_comm.name, "gfx");
722+
ras->ras_block.ras_comm.block = AMDGPU_RAS_BLOCK__GFX;
723+
ras->ras_block.ras_comm.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
724+
adev->gfx.ras_if = &ras->ras_block.ras_comm;
725+
726+
/* If not define special ras_late_init function, use gfx default ras_late_init */
727+
if (!ras->ras_block.ras_late_init)
728+
ras->ras_block.ras_late_init = amdgpu_ras_block_late_init;
729+
730+
/* If not defined special ras_cb function, use default ras_cb */
731+
if (!ras->ras_block.ras_cb)
732+
ras->ras_block.ras_cb = amdgpu_gfx_process_ras_data_cb;
733+
734+
return 0;
735+
}
736+
737+
int amdgpu_gfx_poison_consumption_handler(struct amdgpu_device *adev,
738+
struct amdgpu_iv_entry *entry)
739+
{
740+
if (adev->gfx.ras && adev->gfx.ras->poison_consumption_handler)
741+
return adev->gfx.ras->poison_consumption_handler(adev, entry);
742+
743+
return 0;
744+
}
745+
699746
int amdgpu_gfx_process_ras_data_cb(struct amdgpu_device *adev,
700747
void *err_data,
701748
struct amdgpu_iv_entry *entry)

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ struct amdgpu_gfx_ras {
210210
struct amdgpu_ras_block_object ras_block;
211211
void (*enable_watchdog_timer)(struct amdgpu_device *adev);
212212
bool (*query_utcl2_poison_status)(struct amdgpu_device *adev);
213+
int (*rlc_gc_fed_irq)(struct amdgpu_device *adev,
214+
struct amdgpu_irq_src *source,
215+
struct amdgpu_iv_entry *entry);
216+
int (*poison_consumption_handler)(struct amdgpu_device *adev,
217+
struct amdgpu_iv_entry *entry);
213218
};
214219

215220
struct amdgpu_gfx_funcs {
@@ -323,6 +328,7 @@ struct amdgpu_gfx {
323328
struct amdgpu_irq_src priv_inst_irq;
324329
struct amdgpu_irq_src cp_ecc_error_irq;
325330
struct amdgpu_irq_src sq_irq;
331+
struct amdgpu_irq_src rlc_gc_fed_irq;
326332
struct sq_work sq_work;
327333

328334
/* gfx status */
@@ -432,4 +438,7 @@ void amdgpu_kiq_wreg(struct amdgpu_device *adev, uint32_t reg, uint32_t v);
432438
int amdgpu_gfx_get_num_kcq(struct amdgpu_device *adev);
433439
void amdgpu_gfx_cp_init_microcode(struct amdgpu_device *adev, uint32_t ucode_id);
434440

441+
int amdgpu_gfx_ras_sw_init(struct amdgpu_device *adev);
442+
int amdgpu_gfx_poison_consumption_handler(struct amdgpu_device *adev,
443+
struct amdgpu_iv_entry *entry);
435444
#endif

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ void amdgpu_vmid_free_reserved(struct amdgpu_device *adev,
497497
!--id_mgr->reserved_use_count) {
498498
/* give the reserved ID back to normal round robin */
499499
list_add(&id_mgr->reserved->list, &id_mgr->ids_lru);
500+
id_mgr->reserved = NULL;
500501
}
501502
vm->reserved_vmid[vmhub] = false;
502503
mutex_unlock(&id_mgr->lock);

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,14 @@ void amdgpu_job_free_resources(struct amdgpu_job *job)
161161
struct dma_fence *f;
162162
unsigned i;
163163

164-
/* use sched fence if available */
165-
f = job->base.s_fence ? &job->base.s_fence->finished : &job->hw_fence;
164+
/* Check if any fences where initialized */
165+
if (job->base.s_fence && job->base.s_fence->finished.ops)
166+
f = &job->base.s_fence->finished;
167+
else if (job->hw_fence.ops)
168+
f = &job->hw_fence;
169+
else
170+
f = NULL;
171+
166172
for (i = 0; i < job->num_ibs; ++i)
167173
amdgpu_ib_free(ring->adev, &job->ibs[i], f);
168174
}

0 commit comments

Comments
 (0)