All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init
@ 2016-03-14 15:11 Peter Antoine
  2016-03-14 15:31 ` ✗ Fi.CI.BAT: failure for drm/i915/mocs: Program MOCS for all engines on init (rev6) Patchwork
  2016-03-15 10:15 ` [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init Chris Wilson
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Antoine @ 2016-03-14 15:11 UTC (permalink / raw)
  To: intel-gfx

Allow for the MOCS to be programmed for all engines.
Currently we program the MOCS when the first render batch
goes through. This works on most platforms but fails on
platforms that do not run a render batch early,
i.e. headless servers. The patch now programs all initialised engines
on init and the RCS is programmed again within the initial batch. This
is done for predictable consistency with regards to the hardware
context.

Hardware context loading sets the values of the MOCS for RCS
and L3CC. Programming them from within the batch makes sure that
the render context is valid, no matter what the previous state of
the saved-context was.

v2: posted correct version to the mailing list.
v3: moved programming to within engine->init_hw() (Chris Wilson)
v4: code formatting and white-space changes. (Chris Wilson)

Signed-off-by: Peter Antoine <peter.antoine@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c   |   3 +
 drivers/gpu/drm/i915/intel_lrc.c  |   2 +-
 drivers/gpu/drm/i915/intel_mocs.c | 132 ++++++++++++++++++++++++++++++--------
 drivers/gpu/drm/i915/intel_mocs.h |   2 +
 4 files changed, 110 insertions(+), 29 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b854af2..73e4892 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -32,6 +32,7 @@
 #include "i915_vgpu.h"
 #include "i915_trace.h"
 #include "intel_drv.h"
+#include "intel_mocs.h"
 #include <linux/shmem_fs.h>
 #include <linux/slab.h>
 #include <linux/swap.h>
@@ -4882,6 +4883,8 @@ i915_gem_init_hw(struct drm_device *dev)
 			goto out;
 	}
 
+	intel_mocs_init_l3cc_table(dev);
+
 	/* We can't enable contexts until all firmware is loaded */
 	if (HAS_GUC_UCODE(dev)) {
 		ret = intel_guc_ucode_load(dev);
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 27c9ee3..03ead7f 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1603,7 +1603,7 @@ static int gen8_init_common_ring(struct intel_engine_cs *ring)
 
 	memset(&ring->hangcheck, 0, sizeof(ring->hangcheck));
 
-	return 0;
+	return intel_mocs_init_engine(ring);
 }
 
 static int gen8_init_render_ring(struct intel_engine_cs *ring)
diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/intel_mocs.c
index fed7bea..8e490af 100644
--- a/drivers/gpu/drm/i915/intel_mocs.c
+++ b/drivers/gpu/drm/i915/intel_mocs.c
@@ -128,9 +128,9 @@ static const struct drm_i915_mocs_entry broxton_mocs_table[] = {
 
 /**
  * get_mocs_settings()
- * @dev:        DRM device.
+ * @dev:	DRM device.
  * @table:      Output table that will be made to point at appropriate
- *              MOCS values for the device.
+ *	      MOCS values for the device.
  *
  * This function will return the values of the MOCS table that needs to
  * be programmed for the platform. It will return the values that need
@@ -179,6 +179,47 @@ static i915_reg_t mocs_register(enum intel_ring_id ring, int index)
 }
 
 /**
+ * intel_mocs_init_engine() - emit the mocs control table
+ * @ring:	The engine for whom to emit the registers.
+ *
+ * This function simply emits a MI_LOAD_REGISTER_IMM command for the
+ * given table starting at the given address.
+ *
+ * Return: 0 on success, otherwise the error status.
+ */
+int intel_mocs_init_engine(struct intel_engine_cs *ring)
+{
+	struct drm_device *dev = ring->dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct drm_i915_mocs_table table;
+	unsigned int index;
+
+	if (!get_mocs_settings(dev, &table))
+		return 0;
+
+	if (WARN_ON(table.size > GEN9_NUM_MOCS_ENTRIES))
+		return -ENODEV;
+
+	for (index = 0; index < table.size; index++)
+		I915_WRITE(mocs_register(ring->id, index),
+			   table.table[index].control_value);
+
+	/*
+	 * Ok, now set the unused entries to uncached. These entries
+	 * are officially undefined and no contract for the contents
+	 * and settings is given for these entries.
+	 *
+	 * Entry 0 in the table is uncached - so we are just writing
+	 * that value to all the used entries.
+	 */
+	for (; index < GEN9_NUM_MOCS_ENTRIES; index++)
+		I915_WRITE(mocs_register(ring->id, index),
+			   table.table[0].control_value);
+
+	return 0;
+}
+
+/**
  * emit_mocs_control_table() - emit the mocs control table
  * @req:	Request to set up the MOCS table for.
  * @table:	The values to program into the control regs.
@@ -234,6 +275,14 @@ static int emit_mocs_control_table(struct drm_i915_gem_request *req,
 	return 0;
 }
 
+static inline u32 l3cc_combine(const struct drm_i915_mocs_table *table,
+			       u16 low,
+			       u16 high)
+{
+	return table->table[low].l3cc_value |
+	       table->table[high].l3cc_value << 16;
+}
+
 /**
  * emit_mocs_l3cc_table() - emit the mocs control table
  * @req:	Request to set up the MOCS table for.
@@ -249,11 +298,7 @@ static int emit_mocs_l3cc_table(struct drm_i915_gem_request *req,
 				const struct drm_i915_mocs_table *table)
 {
 	struct intel_ringbuffer *ringbuf = req->ringbuf;
-	unsigned int count;
 	unsigned int i;
-	u32 value;
-	u32 filler = (table->table[0].l3cc_value & 0xffff) |
-			((table->table[0].l3cc_value & 0xffff) << 16);
 	int ret;
 
 	if (WARN_ON(table->size > GEN9_NUM_MOCS_ENTRIES))
@@ -268,20 +313,18 @@ static int emit_mocs_l3cc_table(struct drm_i915_gem_request *req,
 	intel_logical_ring_emit(ringbuf,
 			MI_LOAD_REGISTER_IMM(GEN9_NUM_MOCS_ENTRIES / 2));
 
-	for (i = 0, count = 0; i < table->size / 2; i++, count += 2) {
-		value = (table->table[count].l3cc_value & 0xffff) |
-			((table->table[count + 1].l3cc_value & 0xffff) << 16);
-
+	for (i = 0; i < table->size/2; i++) {
 		intel_logical_ring_emit_reg(ringbuf, GEN9_LNCFCMOCS(i));
-		intel_logical_ring_emit(ringbuf, value);
+		intel_logical_ring_emit(ringbuf,
+					l3cc_combine(table, 2*i, 2*i+1));
 	}
 
 	if (table->size & 0x01) {
 		/* Odd table size - 1 left over */
-		value = (table->table[count].l3cc_value & 0xffff) |
-			((table->table[0].l3cc_value & 0xffff) << 16);
-	} else
-		value = filler;
+		intel_logical_ring_emit_reg(ringbuf, GEN9_LNCFCMOCS(i));
+		intel_logical_ring_emit(ringbuf, l3cc_combine(table, 2*i, 0));
+		i++;
+	}
 
 	/*
 	 * Now set the rest of the table to uncached - use entry 0 as
@@ -290,9 +333,7 @@ static int emit_mocs_l3cc_table(struct drm_i915_gem_request *req,
 	 */
 	for (; i < GEN9_NUM_MOCS_ENTRIES / 2; i++) {
 		intel_logical_ring_emit_reg(ringbuf, GEN9_LNCFCMOCS(i));
-		intel_logical_ring_emit(ringbuf, value);
-
-		value = filler;
+		intel_logical_ring_emit(ringbuf, l3cc_combine(table, 0, 0));
 	}
 
 	intel_logical_ring_emit(ringbuf, MI_NOOP);
@@ -302,6 +343,47 @@ static int emit_mocs_l3cc_table(struct drm_i915_gem_request *req,
 }
 
 /**
+ * intel_mocs_init_l3cc_table() - program the mocs control table
+ * @dev:      The the device to be programmed.
+ *
+ * This function simply programs the mocs registers for the given table
+ * starting at the given address. This register set is  programmed in pairs.
+ *
+ * These registers may get programmed more than once, it is simpler to
+ * re-program 32 registers than maintain the state of when they were programmed.
+ * We are always reprogramming with the same values and this only on context
+ * start.
+ *
+ * Return: Nothing.
+ */
+void intel_mocs_init_l3cc_table(struct drm_device *dev)
+{
+	unsigned int i;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	struct drm_i915_mocs_table table;
+
+	if (!get_mocs_settings(dev, &table))
+		return;
+
+	for (i = 0; i < table.size/2; i++)
+		I915_WRITE(GEN9_LNCFCMOCS(i), l3cc_combine(&table, 2*i, 2*i+1));
+
+	/* Odd table size - 1 left over */
+	if (table.size & 0x01) {
+		I915_WRITE(GEN9_LNCFCMOCS(i), l3cc_combine(&table, 2*i, 0));
+		i++;
+	}
+
+	/*
+	 * Now set the rest of the table to uncached - use entry 0 as
+	 * this will be uncached. Leave the last pair as initialised as
+	 * they are reserved by the hardware.
+	 */
+	for (; i < (GEN9_NUM_MOCS_ENTRIES / 2); i++)
+		I915_WRITE(GEN9_LNCFCMOCS(i), l3cc_combine(&table, 0, 0));
+}
+
+/**
  * intel_rcs_context_init_mocs() - program the MOCS register.
  * @req:	Request to set up the MOCS tables for.
  *
@@ -323,16 +405,10 @@ int intel_rcs_context_init_mocs(struct drm_i915_gem_request *req)
 	int ret;
 
 	if (get_mocs_settings(req->ring->dev, &t)) {
-		struct drm_i915_private *dev_priv = req->i915;
-		struct intel_engine_cs *ring;
-		enum intel_ring_id ring_id;
-
-		/* Program the control registers */
-		for_each_ring(ring, dev_priv, ring_id) {
-			ret = emit_mocs_control_table(req, &t, ring_id);
-			if (ret)
-				return ret;
-		}
+		/* Program the RCS control registers */
+		ret = emit_mocs_control_table(req, &t, RCS);
+		if (ret)
+			return ret;
 
 		/* Now program the l3cc registers */
 		ret = emit_mocs_l3cc_table(req, &t);
diff --git a/drivers/gpu/drm/i915/intel_mocs.h b/drivers/gpu/drm/i915/intel_mocs.h
index 76e45b1..4640299 100644
--- a/drivers/gpu/drm/i915/intel_mocs.h
+++ b/drivers/gpu/drm/i915/intel_mocs.h
@@ -53,5 +53,7 @@
 #include "i915_drv.h"
 
 int intel_rcs_context_init_mocs(struct drm_i915_gem_request *req);
+void intel_mocs_init_l3cc_table(struct drm_device *dev);
+int intel_mocs_init_engine(struct intel_engine_cs *ring);
 
 #endif
-- 
1.9.1

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

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

