Skip to content

Commit b1e5158

Browse files
committed
Merge tag 'drm-fixes-2023-12-01' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "Weekly fixes, mostly amdgpu fixes with a scattering of nouveau, i915, and a couple of reverts. Hopefully it will quieten down in coming weeks. drm: - Revert unexport of prime helpers for fd/handle conversion dma_resv: - Do not double add fences in dma_resv_add_fence. gpuvm: - Fix GPUVM license identifier. i915: - Mark internal GSC engine with reserved uabi class - Take VGA converters into account in eDP probe - Fix intel_pre_plane_updates() call to ensure workarounds get applied panel: - Revert panel fixes as they require exporting device_is_dependent. nouveau: - fix oversized allocations in new vm path - fix zero-length array - remove a stray lock nt36523: - Fix error check for nt36523. amdgpu: - DMUB fix - DCN 3.5 fixes - XGMI fix - DCN 3.2 fixes - Vangogh suspend fix - NBIO 7.9 fix - GFX11 golden register fix - Backlight fix - NBIO 7.11 fix - IB test overflow fix - DCN 3.1.4 fixes - fix a runtime pm ref count - Retimer fix - ABM fix - DCN 3.1.5 fix - Fix AGP addressing - Fix possible memory leak in SMU error path - Make sure PME is enabled in D3 - Fix possible NULL pointer dereference in debugfs - EEPROM fix - GC 9.4.3 fix amdkfd: - IP version check fix - Fix memory leak in pqm_uninit()" * tag 'drm-fixes-2023-12-01' of git://anongit.freedesktop.org/drm/drm: (53 commits) Revert "drm/prime: Unexport helpers for fd/handle conversion" drm/amdgpu: Use another offset for GC 9.4.3 remap drm/amd/display: Fix some HostVM parameters in DML drm/amdkfd: Free gang_ctx_bo and wptr_bo in pqm_uninit drm/amdgpu: Update EEPROM I2C address for smu v13_0_0 drm/amd/display: Allow DTBCLK disable for DCN35 drm/amdgpu: Fix cat debugfs amdgpu_regs_didt causes kernel null pointer drm/amd: Enable PCIe PME from D3 drm/amd/pm: fix a memleak in aldebaran_tables_init drm/amdgpu: fix AGP addressing when GART is not at 0 drm/amd/display: update dcn315 lpddr pstate latency drm/amd/display: fix ABM disablement drm/amd/display: Fix black screen on video playback with embedded panel drm/amd/display: Fix conversions between bytes and KB drm/amdkfd: Use common function for IP version check drm/amd/display: Remove config update drm/amd/display: Update DCN35 clock table policy drm/amd/display: force toggle rate wa for first link training for a retimer drm/amdgpu: correct the amdgpu runtime dereference usage count drm/amd/display: Update min Z8 residency time to 2100 for DCN314 ...
2 parents c9a925b + 908f606 commit b1e5158

Some content is hidden

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

67 files changed

+537
-302
lines changed

drivers/dma-buf/dma-resv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ void dma_resv_add_fence(struct dma_resv *obj, struct dma_fence *fence,
301301

302302
dma_resv_list_entry(fobj, i, obj, &old, &old_usage);
303303
if ((old->context == fence->context && old_usage >= usage &&
304-
dma_fence_is_later(fence, old)) ||
304+
dma_fence_is_later_or_same(fence, old)) ||
305305
dma_fence_is_signaled(old)) {
306306
dma_resv_list_set(fobj, i, fence, usage);
307307
dma_fence_put(old);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ int amdgpu_amdkfd_get_xgmi_bandwidth_mbytes(struct amdgpu_device *dst,
547547
struct amdgpu_device *adev = dst, *peer_adev;
548548
int num_links;
549549

550-
if (adev->asic_type != CHIP_ALDEBARAN)
550+
if (amdgpu_ip_version(adev, GC_HWIP, 0) < IP_VERSION(9, 4, 2))
551551
return 0;
552552

553553
if (src)

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,9 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,
638638
if (size & 0x3 || *pos & 0x3)
639639
return -EINVAL;
640640

641+
if (!adev->didt_rreg)
642+
return -EOPNOTSUPP;
643+
641644
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
642645
if (r < 0) {
643646
pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
@@ -694,6 +697,9 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user
694697
if (size & 0x3 || *pos & 0x3)
695698
return -EINVAL;
696699

700+
if (!adev->didt_wreg)
701+
return -EOPNOTSUPP;
702+
697703
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
698704
if (r < 0) {
699705
pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4538,6 +4538,10 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
45384538
if (amdgpu_sriov_vf(adev))
45394539
amdgpu_virt_release_full_gpu(adev, false);
45404540

4541+
r = amdgpu_dpm_notify_rlc_state(adev, false);
4542+
if (r)
4543+
return r;
4544+
45414545
return 0;
45424546
}
45434547

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,11 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
340340
adev->have_disp_power_ref = true;
341341
return ret;
342342
}
343-
/* if we have no active crtcs, then drop the power ref
344-
* we got before
343+
/* if we have no active crtcs, then go to
344+
* drop the power ref we got before
345345
*/
346-
if (!active && adev->have_disp_power_ref) {
347-
pm_runtime_put_autosuspend(dev->dev);
346+
if (!active && adev->have_disp_power_ref)
348347
adev->have_disp_power_ref = false;
349-
}
350-
351348
out:
352349
/* drop the power reference we got coming in here */
353350
pm_runtime_put_autosuspend(dev->dev);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,6 +2263,8 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
22632263
pm_runtime_mark_last_busy(ddev->dev);
22642264
pm_runtime_put_autosuspend(ddev->dev);
22652265

2266+
pci_wake_from_d3(pdev, TRUE);
2267+
22662268
/*
22672269
* For runpm implemented via BACO, PMFW will handle the
22682270
* timing for BACO in and out:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ uint64_t amdgpu_gmc_agp_addr(struct ttm_buffer_object *bo)
181181
{
182182
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
183183

184+
if (!bo->ttm)
185+
return AMDGPU_BO_INVALID_OFFSET;
186+
184187
if (bo->ttm->num_pages != 1 || bo->ttm->caching == ttm_cached)
185188
return AMDGPU_BO_INVALID_OFFSET;
186189

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,10 +1527,14 @@ u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo)
15271527
u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo)
15281528
{
15291529
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
1530-
uint64_t offset;
1530+
uint64_t offset = AMDGPU_BO_INVALID_OFFSET;
15311531

1532-
offset = (bo->tbo.resource->start << PAGE_SHIFT) +
1533-
amdgpu_ttm_domain_start(adev, bo->tbo.resource->mem_type);
1532+
if (bo->tbo.resource->mem_type == TTM_PL_TT)
1533+
offset = amdgpu_gmc_agp_addr(&bo->tbo);
1534+
1535+
if (offset == AMDGPU_BO_INVALID_OFFSET)
1536+
offset = (bo->tbo.resource->start << PAGE_SHIFT) +
1537+
amdgpu_ttm_domain_start(adev, bo->tbo.resource->mem_type);
15341538

15351539
return amdgpu_gmc_sign_extend(offset);
15361540
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
214214
control->i2c_address = EEPROM_I2C_MADDR_0;
215215
return true;
216216
case IP_VERSION(13, 0, 0):
217+
if (strnstr(atom_ctx->vbios_pn, "D707",
218+
sizeof(atom_ctx->vbios_pn)))
219+
control->i2c_address = EEPROM_I2C_MADDR_0;
220+
else
221+
control->i2c_address = EEPROM_I2C_MADDR_4;
222+
return true;
217223
case IP_VERSION(13, 0, 6):
218224
case IP_VERSION(13, 0, 10):
219225
control->i2c_address = EEPROM_I2C_MADDR_4;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -959,10 +959,8 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo)
959959
return 0;
960960

961961
addr = amdgpu_gmc_agp_addr(bo);
962-
if (addr != AMDGPU_BO_INVALID_OFFSET) {
963-
bo->resource->start = addr >> PAGE_SHIFT;
962+
if (addr != AMDGPU_BO_INVALID_OFFSET)
964963
return 0;
965-
}
966964

967965
/* allocate GART space */
968966
placement.num_placement = 1;

0 commit comments

Comments
 (0)