All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/2] drm/i915/display: Explicitly cleanup initial_plane_config
@ 2020-02-04  9:48 Chris Wilson
  2020-02-04  9:48 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2020-02-04  9:48 UTC (permalink / raw)
  To: intel-gfx

I am about to stuff more objects into the plane_config and would like to
have it clean up after itself. Move the current framebuffer release into
a common function so it can be extended with the new object with
relative ease.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 21 ++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index b0af37fb6d4a..b07971204492 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3570,8 +3570,6 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 		goto valid_fb;
 	}
 
-	kfree(plane_config->fb);
-
 	/*
 	 * Failed to alloc the obj, check to see if we should share
 	 * an fb with another CRTC instead
@@ -3591,7 +3589,6 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 
 		if (intel_plane_ggtt_offset(state) == plane_config->base) {
 			fb = state->hw.fb;
-			drm_framebuffer_get(fb);
 			goto valid_fb;
 		}
 	}
@@ -3625,7 +3622,6 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 			intel_crtc->pipe, PTR_ERR(intel_state->vma));
 
 		intel_state->vma = NULL;
-		drm_framebuffer_put(fb);
 		return;
 	}
 
@@ -3648,6 +3644,8 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 		dev_priv->preserve_bios_swizzle = true;
 
 	plane_state->fb = fb;
+	drm_framebuffer_get(fb);
+
 	plane_state->crtc = &intel_crtc->base;
 	intel_plane_copy_uapi_to_hw_state(intel_state, intel_state);
 
@@ -17854,6 +17852,19 @@ static void intel_mode_config_cleanup(struct drm_i915_private *i915)
 	drm_mode_config_cleanup(&i915->drm);
 }
 
+static void plane_config_fini(struct intel_initial_plane_config *plane_config)
+{
+	if (plane_config->fb) {
+		struct drm_framebuffer *fb = &plane_config->fb->base;
+
+		/* We may only have the stub and not a full framebuffer */
+		if (drm_framebuffer_read_refcount(fb))
+			drm_framebuffer_put(fb);
+		else
+			kfree(fb);
+	}
+}
+
 int intel_modeset_init(struct drm_i915_private *i915)
 {
 	struct drm_device *dev = &i915->drm;
@@ -17942,6 +17953,8 @@ int intel_modeset_init(struct drm_i915_private *i915)
 		 * just get the first one.
 		 */
 		intel_find_initial_plane_obj(crtc, &plane_config);
+
+		plane_config_fini(&plane_config);
 	}
 
 	/*
-- 
2.25.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma
  2020-02-04  9:48 [Intel-gfx] [PATCH 1/2] drm/i915/display: Explicitly cleanup initial_plane_config Chris Wilson
@ 2020-02-04  9:48 ` Chris Wilson
  2020-02-04 14:26   ` Ville Syrjälä
  2020-02-05  1:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/display: Explicitly cleanup initial_plane_config Patchwork
  2020-02-07  5:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2020-02-04  9:48 UTC (permalink / raw)
  To: intel-gfx

As only the display codes tries to pin its preallocated framebuffer into
an exact location in the GGTT, remove the convenience function and make
the pin management explicit in the display code. Then throughout the
display management, we track the framebuffer and its plane->vma; with
less single purpose code and ready for first class i915_vma.

In doing so, this should fix the BUG_ON(vma->pages) on fi-kbl-soraka.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
Ville, you mentioned you had a plan... This should prevent an oops during
boot for kbl-soraka, so it would be nice :)
-Chris
---
 drivers/gpu/drm/i915/display/intel_display.c  | 141 +++++++++++-------
 .../drm/i915/display/intel_display_types.h    |   1 +
 drivers/gpu/drm/i915/gem/i915_gem_stolen.c    |  82 ++--------
 drivers/gpu/drm/i915/gem/i915_gem_stolen.h    |   1 -
 drivers/gpu/drm/i915/gt/intel_rc6.c           |   1 -
 5 files changed, 102 insertions(+), 124 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index b07971204492..c3695317d74a 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -3389,6 +3389,68 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)
 	}
 }
 
+static struct i915_vma *
+initial_plane_vma(struct drm_i915_private *i915,
+		  struct intel_initial_plane_config *plane_config)
+{
+	struct drm_i915_gem_object *obj;
+	struct i915_vma *vma;
+	u32 base, size;
+
+	if (plane_config->size == 0)
+		return NULL;
+
+	base = round_down(plane_config->base,
+			  I915_GTT_MIN_ALIGNMENT);
+	size = round_up(plane_config->base + plane_config->size,
+			I915_GTT_MIN_ALIGNMENT);
+	size -= base;
+
+	/*
+	 * If the FB is too big, just don't use it since fbdev is not very
+	 * important and we should probably use that space with FBC or other
+	 * features.
+	 */
+	if (size * 2 > i915->stolen_usable_size)
+		return NULL;
+
+	obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size);
+	if (IS_ERR(obj))
+		return NULL;
+
+	switch (plane_config->tiling) {
+	case I915_TILING_NONE:
+		break;
+	case I915_TILING_X:
+	case I915_TILING_Y:
+		obj->tiling_and_stride =
+			plane_config->fb->base.pitches[0] |
+			plane_config->tiling;
+		break;
+	default:
+		MISSING_CASE(plane_config->tiling);
+		goto err_obj;
+	}
+
+	vma = i915_vma_instance(obj, &i915->ggtt.vm, NULL);
+	if (IS_ERR(vma))
+		goto err_obj;
+
+	if (i915_vma_pin(vma, 0, 0,
+			 PIN_GLOBAL | PIN_MAPPABLE | PIN_OFFSET_FIXED | base))
+		goto err_obj;
+
+	if (i915_gem_object_is_tiled(obj) &&
+	    !i915_vma_is_map_and_fenceable(vma))
+		goto err_obj;
+
+	return vma;
+
+err_obj:
+	i915_gem_object_put(obj);
+	return NULL;
+}
+
 static bool
 intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
 			      struct intel_initial_plane_config *plane_config)
@@ -3397,22 +3459,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct drm_mode_fb_cmd2 mode_cmd = { 0 };
 	struct drm_framebuffer *fb = &plane_config->fb->base;
-	u32 base_aligned = round_down(plane_config->base, PAGE_SIZE);
-	u32 size_aligned = round_up(plane_config->base + plane_config->size,
-				    PAGE_SIZE);
-	struct drm_i915_gem_object *obj;
-	bool ret = false;
-
-	size_aligned -= base_aligned;
-
-	if (plane_config->size == 0)
-		return false;
-
-	/* If the FB is too big, just don't use it since fbdev is not very
-	 * important and we should probably use that space with FBC or other
-	 * features. */
-	if (size_aligned * 2 > dev_priv->stolen_usable_size)
-		return false;
+	struct i915_vma *vma;
 
 	switch (fb->modifier) {
 	case DRM_FORMAT_MOD_LINEAR:
@@ -3426,25 +3473,10 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
 		return false;
 	}
 
-	obj = i915_gem_object_create_stolen_for_preallocated(dev_priv,
-							     base_aligned,
-							     base_aligned,
-							     size_aligned);
-	if (IS_ERR(obj))
+	vma = initial_plane_vma(dev_priv, plane_config);
+	if (!vma)
 		return false;
 
-	switch (plane_config->tiling) {
-	case I915_TILING_NONE:
-		break;
-	case I915_TILING_X:
-	case I915_TILING_Y:
-		obj->tiling_and_stride = fb->pitches[0] | plane_config->tiling;
-		break;
-	default:
-		MISSING_CASE(plane_config->tiling);
-		goto out;
-	}
-
 	mode_cmd.pixel_format = fb->format->format;
 	mode_cmd.width = fb->width;
 	mode_cmd.height = fb->height;
@@ -3452,17 +3484,18 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
 	mode_cmd.modifier[0] = fb->modifier;
 	mode_cmd.flags = DRM_MODE_FB_MODIFIERS;
 
-	if (intel_framebuffer_init(to_intel_framebuffer(fb), obj, &mode_cmd)) {
+	if (intel_framebuffer_init(to_intel_framebuffer(fb),
+				   vma->obj, &mode_cmd)) {
 		drm_dbg_kms(&dev_priv->drm, "intel fb init failed\n");
-		goto out;
+		goto err_vma;
 	}
 
+	plane_config->vma = vma;
+	return true;
 
-	drm_dbg_kms(&dev_priv->drm, "initial plane fb obj %p\n", obj);
-	ret = true;
-out:
-	i915_gem_object_put(obj);
-	return ret;
+err_vma:
+	i915_vma_put(vma);
+	return false;
 }
 
 static void
@@ -3561,12 +3594,14 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	struct intel_plane_state *intel_state =
 		to_intel_plane_state(plane_state);
 	struct drm_framebuffer *fb;
+	struct i915_vma *vma;
 
 	if (!plane_config->fb)
 		return;
 
 	if (intel_alloc_initial_plane_obj(intel_crtc, plane_config)) {
 		fb = &plane_config->fb->base;
+		vma = plane_config->vma;
 		goto valid_fb;
 	}
 
@@ -3589,6 +3624,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 
 		if (intel_plane_ggtt_offset(state) == plane_config->base) {
 			fb = state->hw.fb;
+			vma = state->vma;
 			goto valid_fb;
 		}
 	}
@@ -3611,21 +3647,11 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	intel_state->color_plane[0].stride =
 		intel_fb_pitch(fb, 0, intel_state->hw.rotation);
 
-	intel_state->vma =
-		intel_pin_and_fence_fb_obj(fb,
-					   &intel_state->view,
-					   intel_plane_uses_fence(intel_state),
-					   &intel_state->flags);
-	if (IS_ERR(intel_state->vma)) {
-		drm_err(&dev_priv->drm,
-			"failed to pin boot fb on pipe %d: %li\n",
-			intel_crtc->pipe, PTR_ERR(intel_state->vma));
-
-		intel_state->vma = NULL;
-		return;
-	}
-
-	intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
+	__i915_vma_pin(vma);
+	intel_state->vma = i915_vma_get(vma);
+	if (intel_plane_uses_fence(intel_state) && i915_vma_pin_fence(vma) == 0)
+		if (vma->fence)
+			intel_state->flags |= PLANE_HAS_FENCE;
 
 	plane_state->src_x = 0;
 	plane_state->src_y = 0;
@@ -3649,6 +3675,8 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	plane_state->crtc = &intel_crtc->base;
 	intel_plane_copy_uapi_to_hw_state(intel_state, intel_state);
 
+	intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
+
 	atomic_or(to_intel_plane(primary)->frontbuffer_bit,
 		  &to_intel_frontbuffer(fb)->bits);
 }
@@ -17863,6 +17891,9 @@ static void plane_config_fini(struct intel_initial_plane_config *plane_config)
 		else
 			kfree(fb);
 	}
+
+	if (plane_config->vma)
+		i915_vma_put(plane_config->vma);
 }
 
 int intel_modeset_init(struct drm_i915_private *i915)
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 7c6133a9c51b..7ae0bc8b80d1 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -592,6 +592,7 @@ struct intel_plane_state {
 
 struct intel_initial_plane_config {
 	struct intel_framebuffer *fb;
+	struct i915_vma *vma;
 	unsigned int tiling;
 	int size;
 	u32 base;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index b47e7109be6a..491cfbaaa330 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -686,28 +686,24 @@ struct intel_memory_region *i915_gem_stolen_setup(struct drm_i915_private *i915)
 struct drm_i915_gem_object *
 i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *i915,
 					       resource_size_t stolen_offset,
-					       resource_size_t gtt_offset,
 					       resource_size_t size)
 {
 	struct intel_memory_region *mem = i915->mm.regions[INTEL_REGION_STOLEN];
-	struct i915_ggtt *ggtt = &i915->ggtt;
 	struct drm_i915_gem_object *obj;
 	struct drm_mm_node *stolen;
-	struct i915_vma *vma;
 	int ret;
 
 	if (!drm_mm_initialized(&i915->mm.stolen))
 		return ERR_PTR(-ENODEV);
 
 	drm_dbg(&i915->drm,
-		"creating preallocated stolen object: stolen_offset=%pa, gtt_offset=%pa, size=%pa\n",
-		&stolen_offset, &gtt_offset, &size);
+		"creating preallocated stolen object: stolen_offset=%pa, size=%pa\n",
+		&stolen_offset, &size);
 
 	/* KISS and expect everything to be page-aligned */
-	if (drm_WARN_ON(&i915->drm, size == 0) ||
-	    drm_WARN_ON(&i915->drm, !IS_ALIGNED(size, I915_GTT_PAGE_SIZE)) ||
-	    drm_WARN_ON(&i915->drm,
-			!IS_ALIGNED(stolen_offset, I915_GTT_MIN_ALIGNMENT)))
+	if (GEM_WARN_ON(size == 0) ||
+	    GEM_WARN_ON(!IS_ALIGNED(size, I915_GTT_PAGE_SIZE)) ||
+	    GEM_WARN_ON(!IS_ALIGNED(stolen_offset, I915_GTT_MIN_ALIGNMENT)))
 		return ERR_PTR(-EINVAL);
 
 	stolen = kzalloc(sizeof(*stolen), GFP_KERNEL);
@@ -720,68 +716,20 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *i915,
 	ret = drm_mm_reserve_node(&i915->mm.stolen, stolen);
 	mutex_unlock(&i915->mm.stolen_lock);
 	if (ret) {
-		drm_dbg(&i915->drm, "failed to allocate stolen space\n");
-		kfree(stolen);
-		return ERR_PTR(ret);
+		obj = ERR_PTR(ret);
+		goto err_free;
 	}
 
 	obj = __i915_gem_object_create_stolen(mem, stolen);
-	if (IS_ERR(obj)) {
-		drm_dbg(&i915->drm, "failed to allocate stolen object\n");
-		i915_gem_stolen_remove_node(i915, stolen);
-		kfree(stolen);
-		return obj;
-	}
-
-	/* Some objects just need physical mem from stolen space */
-	if (gtt_offset == I915_GTT_OFFSET_NONE)
-		return obj;
-
-	ret = i915_gem_object_pin_pages(obj);
-	if (ret)
-		goto err;
-
-	vma = i915_vma_instance(obj, &ggtt->vm, NULL);
-	if (IS_ERR(vma)) {
-		ret = PTR_ERR(vma);
-		goto err_pages;
-	}
-
-	/* To simplify the initialisation sequence between KMS and GTT,
-	 * we allow construction of the stolen object prior to
-	 * setting up the GTT space. The actual reservation will occur
-	 * later.
-	 */
-	mutex_lock(&ggtt->vm.mutex);
-	ret = i915_gem_gtt_reserve(&ggtt->vm, &vma->node,
-				   size, gtt_offset, obj->cache_level,
-				   0);
-	if (ret) {
-		drm_dbg(&i915->drm, "failed to allocate stolen GTT space\n");
-		mutex_unlock(&ggtt->vm.mutex);
-		goto err_pages;
-	}
-
-	GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
-
-	GEM_BUG_ON(vma->pages);
-	vma->pages = obj->mm.pages;
-	atomic_set(&vma->pages_count, I915_VMA_PAGES_ACTIVE);
-
-	set_bit(I915_VMA_GLOBAL_BIND_BIT, __i915_vma_flags(vma));
-	__i915_vma_set_map_and_fenceable(vma);
-
-	list_add_tail(&vma->vm_link, &ggtt->vm.bound_list);
-	mutex_unlock(&ggtt->vm.mutex);
-
-	GEM_BUG_ON(i915_gem_object_is_shrinkable(obj));
-	atomic_inc(&obj->bind_count);
+	if (IS_ERR(obj))
+		goto err_stolen;
 
+	i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
 	return obj;
 
-err_pages:
-	i915_gem_object_unpin_pages(obj);
-err:
-	i915_gem_object_put(obj);
-	return ERR_PTR(ret);
+err_stolen:
+	i915_gem_stolen_remove_node(i915, stolen);
+err_free:
+	kfree(stolen);
+	return obj;
 }
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.h b/drivers/gpu/drm/i915/gem/i915_gem_stolen.h
index c1040627fbf3..e15c0adad8af 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.h
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.h
@@ -28,7 +28,6 @@ i915_gem_object_create_stolen(struct drm_i915_private *dev_priv,
 struct drm_i915_gem_object *
 i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *dev_priv,
 					       resource_size_t stolen_offset,
-					       resource_size_t gtt_offset,
 					       resource_size_t size);
 
 #endif /* __I915_GEM_STOLEN_H__ */
diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
index 01a99fdbb3c4..cc0882ee2a80 100644
--- a/drivers/gpu/drm/i915/gt/intel_rc6.c
+++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
@@ -299,7 +299,6 @@ static int vlv_rc6_init(struct intel_rc6 *rc6)
 		pcbr_offset = (pcbr & ~4095) - i915->dsm.start;
 		pctx = i915_gem_object_create_stolen_for_preallocated(i915,
 								      pcbr_offset,
-								      I915_GTT_OFFSET_NONE,
 								      pctx_size);
 		if (IS_ERR(pctx))
 			return PTR_ERR(pctx);
-- 
2.25.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma
  2020-02-04  9:48 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma Chris Wilson
@ 2020-02-04 14:26   ` Ville Syrjälä
  2020-02-04 15:07     ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjälä @ 2020-02-04 14:26 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Tue, Feb 04, 2020 at 09:48:02AM +0000, Chris Wilson wrote:
> As only the display codes tries to pin its preallocated framebuffer into
> an exact location in the GGTT, remove the convenience function and make
> the pin management explicit in the display code. Then throughout the
> display management, we track the framebuffer and its plane->vma; with
> less single purpose code and ready for first class i915_vma.
> 
> In doing so, this should fix the BUG_ON(vma->pages) on fi-kbl-soraka.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> Ville, you mentioned you had a plan... This should prevent an oops during
> boot for kbl-soraka, so it would be nice :)
> -Chris
> ---
>  drivers/gpu/drm/i915/display/intel_display.c  | 141 +++++++++++-------
>  .../drm/i915/display/intel_display_types.h    |   1 +
>  drivers/gpu/drm/i915/gem/i915_gem_stolen.c    |  82 ++--------
>  drivers/gpu/drm/i915/gem/i915_gem_stolen.h    |   1 -
>  drivers/gpu/drm/i915/gt/intel_rc6.c           |   1 -
>  5 files changed, 102 insertions(+), 124 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index b07971204492..c3695317d74a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -3389,6 +3389,68 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)
>  	}
>  }
>  
> +static struct i915_vma *
> +initial_plane_vma(struct drm_i915_private *i915,
> +		  struct intel_initial_plane_config *plane_config)
> +{
> +	struct drm_i915_gem_object *obj;
> +	struct i915_vma *vma;
> +	u32 base, size;
> +
> +	if (plane_config->size == 0)
> +		return NULL;
> +
> +	base = round_down(plane_config->base,
> +			  I915_GTT_MIN_ALIGNMENT);
> +	size = round_up(plane_config->base + plane_config->size,
> +			I915_GTT_MIN_ALIGNMENT);
> +	size -= base;
> +
> +	/*
> +	 * If the FB is too big, just don't use it since fbdev is not very
> +	 * important and we should probably use that space with FBC or other
> +	 * features.
> +	 */
> +	if (size * 2 > i915->stolen_usable_size)
> +		return NULL;
> +
> +	obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size);
> +	if (IS_ERR(obj))
> +		return NULL;
> +
> +	switch (plane_config->tiling) {
> +	case I915_TILING_NONE:
> +		break;
> +	case I915_TILING_X:
> +	case I915_TILING_Y:
> +		obj->tiling_and_stride =
> +			plane_config->fb->base.pitches[0] |
> +			plane_config->tiling;
> +		break;
> +	default:
> +		MISSING_CASE(plane_config->tiling);
> +		goto err_obj;
> +	}
> +
> +	vma = i915_vma_instance(obj, &i915->ggtt.vm, NULL);
> +	if (IS_ERR(vma))
> +		goto err_obj;
> +
> +	if (i915_vma_pin(vma, 0, 0,
> +			 PIN_GLOBAL | PIN_MAPPABLE | PIN_OFFSET_FIXED | base))
> +		goto err_obj;
> +
> +	if (i915_gem_object_is_tiled(obj) &&
> +	    !i915_vma_is_map_and_fenceable(vma))
> +		goto err_obj;
> +
> +	return vma;
> +
> +err_obj:
> +	i915_gem_object_put(obj);
> +	return NULL;
> +}
> +
>  static bool
>  intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
>  			      struct intel_initial_plane_config *plane_config)
> @@ -3397,22 +3459,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	struct drm_mode_fb_cmd2 mode_cmd = { 0 };
>  	struct drm_framebuffer *fb = &plane_config->fb->base;
> -	u32 base_aligned = round_down(plane_config->base, PAGE_SIZE);
> -	u32 size_aligned = round_up(plane_config->base + plane_config->size,
> -				    PAGE_SIZE);
> -	struct drm_i915_gem_object *obj;
> -	bool ret = false;
> -
> -	size_aligned -= base_aligned;
> -
> -	if (plane_config->size == 0)
> -		return false;
> -
> -	/* If the FB is too big, just don't use it since fbdev is not very
> -	 * important and we should probably use that space with FBC or other
> -	 * features. */
> -	if (size_aligned * 2 > dev_priv->stolen_usable_size)
> -		return false;
> +	struct i915_vma *vma;
>  
>  	switch (fb->modifier) {
>  	case DRM_FORMAT_MOD_LINEAR:
> @@ -3426,25 +3473,10 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
>  		return false;
>  	}
>  
> -	obj = i915_gem_object_create_stolen_for_preallocated(dev_priv,
> -							     base_aligned,
> -							     base_aligned,
> -							     size_aligned);
> -	if (IS_ERR(obj))
> +	vma = initial_plane_vma(dev_priv, plane_config);
> +	if (!vma)
>  		return false;
>  
> -	switch (plane_config->tiling) {
> -	case I915_TILING_NONE:
> -		break;
> -	case I915_TILING_X:
> -	case I915_TILING_Y:
> -		obj->tiling_and_stride = fb->pitches[0] | plane_config->tiling;
> -		break;
> -	default:
> -		MISSING_CASE(plane_config->tiling);
> -		goto out;
> -	}
> -
>  	mode_cmd.pixel_format = fb->format->format;
>  	mode_cmd.width = fb->width;
>  	mode_cmd.height = fb->height;
> @@ -3452,17 +3484,18 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
>  	mode_cmd.modifier[0] = fb->modifier;
>  	mode_cmd.flags = DRM_MODE_FB_MODIFIERS;
>  
> -	if (intel_framebuffer_init(to_intel_framebuffer(fb), obj, &mode_cmd)) {
> +	if (intel_framebuffer_init(to_intel_framebuffer(fb),
> +				   vma->obj, &mode_cmd)) {
>  		drm_dbg_kms(&dev_priv->drm, "intel fb init failed\n");
> -		goto out;
> +		goto err_vma;
>  	}
>  
> +	plane_config->vma = vma;
> +	return true;
>  
> -	drm_dbg_kms(&dev_priv->drm, "initial plane fb obj %p\n", obj);
> -	ret = true;
> -out:
> -	i915_gem_object_put(obj);
> -	return ret;
> +err_vma:
> +	i915_vma_put(vma);
> +	return false;
>  }
>  
>  static void
> @@ -3561,12 +3594,14 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
>  	struct intel_plane_state *intel_state =
>  		to_intel_plane_state(plane_state);
>  	struct drm_framebuffer *fb;
> +	struct i915_vma *vma;
>  
>  	if (!plane_config->fb)
>  		return;
>  
>  	if (intel_alloc_initial_plane_obj(intel_crtc, plane_config)) {
>  		fb = &plane_config->fb->base;
> +		vma = plane_config->vma;
>  		goto valid_fb;
>  	}
>  
> @@ -3589,6 +3624,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
>  
>  		if (intel_plane_ggtt_offset(state) == plane_config->base) {
>  			fb = state->hw.fb;
> +			vma = state->vma;
>  			goto valid_fb;
>  		}
>  	}
> @@ -3611,21 +3647,11 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
>  	intel_state->color_plane[0].stride =
>  		intel_fb_pitch(fb, 0, intel_state->hw.rotation);
>  
> -	intel_state->vma =
> -		intel_pin_and_fence_fb_obj(fb,
> -					   &intel_state->view,
> -					   intel_plane_uses_fence(intel_state),
> -					   &intel_state->flags);
> -	if (IS_ERR(intel_state->vma)) {
> -		drm_err(&dev_priv->drm,
> -			"failed to pin boot fb on pipe %d: %li\n",
> -			intel_crtc->pipe, PTR_ERR(intel_state->vma));
> -
> -		intel_state->vma = NULL;
> -		return;
> -	}
> -
> -	intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
> +	__i915_vma_pin(vma);
> +	intel_state->vma = i915_vma_get(vma);
> +	if (intel_plane_uses_fence(intel_state) && i915_vma_pin_fence(vma) == 0)
> +		if (vma->fence)
> +			intel_state->flags |= PLANE_HAS_FENCE;

Was slighly worried whether the gen2/3 special case would be needed
here, but I doubt we could get this far on those anyway since the
BIOS will be using VGA mode anyway. And even if we did I guess there's
no real way we wouldn't be able to get the fence.

>  
>  	plane_state->src_x = 0;
>  	plane_state->src_y = 0;
> @@ -3649,6 +3675,8 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
>  	plane_state->crtc = &intel_crtc->base;
>  	intel_plane_copy_uapi_to_hw_state(intel_state, intel_state);
>  
> +	intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
> +
>  	atomic_or(to_intel_plane(primary)->frontbuffer_bit,
>  		  &to_intel_frontbuffer(fb)->bits);
>  }
> @@ -17863,6 +17891,9 @@ static void plane_config_fini(struct intel_initial_plane_config *plane_config)
>  		else
>  			kfree(fb);
>  	}
> +
> +	if (plane_config->vma)
> +		i915_vma_put(plane_config->vma);
>  }
>  
>  int intel_modeset_init(struct drm_i915_private *i915)
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 7c6133a9c51b..7ae0bc8b80d1 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -592,6 +592,7 @@ struct intel_plane_state {
>  
>  struct intel_initial_plane_config {
>  	struct intel_framebuffer *fb;
> +	struct i915_vma *vma;
>  	unsigned int tiling;
>  	int size;
>  	u32 base;
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> index b47e7109be6a..491cfbaaa330 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> @@ -686,28 +686,24 @@ struct intel_memory_region *i915_gem_stolen_setup(struct drm_i915_private *i915)
>  struct drm_i915_gem_object *
>  i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *i915,
>  					       resource_size_t stolen_offset,
> -					       resource_size_t gtt_offset,
>  					       resource_size_t size)
>  {
>  	struct intel_memory_region *mem = i915->mm.regions[INTEL_REGION_STOLEN];
> -	struct i915_ggtt *ggtt = &i915->ggtt;
>  	struct drm_i915_gem_object *obj;
>  	struct drm_mm_node *stolen;
> -	struct i915_vma *vma;
>  	int ret;
>  
>  	if (!drm_mm_initialized(&i915->mm.stolen))
>  		return ERR_PTR(-ENODEV);
>  
>  	drm_dbg(&i915->drm,
> -		"creating preallocated stolen object: stolen_offset=%pa, gtt_offset=%pa, size=%pa\n",
> -		&stolen_offset, &gtt_offset, &size);
> +		"creating preallocated stolen object: stolen_offset=%pa, size=%pa\n",
> +		&stolen_offset, &size);
>  
>  	/* KISS and expect everything to be page-aligned */
> -	if (drm_WARN_ON(&i915->drm, size == 0) ||
> -	    drm_WARN_ON(&i915->drm, !IS_ALIGNED(size, I915_GTT_PAGE_SIZE)) ||
> -	    drm_WARN_ON(&i915->drm,
> -			!IS_ALIGNED(stolen_offset, I915_GTT_MIN_ALIGNMENT)))
> +	if (GEM_WARN_ON(size == 0) ||
> +	    GEM_WARN_ON(!IS_ALIGNED(size, I915_GTT_PAGE_SIZE)) ||
> +	    GEM_WARN_ON(!IS_ALIGNED(stolen_offset, I915_GTT_MIN_ALIGNMENT)))

Were these intentional?

>  		return ERR_PTR(-EINVAL);
>  
>  	stolen = kzalloc(sizeof(*stolen), GFP_KERNEL);
> @@ -720,68 +716,20 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *i915,
>  	ret = drm_mm_reserve_node(&i915->mm.stolen, stolen);
>  	mutex_unlock(&i915->mm.stolen_lock);
>  	if (ret) {
> -		drm_dbg(&i915->drm, "failed to allocate stolen space\n");
> -		kfree(stolen);
> -		return ERR_PTR(ret);
> +		obj = ERR_PTR(ret);
> +		goto err_free;
>  	}
>  
>  	obj = __i915_gem_object_create_stolen(mem, stolen);
> -	if (IS_ERR(obj)) {
> -		drm_dbg(&i915->drm, "failed to allocate stolen object\n");
> -		i915_gem_stolen_remove_node(i915, stolen);
> -		kfree(stolen);
> -		return obj;
> -	}
> -
> -	/* Some objects just need physical mem from stolen space */
> -	if (gtt_offset == I915_GTT_OFFSET_NONE)
> -		return obj;
> -
> -	ret = i915_gem_object_pin_pages(obj);
> -	if (ret)
> -		goto err;
> -
> -	vma = i915_vma_instance(obj, &ggtt->vm, NULL);
> -	if (IS_ERR(vma)) {
> -		ret = PTR_ERR(vma);
> -		goto err_pages;
> -	}
> -
> -	/* To simplify the initialisation sequence between KMS and GTT,
> -	 * we allow construction of the stolen object prior to
> -	 * setting up the GTT space. The actual reservation will occur
> -	 * later.
> -	 */
> -	mutex_lock(&ggtt->vm.mutex);
> -	ret = i915_gem_gtt_reserve(&ggtt->vm, &vma->node,
> -				   size, gtt_offset, obj->cache_level,
> -				   0);
> -	if (ret) {
> -		drm_dbg(&i915->drm, "failed to allocate stolen GTT space\n");
> -		mutex_unlock(&ggtt->vm.mutex);
> -		goto err_pages;
> -	}
> -
> -	GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
> -
> -	GEM_BUG_ON(vma->pages);
> -	vma->pages = obj->mm.pages;
> -	atomic_set(&vma->pages_count, I915_VMA_PAGES_ACTIVE);
> -
> -	set_bit(I915_VMA_GLOBAL_BIND_BIT, __i915_vma_flags(vma));
> -	__i915_vma_set_map_and_fenceable(vma);
> -
> -	list_add_tail(&vma->vm_link, &ggtt->vm.bound_list);
> -	mutex_unlock(&ggtt->vm.mutex);
> -
> -	GEM_BUG_ON(i915_gem_object_is_shrinkable(obj));
> -	atomic_inc(&obj->bind_count);
> +	if (IS_ERR(obj))
> +		goto err_stolen;
>  
> +	i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);

Moved here from pin_and_fence() I guess. Do we overwrite the PTEs
when we pin the vma? Or just assuming they already match this?
IIRC we anyway assume that ggtt has a 1:1 mapping of stolen at this
point and we don't double check that the PTEs really point to stolen.

Looks all right to me. Series is 
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  	return obj;
>  
> -err_pages:
> -	i915_gem_object_unpin_pages(obj);
> -err:
> -	i915_gem_object_put(obj);
> -	return ERR_PTR(ret);
> +err_stolen:
> +	i915_gem_stolen_remove_node(i915, stolen);
> +err_free:
> +	kfree(stolen);
> +	return obj;
>  }
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.h b/drivers/gpu/drm/i915/gem/i915_gem_stolen.h
> index c1040627fbf3..e15c0adad8af 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.h
> @@ -28,7 +28,6 @@ i915_gem_object_create_stolen(struct drm_i915_private *dev_priv,
>  struct drm_i915_gem_object *
>  i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *dev_priv,
>  					       resource_size_t stolen_offset,
> -					       resource_size_t gtt_offset,
>  					       resource_size_t size);
>  
>  #endif /* __I915_GEM_STOLEN_H__ */
> diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
> index 01a99fdbb3c4..cc0882ee2a80 100644
> --- a/drivers/gpu/drm/i915/gt/intel_rc6.c
> +++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
> @@ -299,7 +299,6 @@ static int vlv_rc6_init(struct intel_rc6 *rc6)
>  		pcbr_offset = (pcbr & ~4095) - i915->dsm.start;
>  		pctx = i915_gem_object_create_stolen_for_preallocated(i915,
>  								      pcbr_offset,
> -								      I915_GTT_OFFSET_NONE,
>  								      pctx_size);
>  		if (IS_ERR(pctx))
>  			return PTR_ERR(pctx);
> -- 
> 2.25.0

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma
  2020-02-04 14:26   ` Ville Syrjälä
