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

Merge tag 'drm-fixes-2023-10-20' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Regular fixes for the week, amdgpu, i915, nouveau, with some other
  scattered around, nothing major.

  amdgpu:
   - Fix possible NULL pointer dereference
   - Avoid possible BUG_ON in GPUVM updates
   - Disable AMD_CTX_PRIORITY_UNSET

  i915:
   - Fix display issue that was blocking S0ix
   - Retry gtt fault when out of fence registers

  bridge:
   - ti-sn65dsi86: Fix device lifetime

  edid:
   - Add quirk for BenQ GW2765

  ivpu:
   - Extend address range for MMU mmap

  nouveau:
   - DP-connector fixes
   - Documentation fixes

  panel:
   - Move AUX B116XW03 into panel-simple

  scheduler:
   - Eliminate DRM_SCHED_PRIORITY_UNSET

  ttm:
   - Fix possible NULL-ptr deref in cleanup

  mediatek:
   - Correctly free sg_table in gem prime vmap"

* tag 'drm-fixes-2023-10-20' of git://anongit.freedesktop.org/drm/drm:
  drm/amdgpu: Reserve fences for VM update
  drm/amdgpu: Fix possible null pointer dereference
  accel/ivpu: Extend address range for MMU mmap
  Revert "accel/ivpu: Use cached buffers for FW loading"
  accel/ivpu: Don't enter d0i3 during FLR
  drm/i915: Retry gtt fault when out of fence registers
  drm/i915/cx0: Only clear/set the Pipe Reset bit of the PHY Lanes Owned
  gpu/drm: Eliminate DRM_SCHED_PRIORITY_UNSET
  drm/amdgpu: Unset context priority is now invalid
  drm/mediatek: Correctly free sg_table in gem prime vmap
  drm/edid: add 8 bpc quirk to the BenQ GW2765
  drm/ttm: Reorder sys manager cleanup step
  drm/nouveau/disp: fix DP capable DSM connectors
  drm/nouveau: exec: fix ioctl kernel-doc warning
  drm/panel: Move AUX B116XW03 out of panel-edp back to panel-simple
  drm/bridge: ti-sn65dsi86: Associate DSI device lifetime with auxiliary device
parents 0df072ab 8b35ce3f
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -367,14 +367,19 @@ int ivpu_boot(struct ivpu_device *vdev)
	return 0;
}

int ivpu_shutdown(struct ivpu_device *vdev)
void ivpu_prepare_for_reset(struct ivpu_device *vdev)
{
	int ret;

	ivpu_hw_irq_disable(vdev);
	disable_irq(vdev->irq);
	ivpu_ipc_disable(vdev);
	ivpu_mmu_disable(vdev);
}

int ivpu_shutdown(struct ivpu_device *vdev)
{
	int ret;

	ivpu_prepare_for_reset(vdev);

	ret = ivpu_hw_power_down(vdev);
	if (ret)
+1 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ void ivpu_file_priv_put(struct ivpu_file_priv **link);

int ivpu_boot(struct ivpu_device *vdev);
int ivpu_shutdown(struct ivpu_device *vdev);
void ivpu_prepare_for_reset(struct ivpu_device *vdev);

static inline u8 ivpu_revision(struct ivpu_device *vdev)
{
+4 −5
Original line number Diff line number Diff line
@@ -220,8 +220,7 @@ 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_CACHED | DRM_IVPU_BO_NOSNOOP);
	fw->mem = ivpu_bo_alloc_internal(vdev, fw->runtime_addr, fw->runtime_size, DRM_IVPU_BO_WC);
	if (!fw->mem) {
		ivpu_err(vdev, "Failed to allocate firmware runtime memory\n");
		return -ENOMEM;
@@ -331,7 +330,7 @@ int ivpu_fw_load(struct ivpu_device *vdev)
		memset(start, 0, size);
	}

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

	return 0;
}
@@ -433,7 +432,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);
		wmb(); /* Flush WC buffers after writing save_restore_ret_address */
		return;
	}

@@ -495,7 +494,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);

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

	ivpu_fw_boot_params_print(vdev, boot_params);
}
+0 −5
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@
#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;
@@ -85,9 +83,6 @@ 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;
}

+8 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ struct ivpu_hw_ops {
	int (*power_up)(struct ivpu_device *vdev);
	int (*boot_fw)(struct ivpu_device *vdev);
	int (*power_down)(struct ivpu_device *vdev);
	int (*reset)(struct ivpu_device *vdev);
	bool (*is_idle)(struct ivpu_device *vdev);
	void (*wdt_disable)(struct ivpu_device *vdev);
	void (*diagnose_failure)(struct ivpu_device *vdev);
@@ -91,6 +92,13 @@ static inline int ivpu_hw_power_down(struct ivpu_device *vdev)
	return vdev->hw->ops->power_down(vdev);
};

static inline int ivpu_hw_reset(struct ivpu_device *vdev)
{
	ivpu_dbg(vdev, PM, "HW reset\n");

	return vdev->hw->ops->reset(vdev);
};

static inline void ivpu_hw_wdt_disable(struct ivpu_device *vdev)
{
	vdev->hw->ops->wdt_disable(vdev);
Loading