drm/i915/mocs: Program MOCS for all engines on init
Subsystems (2)
PATCH v2 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
@@ -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
@@ -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
Quoted 34 lines · Peter Antoine
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.
Signed-off-by Peter Antoine <[email protected]>--- 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 +1
-0@@ -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>
drivers/gpu/drm/i915/i915_gem.c i915_gem_init_hw(struct drm_device *dev) · line 4886
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem.c +1
-0@@ -4882,6 +4883,8 @@ i915_gem_init_hw(struct drm_device *dev) goto out; } +intel_program_mocs_engines (dev);
Registers to be written when enabling the engine are called from engine->init_hw() in the line above. Please add this state there, which can then be specialised via vfunc if so desired.
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Chris,
Just posted patch that moves to the engine->init_hw().
Have moved the L3CC registers programming out of the function and left in the same place as the original function was. These registers are shared with all engines.
Peter.
Quoted 38 lines · Chris Wilson
Quoted 37 lines · Peter Antoine
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.
Signed-off-by Peter Antoine <[email protected]>--- 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 +1
-0@@ -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; }
Quoted 8 lines
drivers/gpu/drm/i915/i915_gem.c i915_gem_init_hw(struct drm_device *dev) · line 4886
Quoted 1 line
drivers/gpu/drm/i915/i915_gem.c +1
-0+intel_program_mocs_engines (dev);Registers to be written when enabling the engine are called from
engine->init_hw()in the line above. Please add this state there, which can then be specialised via vfunc if so desired.
-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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Just seen a documentation error in program_mocs_l3cc_table() still documents a parameter that has been removed. Will fix later.
Peter.
Quoted 58 lines · Peter Antoine
Hi Chris,
Just posted patch that moves to the
engine->init_hw().Have moved the L3CC registers programming out of the function and left in the same place as the original function was. These registers are shared with all engines.
Peter.
Quoted 39 lines · Chris Wilson
Quoted 38 lines · Peter Antoine
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.
Signed-off-by Peter Antoine <[email protected]>--- 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 +1
-0@@ -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; }Quoted 8 lines
drivers/gpu/drm/i915/i915_gem.c i915_gem_init_hw(struct drm_device *dev) · line 4886
Quoted 1 line
drivers/gpu/drm/i915/i915_gem.c +1
-0+intel_program_mocs_engines (dev);Registers to be written when enabling the engine are called from
engine->init_hw()in the line above. Please add this state there, which can then be specialised via vfunc if so desired.
-Chris
Quoted 8 lines
--
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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
And the program_mocs_control_table(ring) in logical_render_ring_init() is not required and can be removed.
Will update that as well after review.
Peter.
Quoted 73 lines · Peter Antoine
Just seen a documentation error in
program_mocs_l3cc_table()still documents a parameter that has been removed. Will fix later.Peter.
Quoted 58 lines · Peter Antoine
Hi Chris,
Just posted patch that moves to the
engine->init_hw().Have moved the L3CC registers programming out of the function and left in the same place as the original function was. These registers are shared with all engines.
Peter.
Quoted 39 lines · Chris Wilson
Quoted 38 lines · Peter Antoine
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.
Signed-off-by Peter Antoine <[email protected]>--- 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 +1
-0@@ -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; }Quoted 8 lines
drivers/gpu/drm/i915/i915_gem.c i915_gem_init_hw(struct drm_device *dev) · line 4886
Quoted 1 line
drivers/gpu/drm/i915/i915_gem.c +1
-0+intel_program_mocs_engines (dev);Registers to be written when enabling the engine are called from
engine->init_hw()in the line above. Please add this state there, which can then be specialised via vfunc if so desired.
-ChrisQuoted 8 lines
--
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
Quoted 8 lines
--
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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915/mocs: Program MOCS for all engines on init (rev4)
In reply to Peter Antoine== Series Details ==
== Series Details ==
Series: drm/i915/mocs: Program MOCS for all engines on init (rev4)
URL : https://patchwork.freedesktop.org/series/4310/
State : warning
== Summary ==
Series 4310v4 drm/i915/mocs: Program MOCS for all engines on init
http://patchwork.freedesktop.org/api/1.0/series/4310/revisions/4/mbox/
Test gem_ringfill:
Subgroup basic-default-s3:
pass -> DMESG-WARN (bsw-nuc-2)
Test kms_flip:
Subgroup basic-flip-vs-dpms:
pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Subgroup basic-flip-vs-modeset:
dmesg-warn -> PASS (bdw-ultra)
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (hsw-gt2)
Test pm_rpm:
Subgroup basic-pci-d3-state:
dmesg-warn -> PASS (hsw-brixbox)
Subgroup basic-rte:
dmesg-warn -> PASS (bsw-nuc-2)
dmesg-warn -> PASS (snb-dellxps)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:155 dwarn:1 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:171 dwarn:0 dfail:0 fail:0 skip:22 hsw-gt2 total:193 pass:176 dwarn:0 dfail:0 fail:0 skip:17 ilk-hp8440p total:193 pass:129 dwarn:1 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:193 pass:182 dwarn:0 dfail:0 fail:0 skip:11 snb-dellxps total:193 pass:158 dwarn:1 dfail:0 fail:0 skip:34 snb-x220t total:193 pass:158 dwarn:1 dfail:0 fail:1 skip:33
Results at /archive/results/CI_IGT_test/Patchwork_1566/
63461ba49f1bc63fe9dcccdbbaa3a5049c57ae37 drm-intel-nightly: 2016y-03m-10d-13h-21m-51s UTC integration manifest 3acaabbc37c9f2f51e65e218a251c285ca28b2a3 drm/i915/mocs: Program MOCS for all engines on init
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx