diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-11 00:02:14 +0300 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-10-11 00:02:14 +0300 | 
| commit | 284fc30e66e602a5df58393860f67477d6a79339 (patch) | |
| tree | d55041b765fc05e69575f65bea05cf5a81ccdd3d /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | 1e5d41b981bc550f41b198706e259a45686f3b5a (diff) | |
| parent | c4b6ddcf01f63a710c24a128d134d3fa51978d6c (diff) | |
| download | linux-284fc30e66e602a5df58393860f67477d6a79339.tar.xz | |
Merge tag 'drm-next-2025-10-11-1' of https://gitlab.freedesktop.org/drm/kernel
Pull more drm fixes from Dave Airlie:
 "Just the follow up fixes for rc1 from the next branch, amdgpu and xe
  mostly with a single v3d fix in there.
  amdgpu:
   - DC DCE6 fixes
   - GPU reset fixes
   - Secure diplay messaging cleanup
   - MES fix
   - GPUVM locking fixes
   - PMFW messaging cleanup
   - PCI US/DS switch handling fix
   - VCN queue reset fix
   - DC FPU handling fix
   - DCN 3.5 fix
   - DC mirroring fix
  amdkfd:
   - Fix kfd process ref leak
   - mmap write lock handling fix
   - Fix comments in IOCTL
  xe:
   - Fix build with clang 16
   - Fix handling of invalid configfs syntax usage and spell out the
     expected syntax in the documentation
   - Do not try late bind firmware when running as VF since it shouldn't
     handle firmware loading
   - Fix idle assertion for local BOs
   - Fix uninitialized variable for late binding
   - Do not require perfmon_capable to expose free memory at page
     granularity. Handle it like other drm drivers do
   - Fix lock handling on suspend error path
   - Fix I2C controller resume after S3
  v3d:
   - fix fence locking"
* tag 'drm-next-2025-10-11-1' of https://gitlab.freedesktop.org/drm/kernel: (34 commits)
  drm/amd/display: Incorrect Mirror Cositing
  drm/amd/display: Enable Dynamic DTBCLK Switch
  drm/amdgpu: Report individual reset error
  drm/amdgpu: partially revert "revert to old status lock handling v3"
  drm/amd/display: Fix unsafe uses of kernel mode FPU
  drm/amd/pm: Disable VCN queue reset on SMU v13.0.6 due to regression
  drm/amdgpu: Fix general protection fault in amdgpu_vm_bo_reset_state_machine
  drm/amdgpu: Check swus/ds for switch state save
  drm/amdkfd: Fix two comments in kfd_ioctl.h
  drm/amd/pm: Avoid interface mismatch messaging
  drm/amdgpu: Merge amdgpu_vm_set_pasid into amdgpu_vm_init
  drm/amd/amdgpu: Fix the mes version that support inv_tlbs
  drm/amd: Check whether secure display TA loaded successfully
  drm/amdkfd: Fix mmap write lock not release
  drm/amdkfd: Fix kfd process ref leaking when userptr unmapping
  drm/amdgpu: Fix for GPU reset being blocked by KIQ I/O.
  drm/amd/display: Disable scaling on DCE6 for now
  drm/amd/display: Properly disable scaling on DCE6
  drm/amd/display: Properly clear SCL_*_FILTER_CONTROL on DCE6
  drm/amd/display: Add missing DCE6 SCL_HORZ_FILTER_INIT* SRIs
  ...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 48 | 
1 files changed, 30 insertions, 18 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a77000c2e0bb..7a899fb4de29 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -6389,23 +6389,28 @@ static int amdgpu_device_sched_resume(struct list_head *device_list,  		if (!drm_drv_uses_atomic_modeset(adev_to_drm(tmp_adev)) && !job_signaled)  			drm_helper_resume_force_mode(adev_to_drm(tmp_adev)); -		if (tmp_adev->asic_reset_res) -			r = tmp_adev->asic_reset_res; - -		tmp_adev->asic_reset_res = 0; - -		if (r) { +		if (tmp_adev->asic_reset_res) {  			/* bad news, how to tell it to userspace ?  			 * for ras error, we should report GPU bad status instead of  			 * reset failure  			 */  			if (reset_context->src != AMDGPU_RESET_SRC_RAS ||  			    !amdgpu_ras_eeprom_check_err_threshold(tmp_adev)) -				dev_info(tmp_adev->dev, "GPU reset(%d) failed\n", -					atomic_read(&tmp_adev->gpu_reset_counter)); -			amdgpu_vf_error_put(tmp_adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r); +				dev_info( +					tmp_adev->dev, +					"GPU reset(%d) failed with error %d \n", +					atomic_read( +						&tmp_adev->gpu_reset_counter), +					tmp_adev->asic_reset_res); +			amdgpu_vf_error_put(tmp_adev, +					    AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, +					    tmp_adev->asic_reset_res); +			if (!r) +				r = tmp_adev->asic_reset_res; +			tmp_adev->asic_reset_res = 0;  		} else { -			dev_info(tmp_adev->dev, "GPU reset(%d) succeeded!\n", atomic_read(&tmp_adev->gpu_reset_counter)); +			dev_info(tmp_adev->dev, "GPU reset(%d) succeeded!\n", +				 atomic_read(&tmp_adev->gpu_reset_counter));  			if (amdgpu_acpi_smart_shift_update(tmp_adev,  							   AMDGPU_SS_DEV_D0))  				dev_warn(tmp_adev->dev, @@ -7157,28 +7162,35 @@ void amdgpu_pci_resume(struct pci_dev *pdev)  static void amdgpu_device_cache_switch_state(struct amdgpu_device *adev)  { -	struct pci_dev *parent = pci_upstream_bridge(adev->pdev); +	struct pci_dev *swus, *swds;  	int r; -	if (!parent || parent->vendor != PCI_VENDOR_ID_ATI) +	swds = pci_upstream_bridge(adev->pdev); +	if (!swds || swds->vendor != PCI_VENDOR_ID_ATI || +	    pci_pcie_type(swds) != PCI_EXP_TYPE_DOWNSTREAM) +		return; +	swus = pci_upstream_bridge(swds); +	if (!swus || +	    (swus->vendor != PCI_VENDOR_ID_ATI && +	     swus->vendor != PCI_VENDOR_ID_AMD) || +	    pci_pcie_type(swus) != PCI_EXP_TYPE_UPSTREAM)  		return;  	/* If already saved, return */  	if (adev->pcie_reset_ctx.swus)  		return;  	/* Upstream bridge is ATI, assume it's SWUS/DS architecture */ -	r = pci_save_state(parent); +	r = pci_save_state(swds);  	if (r)  		return; -	adev->pcie_reset_ctx.swds_pcistate = pci_store_saved_state(parent); +	adev->pcie_reset_ctx.swds_pcistate = pci_store_saved_state(swds); -	parent = pci_upstream_bridge(parent); -	r = pci_save_state(parent); +	r = pci_save_state(swus);  	if (r)  		return; -	adev->pcie_reset_ctx.swus_pcistate = pci_store_saved_state(parent); +	adev->pcie_reset_ctx.swus_pcistate = pci_store_saved_state(swus); -	adev->pcie_reset_ctx.swus = parent; +	adev->pcie_reset_ctx.swus = swus;  }  static void amdgpu_device_load_switch_state(struct amdgpu_device *adev) | 
