All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Flush everything on switching to the kernel_context
@ 2017-11-26 21:48 Chris Wilson
  2017-11-26 22:25 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-11-26 21:48 UTC (permalink / raw)
  To: intel-gfx

Even though all rendering should have been flushed at the end of the
previous requests, add an extra flush after switching to the
kernel_context. As the switch to the kernel_context is used when idling
the gpu (e.g. suspend), having an extra layer of paranoia to ensure
everything is flushed to memory seems sensible.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index aee0f6d72d33..ce3139e5ec4c 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -620,7 +620,14 @@ int i915_gem_switch_to_kernel_context(struct drm_i915_private *dev_priv)
 								 GFP_KERNEL);
 		}
 
-		i915_add_request(req);
+		/*
+		 * Force a flush after the switch to ensure that all rendering
+		 * and operations prior to switching to the kernel context hits
+		 * memory. This should be guaranteed by the previous request,
+		 * but an extra layer of paranoia before we declare the system
+		 * idle (on suspend etc) is advisable!
+		 */
+		__i915_add_request(req, true);
 	}
 
 	return 0;
-- 
2.15.0

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

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

* ✓ Fi.CI.BAT: success for drm/i915: Flush everything on switching to the kernel_context
  2017-11-26 21:48 [PATCH] drm/i915: Flush everything on switching to the kernel_context Chris Wilson
@ 2017-11-26 22:25 ` Patchwork
  2017-11-26 23:16 ` ✓ Fi.CI.IGT: " Patchwork
  2017-11-27 11:18 ` [PATCH] " Joonas Lahtinen
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-11-26 22:25 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Flush everything on switching to the kernel_context
URL   : https://patchwork.freedesktop.org/series/34419/
State : success

== Summary ==

Series 34419v1 drm/i915: Flush everything on switching to the kernel_context
https://patchwork.freedesktop.org/api/1.0/series/34419/revisions/1/mbox/

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:441s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:452s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:382s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:534s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:277s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:505s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:515s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:483s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:484s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:421s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:265s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:536s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:425s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:431s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:426s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:483s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:458s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:483s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:536s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:477s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:531s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:574s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:462s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:546s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:562s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:511s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:495s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:455s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:556s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:422s
Blacklisted hosts:
fi-cfl-s2        total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:622s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:542s
fi-glk-dsi       total:8    pass:7    dwarn:0   dfail:0   fail:0   skip:0  

2ac27dcb0eb2b64104e890031705714051be9ef8 drm-tip: 2017y-11m-26d-19h-47m-14s UTC integration manifest
1ac4bdf5011c drm/i915: Flush everything on switching to the kernel_context

== Logs ==

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

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

* ✓ Fi.CI.IGT: success for drm/i915: Flush everything on switching to the kernel_context
  2017-11-26 21:48 [PATCH] drm/i915: Flush everything on switching to the kernel_context Chris Wilson
  2017-11-26 22:25 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-11-26 23:16 ` Patchwork
  2017-11-27 11:18 ` [PATCH] " Joonas Lahtinen
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-11-26 23:16 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Flush everything on switching to the kernel_context
URL   : https://patchwork.freedesktop.org/series/34419/
State : success

== Summary ==

Test drv_selftest:
        Subgroup mock_sanitycheck:
                dmesg-warn -> PASS       (shard-snb) fdo#103717
Test kms_flip:
        Subgroup flip-vs-expired-vblank-interruptible:
                fail       -> PASS       (shard-hsw) fdo#102887
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                fail       -> PASS       (shard-snb) fdo#101623
Test perf:
        Subgroup blocking:
                fail       -> PASS       (shard-hsw) fdo#102252

fdo#103717 https://bugs.freedesktop.org/show_bug.cgi?id=103717
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-hsw        total:2662 pass:1535 dwarn:1   dfail:0   fail:10  skip:1116 time:9523s
shard-snb        total:2662 pass:1307 dwarn:2   dfail:0   fail:11  skip:1342 time:8076s
Blacklisted hosts:
shard-apl        total:2662 pass:1685 dwarn:1   dfail:0   fail:26  skip:949 time:13493s
shard-kbl        total:2662 pass:1797 dwarn:9   dfail:0   fail:26  skip:830 time:11214s

== Logs ==

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

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

* Re: [PATCH] drm/i915: Flush everything on switching to the kernel_context
  2017-11-26 21:48 [PATCH] drm/i915: Flush everything on switching to the kernel_context Chris Wilson
  2017-11-26 22:25 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-11-26 23:16 ` ✓ Fi.CI.IGT: " Patchwork
@ 2017-11-27 11:18 ` Joonas Lahtinen
  2017-11-27 11:51   ` Chris Wilson
  2 siblings, 1 reply; 5+ messages in thread
From: Joonas Lahtinen @ 2017-11-27 11:18 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Sun, 2017-11-26 at 21:48 +0000, Chris Wilson wrote:
> Even though all rendering should have been flushed at the end of the
> previous requests, add an extra flush after switching to the
> kernel_context. As the switch to the kernel_context is used when idling
> the gpu (e.g. suspend), having an extra layer of paranoia to ensure
> everything is flushed to memory seems sensible.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: Flush everything on switching to the kernel_context
  2017-11-27 11:18 ` [PATCH] " Joonas Lahtinen
@ 2017-11-27 11:51   ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-11-27 11:51 UTC (permalink / raw)
  To: Joonas Lahtinen, intel-gfx

Quoting Joonas Lahtinen (2017-11-27 11:18:55)
> On Sun, 2017-11-26 at 21:48 +0000, Chris Wilson wrote:
> > Even though all rendering should have been flushed at the end of the
> > previous requests, add an extra flush after switching to the
> > kernel_context. As the switch to the kernel_context is used when idling
> > the gpu (e.g. suspend), having an extra layer of paranoia to ensure
> > everything is flushed to memory seems sensible.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Thanks, I've applied this but I'm going to hold off pushing while CI is
on fire.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-11-27 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-26 21:48 [PATCH] drm/i915: Flush everything on switching to the kernel_context Chris Wilson
2017-11-26 22:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-11-26 23:16 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-27 11:18 ` [PATCH] " Joonas Lahtinen
2017-11-27 11:51   ` 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.