Commit 989c5b90 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-fixes-2024-10-31' of...

Merge tag 'drm-misc-fixes-2024-10-31' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-fixes

Short summary of fixes pull:

ivpu:
- Fix firewall IRQ handling

panthor:
- Fix firmware initialization wrt page sizes
- Fix handling and reporting of dead job groups

sched:
- Guarantee forward progress via WC_MEM_RECLAIM

tests:
- Fix memory leak in drm_display_mode_from_cea_vic()

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20241031144348.GA7826@linux-2.fritz.box
parents 81983758 add4163a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -108,6 +108,14 @@ static int reset_pending_show(struct seq_file *s, void *v)
	return 0;
}

static int firewall_irq_counter_show(struct seq_file *s, void *v)
{
	struct ivpu_device *vdev = seq_to_ivpu(s);

	seq_printf(s, "%d\n", atomic_read(&vdev->hw->firewall_irq_counter));
	return 0;
}

static const struct drm_debugfs_info vdev_debugfs_list[] = {
	{"bo_list", bo_list_show, 0},
	{"fw_name", fw_name_show, 0},
@@ -116,6 +124,7 @@ static const struct drm_debugfs_info vdev_debugfs_list[] = {
	{"last_bootmode", last_bootmode_show, 0},
	{"reset_counter", reset_counter_show, 0},
	{"reset_pending", reset_pending_show, 0},
	{"firewall_irq_counter", firewall_irq_counter_show, 0},
};

static ssize_t
+1 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@ int ivpu_hw_init(struct ivpu_device *vdev)
	platform_init(vdev);
	wa_init(vdev);
	timeouts_init(vdev);
	atomic_set(&vdev->hw->firewall_irq_counter, 0);

	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ struct ivpu_hw_info {
	int dma_bits;
	ktime_t d0i3_entry_host_ts;
	u64 d0i3_entry_vpu_ts;
	atomic_t firewall_irq_counter;
};

int ivpu_hw_init(struct ivpu_device *vdev);
+4 −1
Original line number Diff line number Diff line
@@ -1062,7 +1062,10 @@ static void irq_wdt_mss_handler(struct ivpu_device *vdev)

static void irq_noc_firewall_handler(struct ivpu_device *vdev)
{
	ivpu_pm_trigger_recovery(vdev, "NOC Firewall IRQ");
	atomic_inc(&vdev->hw->firewall_irq_counter);

	ivpu_dbg(vdev, IRQ, "NOC Firewall interrupt detected, counter %d\n",
		 atomic_read(&vdev->hw->firewall_irq_counter));
}

/* Handler for IRQs from NPU core */
+2 −2
Original line number Diff line number Diff line
@@ -487,6 +487,7 @@ static int panthor_fw_load_section_entry(struct panthor_device *ptdev,
					 struct panthor_fw_binary_iter *iter,
					 u32 ehdr)
{
	ssize_t vm_pgsz = panthor_vm_page_size(ptdev->fw->vm);
	struct panthor_fw_binary_section_entry_hdr hdr;
	struct panthor_fw_section *section;
	u32 section_size;
@@ -515,8 +516,7 @@ static int panthor_fw_load_section_entry(struct panthor_device *ptdev,
		return -EINVAL;
	}

	if ((hdr.va.start & ~PAGE_MASK) != 0 ||
	    (hdr.va.end & ~PAGE_MASK) != 0) {
	if (!IS_ALIGNED(hdr.va.start, vm_pgsz) || !IS_ALIGNED(hdr.va.end, vm_pgsz)) {
		drm_err(&ptdev->base, "Firmware corrupted, virtual addresses not page aligned: 0x%x-0x%x\n",
			hdr.va.start, hdr.va.end);
		return -EINVAL;
Loading