Commit cbd4480c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'drm-fixes-2026-01-09' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "I missed the drm-rust fixes tree for last week, so this catches up on
  that, along with amdgpu, and then some misc fixes across a few
  drivers. I hadn't got an xe pull by the time I sent this, I suspect
  one will arrive 10 mins after, but I don't think there is anything
  that can't wait for next week.

  Things seem to have picked up a little with people coming back from
  holidays,

  MAINTAINERS:
   - Fix Nova GPU driver git links
   - Fix typo in TYR driver entry preventing correct behavior of
     scripts/get_maintainer.pl
   - Exclude TYR driver from DRM MISC

  nova-core:
   - Correctly select RUST_FW_LOADER_ABSTRACTIONS to prevent build
     errors
   - Regenerate nova-core bindgen bindings with '--explicit-padding' to
     avoid uninitialized bytes
   - Fix length of received GSP messages, due to miscalculated message
     payload size
   - Regenerate bindings to derive MaybeZeroable
   - Use a bindings alias to derive the firmware version

  exynos:
   - hdmi: replace system_wq with system_percpu_wq

  pl111:
   - Fix error handling in probe

  mediatek/atomic/tidss:
   - Fix tidss in another way and revert reordering of pre-enable and
     post-disable operations, as it breaks other bridge drivers

  nouveau:
   - Fix regression from fwsec s/r fix

  pci/vga:
   - Fix multiple gpu's being reported a 'boot_display'

  fb-helper:
   - Fix vblank timeout during suspend/reset

  amdgpu:
   - Clang fixes
   - Navi1x PCIe DPM fixes
   - Ring reset fixes
   - ISP suspend fix
   - Analog DC fixes
   - VPE fixes
   - Mode1 reset fix

  radeon:
   - Variable sized array fix"

* tag 'drm-fixes-2026-01-09' of https://gitlab.freedesktop.org/drm/kernel: (32 commits)
  Reapply "Revert "drm/amd: Skip power ungate during suspend for VPE""
  drm/amd/display: Check NULL before calling dac_load_detection
  drm/amd/pm: Disable MMIO access during SMU Mode 1 reset
  drm/exynos: hdmi: replace use of system_wq with system_percpu_wq
  drm/fb-helper: Fix vblank timeout during suspend/reset
  PCI/VGA: Don't assume the only VGA device on a system is `boot_vga`
  drm/amdgpu: Fix query for VPE block_type and ip_count
  drm/amd/display: Add missing encoder setup to DACnEncoderControl
  drm/amd/display: Correct color depth for SelectCRTC_Source
  drm/amd/amdgpu: Fix SMU warning during isp suspend-resume
  drm/amdgpu: always backup and reemit fences
  drm/amdgpu: don't reemit ring contents more than once
  drm/amd/pm: force send pcie parmater on navi1x
  drm/amd/pm: fix wrong pcie parameter on navi1x
  drm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[]
  drm/amd/display: Reduce number of arguments of dcn30's CalculateWatermarksAndDRAMSpeedChangeSupport()
  drm/amd/display: Reduce number of arguments of dcn30's CalculatePrefetchSchedule()
  drm/amd/display: Apply e4479aec to dml
  nouveau: don't attempt fwsec on sb on newer platforms
  drm/tidss: Fix enable/disable order
  ...
parents 2bfe3e0d f6eac56d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2159,7 +2159,7 @@ M: Alice Ryhl <aliceryhl@google.com>
L:	dri-devel@lists.freedesktop.org
S:	Supported
W:	https://rust-for-linux.com/tyr-gpu-driver
W	https://drm.pages.freedesktop.org/maintainer-tools/drm-rust.html
W:	https://drm.pages.freedesktop.org/maintainer-tools/drm-rust.html
B:	https://gitlab.freedesktop.org/panfrost/linux/-/issues
T:	git https://gitlab.freedesktop.org/drm/rust/kernel.git
F:	Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
@@ -8068,7 +8068,7 @@ W: https://rust-for-linux.com/nova-gpu-driver
Q:	https://patchwork.freedesktop.org/project/nouveau/
B:	https://gitlab.freedesktop.org/drm/nova/-/issues
C:	irc://irc.oftc.net/nouveau
T:	git https://gitlab.freedesktop.org/drm/nova.git nova-next
T:	git https://gitlab.freedesktop.org/drm/rust/kernel.git drm-rust-next
F:	Documentation/gpu/nova/
F:	drivers/gpu/nova-core/
@@ -8080,7 +8080,7 @@ W: https://rust-for-linux.com/nova-gpu-driver
Q:	https://patchwork.freedesktop.org/project/nouveau/
B:	https://gitlab.freedesktop.org/drm/nova/-/issues
C:	irc://irc.oftc.net/nouveau
T:	git https://gitlab.freedesktop.org/drm/nova.git nova-next
T:	git https://gitlab.freedesktop.org/drm/rust/kernel.git drm-rust-next
F:	Documentation/gpu/nova/
F:	drivers/gpu/drm/nova/
F:	include/uapi/drm/nova_drm.h
@@ -8358,6 +8358,7 @@ X: drivers/gpu/drm/msm/
X:	drivers/gpu/drm/nova/
X:	drivers/gpu/drm/radeon/
X:	drivers/gpu/drm/tegra/
X:	drivers/gpu/drm/tyr/
X:	drivers/gpu/drm/xe/
DRM DRIVERS AND COMMON INFRASTRUCTURE [RUST]
+4 −2
Original line number Diff line number Diff line
@@ -3445,11 +3445,10 @@ int amdgpu_device_set_pg_state(struct amdgpu_device *adev,
		    (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX ||
		     adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SDMA))
			continue;
		/* skip CG for VCE/UVD/VPE, it's handled specially */
		/* skip CG for VCE/UVD, it's handled specially */
		if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_UVD &&
		    adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCE &&
		    adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VCN &&
		    adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_VPE &&
		    adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_JPEG &&
		    adev->ip_blocks[i].version->funcs->set_powergating_state) {
			/* enable powergating to save power */
@@ -5867,6 +5866,9 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev)
	if (ret)
		goto mode1_reset_failed;

	/* enable mmio access after mode 1 reset completed */
	adev->no_hw_access = false;

	amdgpu_device_load_pci_state(adev->pdev);
	ret = amdgpu_psp_wait_for_bootloader(adev);
	if (ret)
+31 −5
Original line number Diff line number Diff line
@@ -89,6 +89,16 @@ static u32 amdgpu_fence_read(struct amdgpu_ring *ring)
	return seq;
}

static void amdgpu_fence_save_fence_wptr_start(struct amdgpu_fence *af)
{
	af->fence_wptr_start = af->ring->wptr;
}

static void amdgpu_fence_save_fence_wptr_end(struct amdgpu_fence *af)
{
	af->fence_wptr_end = af->ring->wptr;
}

/**
 * amdgpu_fence_emit - emit a fence on the requested ring
 *
@@ -116,8 +126,10 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, struct amdgpu_fence *af,
		       &ring->fence_drv.lock,
		       adev->fence_context + ring->idx, seq);

	amdgpu_fence_save_fence_wptr_start(af);
	amdgpu_ring_emit_fence(ring, ring->fence_drv.gpu_addr,
			       seq, flags | AMDGPU_FENCE_FLAG_INT);
	amdgpu_fence_save_fence_wptr_end(af);
	amdgpu_fence_save_wptr(af);
	pm_runtime_get_noresume(adev_to_drm(adev)->dev);
	ptr = &ring->fence_drv.fences[seq & ring->fence_drv.num_fences_mask];
@@ -709,6 +721,7 @@ void amdgpu_fence_driver_guilty_force_completion(struct amdgpu_fence *af)
	struct amdgpu_ring *ring = af->ring;
	unsigned long flags;
	u32 seq, last_seq;
	bool reemitted = false;

	last_seq = amdgpu_fence_read(ring) & ring->fence_drv.num_fences_mask;
	seq = ring->fence_drv.sync_seq & ring->fence_drv.num_fences_mask;
@@ -726,7 +739,9 @@ void amdgpu_fence_driver_guilty_force_completion(struct amdgpu_fence *af)
		if (unprocessed && !dma_fence_is_signaled_locked(unprocessed)) {
			fence = container_of(unprocessed, struct amdgpu_fence, base);

			if (fence == af)
			if (fence->reemitted > 1)
				reemitted = true;
			else if (fence == af)
				dma_fence_set_error(&fence->base, -ETIME);
			else if (fence->context == af->context)
				dma_fence_set_error(&fence->base, -ECANCELED);
@@ -734,9 +749,12 @@ void amdgpu_fence_driver_guilty_force_completion(struct amdgpu_fence *af)
		rcu_read_unlock();
	} while (last_seq != seq);
	spin_unlock_irqrestore(&ring->fence_drv.lock, flags);
	/* signal the guilty fence */
	amdgpu_fence_write(ring, (u32)af->base.seqno);
	amdgpu_fence_process(ring);

	if (reemitted) {
		/* if we've already reemitted once then just cancel everything */
		amdgpu_fence_driver_force_completion(af->ring);
		af->ring->ring_backup_entries_to_copy = 0;
	}
}

void amdgpu_fence_save_wptr(struct amdgpu_fence *af)
@@ -784,10 +802,18 @@ void amdgpu_ring_backup_unprocessed_commands(struct amdgpu_ring *ring,
			/* save everything if the ring is not guilty, otherwise
			 * just save the content from other contexts.
			 */
			if (!guilty_fence || (fence->context != guilty_fence->context))
			if (!fence->reemitted &&
			    (!guilty_fence || (fence->context != guilty_fence->context))) {
				amdgpu_ring_backup_unprocessed_command(ring, wptr,
								       fence->wptr);
			} else if (!fence->reemitted) {
				/* always save the fence */
				amdgpu_ring_backup_unprocessed_command(ring,
								       fence->fence_wptr_start,
								       fence->fence_wptr_end);
			}
			wptr = fence->wptr;
			fence->reemitted++;
		}
		rcu_read_unlock();
	} while (last_seq != seq);
+24 −0
Original line number Diff line number Diff line
@@ -318,12 +318,36 @@ void isp_kernel_buffer_free(void **buf_obj, u64 *gpu_addr, void **cpu_addr)
}
EXPORT_SYMBOL(isp_kernel_buffer_free);

static int isp_resume(struct amdgpu_ip_block *ip_block)
{
	struct amdgpu_device *adev = ip_block->adev;
	struct amdgpu_isp *isp = &adev->isp;

	if (isp->funcs->hw_resume)
		return isp->funcs->hw_resume(isp);

	return -ENODEV;
}

static int isp_suspend(struct amdgpu_ip_block *ip_block)
{
	struct amdgpu_device *adev = ip_block->adev;
	struct amdgpu_isp *isp = &adev->isp;

	if (isp->funcs->hw_suspend)
		return isp->funcs->hw_suspend(isp);

	return -ENODEV;
}

static const struct amd_ip_funcs isp_ip_funcs = {
	.name = "isp_ip",
	.early_init = isp_early_init,
	.hw_init = isp_hw_init,
	.hw_fini = isp_hw_fini,
	.is_idle = isp_is_idle,
	.suspend = isp_suspend,
	.resume = isp_resume,
	.set_clockgating_state = isp_set_clockgating_state,
	.set_powergating_state = isp_set_powergating_state,
};
+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ struct amdgpu_isp;
struct isp_funcs {
	int (*hw_init)(struct amdgpu_isp *isp);
	int (*hw_fini)(struct amdgpu_isp *isp);
	int (*hw_suspend)(struct amdgpu_isp *isp);
	int (*hw_resume)(struct amdgpu_isp *isp);
};

struct amdgpu_isp {
Loading