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

Merge tag 'drm-intel-gt-next-2021-01-21-1' of...

Merge tag 'drm-intel-gt-next-2021-01-21-1' of git://anongit.freedesktop.org/drm/drm-intel

 into drm-next

Cross-subsystem Changes:

- Includes gvt-gt-next-2021-01-18 + header check fix for GVT

Driver Changes:

- Fix for #2955: Clear potentially malicious register state before
  executing clear residuals security mitigation (Chris)
- Fixes that lead to marking per-engine-reset as supported on Gen7
  (Chris)
- Remove per-client stats from debugfs/i915_gem_objects) (Tvrtko, Chris)
- Add arbitration check before semaphore wait (Chris)
- Apply interactive priority to explicit flip fences (Chris)
- Make GEM errors non-fatal by default to help capturing logs during
  development (Chris)
- Fix object page offset within a region in error capture (CQ, Matt A)
- Close race between enable_breadcrumbs and cancel_breadcrumbs (Chris)
- Almagamate clflushes on suspend/freeze to speed up S/R (Chris)
- Protect used framebuffers from casual eviction (Chris)

- Fix the sgt.pfn sanity check (Kui, Matt A)
- Reduce locking around i915_request.lock and ctx->engines_mutex (Chris)
- Simplify tracking for engine->fw_active and stats.active (Chris)
- Constrain pool objects by mapping type (Chris, Matt A)
- Use shrinkable status for unknown swizzle quirks (Chris)
- Do not suspend bonded requests if one hangs (Chris)
- Restore "Skip over completed active execlists" optimization (Chris)

- Move stolen node into GEM object union (Chris)
. Split gem_create into own file (Matt A)
- Convert object_create into object_init in LMEM region code (Matt A)
- Reduce test_and_set_bit to set_bit in i915_request_submit() (Chris)
- Mark up protected uses of 'i915_request_completed' (Chris)
- Remove extraneous inline modifiers (Chris)
- Add function to define defaults for GuC/HuC enable (John)

- Improve code locality by moving closer to single user (Matt A, Chris)
- Compiler warning fixes (Matt A, Chris)
- Selftest / CI improvements (Chris)

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210121150747.GA58732@jlahtine-mobl.ger.corp.intel.com
parents a6b8720c 69b4b998
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -31,10 +31,13 @@ config DRM_I915_DEBUG
	select DRM_DEBUG_SELFTEST
	select DMABUF_SELFTESTS
	select SW_SYNC # signaling validation framework (igt/syncobj*)
	select DRM_I915_WERROR
	select DRM_I915_DEBUG_GEM
	select DRM_I915_DEBUG_GEM_ONCE
	select DRM_I915_DEBUG_MMIO
	select DRM_I915_DEBUG_RUNTIME_PM
	select DRM_I915_SW_FENCE_DEBUG_OBJECTS
	select DRM_I915_SELFTEST
	select DRM_I915_DEBUG_RUNTIME_PM
	select DRM_I915_DEBUG_MMIO
	default n
	help
	  Choose this option to turn on extra driver debugging that may affect
@@ -69,6 +72,21 @@ config DRM_I915_DEBUG_GEM

	  If in doubt, say "N".

config DRM_I915_DEBUG_GEM_ONCE
	bool "Make a GEM debug failure fatal"
	default n
	depends on DRM_I915_DEBUG_GEM
	help
	  During development, we often only want the very first failure
	  as that would otherwise be lost in the deluge of subsequent
	  failures. However, more casual testers may not want to trigger
	  a hard BUG_ON and hope that the system remains sufficiently usable
	  to capture a bug report in situ.

	  Recommended for driver developers only.

	  If in doubt, say "N".

config DRM_I915_ERRLOG_GEM
	bool "Insert extra logging (very verbose) for common GEM errors"
	default n
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ gem-y += \
	gem/i915_gem_clflush.o \
	gem/i915_gem_client_blt.o \
	gem/i915_gem_context.o \
	gem/i915_gem_create.o \
	gem/i915_gem_dmabuf.o \
	gem/i915_gem_domain.o \
	gem/i915_gem_execbuffer.o \
+8 −15
Original line number Diff line number Diff line
@@ -2247,7 +2247,7 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
		 */
		ret = i915_vma_pin_fence(vma);
		if (ret != 0 && INTEL_GEN(dev_priv) < 4) {
			i915_gem_object_unpin_from_display_plane(vma);
			i915_vma_unpin(vma);
			vma = ERR_PTR(ret);
			goto err;
		}
@@ -2265,12 +2265,9 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
void intel_unpin_fb_vma(struct i915_vma *vma, unsigned long flags)
{
	i915_gem_object_lock(vma->obj, NULL);
	if (flags & PLANE_HAS_FENCE)
		i915_vma_unpin_fence(vma);
	i915_gem_object_unpin_from_display_plane(vma);
	i915_gem_object_unlock(vma->obj);
	i915_vma_unpin(vma);
	i915_vma_put(vma);
}
@@ -15631,15 +15628,6 @@ void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
		intel_unpin_fb_vma(vma, old_plane_state->flags);
}
static void fb_obj_bump_render_priority(struct drm_i915_gem_object *obj)
{
	struct i915_sched_attr attr = {
		.priority = I915_USER_PRIORITY(I915_PRIORITY_DISPLAY),
	};
	i915_gem_object_wait_priority(obj, 0, &attr);
}
/**
 * intel_prepare_plane_fb - Prepare fb for usage on plane
 * @_plane: drm plane to prepare for
@@ -15656,6 +15644,9 @@ int
intel_prepare_plane_fb(struct drm_plane *_plane,
		       struct drm_plane_state *_new_plane_state)
{
	struct i915_sched_attr attr = {
		.priority = I915_USER_PRIORITY(I915_PRIORITY_DISPLAY),
	};
	struct intel_plane *plane = to_intel_plane(_plane);
	struct intel_plane_state *new_plane_state =
		to_intel_plane_state(_new_plane_state);
@@ -15695,6 +15686,8 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
	}
	if (new_plane_state->uapi.fence) { /* explicit fencing */
		i915_gem_fence_wait_priority(new_plane_state->uapi.fence,
					     &attr);
		ret = i915_sw_fence_await_dma_fence(&state->commit_ready,
						    new_plane_state->uapi.fence,
						    i915_fence_timeout(dev_priv),
@@ -15716,7 +15709,7 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
	if (ret)
		return ret;
	fb_obj_bump_render_priority(obj);
	i915_gem_object_wait_priority(obj, 0, &attr);
	i915_gem_object_flush_frontbuffer(obj, ORIGIN_DIRTYFB);
	if (!new_plane_state->uapi.fence) { /* implicit fencing */
+2 −2
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
	 * If the object is stolen however, it will be full of whatever
	 * garbage was left in there.
	 */
	if (vma->obj->stolen && !prealloc)
	if (!i915_gem_object_is_shmem(vma->obj) && !prealloc)
		memset_io(info->screen_base, 0, info->screen_size);

	/* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
@@ -595,7 +595,7 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous
	 * full of whatever garbage was left in there.
	 */
	if (state == FBINFO_STATE_RUNNING &&
	    intel_fb_obj(&ifbdev->fb->base)->stolen)
	    !i915_gem_object_is_shmem(intel_fb_obj(&ifbdev->fb->base)))
		memset_io(info->screen_base, 0, info->screen_size);

	drm_fb_helper_set_suspend(&ifbdev->helper, state);
+3 −1
Original line number Diff line number Diff line
@@ -225,8 +225,10 @@ static void frontbuffer_release(struct kref *ref)
	struct i915_vma *vma;

	spin_lock(&obj->vma.lock);
	for_each_ggtt_vma(vma, obj)
	for_each_ggtt_vma(vma, obj) {
		i915_vma_clear_scanout(vma);
		vma->display_alignment = I915_GTT_MIN_ALIGNMENT;
	}
	spin_unlock(&obj->vma.lock);

	RCU_INIT_POINTER(obj->frontbuffer, NULL);
Loading