* ✗ Fi.CI.BAT: failure for drm/i915/mocs: Program MOCS for all engines on init (rev6)
  2016-03-14 15:11 [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init Peter Antoine
@ 2016-03-14 15:31 ` Patchwork
  2016-03-15 10:15 ` [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init Chris Wilson
  1 sibling, 0 replies; 8+ messages in thread
From: Patchwork @ 2016-03-14 15:31 UTC (permalink / raw)
  To: Peter Antoine; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/mocs: Program MOCS for all engines on init (rev6)
URL   : https://patchwork.freedesktop.org/series/4310/
State : failure

== Summary ==

Series 4310v6 drm/i915/mocs: Program MOCS for all engines on init
http://patchwork.freedesktop.org/api/1.0/series/4310/revisions/6/mbox/

Test drv_hangman:
        Subgroup error-state-basic:
                pass       -> INCOMPLETE (snb-dellxps)
Test gem_exec_basic:
        Subgroup readonly-render:
                incomplete -> PASS       (ilk-hp8440p)
Test gem_mmap_gtt:
        Subgroup basic-small-copy:
                pass       -> DMESG-WARN (ilk-hp8440p)
        Subgroup basic-write-no-prefault:
                incomplete -> PASS       (ilk-hp8440p)
Test gem_ringfill:
        Subgroup basic-default-s3:
                dmesg-warn -> PASS       (bsw-nuc-2)
                incomplete -> DMESG-WARN (ilk-hp8440p)
Test kms_addfb_basic:
        Subgroup addfb25-yf-tiled:
                incomplete -> PASS       (ilk-hp8440p)
        Subgroup bad-pitch-1024:
                incomplete -> PASS       (ilk-hp8440p)
        Subgroup size-max:
                incomplete -> PASS       (ilk-hp8440p)
        Subgroup small-bo:
                incomplete -> PASS       (ilk-hp8440p)
        Subgroup unused-offsets:
                incomplete -> PASS       (ilk-hp8440p)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                dmesg-warn -> PASS       (bdw-ultra)
                pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE
        Subgroup basic-flip-vs-modeset:
                incomplete -> PASS       (bsw-nuc-2)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b:
                pass       -> DMESG-WARN (hsw-brixbox)
        Subgroup suspend-read-crc-pipe-a:
                incomplete -> PASS       (hsw-gt2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                dmesg-warn -> PASS       (bsw-nuc-2)
                pass       -> DMESG-WARN (snb-dellxps)
Test prime_self_import:
        Subgroup basic-llseek-size:
                incomplete -> PASS       (ilk-hp8440p)

bdw-nuci7        total:194  pass:182  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:194  pass:173  dwarn:0   dfail:0   fail:0   skip:21 
bsw-nuc-2        total:194  pass:156  dwarn:1   dfail:0   fail:0   skip:37 
hsw-brixbox      total:194  pass:171  dwarn:1   dfail:0   fail:0   skip:22 
hsw-gt2          total:194  pass:177  dwarn:0   dfail:0   fail:0   skip:17 
ilk-hp8440p      total:194  pass:124  dwarn:6   dfail:0   fail:1   skip:63 
ivb-t430s        total:194  pass:169  dwarn:0   dfail:0   fail:0   skip:25 
skl-i5k-2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
skl-i7k-2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
skl-nuci5        total:194  pass:183  dwarn:0   dfail:0   fail:0   skip:11 
snb-dellxps      total:152  pass:124  dwarn:1   dfail:0   fail:0   skip:26 
snb-x220t        total:194  pass:159  dwarn:1   dfail:0   fail:1   skip:33 

Results at /archive/results/CI_IGT_test/Patchwork_1594/

3e5ecc8c5ff80cb1fb635ce1cf16b7cd4cfb1979 drm-intel-nightly: 2016y-03m-14d-09h-06m-00s UTC integration manifest
2825cd26c9cf60a6122737f79520aecde49098a1 drm/i915/mocs: Program MOCS for all engines on init

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

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

* Re: [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init
  2016-03-14 15:11 [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init Peter Antoine
  2016-03-14 15:31 ` ✗ Fi.CI.BAT: failure for drm/i915/mocs: Program MOCS for all engines on init (rev6) Patchwork
@ 2016-03-15 10:15 ` Chris Wilson
  2016-03-15 14:40   ` Peter Antoine
  1 sibling, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2016-03-15 10:15 UTC (permalink / raw)
  To: Peter Antoine; +Cc: intel-gfx

On Mon, Mar 14, 2016 at 03:11:02PM +0000, Peter Antoine wrote:
> Allow for the MOCS to be programmed for all engines.
> Currently we program the MOCS when the first render batch
> goes through. This works on most platforms but fails on
> platforms that do not run a render batch early,
> i.e. headless servers. The patch now programs all initialised engines
> on init and the RCS is programmed again within the initial batch. This
> is done for predictable consistency with regards to the hardware
> context.
> 
> Hardware context loading sets the values of the MOCS for RCS
> and L3CC. Programming them from within the batch makes sure that
> the render context is valid, no matter what the previous state of
> the saved-context was.
> 
> v2: posted correct version to the mailing list.
> v3: moved programming to within engine->init_hw() (Chris Wilson)
> v4: code formatting and white-space changes. (Chris Wilson)
> 
> Signed-off-by: Peter Antoine <peter.antoine@intel.com>

So testcase?

Execute a bunch of MI_STORE_REGISTER_MEM on the various rings in a fresh
context each time and confirm the ABI for the first N locations.

Repeat across suspend/resume (i.e. make sure the context image maintain
the register state). Then verify that freshly constructed contexts also
have the correct settings after resume.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init
  2016-03-15 10:15 ` [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init Chris Wilson
@ 2016-03-15 14:40   ` Peter Antoine
  2016-03-22  9:02     ` Peter Antoine
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Antoine @ 2016-03-15 14:40 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Davies, Devon, intel-gfx

Chris,

Testcases are underway, validation are working on them.

Peter.

On Tue, 15 Mar 2016, Chris Wilson wrote:

> On Mon, Mar 14, 2016 at 03:11:02PM +0000, Peter Antoine wrote:
>> Allow for the MOCS to be programmed for all engines.
>> Currently we program the MOCS when the first render batch
>> goes through. This works on most platforms but fails on
>> platforms that do not run a render batch early,
>> i.e. headless servers. The patch now programs all initialised engines
>> on init and the RCS is programmed again within the initial batch. This
>> is done for predictable consistency with regards to the hardware
>> context.
>>
>> Hardware context loading sets the values of the MOCS for RCS
>> and L3CC. Programming them from within the batch makes sure that
>> the render context is valid, no matter what the previous state of
>> the saved-context was.
>>
>> v2: posted correct version to the mailing list.
>> v3: moved programming to within engine->init_hw() (Chris Wilson)
>> v4: code formatting and white-space changes. (Chris Wilson)
>>
>> Signed-off-by: Peter Antoine <peter.antoine@intel.com>
>
> So testcase?
>
> Execute a bunch of MI_STORE_REGISTER_MEM on the various rings in a fresh
> context each time and confirm the ABI for the first N locations.
>
> Repeat across suspend/resume (i.e. make sure the context image maintain
> the register state). Then verify that freshly constructed contexts also
> have the correct settings after resume.
> -Chris
>
>

--
    Peter Antoine (Android Graphics Driver Software Engineer)
    ---------------------------------------------------------------------
    Intel Corporation (UK) Limited
    Registered No. 1134945 (England)
    Registered Office: Pipers Way, Swindon SN3 1RJ
    VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init
  2016-03-15 14:40   ` Peter Antoine
@ 2016-03-22  9:02     ` Peter Antoine
  2016-03-22  9:36       ` Chris Wilson
  2016-04-12 11:52       ` Peter Antoine
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Antoine @ 2016-03-22  9:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Davies, Devon, intel-gfx

Chris.

Can these patches be reviewed without the tests or are they blocked 
waiting for the tests.

Are the patches acceptable?

Thanks,
Peter.

On Tue, 15 Mar 2016, Peter Antoine wrote:

> Chris,
>
> Testcases are underway, validation are working on them.
>
> Peter.
>
> On Tue, 15 Mar 2016, Chris Wilson wrote:
>
>> On Mon, Mar 14, 2016 at 03:11:02PM +0000, Peter Antoine wrote:
>>> Allow for the MOCS to be programmed for all engines.
>>> Currently we program the MOCS when the first render batch
>>> goes through. This works on most platforms but fails on
>>> platforms that do not run a render batch early,
>>> i.e. headless servers. The patch now programs all initialised engines
>>> on init and the RCS is programmed again within the initial batch. This
>>> is done for predictable consistency with regards to the hardware
>>> context.
>>> 
>>> Hardware context loading sets the values of the MOCS for RCS
>>> and L3CC. Programming them from within the batch makes sure that
>>> the render context is valid, no matter what the previous state of
>>> the saved-context was.
>>> 
>>> v2: posted correct version to the mailing list.
>>> v3: moved programming to within engine->init_hw() (Chris Wilson)
>>> v4: code formatting and white-space changes. (Chris Wilson)
>>> 
>>> Signed-off-by: Peter Antoine <peter.antoine@intel.com>
>> 
>> So testcase?
>> 
>> Execute a bunch of MI_STORE_REGISTER_MEM on the various rings in a fresh
>> context each time and confirm the ABI for the first N locations.
>> 
>> Repeat across suspend/resume (i.e. make sure the context image maintain
>> the register state). Then verify that freshly constructed contexts also
>> have the correct settings after resume.
>> -Chris
>> 
>> 
>
> --
>   Peter Antoine (Android Graphics Driver Software Engineer)
>   ---------------------------------------------------------------------
>   Intel Corporation (UK) Limited
>   Registered No. 1134945 (England)
>   Registered Office: Pipers Way, Swindon SN3 1RJ
>   VAT No: 860 2173 47
>

--
    Peter Antoine (Android Graphics Driver Software Engineer)
    ---------------------------------------------------------------------
    Intel Corporation (UK) Limited
    Registered No. 1134945 (England)
    Registered Office: Pipers Way, Swindon SN3 1RJ
    VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init
  2016-03-22  9:02     ` Peter Antoine
@ 2016-03-22  9:36       ` Chris Wilson
  2016-04-12 11:52       ` Peter Antoine
  1 sibling, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2016-03-22  9:36 UTC (permalink / raw)
  To: Peter Antoine; +Cc: Davies, Devon, intel-gfx

On Tue, Mar 22, 2016 at 09:02:17AM +0000, Peter Antoine wrote:
> Chris.
> 
> Can these patches be reviewed without the tests or are they blocked
> waiting for the tests.

More or less waiting upon the tests. Or where is the bugzilla?

It would only take a couple of hours to write something like:

for_each_engine() {
	switch (mode) {
	case NOTHING: break;
	case RESET: reset_gpu(); break;
	case SUSPEND: suspend_autoresume(); brea;
	case HIBERNATE: hibernate_autoresume(); brea;
	}
	fd = drm_open_driver();
	if (use_context)
		ctx = gem_context_create();
	for_each_mocs()
		MI_STORE_REGISTER_MEM(engine, mocs, out[i]);
	execbuf(engine)

	gem_set_domain(out, DOMAIN_COU, 0);
	/* Check ABI caching levels */
	for_each_mocs()
		igt_assert(out[i], foo);
	close(fd);
}

> Are the patches acceptable?

Yes, with a reference to a bug demonstrating the impact and a testcase
to demonstrate it works.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init
  2016-03-22  9:02     ` Peter Antoine
  2016-03-22  9:36       ` Chris Wilson
@ 2016-04-12 11:52       ` Peter Antoine
  2016-04-13 13:52         ` Chris Wilson
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Antoine @ 2016-04-12 11:52 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Davies, Devon, intel-gfx

Chris,

If the test is ok, can you review-by this patch.

Thanks,
Peter.

On Tue, 22 Mar 2016, Peter Antoine wrote:

> Chris.
>
> Can these patches be reviewed without the tests or are they blocked waiting 
> for the tests.
>
> Are the patches acceptable?
>
> Thanks,
> Peter.
>
> On Tue, 15 Mar 2016, Peter Antoine wrote:
>
>> Chris,
>> 
>> Testcases are underway, validation are working on them.
>> 
>> Peter.
>> 
>> On Tue, 15 Mar 2016, Chris Wilson wrote:
>> 
>>> On Mon, Mar 14, 2016 at 03:11:02PM +0000, Peter Antoine wrote:
>>>> Allow for the MOCS to be programmed for all engines.
>>>> Currently we program the MOCS when the first render batch
>>>> goes through. This works on most platforms but fails on
>>>> platforms that do not run a render batch early,
>>>> i.e. headless servers. The patch now programs all initialised engines
>>>> on init and the RCS is programmed again within the initial batch. This
>>>> is done for predictable consistency with regards to the hardware
>>>> context.
>>>> 
>>>> Hardware context loading sets the values of the MOCS for RCS
>>>> and L3CC. Programming them from within the batch makes sure that
>>>> the render context is valid, no matter what the previous state of
>>>> the saved-context was.
>>>> 
>>>> v2: posted correct version to the mailing list.
>>>> v3: moved programming to within engine->init_hw() (Chris Wilson)
>>>> v4: code formatting and white-space changes. (Chris Wilson)
>>>> 
>>>> Signed-off-by: Peter Antoine <peter.antoine@intel.com>
>>> 
>>> So testcase?
>>> 
>>> Execute a bunch of MI_STORE_REGISTER_MEM on the various rings in a fresh
>>> context each time and confirm the ABI for the first N locations.
>>> 
>>> Repeat across suspend/resume (i.e. make sure the context image maintain
>>> the register state). Then verify that freshly constructed contexts also
>>> have the correct settings after resume.
>>> -Chris
>>> 
>>> 
>> 
>> --
>>   Peter Antoine (Android Graphics Driver Software Engineer)
>>   ---------------------------------------------------------------------
>>   Intel Corporation (UK) Limited
>>   Registered No. 1134945 (England)
>>   Registered Office: Pipers Way, Swindon SN3 1RJ
>>   VAT No: 860 2173 47
>> 
>
> --
>   Peter Antoine (Android Graphics Driver Software Engineer)
>   ---------------------------------------------------------------------
>   Intel Corporation (UK) Limited
>   Registered No. 1134945 (England)
>   Registered Office: Pipers Way, Swindon SN3 1RJ
>   VAT No: 860 2173 47
>

--
    Peter Antoine (Android Graphics Driver Software Engineer)
    ---------------------------------------------------------------------
    Intel Corporation (UK) Limited
    Registered No. 1134945 (England)
    Registered Office: Pipers Way, Swindon SN3 1RJ
    VAT No: 860 2173 47
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init
  2016-04-12 11:52       ` Peter Antoine
@ 2016-04-13 13:52         ` Chris Wilson
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Wilson @ 2016-04-13 13:52 UTC (permalink / raw)
  To: Peter Antoine; +Cc: Davies, Devon, intel-gfx

On Tue, Apr 12, 2016 at 12:52:24PM +0100, Peter Antoine wrote:
> Chris,
> 
> If the test is ok, can you review-by this patch.

Yup, my box decided that was good time to suffer fs corruption. Patched
up and resent for CI with my r-b.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-04-13 13:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-14 15:11 [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init Peter Antoine
2016-03-14 15:31 ` ✗ Fi.CI.BAT: failure for drm/i915/mocs: Program MOCS for all engines on init (rev6) Patchwork
2016-03-15 10:15 ` [PATCH v4] drm/i915/mocs: Program MOCS for all engines on init Chris Wilson
2016-03-15 14:40   ` Peter Antoine
2016-03-22  9:02     ` Peter Antoine
2016-03-22  9:36       ` Chris Wilson
2016-04-12 11:52       ` Peter Antoine
2016-04-13 13:52         ` 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.