Commit 6edc84bc authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'drm-fixes-2023-09-29' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Regular pull, this feel suspiciously light so I expect next week might
  be a bit heavier? Let's see how we go. This is from a code point of
  view ivpu and i915 fixes.

  The only other patch is adding Danilo Krummrich to the nouveau
  maintainers, he's agreed to take on more of the roll after Ben
  retired.

  MAINTAINERS:
   - add Danilo for nouveau

  ivpu:
   - Add PCI ids for Arrow Lake
   - Fix memory corruption during IPC
   - Avoid dmesg flooding
   - 40xx: Wait for clock resource
   - 40xx: Fix interrupt usage
   - 40xx: Support caching when loading firmware

  i915:
   - Fix a panic regression on gen8_ggtt_insert_entries
   - Fix load issue due to reservation address in ggtt_reserve_guc_top
   - Fix a possible deadlock with guc busyness worker"

* tag 'drm-fixes-2023-09-29' of git://anongit.freedesktop.org/drm/drm:
  accel/ivpu: Use cached buffers for FW loading
  accel/ivpu/40xx: Fix missing VPUIP interrupts
  accel/ivpu/40xx: Disable frequency change interrupt
  accel/ivpu/40xx: Ensure clock resource ownership Ack before Power-Up
  accel/ivpu: Don't flood dmesg with VPU ready message
  accel/ivpu: Do not use wait event interruptible
  MAINTAINERS: update nouveau maintainers
  i915/guc: Get runtime pm in busyness worker only if already active
  drm/i915/gt: Fix reservation address in ggtt_reserve_guc_top
  i915: Limit the length of an sg list to the requested length
  accel/ivpu: Add Arrow Lake pci id
parents 71e58659 06365a04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6647,6 +6647,7 @@ F: drivers/gpu/drm/panel/panel-novatek-nt36672a.c
DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS
M:	Karol Herbst <kherbst@redhat.com>
M:	Lyude Paul <lyude@redhat.com>
M:	Danilo Krummrich <dakr@redhat.com>
L:	dri-devel@lists.freedesktop.org
L:	nouveau@lists.freedesktop.org
S:	Supported
+2 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ static int ivpu_wait_for_ready(struct ivpu_device *vdev)
	}

	if (!ret)
		ivpu_info(vdev, "VPU ready message received successfully\n");
		ivpu_dbg(vdev, PM, "VPU ready message received successfully\n");
	else
		ivpu_hw_diagnose_failure(vdev);

@@ -634,6 +634,7 @@ static void ivpu_dev_fini(struct ivpu_device *vdev)

static struct pci_device_id ivpu_pci_ids[] = {
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_MTL) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_ARL) },
	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_LNL) },
	{ }
};
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#define DRIVER_DATE "20230117"

#define PCI_DEVICE_ID_MTL   0x7d1d
#define PCI_DEVICE_ID_ARL   0xad1d
#define PCI_DEVICE_ID_LNL   0x643e

#define IVPU_HW_37XX	37
@@ -165,6 +166,7 @@ static inline int ivpu_hw_gen(struct ivpu_device *vdev)
{
	switch (ivpu_device_id(vdev)) {
	case PCI_DEVICE_ID_MTL:
	case PCI_DEVICE_ID_ARL:
		return IVPU_HW_37XX;
	case PCI_DEVICE_ID_LNL:
		return IVPU_HW_40XX;
+5 −3
Original line number Diff line number Diff line
@@ -220,7 +220,8 @@ static int ivpu_fw_mem_init(struct ivpu_device *vdev)
	if (ret)
		return ret;

	fw->mem = ivpu_bo_alloc_internal(vdev, fw->runtime_addr, fw->runtime_size, DRM_IVPU_BO_WC);
	fw->mem = ivpu_bo_alloc_internal(vdev, fw->runtime_addr, fw->runtime_size,
					 DRM_IVPU_BO_CACHED | DRM_IVPU_BO_NOSNOOP);
	if (!fw->mem) {
		ivpu_err(vdev, "Failed to allocate firmware runtime memory\n");
		return -ENOMEM;
@@ -330,7 +331,7 @@ int ivpu_fw_load(struct ivpu_device *vdev)
		memset(start, 0, size);
	}

	wmb(); /* Flush WC buffers after writing fw->mem */
	clflush_cache_range(fw->mem->kvaddr, fw->mem->base.size);

	return 0;
}
@@ -432,6 +433,7 @@ void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params
	if (!ivpu_fw_is_cold_boot(vdev)) {
		boot_params->save_restore_ret_address = 0;
		vdev->pm->is_warmboot = true;
		clflush_cache_range(vdev->fw->mem->kvaddr, SZ_4K);
		return;
	}

@@ -493,7 +495,7 @@ void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params
	boot_params->punit_telemetry_sram_size = ivpu_hw_reg_telemetry_size_get(vdev);
	boot_params->vpu_telemetry_enable = ivpu_hw_reg_telemetry_enable_get(vdev);

	wmb(); /* Flush WC buffers after writing bootparams */
	clflush_cache_range(vdev->fw->mem->kvaddr, SZ_4K);

	ivpu_fw_boot_params_print(vdev, boot_params);
}
+5 −0
Original line number Diff line number Diff line
@@ -8,6 +8,8 @@
#include <drm/drm_gem.h>
#include <drm/drm_mm.h>

#define DRM_IVPU_BO_NOSNOOP       0x10000000

struct dma_buf;
struct ivpu_bo_ops;
struct ivpu_file_priv;
@@ -83,6 +85,9 @@ static inline u32 ivpu_bo_cache_mode(struct ivpu_bo *bo)

static inline bool ivpu_bo_is_snooped(struct ivpu_bo *bo)
{
	if (bo->flags & DRM_IVPU_BO_NOSNOOP)
		return false;

	return ivpu_bo_cache_mode(bo) == DRM_IVPU_BO_CACHED;
}

Loading