Commit f31d83f0 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-fixes-2020-03-12' of...

Merge tag 'drm-intel-fixes-2020-03-12' of git://anongit.freedesktop.org/drm/drm-intel

 into drm-fixes

drm/i915 fixes for v5.6-rc6:
- hard lockup fix
- GVT fixes
- 32-bit alignment issue fix
- timeline wait fixes
- cacheline_retire and free

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

From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87lfo6ksvw.fsf@intel.com
parents d9443265 14a0d527
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -423,7 +423,8 @@ eb_validate_vma(struct i915_execbuffer *eb,
	if (unlikely(entry->flags & eb->invalid_flags))
		return -EINVAL;

	if (unlikely(entry->alignment && !is_power_of_2(entry->alignment)))
	if (unlikely(entry->alignment &&
		     !is_power_of_2_u64(entry->alignment)))
		return -EINVAL;

	/*
+18 −11
Original line number Diff line number Diff line
@@ -1679,11 +1679,9 @@ need_timeslice(struct intel_engine_cs *engine, const struct i915_request *rq)
	if (!intel_engine_has_timeslices(engine))
		return false;

	if (list_is_last(&rq->sched.link, &engine->active.requests))
		return false;

	hint = max(rq_prio(list_next_entry(rq, sched.link)),
		   engine->execlists.queue_priority_hint);
	hint = engine->execlists.queue_priority_hint;
	if (!list_is_last(&rq->sched.link, &engine->active.requests))
		hint = max(hint, rq_prio(list_next_entry(rq, sched.link)));

	return hint >= effective_prio(rq);
}
@@ -1725,6 +1723,18 @@ static void set_timeslice(struct intel_engine_cs *engine)
	set_timer_ms(&engine->execlists.timer, active_timeslice(engine));
}

static void start_timeslice(struct intel_engine_cs *engine)
{
	struct intel_engine_execlists *execlists = &engine->execlists;

	execlists->switch_priority_hint = execlists->queue_priority_hint;

	if (timer_pending(&execlists->timer))
		return;

	set_timer_ms(&execlists->timer, timeslice(engine));
}

static void record_preemption(struct intel_engine_execlists *execlists)
{
	(void)I915_SELFTEST_ONLY(execlists->preempt_hang.count++);
@@ -1888,11 +1898,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
				 * Even if ELSP[1] is occupied and not worthy
				 * of timeslices, our queue might be.
				 */
				if (!execlists->timer.expires &&
				    need_timeslice(engine, last))
					set_timer_ms(&execlists->timer,
						     timeslice(engine));

				start_timeslice(engine);
				return;
			}
		}
@@ -1927,7 +1933,8 @@ static void execlists_dequeue(struct intel_engine_cs *engine)

			if (last && !can_merge_rq(last, rq)) {
				spin_unlock(&ve->base.active.lock);
				return; /* leave this for another */
				start_timeslice(engine);
				return; /* leave this for another sibling */
			}

			ENGINE_TRACE(engine,
+6 −2
Original line number Diff line number Diff line
@@ -192,11 +192,15 @@ static void cacheline_release(struct intel_timeline_cacheline *cl)

static void cacheline_free(struct intel_timeline_cacheline *cl)
{
	if (!i915_active_acquire_if_busy(&cl->active)) {
		__idle_cacheline_free(cl);
		return;
	}

	GEM_BUG_ON(ptr_test_bit(cl->vaddr, CACHELINE_FREE));
	cl->vaddr = ptr_set_bit(cl->vaddr, CACHELINE_FREE);

	if (i915_active_is_idle(&cl->active))
		__idle_cacheline_free(cl);
	i915_active_release(&cl->active);
}

int intel_timeline_init(struct intel_timeline *timeline,
+2 −1
Original line number Diff line number Diff line
@@ -457,7 +457,8 @@ void intel_vgpu_emulate_hotplug(struct intel_vgpu *vgpu, bool connected)
	struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;

	/* TODO: add more platforms support */
	if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) {
	if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv) ||
		IS_COFFEELAKE(dev_priv)) {
		if (connected) {
			vgpu_vreg_t(vgpu, SFUSE_STRAP) |=
				SFUSE_STRAP_DDID_DETECTED;
+2 −3
Original line number Diff line number Diff line
@@ -147,15 +147,14 @@ static void virt_vbt_generation(struct vbt *v)
	/* there's features depending on version! */
	v->header.version = 155;
	v->header.header_size = sizeof(v->header);
	v->header.vbt_size = sizeof(struct vbt) - sizeof(v->header);
	v->header.vbt_size = sizeof(struct vbt);
	v->header.bdb_offset = offsetof(struct vbt, bdb_header);

	strcpy(&v->bdb_header.signature[0], "BIOS_DATA_BLOCK");
	v->bdb_header.version = 186; /* child_dev_size = 33 */
	v->bdb_header.header_size = sizeof(v->bdb_header);

	v->bdb_header.bdb_size = sizeof(struct vbt) - sizeof(struct vbt_header)
		- sizeof(struct bdb_header);
	v->bdb_header.bdb_size = sizeof(struct vbt) - sizeof(struct vbt_header);

	/* general features */
	v->general_features_header.id = BDB_GENERAL_FEATURES;
Loading