All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
@ 2018-06-22  3:55 Zhao Yakui
  2018-06-22  4:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-06-22  4:24 ` ✗ Fi.CI.BAT: failure " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Zhao Yakui @ 2018-06-22  3:55 UTC (permalink / raw)
  To: intel-gfx

Under execlists mode the context buffer is allocated in global Gtt region.
The I915_MAP_WB type is used to map the buffer so that the driver can
initialize the context buffer.(Ring reg, Context Ctrl reg and so on).
And then __context_pin is called to flush back corresponding contents.
In fact as it also tries to update context buffer (Ring Tail offset)
before writting the ELSP port, it has no explicit cache flsuh.Maybe it is
handled by HW. But this is quite confusing as BXT has no LLC. So the WC
is used to map the context buffer on the platform without LLC and the
update of context buffer is writen into phys page directly. It will
be safer.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
CC: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 10deebe..a76ea83 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1386,6 +1386,7 @@ __execlists_context_pin(struct intel_engine_cs *engine,
 {
 	void *vaddr;
 	int ret;
+	enum i915_map_type map = HAS_LLC(ctx->i915) ? I915_MAP_WB : I915_MAP_WC;
 
 	ret = execlists_context_deferred_alloc(ctx, engine, ce);
 	if (ret)
@@ -1396,7 +1397,7 @@ __execlists_context_pin(struct intel_engine_cs *engine,
 	if (ret)
 		goto err;
 
-	vaddr = i915_gem_object_pin_map(ce->state->obj, I915_MAP_WB);
+	vaddr = i915_gem_object_pin_map(ce->state->obj, map);
 	if (IS_ERR(vaddr)) {
 		ret = PTR_ERR(vaddr);
 		goto unpin_vma;
@@ -2728,6 +2729,7 @@ populate_lr_context(struct i915_gem_context *ctx,
 		    struct intel_engine_cs *engine,
 		    struct intel_ring *ring)
 {
+	enum i915_map_type map = HAS_LLC(ctx->i915) ? I915_MAP_WB : I915_MAP_WC;
 	void *vaddr;
 	u32 *regs;
 	int ret;
@@ -2738,7 +2740,7 @@ populate_lr_context(struct i915_gem_context *ctx,
 		return ret;
 	}
 
-	vaddr = i915_gem_object_pin_map(ctx_obj, I915_MAP_WB);
+	vaddr = i915_gem_object_pin_map(ctx_obj, map);
 	if (IS_ERR(vaddr)) {
 		ret = PTR_ERR(vaddr);
 		DRM_DEBUG_DRIVER("Could not map object pages! (%d)\n", ret);
@@ -2756,7 +2758,7 @@ populate_lr_context(struct i915_gem_context *ctx,
 		void *defaults;
 
 		defaults = i915_gem_object_pin_map(engine->default_state,
-						   I915_MAP_WB);
+						   map);
 		if (IS_ERR(defaults)) {
 			ret = PTR_ERR(defaults);
 			goto err_unpin_ctx;
-- 
2.7.4

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

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
  2018-06-22  3:55 [PATCH] drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC Zhao Yakui
@ 2018-06-22  4:09 ` Patchwork
  2018-06-22  4:24 ` ✗ Fi.CI.BAT: failure " Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-06-22  4:09 UTC (permalink / raw)
  To: Zhao Yakui; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
URL   : https://patchwork.freedesktop.org/series/45213/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
e5a2098da0c4 drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
-:12: WARNING:TYPO_SPELLING: 'writting' may be misspelled - perhaps 'writing'?
#12: 
before writting the ELSP port, it has no explicit cache flsuh.Maybe it is

total: 0 errors, 1 warnings, 0 checks, 38 lines checked

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

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

* ✗ Fi.CI.BAT: failure for drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
  2018-06-22  3:55 [PATCH] drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC Zhao Yakui
  2018-06-22  4:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-06-22  4:24 ` Patchwork
  2018-06-22  6:33   ` Chris Wilson
  1 sibling, 1 reply; 4+ messages in thread
From: Patchwork @ 2018-06-22  4:24 UTC (permalink / raw)
  To: Zhao Yakui; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
URL   : https://patchwork.freedesktop.org/series/45213/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4368 -> Patchwork_9391 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_9391 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9391, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/45213/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_9391:

  === IGT changes ===

    ==== Possible regressions ====

    igt@gem_close_race@basic-threads:
      fi-bsw-n3050:       PASS -> INCOMPLETE

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_close_race@basic-threads:
      fi-glk-j4005:       PASS -> INCOMPLETE (k.org#198133, fdo#103359)
      fi-bxt-j4205:       PASS -> INCOMPLETE (fdo#103927)
      fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

    
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (43 -> 37) ==

  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-glk-dsi fi-bsw-cyan fi-ctg-p8600 fi-kbl-x1275 


== Build changes ==

    * Linux: CI_DRM_4368 -> Patchwork_9391

  CI_DRM_4368: f9f621dc095a8bfd2157fba018ddb542260d8daa @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4528: 6be300d405de5974b262e8b93a445be4ac618e6a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9391: e5a2098da0c4b8d365abd17df2991ddf598917de @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

e5a2098da0c4 drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC

== Logs ==

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

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

* Re: ✗ Fi.CI.BAT: failure for drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
  2018-06-22  4:24 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2018-06-22  6:33   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2018-06-22  6:33 UTC (permalink / raw)
  To: Patchwork, Zhao Yakui; +Cc: intel-gfx

Quoting Patchwork (2018-06-22 05:24:34)
> == Series Details ==
> 
> Series: drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC
> URL   : https://patchwork.freedesktop.org/series/45213/
> State : failure
> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_4368 -> Patchwork_9391 =
> 
> == Summary - FAILURE ==
> 
>   Serious unknown changes coming with Patchwork_9391 absolutely need to be
>   verified manually.
>   
>   If you think the reported changes have nothing to do with the changes
>   introduced in Patchwork_9391, please notify your bug team to allow them
>   to document this new failure mode, which will reduce false positives in CI.
> 
>   External URL: https://patchwork.freedesktop.org/api/1.0/series/45213/revisions/1/mbox/
> 
> == Possible new issues ==
> 
>   Here are the unknown changes that may have been introduced in Patchwork_9391:
> 
>   === IGT changes ===
> 
>     ==== Possible regressions ====
> 
>     igt@gem_close_race@basic-threads:
>       fi-bsw-n3050:       PASS -> INCOMPLETE
> 
>     
> == Known issues ==
> 
>   Here are the changes found in Patchwork_9391 that come from known issues:
> 
>   === IGT changes ===
> 
>     ==== Issues hit ====
> 
>     igt@gem_close_race@basic-threads:
>       fi-glk-j4005:       PASS -> INCOMPLETE (k.org#198133, fdo#103359)
>       fi-bxt-j4205:       PASS -> INCOMPLETE (fdo#103927)
>       fi-bxt-dsi:         PASS -> INCOMPLETE (fdo#103927)

Iow, we've never encountered a failure to map the context image before.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-06-22  6:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22  3:55 [PATCH] drm/i915: Use I915_MAP_WC for execlists context buffer on the platforms without LLC Zhao Yakui
2018-06-22  4:09 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-06-22  4:24 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-06-22  6:33   ` Chris Wilson

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.