Skip to contentSkip to conversation

drm/i915/mocs: Program MOCS for all engines on init

PATCH Superseded Peter Antoine 2 participants 2 messages Mar 10, 2016

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915/mocs: Program MOCS for all engines on init

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.

---
 drivers/gpu/drm/i915/i915_gem.c   |   3 +
 drivers/gpu/drm/i915/intel_mocs.c | 138 ++++++++++++++++++++++++++++++++++----
 drivers/gpu/drm/i915/intel_mocs.h |   1 +
 3 files changed, 130 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +3 -0
index b854af2..05c9fcb 100644
@@ -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_program_mocs_engines(dev);
+
 	/* We can't enable contexts until all firmware is loaded */
 	if (HAS_GUC_UCODE(dev)) {
 		ret = intel_guc_ucode_load(dev);
drivers/gpu/drm/i915/intel_mocs.c +126 -12

163 lines not on this page · raw message

drivers/gpu/drm/i915/intel_mocs.h +1 -0
index 76e45b1..d20e16d 100644
@@ -53,5 +53,6 @@
 #include "i915_drv.h"
 
 int intel_rcs_context_init_mocs(struct drm_i915_gem_request *req);
+void intel_program_mocs_engines(struct drm_device *dev);
 
 #endif
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✗ Fi.CI.BAT: failure for drm/i915/mocs: Program MOCS for all engines on init (rev3)

== Series Details ==

== Series Details ==

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

== Summary ==

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

Test kms_flip:

        Subgroup basic-flip-vs-dpms:
                pass       -> SKIP       (hsw-brixbox)
                pass       -> DMESG-WARN (ilk-hp8440p) UNSTABLE
        Subgroup basic-flip-vs-modeset:
                dmesg-warn -> PASS       (bdw-ultra)
Test kms_force_connector_basic:
        Subgroup force-edid:
                pass       -> SKIP       (snb-x220t)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b-frame-sequence:
                pass       -> DMESG-WARN (ilk-hp8440p)
        Subgroup read-crc-pipe-a-frame-sequence:
                pass       -> DMESG-WARN (snb-x220t)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                fail       -> DMESG-FAIL (snb-x220t)
                dmesg-warn -> PASS       (hsw-brixbox)
        Subgroup basic-rte:
                dmesg-warn -> PASS       (snb-x220t)
                dmesg-warn -> PASS       (bsw-nuc-2)
bdw-nuci7        total:193  pass:181  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:193  pass:172  dwarn:0   dfail:0   fail:0   skip:21 
bsw-nuc-2        total:193  pass:156  dwarn:0   dfail:0   fail:0   skip:37 
byt-nuc          total:193  pass:158  dwarn:0   dfail:0   fail:0   skip:35 
hsw-brixbox      total:193  pass:170  dwarn:0   dfail:0   fail:0   skip:23 
hsw-gt2          total:88   pass:81   dwarn:0   dfail:0   fail:0   skip:6  
ilk-hp8440p      total:193  pass:128  dwarn:2   dfail:0   fail:0   skip:63 
ivb-t430s        total:193  pass:168  dwarn:0   dfail:0   fail:0   skip:25 
skl-i5k-2        total:193  pass:170  dwarn:0   dfail:0   fail:0   skip:23 
skl-i7k-2        total:193  pass:170  dwarn:0   dfail:0   fail:0   skip:23 
skl-nuci5        total:161  pass:152  dwarn:0   dfail:0   fail:0   skip:9  
snb-x220t        total:193  pass:157  dwarn:1   dfail:1   fail:0   skip:34 

Results at /archive/results/CI_IGT_test/Patchwork_1564/

63461ba49f1bc63fe9dcccdbbaa3a5049c57ae37 drm-intel-nightly: 2016y-03m-10d-13h-21m-51s UTC integration manifest 330bfde869b2c28e73e3b5a21bb88e091b62d9ec drm/i915/mocs: Program MOCS for all engines on init

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx