public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] uxa: Support BLT ring flushes on Broadwell, but not render ring flushes.
@ 2014-03-17 16:27 Kenneth Graunke
  2014-03-18  8:29 ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Kenneth Graunke @ 2014-03-17 16:27 UTC (permalink / raw)
  To: intel-gfx

Several places (such as intel_cache_expire) call intel_emit_batch_flush,
so it needs to work on Broadwell.  Sometimes the batch is empty, in
which case current_batch may not yet be BLT_RING.

The PIPE_CONTROL code has not been ported to work on Broadwell, so
trying to do a render ring flush will hang the GPU.  It also doesn't
make any sense to do a render ring flush, given that we never use the
render ring for UXA on Broadwell.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
---
 src/uxa/intel_batchbuffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

This is an alternative to my old "uxa: Don't emit PIPE_CONTROLs in an
empty batch." patch, which Chris pointed out was broken.

Chris,

In the future, if you're going to rewrite significant portions of my
patches, could you please at least put your Signed-off-by or something
on it?  In the version of "uxa: Enable BLT acceleration on Broadwell.",
you committed, at least half the patch was not actually written by me,
and the resulting code either hit assertion failures or GPU hangs if
run at all.

It's pretty disconcerting to see code committed under my name, with my
Signed-off-by, that doesn't work and which I've never even seen before.

diff --git a/src/uxa/intel_batchbuffer.c b/src/uxa/intel_batchbuffer.c
index 4aabe48..ec71ce2 100644
--- a/src/uxa/intel_batchbuffer.c
+++ b/src/uxa/intel_batchbuffer.c
@@ -183,11 +183,11 @@ void intel_batch_emit_flush(ScrnInfoPtr scrn)
 	int flags;
 
 	assert (!intel->in_batch_atomic);
-	assert (INTEL_INFO(intel)->gen < 0100);
 
 	/* Big hammer, look to the pipelined flushes in future. */
 	if ((INTEL_INFO(intel)->gen >= 060)) {
-		if (intel->current_batch == BLT_BATCH) {
+		if (intel->current_batch == BLT_BATCH ||
+		    INTEL_INFO(intel)->gen >= 0100) {
 			BEGIN_BATCH_BLT(4);
 			OUT_BATCH(MI_FLUSH_DW | 2);
 			OUT_BATCH(0);
-- 
1.8.4.2

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

end of thread, other threads:[~2014-03-18 17:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17 16:27 [PATCH] uxa: Support BLT ring flushes on Broadwell, but not render ring flushes Kenneth Graunke
2014-03-18  8:29 ` Chris Wilson
2014-03-18 17:08   ` Kenneth Graunke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox