Commit dc1af502 authored by Simona Vetter's avatar Simona Vetter
Browse files

Merge tag 'drm-intel-gt-next-2025-10-29' of...

Merge tag 'drm-intel-gt-next-2025-10-29' of https://gitlab.freedesktop.org/drm/i915/kernel

 into drm-next

Driver Changes:

Fixes/improvements/new stuff:

- Set O_LARGEFILE in __create_shmem() (Taotao Chen)
- Fix incorrect error handling in shmem_pwrite() (Taotao Chen)
- Skip GuC communication warning on reset in progress [guc] (Zhanjun Dong)
- Fix conversion between clock ticks and nanoseconds [guc] (Umesh Nerlige Ramappa)

Miscellaneous:

- Avoid accessing uninitialized context in emit_rpcs_query() [selftests] (Krzysztof Karas)
- Fix typo in comment (I915_EXEC_NO_RELOC) [gem] (Marlon Henrique Sanches)

Backmerges:

- Merge drm/drm-next into drm-intel-gt-next (Joonas Lahtinen)

Signed-off-by: default avatarSimona Vetter <simona.vetter@ffwll.ch>
From: Tvrtko Ursulin <tursulin@igalia.com>
Link: https://patch.msgid.link/aQH994lQI_iVPzTI@linux
parents 7446fbf0 2ada9cb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ enum {
 * we want to leave the object where it is and for all the existing relocations
 * to match. If the object is given a new address, or if userspace thinks the
 * object is elsewhere, we have to parse all the relocation entries and update
 * the addresses. Userspace can set the I915_EXEC_NORELOC flag to hint that
 * the addresses. Userspace can set the I915_EXEC_NO_RELOC flag to hint that
 * all the target addresses in all of its objects match the value in the
 * relocation entries and that they all match the presumed offsets given by the
 * list of execbuffer objects. Using this knowledge, we know that if we haven't
+12 −3
Original line number Diff line number Diff line
@@ -441,11 +441,20 @@ shmem_pwrite(struct drm_i915_gem_object *obj,
	written = file->f_op->write_iter(&kiocb, &iter);
	BUG_ON(written == -EIOCBQUEUED);

	if (written != size)
		return -EIO;

	/*
	 * First, check if write_iter returned a negative error.
	 * If the write failed, return the real error code immediately.
	 * This prevents it from being overwritten by the short write check below.
	 */
	if (written < 0)
		return written;
	/*
	 * Check for a short write (written bytes != requested size).
	 * Even if some data was written, return -EIO to indicate that the
	 * write was not fully completed.
	 */
	if (written != size)
		return -EIO;

	return 0;
}
+2 −1
Original line number Diff line number Diff line
@@ -962,13 +962,14 @@ emit_rpcs_query(struct drm_i915_gem_object *obj,
	if (IS_ERR(rpcs))
		return PTR_ERR(rpcs);

	i915_gem_ww_ctx_init(&ww, false);

	batch = i915_vma_instance(rpcs, ce->vm, NULL);
	if (IS_ERR(batch)) {
		err = PTR_ERR(batch);
		goto err_put;
	}

	i915_gem_ww_ctx_init(&ww, false);
retry:
	err = i915_gem_object_lock(obj, &ww);
	if (!err)
+2 −2
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ static u64 div_u64_roundup(u64 nom, u32 den)

u64 intel_gt_clock_interval_to_ns(const struct intel_gt *gt, u64 count)
{
	return div_u64_roundup(count * NSEC_PER_SEC, gt->clock_frequency);
	return mul_u64_u32_div(count, NSEC_PER_SEC, gt->clock_frequency);
}

u64 intel_gt_pm_interval_to_ns(const struct intel_gt *gt, u64 count)
@@ -215,7 +215,7 @@ u64 intel_gt_pm_interval_to_ns(const struct intel_gt *gt, u64 count)

u64 intel_gt_ns_to_clock_interval(const struct intel_gt *gt, u64 ns)
{
	return div_u64_roundup(gt->clock_frequency * ns, NSEC_PER_SEC);
	return mul_u64_u32_div(ns, gt->clock_frequency, NSEC_PER_SEC);
}

u64 intel_gt_ns_to_pm_interval(const struct intel_gt *gt, u64 ns)