@ 2020-02-04 15:07     ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2020-02-04 15:07 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

Quoting Ville Syrjälä (2020-02-04 14:26:23)
> On Tue, Feb 04, 2020 at 09:48:02AM +0000, Chris Wilson wrote:
> > As only the display codes tries to pin its preallocated framebuffer into
> > an exact location in the GGTT, remove the convenience function and make
> > the pin management explicit in the display code. Then throughout the
> > display management, we track the framebuffer and its plane->vma; with
> > less single purpose code and ready for first class i915_vma.
> > 
> > In doing so, this should fix the BUG_ON(vma->pages) on fi-kbl-soraka.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> > Ville, you mentioned you had a plan... This should prevent an oops during
> > boot for kbl-soraka, so it would be nice :)
> > -Chris
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c  | 141 +++++++++++-------
> >  .../drm/i915/display/intel_display_types.h    |   1 +
> >  drivers/gpu/drm/i915/gem/i915_gem_stolen.c    |  82 ++--------
> >  drivers/gpu/drm/i915/gem/i915_gem_stolen.h    |   1 -
> >  drivers/gpu/drm/i915/gt/intel_rc6.c           |   1 -
> >  5 files changed, 102 insertions(+), 124 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index b07971204492..c3695317d74a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -3389,6 +3389,68 @@ int skl_format_to_fourcc(int format, bool rgb_order, bool alpha)
> >       }
> >  }
> >  
> > +static struct i915_vma *
> > +initial_plane_vma(struct drm_i915_private *i915,
> > +               struct intel_initial_plane_config *plane_config)
> > +{
> > +     struct drm_i915_gem_object *obj;
> > +     struct i915_vma *vma;
> > +     u32 base, size;
> > +
> > +     if (plane_config->size == 0)
> > +             return NULL;
> > +
> > +     base = round_down(plane_config->base,
> > +                       I915_GTT_MIN_ALIGNMENT);
> > +     size = round_up(plane_config->base + plane_config->size,
> > +                     I915_GTT_MIN_ALIGNMENT);
> > +     size -= base;
> > +
> > +     /*
> > +      * If the FB is too big, just don't use it since fbdev is not very
> > +      * important and we should probably use that space with FBC or other
> > +      * features.
> > +      */
> > +     if (size * 2 > i915->stolen_usable_size)
> > +             return NULL;
> > +
> > +     obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size);
> > +     if (IS_ERR(obj))
> > +             return NULL;
> > +
> > +     switch (plane_config->tiling) {
> > +     case I915_TILING_NONE:
> > +             break;
> > +     case I915_TILING_X:
> > +     case I915_TILING_Y:
> > +             obj->tiling_and_stride =
> > +                     plane_config->fb->base.pitches[0] |
> > +                     plane_config->tiling;
> > +             break;
> > +     default:
> > +             MISSING_CASE(plane_config->tiling);
> > +             goto err_obj;
> > +     }
> > +
> > +     vma = i915_vma_instance(obj, &i915->ggtt.vm, NULL);
> > +     if (IS_ERR(vma))
> > +             goto err_obj;
> > +
> > +     if (i915_vma_pin(vma, 0, 0,
> > +                      PIN_GLOBAL | PIN_MAPPABLE | PIN_OFFSET_FIXED | base))
> > +             goto err_obj;
> > +
> > +     if (i915_gem_object_is_tiled(obj) &&
> > +         !i915_vma_is_map_and_fenceable(vma))
> > +             goto err_obj;
> > +
> > +     return vma;
> > +
> > +err_obj:
> > +     i915_gem_object_put(obj);
> > +     return NULL;
> > +}
> > +
> >  static bool
> >  intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
> >                             struct intel_initial_plane_config *plane_config)
> > @@ -3397,22 +3459,7 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
> >       struct drm_i915_private *dev_priv = to_i915(dev);
> >       struct drm_mode_fb_cmd2 mode_cmd = { 0 };
> >       struct drm_framebuffer *fb = &plane_config->fb->base;
> > -     u32 base_aligned = round_down(plane_config->base, PAGE_SIZE);
> > -     u32 size_aligned = round_up(plane_config->base + plane_config->size,
> > -                                 PAGE_SIZE);
> > -     struct drm_i915_gem_object *obj;
> > -     bool ret = false;
> > -
> > -     size_aligned -= base_aligned;
> > -
> > -     if (plane_config->size == 0)
> > -             return false;
> > -
> > -     /* If the FB is too big, just don't use it since fbdev is not very
> > -      * important and we should probably use that space with FBC or other
> > -      * features. */
> > -     if (size_aligned * 2 > dev_priv->stolen_usable_size)
> > -             return false;
> > +     struct i915_vma *vma;
> >  
> >       switch (fb->modifier) {
> >       case DRM_FORMAT_MOD_LINEAR:
> > @@ -3426,25 +3473,10 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
> >               return false;
> >       }
> >  
> > -     obj = i915_gem_object_create_stolen_for_preallocated(dev_priv,
> > -                                                          base_aligned,
> > -                                                          base_aligned,
> > -                                                          size_aligned);
> > -     if (IS_ERR(obj))
> > +     vma = initial_plane_vma(dev_priv, plane_config);
> > +     if (!vma)
> >               return false;
> >  
> > -     switch (plane_config->tiling) {
> > -     case I915_TILING_NONE:
> > -             break;
> > -     case I915_TILING_X:
> > -     case I915_TILING_Y:
> > -             obj->tiling_and_stride = fb->pitches[0] | plane_config->tiling;
> > -             break;
> > -     default:
> > -             MISSING_CASE(plane_config->tiling);
> > -             goto out;
> > -     }
> > -
> >       mode_cmd.pixel_format = fb->format->format;
> >       mode_cmd.width = fb->width;
> >       mode_cmd.height = fb->height;
> > @@ -3452,17 +3484,18 @@ intel_alloc_initial_plane_obj(struct intel_crtc *crtc,
> >       mode_cmd.modifier[0] = fb->modifier;
> >       mode_cmd.flags = DRM_MODE_FB_MODIFIERS;
> >  
> > -     if (intel_framebuffer_init(to_intel_framebuffer(fb), obj, &mode_cmd)) {
> > +     if (intel_framebuffer_init(to_intel_framebuffer(fb),
> > +                                vma->obj, &mode_cmd)) {
> >               drm_dbg_kms(&dev_priv->drm, "intel fb init failed\n");
> > -             goto out;
> > +             goto err_vma;
> >       }
> >  
> > +     plane_config->vma = vma;
> > +     return true;
> >  
> > -     drm_dbg_kms(&dev_priv->drm, "initial plane fb obj %p\n", obj);
> > -     ret = true;
> > -out:
> > -     i915_gem_object_put(obj);
> > -     return ret;
> > +err_vma:
> > +     i915_vma_put(vma);
> > +     return false;
> >  }
> >  
> >  static void
> > @@ -3561,12 +3594,14 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
> >       struct intel_plane_state *intel_state =
> >               to_intel_plane_state(plane_state);
> >       struct drm_framebuffer *fb;
> > +     struct i915_vma *vma;
> >  
> >       if (!plane_config->fb)
> >               return;
> >  
> >       if (intel_alloc_initial_plane_obj(intel_crtc, plane_config)) {
> >               fb = &plane_config->fb->base;
> > +             vma = plane_config->vma;
> >               goto valid_fb;
> >       }
> >  
> > @@ -3589,6 +3624,7 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
> >  
> >               if (intel_plane_ggtt_offset(state) == plane_config->base) {
> >                       fb = state->hw.fb;
> > +                     vma = state->vma;
> >                       goto valid_fb;
> >               }
> >       }
> > @@ -3611,21 +3647,11 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
> >       intel_state->color_plane[0].stride =
> >               intel_fb_pitch(fb, 0, intel_state->hw.rotation);
> >  
> > -     intel_state->vma =
> > -             intel_pin_and_fence_fb_obj(fb,
> > -                                        &intel_state->view,
> > -                                        intel_plane_uses_fence(intel_state),
> > -                                        &intel_state->flags);
> > -     if (IS_ERR(intel_state->vma)) {
> > -             drm_err(&dev_priv->drm,
> > -                     "failed to pin boot fb on pipe %d: %li\n",
> > -                     intel_crtc->pipe, PTR_ERR(intel_state->vma));
> > -
> > -             intel_state->vma = NULL;
> > -             return;
> > -     }
> > -
> > -     intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
> > +     __i915_vma_pin(vma);
> > +     intel_state->vma = i915_vma_get(vma);
> > +     if (intel_plane_uses_fence(intel_state) && i915_vma_pin_fence(vma) == 0)
> > +             if (vma->fence)
> > +                     intel_state->flags |= PLANE_HAS_FENCE;
> 
> Was slighly worried whether the gen2/3 special case would be needed
> here, but I doubt we could get this far on those anyway since the
> BIOS will be using VGA mode anyway. And even if we did I guess there's
> no real way we wouldn't be able to get the fence.
> 
> >  
> >       plane_state->src_x = 0;
> >       plane_state->src_y = 0;
> > @@ -3649,6 +3675,8 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
> >       plane_state->crtc = &intel_crtc->base;
> >       intel_plane_copy_uapi_to_hw_state(intel_state, intel_state);
> >  
> > +     intel_frontbuffer_flush(to_intel_frontbuffer(fb), ORIGIN_DIRTYFB);
> > +
> >       atomic_or(to_intel_plane(primary)->frontbuffer_bit,
> >                 &to_intel_frontbuffer(fb)->bits);
> >  }
> > @@ -17863,6 +17891,9 @@ static void plane_config_fini(struct intel_initial_plane_config *plane_config)
> >               else
> >                       kfree(fb);
> >       }
> > +
> > +     if (plane_config->vma)
> > +             i915_vma_put(plane_config->vma);
> >  }
> >  
> >  int intel_modeset_init(struct drm_i915_private *i915)
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index 7c6133a9c51b..7ae0bc8b80d1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -592,6 +592,7 @@ struct intel_plane_state {
> >  
> >  struct intel_initial_plane_config {
> >       struct intel_framebuffer *fb;
> > +     struct i915_vma *vma;
> >       unsigned int tiling;
> >       int size;
> >       u32 base;
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> > index b47e7109be6a..491cfbaaa330 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> > @@ -686,28 +686,24 @@ struct intel_memory_region *i915_gem_stolen_setup(struct drm_i915_private *i915)
> >  struct drm_i915_gem_object *
> >  i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *i915,
> >                                              resource_size_t stolen_offset,
> > -                                            resource_size_t gtt_offset,
> >                                              resource_size_t size)
> >  {
> >       struct intel_memory_region *mem = i915->mm.regions[INTEL_REGION_STOLEN];
> > -     struct i915_ggtt *ggtt = &i915->ggtt;
> >       struct drm_i915_gem_object *obj;
> >       struct drm_mm_node *stolen;
> > -     struct i915_vma *vma;
> >       int ret;
> >  
> >       if (!drm_mm_initialized(&i915->mm.stolen))
> >               return ERR_PTR(-ENODEV);
> >  
> >       drm_dbg(&i915->drm,
> > -             "creating preallocated stolen object: stolen_offset=%pa, gtt_offset=%pa, size=%pa\n",
> > -             &stolen_offset, &gtt_offset, &size);
> > +             "creating preallocated stolen object: stolen_offset=%pa, size=%pa\n",
> > +             &stolen_offset, &size);
> >  
> >       /* KISS and expect everything to be page-aligned */
> > -     if (drm_WARN_ON(&i915->drm, size == 0) ||
> > -         drm_WARN_ON(&i915->drm, !IS_ALIGNED(size, I915_GTT_PAGE_SIZE)) ||
> > -         drm_WARN_ON(&i915->drm,
> > -                     !IS_ALIGNED(stolen_offset, I915_GTT_MIN_ALIGNMENT)))
> > +     if (GEM_WARN_ON(size == 0) ||
> > +         GEM_WARN_ON(!IS_ALIGNED(size, I915_GTT_PAGE_SIZE)) ||
> > +         GEM_WARN_ON(!IS_ALIGNED(stolen_offset, I915_GTT_MIN_ALIGNMENT)))
> 
> Were these intentional?

Yes. They shouldn't have been converted to drm_.

> >  
> >       stolen = kzalloc(sizeof(*stolen), GFP_KERNEL);
> > @@ -720,68 +716,20 @@ i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private *i915,
> >       ret = drm_mm_reserve_node(&i915->mm.stolen, stolen);
> >       mutex_unlock(&i915->mm.stolen_lock);
> >       if (ret) {
> > -             drm_dbg(&i915->drm, "failed to allocate stolen space\n");
> > -             kfree(stolen);
> > -             return ERR_PTR(ret);
> > +             obj = ERR_PTR(ret);
> > +             goto err_free;
> >       }
> >  
> >       obj = __i915_gem_object_create_stolen(mem, stolen);
> > -     if (IS_ERR(obj)) {
> > -             drm_dbg(&i915->drm, "failed to allocate stolen object\n");
> > -             i915_gem_stolen_remove_node(i915, stolen);
> > -             kfree(stolen);
> > -             return obj;
> > -     }
> > -
> > -     /* Some objects just need physical mem from stolen space */
> > -     if (gtt_offset == I915_GTT_OFFSET_NONE)
> > -             return obj;
> > -
> > -     ret = i915_gem_object_pin_pages(obj);
> > -     if (ret)
> > -             goto err;
> > -
> > -     vma = i915_vma_instance(obj, &ggtt->vm, NULL);
> > -     if (IS_ERR(vma)) {
> > -             ret = PTR_ERR(vma);
> > -             goto err_pages;
> > -     }
> > -
> > -     /* To simplify the initialisation sequence between KMS and GTT,
> > -      * we allow construction of the stolen object prior to
> > -      * setting up the GTT space. The actual reservation will occur
> > -      * later.
> > -      */
> > -     mutex_lock(&ggtt->vm.mutex);
> > -     ret = i915_gem_gtt_reserve(&ggtt->vm, &vma->node,
> > -                                size, gtt_offset, obj->cache_level,
> > -                                0);
> > -     if (ret) {
> > -             drm_dbg(&i915->drm, "failed to allocate stolen GTT space\n");
> > -             mutex_unlock(&ggtt->vm.mutex);
> > -             goto err_pages;
> > -     }
> > -
> > -     GEM_BUG_ON(!drm_mm_node_allocated(&vma->node));
> > -
> > -     GEM_BUG_ON(vma->pages);
> > -     vma->pages = obj->mm.pages;
> > -     atomic_set(&vma->pages_count, I915_VMA_PAGES_ACTIVE);
> > -
> > -     set_bit(I915_VMA_GLOBAL_BIND_BIT, __i915_vma_flags(vma));
> > -     __i915_vma_set_map_and_fenceable(vma);
> > -
> > -     list_add_tail(&vma->vm_link, &ggtt->vm.bound_list);
> > -     mutex_unlock(&ggtt->vm.mutex);
> > -
> > -     GEM_BUG_ON(i915_gem_object_is_shrinkable(obj));
> > -     atomic_inc(&obj->bind_count);
> > +     if (IS_ERR(obj))
> > +             goto err_stolen;
> >  
> > +     i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
> 
> Moved here from pin_and_fence() I guess. Do we overwrite the PTEs
> when we pin the vma? Or just assuming they already match this?

We rewrite the PTE on binding; we don't assume the current entries point
anywhere.

> IIRC we anyway assume that ggtt has a 1:1 mapping of stolen at this
> point and we don't double check that the PTEs really point to stolen.

Right. We assume the layout is straightforward, and we don't actually
write the PTEs until later when initialising the GTT (after reserving
all the holes required for preallocated objects). Well that's the plan
at least.

This patch will introduce a change where we rewrite the PTEs
immediately. But either they already pointed to our preallocated stolen,
or we are already in trouble.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/display: Explicitly cleanup initial_plane_config
  2020-02-04  9:48 [Intel-gfx] [PATCH 1/2] drm/i915/display: Explicitly cleanup initial_plane_config Chris Wilson
  2020-02-04  9:48 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma Chris Wilson
@ 2020-02-05  1:36 ` Patchwork
  2020-02-07  5:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-02-05  1:36 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/display: Explicitly cleanup initial_plane_config
URL   : https://patchwork.freedesktop.org/series/72961/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7867 -> Patchwork_16412
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/index.html

Known issues
------------

  Here are the changes found in Patchwork_16412 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_gem_contexts:
    - fi-byt-n2820:       [PASS][1] -> [DMESG-FAIL][2] ([i915#1052])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html

  * igt@i915_selftest@live_hangcheck:
    - fi-icl-u2:          [PASS][3] -> [INCOMPLETE][4] ([fdo#108569])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/fi-icl-u2/igt@i915_selftest@live_hangcheck.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770r:       [DMESG-FAIL][5] ([i915#725]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/fi-hsw-4770r/igt@i915_selftest@live_blt.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/fi-hsw-4770r/igt@i915_selftest@live_blt.html

  
#### Warnings ####

  * igt@gem_exec_parallel@contexts:
    - fi-byt-n2820:       [TIMEOUT][7] ([fdo#112271] / [i915#1084]) -> [FAIL][8] ([i915#694])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/fi-byt-n2820/igt@gem_exec_parallel@contexts.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/fi-byt-n2820/igt@gem_exec_parallel@contexts.html

  * igt@gem_exec_parallel@fds:
    - fi-byt-n2820:       [TIMEOUT][9] ([fdo#112271]) -> [FAIL][10] ([i915#694])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/fi-byt-n2820/igt@gem_exec_parallel@fds.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/fi-byt-n2820/igt@gem_exec_parallel@fds.html

  
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
  [i915#1052]: https://gitlab.freedesktop.org/drm/intel/issues/1052
  [i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084
  [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725


Participating hosts (42 -> 41)
------------------------------

  Additional (5): fi-bdw-5557u fi-kbl-7500u fi-ivb-3770 fi-snb-2600 fi-kbl-r 
  Missing    (6): fi-hsw-4200u fi-byt-squawks fi-ctg-p8600 fi-blb-e6850 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7867 -> Patchwork_16412

  CI-20190529: 20190529
  CI_DRM_7867: a4c409e48c6281538b1e375545dfb5989fa02063 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5418: 4028bd390b41925f6e26f6f11b31e05054652527 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_16412: c541adbd4e701db99e5f6d822483cd129837852b @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

c541adbd4e70 drm/i915/display: Be explicit in handling the preallocated vma
464b56781aab drm/i915/display: Explicitly cleanup initial_plane_config

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/display: Explicitly cleanup initial_plane_config
  2020-02-04  9:48 [Intel-gfx] [PATCH 1/2] drm/i915/display: Explicitly cleanup initial_plane_config Chris Wilson
  2020-02-04  9:48 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma Chris Wilson
  2020-02-05  1:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/display: Explicitly cleanup initial_plane_config Patchwork
@ 2020-02-07  5:13 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2020-02-07  5:13 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/display: Explicitly cleanup initial_plane_config
URL   : https://patchwork.freedesktop.org/series/72961/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7867_full -> Patchwork_16412_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Known issues
------------

  Here are the changes found in Patchwork_16412_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_caching@read-writes:
    - shard-hsw:          [PASS][1] -> [FAIL][2] ([i915#694]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-hsw4/igt@gem_caching@read-writes.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-hsw6/igt@gem_caching@read-writes.html

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#110841])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb6/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb1/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_exec_schedule@independent-bsd2:
    - shard-iclb:         [PASS][5] -> [SKIP][6] ([fdo#109276]) +13 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb1/igt@gem_exec_schedule@independent-bsd2.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb3/igt@gem_exec_schedule@independent-bsd2.html

  * igt@gem_exec_schedule@pi-ringfull-bsd:
    - shard-iclb:         [PASS][7] -> [SKIP][8] ([fdo#112146]) +2 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb6/igt@gem_exec_schedule@pi-ringfull-bsd.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb1/igt@gem_exec_schedule@pi-ringfull-bsd.html

  * igt@gem_exec_schedule@pi-userfault-bsd:
    - shard-iclb:         [PASS][9] -> [SKIP][10] ([i915#677])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb6/igt@gem_exec_schedule@pi-userfault-bsd.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb2/igt@gem_exec_schedule@pi-userfault-bsd.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
    - shard-glk:          [PASS][11] -> [FAIL][12] ([i915#644])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-glk7/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-glk9/igt@gem_ppgtt@flink-and-close-vma-leak.html

  * igt@kms_atomic_interruptible@legacy-cursor:
    - shard-apl:          [PASS][13] -> [TIMEOUT][14] ([fdo#112271]) +1 similar issue
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-apl2/igt@kms_atomic_interruptible@legacy-cursor.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-apl8/igt@kms_atomic_interruptible@legacy-cursor.html

  * igt@kms_color@pipe-b-ctm-red-to-blue:
    - shard-skl:          [PASS][15] -> [FAIL][16] ([i915#129])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-skl4/igt@kms_color@pipe-b-ctm-red-to-blue.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-skl8/igt@kms_color@pipe-b-ctm-red-to-blue.html

  * igt@kms_cursor_crc@pipe-c-cursor-suspend:
    - shard-kbl:          [PASS][17] -> [DMESG-WARN][18] ([i915#180]) +7 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-kbl6/igt@kms_cursor_crc@pipe-c-cursor-suspend.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-kbl1/igt@kms_cursor_crc@pipe-c-cursor-suspend.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-apl:          [PASS][19] -> [FAIL][20] ([i915#79])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-apl4/igt@kms_flip@flip-vs-expired-vblank.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-apl2/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_flip@plain-flip-ts-check:
    - shard-skl:          [PASS][21] -> [FAIL][22] ([i915#34])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-skl8/igt@kms_flip@plain-flip-ts-check.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-skl1/igt@kms_flip@plain-flip-ts-check.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt:
    - shard-apl:          [PASS][23] -> [INCOMPLETE][24] ([CI#80] / [fdo#103927])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-apl2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-apl8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render:
    - shard-skl:          [PASS][25] -> [FAIL][26] ([i915#49])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-skl7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-skl5/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-render.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
    - shard-apl:          [PASS][27] -> [DMESG-WARN][28] ([i915#180])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-apl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-apl6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          [PASS][29] -> [FAIL][30] ([fdo#108145]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-skl7/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-skl5/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html

  * igt@kms_psr@psr2_sprite_mmap_cpu:
    - shard-iclb:         [PASS][31] -> [SKIP][32] ([fdo#109441])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_cpu.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb6/igt@kms_psr@psr2_sprite_mmap_cpu.html

  * igt@perf@disabled-read-error:
    - shard-iclb:         [PASS][33] -> [DMESG-WARN][34] ([i915#645])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb7/igt@perf@disabled-read-error.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb6/igt@perf@disabled-read-error.html

  * igt@perf_pmu@busy-check-all-vcs1:
    - shard-iclb:         [PASS][35] -> [SKIP][36] ([fdo#112080]) +8 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb4/igt@perf_pmu@busy-check-all-vcs1.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb7/igt@perf_pmu@busy-check-all-vcs1.html

  
#### Possible fixes ####

  * igt@gem_exec_balancer@smoke:
    - shard-iclb:         [SKIP][37] ([fdo#110854]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb6/igt@gem_exec_balancer@smoke.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb2/igt@gem_exec_balancer@smoke.html

  * igt@gem_exec_schedule@wide-bsd:
    - shard-iclb:         [SKIP][39] ([fdo#112146]) -> [PASS][40] +4 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb1/igt@gem_exec_schedule@wide-bsd.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb3/igt@gem_exec_schedule@wide-bsd.html

  * igt@gem_partial_pwrite_pread@write-snoop:
    - shard-hsw:          [FAIL][41] ([i915#694]) -> [PASS][42] +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-hsw7/igt@gem_partial_pwrite_pread@write-snoop.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-hsw4/igt@gem_partial_pwrite_pread@write-snoop.html

  * igt@i915_pm_dc@dc5-dpms:
    - shard-iclb:         [FAIL][43] ([i915#447]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb3/igt@i915_pm_dc@dc5-dpms.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb8/igt@i915_pm_dc@dc5-dpms.html

  * igt@i915_selftest@live_blt:
    - shard-hsw:          [DMESG-FAIL][45] ([i915#725]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-hsw8/igt@i915_selftest@live_blt.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-hsw8/igt@i915_selftest@live_blt.html

  * igt@kms_color@pipe-b-ctm-max:
    - shard-skl:          [FAIL][47] ([i915#168]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-skl4/igt@kms_color@pipe-b-ctm-max.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-skl8/igt@kms_color@pipe-b-ctm-max.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          [FAIL][49] ([i915#79]) -> [PASS][50]
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-glk5/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-glk6/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-apl:          [DMESG-WARN][51] ([i915#180]) -> [PASS][52] +1 similar issue
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-apl1/igt@kms_flip@flip-vs-suspend-interruptible.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_flip@plain-flip-fb-recreate-interruptible:
    - shard-apl:          [FAIL][53] ([i915#34]) -> [PASS][54]
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-apl1/igt@kms_flip@plain-flip-fb-recreate-interruptible.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-apl2/igt@kms_flip@plain-flip-fb-recreate-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [DMESG-WARN][55] ([i915#180]) -> [PASS][56] +9 similar issues
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-kbl4/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-glk:          [FAIL][57] ([i915#899]) -> [PASS][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-glk9/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-glk3/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][59] ([fdo#109441]) -> [PASS][60] +1 similar issue
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb6/igt@kms_psr@psr2_no_drrs.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  * igt@perf_pmu@busy-vcs1:
    - shard-iclb:         [SKIP][61] ([fdo#112080]) -> [PASS][62] +10 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb5/igt@perf_pmu@busy-vcs1.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb4/igt@perf_pmu@busy-vcs1.html

  * igt@prime_busy@hang-bsd2:
    - shard-iclb:         [SKIP][63] ([fdo#109276]) -> [PASS][64] +19 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-iclb6/igt@prime_busy@hang-bsd2.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-iclb2/igt@prime_busy@hang-bsd2.html

  
#### Warnings ####

  * igt@gem_tiled_blits@normal:
    - shard-hsw:          [FAIL][65] ([i915#694]) -> [FAIL][66] ([i915#818])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7867/shard-hsw4/igt@gem_tiled_blits@normal.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/shard-hsw7/igt@gem_tiled_blits@normal.html

  
  [CI#80]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/80
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
  [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
  [i915#129]: https://gitlab.freedesktop.org/drm/intel/issues/129
  [i915#168]: https://gitlab.freedesktop.org/drm/intel/issues/168
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
  [i915#447]: https://gitlab.freedesktop.org/drm/intel/issues/447
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
  [i915#645]: https://gitlab.freedesktop.org/drm/intel/issues/645
  [i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
  [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#818]: https://gitlab.freedesktop.org/drm/intel/issues/818
  [i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899


Participating hosts (10 -> 10)
------------------------------

  No changes in participating hosts


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7867 -> Patchwork_16412

  CI-20190529: 20190529
  CI_DRM_7867: a4c409e48c6281538b1e375545dfb5989fa02063 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5418: 4028bd390b41925f6e26f6f11b31e05054652527 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_16412: c541adbd4e701db99e5f6d822483cd129837852b @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16412/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-07  5:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04  9:48 [Intel-gfx] [PATCH 1/2] drm/i915/display: Explicitly cleanup initial_plane_config Chris Wilson
2020-02-04  9:48 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: Be explicit in handling the preallocated vma Chris Wilson
2020-02-04 14:26   ` Ville Syrjälä
2020-02-04 15:07     ` Chris Wilson
2020-02-05  1:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/display: Explicitly cleanup initial_plane_config Patchwork
2020-02-07  5:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.