i915/gem_mocs_settings: Add mocs table for icelake
PATCH 1/1 i915/gem_mocs_settings: Add mocs table for icelake
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
--- tests/i915/gem_mocs_settings.c | 145 +++++++++++++++++++++++++++------ 1 file changed, 122 insertions(+), 23 deletions(-)
tests/i915/gem_mocs_settings.c +122 -23
@@ -33,6 +33,10 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +#define MOCS_PTE_INDEX (0x1) +enum {NONE ,RESET ,
@@ -65,6 +69,7 @@ static const char * const test_modes[] = {struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {
@@ -73,37 +78,113 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] = {0x00000004 ,0x0030 ,0x1 }, + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x0007FFFF ,0x003F }, + [1 ] = {0x0007FFFF ,0x003F }, + [2 ] = {0x0007FFFF ,0x003F }, + [3 ] = {0x0007FFFF ,0x003F }, + [4 ] = {0x0007FFFF ,0x003F }, + [5 ] = {0x0007FFFF ,0x003F }, + [6 ] = {0x0007FFFF ,0x003F }, + [7 ] = {0x0007FFFF ,0x003F }, + [8 ] = {0x0007FFFF ,0x003F }, + [9 ] = {0x0007FFFF ,0x003F }, + [10 ] = {0x0007FFFF ,0x003F }, + [11 ] = {0x0007FFFF ,0x003F }, + [12 ] = {0x0007FFFF ,0x003F }, + [13 ] = {0x0007FFFF ,0x003F }, + [14 ] = {0x0007FFFF ,0x003F }, + [15 ] = {0x0007FFFF ,0x003F }, + [18 ] = {0x0007FFFF ,0x003F }, + [19 ] = {0x0007FFFF ,0x003F }, + [21 ] = {0x0007FFFF ,0x003F }, + [22 ] = {0x0007FFFF ,0x003F }, + [23 ] = {0x0007FFFF ,0x003F }, + [62 ] = {0x0007FFFF ,0x003F }, + [63 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00000009 ,0x0010 ,0x1 }, + {0x00000038 ,0x0030 ,0x1 }, + {0x0000003b ,0x0030 ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00003FFF ,0x003F ,0x1 },/* no snoop bit */ + {0x00003FFF ,0x003F ,0x1 }, + {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00000009 ,0x0010 ,0x1 }, + {0x00000038 ,0x0030 ,0x1 }, + {0x00000039 ,0x0030 ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00007FFF ,0x003F ,0x1 }, + {0x00007FFF ,0x003F ,0x1 }, + {0x00007FFF ,0x003F ,0x1 }, }; +static uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ]; + +static void set_mocs_settings (void ) +{ +uint8_t index; +/* Set un-used entries to PTE */ +for (index =0 ; index <MAX_NUMBER_MOCS_REGISTERS ; index++) { +if (index <GEN9_NUM_MOCS_ENTRIES ) { +if (!skylake_mocs_table[index].used) { + skylake_mocs_table[index] = skylake_mocs_table[MOCS_PTE_INDEX ]; + dirty_skylake_mocs_table[index] = dirty_skylake_mocs_table[MOCS_PTE_INDEX ]; + } +if (!broxton_mocs_table[index].used) { + broxton_mocs_table[index] = broxton_mocs_table[MOCS_PTE_INDEX ]; + dirty_broxton_mocs_table[index] = dirty_broxton_mocs_table[MOCS_PTE_INDEX ]; + } +if (!icelake_mocs_table[index].used) { + icelake_mocs_table[index] = icelake_mocs_table[MOCS_PTE_INDEX ]; + dirty_icelake_mocs_table[index] = dirty_icelake_mocs_table[MOCS_PTE_INDEX ]; + } + }else {/*icelake has 64 entries */ +if (!icelake_mocs_table[index].used) { + icelake_mocs_table[index] = icelake_mocs_table[MOCS_PTE_INDEX ]; + dirty_icelake_mocs_table[index] = dirty_icelake_mocs_table[MOCS_PTE_INDEX ]; + } + } + } +memset ((char *)write_values,0xFF ,MAX_NUMBER_MOCS_REGISTERS *sizeof (uint32_t )); +} +static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty) {uint32_t devid =intel_get_drm_devid (fd);
@@ -127,6 +208,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;
@@ -374,13 +464,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }
@@ -440,6 +538,7 @@ igt_main fd =drm_open_driver_master (DRIVER_INTEL );/* for SECURE */ igt_require_gem (fd);gem_require_mocs_registers (fd); +set_mocs_settings ();igt_require (get_mocs_settings (fd, &table, false)); }
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for i915/gem_mocs_settings: Add mocs table for icelake (rev3)
== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev3)
URL : https://patchwork.freedesktop.org/series/56459/
State : success
== Summary ==
CI Bug Log - changes from IGT_4832 -> IGTPW_2430
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/3/mbox/
Known issues
------------
Here are the changes found in IGTPW_2430 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: PASS -> FAIL [fdo#109485]
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: PASS -> FAIL [fdo#103167]
#### Possible fixes ####
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS
* igt@pm_rpm@basic-rte:
- fi-hsw-4770: {SKIP} [fdo#109271] -> PASS +1
* igt@pm_rpm@module-reload:
- fi-skl-6770hq: FAIL [fdo#108511] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#105998]: https://bugs.freedesktop.org/show_bug.cgi?id=105998
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#109527]: https://bugs.freedesktop.org/show_bug.cgi?id=109527
[fdo#109528]: https://bugs.freedesktop.org/show_bug.cgi?id=109528
[fdo#109530]: https://bugs.freedesktop.org/show_bug.cgi?id=109530
Participating hosts (49 -> 41)
------------------------------
Additional (1): fi-icl-y
Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-glk-j4005 fi-bxt-j4205 fi-bdw-samus
Build changes
-------------
* IGT: IGT_4832 -> IGTPW_2430
CI_DRM_5611: c09679e398a860df940ba35ad5102e396bf4acb5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2430: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2430/
IGT_4832: 324ab48e67065f0cf67525b3ab9c44fd3dcaef0a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2430/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for i915/gem_mocs_settings: Add mocs table for icelake (rev3)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev3)
URL : https://patchwork.freedesktop.org/series/56459/
State : success
== Summary ==
CI Bug Log - changes from IGT_4832_full -> IGTPW_2430_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/3/mbox/
Known issues
------------
Here are the changes found in IGTPW_2430_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_suspend@fence-restore-untiled:
- shard-apl: PASS -> DMESG-WARN [fdo#108566]
* igt@kms_color@pipe-a-gamma:
- shard-kbl: PASS -> FAIL [fdo#104782]
- shard-apl: PASS -> FAIL [fdo#104782] +1
* igt@kms_color@pipe-c-ctm-max:
- shard-apl: PASS -> FAIL [fdo#108147]
* igt@kms_cursor_crc@cursor-256x256-random:
- shard-apl: PASS -> FAIL [fdo#103232] +6
* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-glk: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-64x21-onscreen:
- shard-kbl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: PASS -> FAIL [fdo#105767]
* igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-xtiled:
- shard-glk: PASS -> FAIL [fdo#107791]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-kbl: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
- shard-glk: PASS -> FAIL [fdo#103167] +3
* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-glk: NOTRUN -> FAIL [fdo#108145]
* igt@kms_plane_multiple@atomic-pipe-c-tiling-none:
- shard-glk: PASS -> FAIL [fdo#103166] +5
* igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
- shard-apl: PASS -> FAIL [fdo#103166] +5
* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: PASS -> FAIL [fdo#109016]
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: PASS -> DMESG-FAIL [fdo#105763]
* igt@kms_setmode@basic:
- shard-apl: PASS -> FAIL [fdo#99912]
- shard-hsw: PASS -> FAIL [fdo#99912]
- shard-kbl: PASS -> FAIL [fdo#99912] * igt@kms_vblank@pipe-b-ts-continuation-modeset-rpm:
- shard-apl: PASS -> FAIL [fdo#104894]
#### Possible fixes ####
* igt@kms_color@pipe-a-degamma:
- shard-kbl: FAIL [fdo#104782] / [fdo#108145] -> PASS
* igt@kms_cursor_crc@cursor-64x21-random:
- shard-apl: FAIL [fdo#103232] -> PASS +3
* igt@kms_cursor_crc@cursor-alpha-opaque:
- shard-glk: FAIL [fdo#109350] -> PASS
* igt@kms_draw_crc@draw-method-xrgb8888-pwrite-xtiled:
- shard-glk: FAIL [fdo#107791] -> PASS
* {igt@kms_flip@flip-vs-suspend}:
- shard-snb: DMESG-WARN [fdo#102365] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
- shard-apl: FAIL [fdo#103167] -> PASS +1
- shard-kbl: FAIL [fdo#103167] -> PASS +1
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
- shard-glk: FAIL [fdo#103167] -> PASS +2
* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-apl: FAIL [fdo#108948] -> PASS
* igt@kms_plane@plane-position-covered-pipe-c-planes:
- shard-glk: FAIL [fdo#103166] -> PASS +1
* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-apl: FAIL [fdo#103166] -> PASS +2
- shard-kbl: FAIL [fdo#103166] -> PASS +2
* igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend:
- shard-apl: FAIL [fdo#104894] -> PASS
- shard-kbl: FAIL [fdo#104894] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102365]: https://bugs.freedesktop.org/show_bug.cgi?id=102365
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#107791]: https://bugs.freedesktop.org/show_bug.cgi?id=107791
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108948]: https://bugs.freedesktop.org/show_bug.cgi?id=108948
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 5)
------------------------------
Missing (2): shard-skl shard-iclb
Build changes
-------------
* IGT: IGT_4832 -> IGTPW_2430
CI_DRM_5611: c09679e398a860df940ba35ad5102e396bf4acb5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2430: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2430/
IGT_4832: 324ab48e67065f0cf67525b3ab9c44fd3dcaef0a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2430/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Fixing the CC.
Radek
Quoted 221 lines · Prathap Kumar Valsan via igt-dev
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>--- tests/i915/gem_mocs_settings.c | 145 +++++++++++++++++++++++++++------ 1 file changed, 122 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +4
-0@@ -33,6 +33,10 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +#define MOCS_PTE_INDEX (0x1) +enum {NONE ,tests/i915/gem_mocs_settings.c +83
-21RESET,@@ -65,6 +69,7 @@ static const char * const test_modes[] = {struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {@@ -73,37 +78,113 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] = {0x00000004 ,0x0030 ,0x1 }, + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x0007FFFF ,0x003F }, + [1 ] = {0x0007FFFF ,0x003F }, + [2 ] = {0x0007FFFF ,0x003F }, + [3 ] = {0x0007FFFF ,0x003F }, + [4 ] = {0x0007FFFF ,0x003F }, + [5 ] = {0x0007FFFF ,0x003F }, + [6 ] = {0x0007FFFF ,0x003F }, + [7 ] = {0x0007FFFF ,0x003F }, + [8 ] = {0x0007FFFF ,0x003F }, + [9 ] = {0x0007FFFF ,0x003F }, + [10 ] = {0x0007FFFF ,0x003F }, + [11 ] = {0x0007FFFF ,0x003F }, + [12 ] = {0x0007FFFF ,0x003F }, + [13 ] = {0x0007FFFF ,0x003F }, + [14 ] = {0x0007FFFF ,0x003F }, + [15 ] = {0x0007FFFF ,0x003F }, + [18 ] = {0x0007FFFF ,0x003F }, + [19 ] = {0x0007FFFF ,0x003F }, + [21 ] = {0x0007FFFF ,0x003F }, + [22 ] = {0x0007FFFF ,0x003F }, + [23 ] = {0x0007FFFF ,0x003F }, + [62 ] = {0x0007FFFF ,0x003F }, + [63 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00000009 ,0x0010 ,0x1 }, + {0x00000038 ,0x0030 ,0x1 }, + {0x0000003b ,0x0030 ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00003FFF ,0x003F ,0x1 },/* no snoop bit */ + {0x00003FFF ,0x003F ,0x1 }, + {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00000009 ,0x0010 ,0x1 }, + {0x00000038 ,0x0030 ,0x1 }, + {0x00000039 ,0x0030 ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00007FFF ,0x003F ,0x1 }, + {0x00007FFF ,0x003F ,0x1 }, + {0x00007FFF ,0x003F ,0x1 }, }; +static uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ]; + +static void set_mocs_settings (void ) +{ +uint8_t index; +/* Set un-used entries to PTE */ +for (index =0 ; index <MAX_NUMBER_MOCS_REGISTERS ; index++) { +if (index <GEN9_NUM_MOCS_ENTRIES ) { +if (!skylake_mocs_table[index].used) { + skylake_mocs_table[index] = skylake_mocs_table[MOCS_PTE_INDEX ]; + dirty_skylake_mocs_table[index] = dirty_skylake_mocs_table[MOCS_PTE_INDEX ]; + } +if (!broxton_mocs_table[index].used) { + broxton_mocs_table[index] = broxton_mocs_table[MOCS_PTE_INDEX ]; + dirty_broxton_mocs_table[index]= dirty_broxton_mocs_table[MOCS_PTE_INDEX];
tests/i915/gem_mocs_settings.c +3
-0+ } +if (!icelake_mocs_table[index].used) { + icelake_mocs_table[index]= icelake_mocs_table[MOCS_PTE_INDEX];
tests/i915/gem_mocs_settings.c +1
-0+ dirty_icelake_mocs_table[index]= dirty_icelake_mocs_table[MOCS_PTE_INDEX];
tests/i915/gem_mocs_settings.c +4
-0+ } + }else {/*icelake has 64 entries */ +if (!icelake_mocs_table[index].used) { + icelake_mocs_table[index]= icelake_mocs_table[MOCS_PTE_INDEX];
tests/i915/gem_mocs_settings.c +1
-0+ dirty_icelake_mocs_table[index]= dirty_icelake_mocs_table[MOCS_PTE_INDEX];
tests/i915/gem_mocs_settings.c +4
-0+ } + } + } + memset((char *)write_values, 0xFF, MAX_NUMBER_MOCS_REGISTERS *
sizeof(uint32_t));tests/i915/gem_mocs_settings.c +11
-0+} +static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty) {uint32_t devid =intel_get_drm_devid (fd);@@ -127,6 +208,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }tests/i915/gem_mocs_settings.c +0
-0return result;@@ -374,13 +464,21 @@ static void check_mocs_values(int fd, unsigned engine,
uint32_tctx_id, bool dirstatic void
write_dirty_mocs(int fd, unsigned engine, uint32_t ctx_id){tests/i915/gem_mocs_settings.c +10
-2+uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }
tests/i915/gem_mocs_settings.c igt_main · line 544
Quoted 7 lines
tests/i915/gem_mocs_settings.c +1
-0@@ -440,6 +538,7 @@ igt_main fd =drm_open_driver_master (DRIVER_INTEL );/* for SECURE */ igt_require_gem (fd);gem_require_mocs_registers (fd); +set_mocs_settings ();igt_require (get_mocs_settings (fd, &table, false)); }
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 124 lines · Prathap Kumar Valsan
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>--- tests/i915/gem_mocs_settings.c | 145 +++++++++++++++++++++++++++------ 1 file changed, 122 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +68
-16@@ -33,6 +33,10 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +#define MOCS_PTE_INDEX (0x1) +enum {NONE ,RESET ,@@ -65,6 +69,7 @@ static const char * const test_modes[] = {struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {@@ -73,37 +78,113 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] = {0x00000004 ,0x0030 ,0x1 }, + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x0007FFFF ,0x003F }, + [1 ] = {0x0007FFFF ,0x003F }, + [2 ] = {0x0007FFFF ,0x003F }, + [3 ] = {0x0007FFFF ,0x003F }, + [4 ] = {0x0007FFFF ,0x003F }, + [5 ] = {0x0007FFFF ,0x003F }, + [6 ] = {0x0007FFFF ,0x003F }, + [7 ] = {0x0007FFFF ,0x003F }, + [8 ] = {0x0007FFFF ,0x003F }, + [9 ] = {0x0007FFFF ,0x003F }, + [10 ] = {0x0007FFFF ,0x003F }, + [11 ] = {0x0007FFFF ,0x003F }, + [12 ] = {0x0007FFFF ,0x003F }, + [13 ] = {0x0007FFFF ,0x003F }, + [14 ] = {0x0007FFFF ,0x003F }, + [15 ] = {0x0007FFFF ,0x003F }, + [18 ] = {0x0007FFFF ,0x003F }, + [19 ] = {0x0007FFFF ,0x003F }, + [21 ] = {0x0007FFFF ,0x003F }, + [22 ] = {0x0007FFFF ,0x003F }, + [23 ] = {0x0007FFFF ,0x003F }, + [62 ] = {0x0007FFFF ,0x003F }, + [63 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00000009 ,0x0010 ,0x1 }, + {0x00000038 ,0x0030 ,0x1 }, + {0x0000003b ,0x0030 ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00003FFF ,0x003F ,0x1 },/* no snoop bit */ + {0x00003FFF ,0x003F ,0x1 }, + {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00000009 ,0x0010 ,0x1 }, + {0x00000038 ,0x0030 ,0x1 }, + {0x00000039 ,0x0030 ,0x1 }, };
tests/i915/gem_mocs_settings.c struct mocs_table { · line 155
Quoted 10 lines
tests/i915/gem_mocs_settings.c +4
-5-static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + {0x00007FFF ,0x003F ,0x1 }, + {0x00007FFF ,0x003F ,0x1 }, + {0x00007FFF ,0x003F ,0x1 },
These are all the same, why bother defining the array?
tests/i915/gem_mocs_settings.c struct mocs_table { · line 164
Quoted 9 lines
tests/i915/gem_mocs_settings.c +7
-0}; +static uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ]; + +static void set_mocs_settings (void ) +{ +uint8_t index; +/* Set un-used entries to PTE */ +for (index =0 ; index <MAX_NUMBER_MOCS_REGISTERS ; index++) {
I think this is too verbose to fix the issue. IMO we should
a) continue with *const* tables
b) not have this function to modify the values
for that I think it's reasonable to have something like:
static const struct mocs_entry icelake_mocs_pte = { 0x00000004, 0x0030, 0x1 };
static struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES] = {
[0] = { 0x00000005, 0x0010, 0x1 },
[1] = icelake_mocs_pte,
[2] = { 0x00000037, 0x0030, 0x1 },
...
[20] = icelake_mocs_pte,...
So... you basically define all entries and don't need to overwrite the values like you are doing.
Lucas De Marchi
Quoted 77 lines
tests/i915/gem_mocs_settings.c +43
-3+if (index <GEN9_NUM_MOCS_ENTRIES ) { +if (!skylake_mocs_table[index].used) { + skylake_mocs_table[index] = skylake_mocs_table[MOCS_PTE_INDEX ]; + dirty_skylake_mocs_table[index] = dirty_skylake_mocs_table[MOCS_PTE_INDEX ]; + } +if (!broxton_mocs_table[index].used) { + broxton_mocs_table[index] = broxton_mocs_table[MOCS_PTE_INDEX ]; + dirty_broxton_mocs_table[index] = dirty_broxton_mocs_table[MOCS_PTE_INDEX ]; + } +if (!icelake_mocs_table[index].used) { + icelake_mocs_table[index] = icelake_mocs_table[MOCS_PTE_INDEX ]; + dirty_icelake_mocs_table[index] = dirty_icelake_mocs_table[MOCS_PTE_INDEX ]; + } + }else {/*icelake has 64 entries */ +if (!icelake_mocs_table[index].used) { + icelake_mocs_table[index] = icelake_mocs_table[MOCS_PTE_INDEX ]; + dirty_icelake_mocs_table[index] = dirty_icelake_mocs_table[MOCS_PTE_INDEX ]; + } + } + } +memset ((char *)write_values,0xFF ,MAX_NUMBER_MOCS_REGISTERS *sizeof (uint32_t )); +} +static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty) {uint32_t devid =intel_get_drm_devid (fd);@@ -127,6 +208,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -374,13 +464,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }@@ -440,6 +538,7 @@ igt_main fd =drm_open_driver_master (DRIVER_INTEL );/* for SECURE */ igt_require_gem (fd);gem_require_mocs_registers (fd); +set_mocs_settings ();igt_require (get_mocs_settings (fd, &table, false)); } --2.20.1
Signature · 5 lines
Lucas De Marchi _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Lucas De Marchi (2019-02-21 22:48:45)
Quoted 11 lines
static const struct
mocs_entryicelake_mocs_pte= {0x00000004,0x0030,0x1};static struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES] = { [0] = { 0x00000005, 0x0010, 0x1 }, [1] = icelake_mocs_pte, [2] = { 0x00000037, 0x0030, 0x1 }, ... [20] = icelake_mocs_pte,...
So... you basically define all entries and don't need to overwrite the values like you are doing.
/* All unspecified entries default to following PTE */ [0 ... GEN11_NUM_MOCS_ENTRIES-1] = icelake_mocs_pte,
[0] = ...,
[2] = ...,
If I remember my syntax correctly,
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 13 lines · Chris Wilson
Quoting Lucas De Marchi (2019-02-21 22:48:45)
Quoted 11 lines
static const struct
mocs_entryicelake_mocs_pte= {0x00000004,0x0030,0x1};static struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES] = { [0] = { 0x00000005, 0x0010, 0x1 }, [1] = icelake_mocs_pte, [2] = { 0x00000037, 0x0030, 0x1 }, ... [20] = icelake_mocs_pte,...
So... you basically define all entries and don't need to overwrite the values like you are doing.
Quoted 7 lines
/* All unspecified entries default to following PTE */ [0 ... GEN11_NUM_MOCS_ENTRIES-1] =
icelake_mocs_pte,[0] = ...,
[2] = ...,If I remember my syntax correctly,
yep, but just remember there are holes of unspecified entries, so you need to do this in the middle of the array by supplying the correct index, not the number of entries.
Lucas De Marchi
Quoted 1 line
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v2 1/1 i915/gem_mocs_settings: Add mocs table for icelake
In reply to Prathap Kumar Valsan via igt-devFrom: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
---
Changes in v2:
- Cleaned up the code based on review comments from Lucas and Chris
tests/i915/gem_mocs_settings.c | 96 ++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 23 deletions(-)
tests/i915/gem_mocs_settings.c +73 -23
@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,
@@ -72,36 +75,66 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = icelake_mocs_pte, + [0 ] = {0x00000005 ,0x0010 }, + [1 ] = {0x00000004 ,0x0030 }, + [2 ] = {0x00000037 ,0x0030 }, + [3 ] = {0x00000005 ,0x0010 }, + [4 ] = {0x00000005 ,0x0030 }, + [5 ] = {0x00000037 ,0x0010 }, + [6 ] = {0x00000017 ,0x0010 }, + [7 ] = {0x00000017 ,0x0030 }, + [8 ] = {0x00000027 ,0x0010 }, + [9 ] = {0x00000027 ,0x0030 }, + [10 ] = {0x00000077 ,0x0010 }, + [11 ] = {0x00000077 ,0x0030 }, + [12 ] = {0x00000057 ,0x0010 }, + [13 ] = {0x00000057 ,0x0030 }, + [14 ] = {0x00000067 ,0x0010 }, + [15 ] = {0x00000067 ,0x0030 }, + [18 ] = {0x00060037 ,0x0030 }, + [19 ] = {0x00000737 ,0x0030 }, + [20 ] = {0x00000337 ,0x0030 }, + [21 ] = {0x00000137 ,0x0030 }, + [22 ] = {0x000003b7 ,0x0030 }, + [23 ] = {0x000007b7 ,0x0030 }, + [62 ] = {0x00000037 ,0x0010 }, + [63 ] = {0x00000037 ,0x0010 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x0000003b ,0x0030 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x00000039 ,0x0030 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)
@@ -127,6 +160,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;
@@ -374,13 +416,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 144 lines · Prathap Kumar Valsan
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v2:
- Cleaned up the code based on review comments from Lucas and Christests/i915/gem_mocs_settings.c | 96 ++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +71
-22@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -72,36 +75,66 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = icelake_mocs_pte, + [0 ] = {0x00000005 ,0x0010 }, + [1 ] = {0x00000004 ,0x0030 }, + [2 ] = {0x00000037 ,0x0030 }, + [3 ] = {0x00000005 ,0x0010 }, + [4 ] = {0x00000005 ,0x0030 }, + [5 ] = {0x00000037 ,0x0010 }, + [6 ] = {0x00000017 ,0x0010 }, + [7 ] = {0x00000017 ,0x0030 }, + [8 ] = {0x00000027 ,0x0010 }, + [9 ] = {0x00000027 ,0x0030 }, + [10 ] = {0x00000077 ,0x0010 }, + [11 ] = {0x00000077 ,0x0030 }, + [12 ] = {0x00000057 ,0x0010 }, + [13 ] = {0x00000057 ,0x0030 }, + [14 ] = {0x00000067 ,0x0010 }, + [15 ] = {0x00000067 ,0x0030 }, + [18 ] = {0x00060037 ,0x0030 }, + [19 ] = {0x00000737 ,0x0030 }, + [20 ] = {0x00000337 ,0x0030 }, + [21 ] = {0x00000137 ,0x0030 }, + [22 ] = {0x000003b7 ,0x0030 }, + [23 ] = {0x000007b7 ,0x0030 }, + [62 ] = {0x00000037 ,0x0010 }, + [63 ] = {0x00000037 ,0x0010 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x0000003b ,0x0030 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x00000039 ,0x0030 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +160,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -374,13 +416,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; + write_registers(fd, ctx_id, get_engine_base(engine), - write_values, ARRAY_SIZE(write_values),
tests/i915/gem_mocs_settings.c static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir · line 436
Quoted 10 lines
tests/i915/gem_mocs_settings.c +2
-1+ write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }
The "-dirty" subcase of the test doesn't seem suitable to current hardware..
The table is now global. So writing it from one context and checking if another context is unaffected is bound to fail.
Shouldn't the test for gen11+ be restricted to reading the values and checking whether they match pre-defined array? (we may still do a test if everything is fine after reset/suspend, that won't hurt)
And if we are writing dirty values, shouldn't there be a restoration to original values afterwards?
-Tomasz
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Lis, Tomasz (2019-02-22 15:17:34)
Quoted 159 lines · Prathap Kumar Valsan
Quoted 144 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v2:
- Cleaned up the code based on review comments from Lucas and Christests/i915/gem_mocs_settings.c | 96 ++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +71
-22@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -72,36 +75,66 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = icelake_mocs_pte, + [0 ] = {0x00000005 ,0x0010 }, + [1 ] = {0x00000004 ,0x0030 }, + [2 ] = {0x00000037 ,0x0030 }, + [3 ] = {0x00000005 ,0x0010 }, + [4 ] = {0x00000005 ,0x0030 }, + [5 ] = {0x00000037 ,0x0010 }, + [6 ] = {0x00000017 ,0x0010 }, + [7 ] = {0x00000017 ,0x0030 }, + [8 ] = {0x00000027 ,0x0010 }, + [9 ] = {0x00000027 ,0x0030 }, + [10 ] = {0x00000077 ,0x0010 }, + [11 ] = {0x00000077 ,0x0030 }, + [12 ] = {0x00000057 ,0x0010 }, + [13 ] = {0x00000057 ,0x0030 }, + [14 ] = {0x00000067 ,0x0010 }, + [15 ] = {0x00000067 ,0x0030 }, + [18 ] = {0x00060037 ,0x0030 }, + [19 ] = {0x00000737 ,0x0030 }, + [20 ] = {0x00000337 ,0x0030 }, + [21 ] = {0x00000137 ,0x0030 }, + [22 ] = {0x000003b7 ,0x0030 }, + [23 ] = {0x000007b7 ,0x0030 }, + [62 ] = {0x00000037 ,0x0010 }, + [63 ] = {0x00000037 ,0x0010 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x0000003b ,0x0030 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x00000039 ,0x0030 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +160,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -374,13 +416,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; + write_registers(fd, ctx_id, get_engine_base(engine), - write_values, ARRAY_SIZE(write_values),tests/i915/gem_mocs_settings.c static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir · line 436
Quoted 10 lines
tests/i915/gem_mocs_settings.c +2
-1+ write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }The "-dirty" subcase of the test doesn't seem suitable to current hardware..
Quoted 2 lines
The table is now global. So writing it from one context and checking if another context is unaffected is bound to fail.
We shouldn't be able to do nonpriv writes to it then. Hopefully those writes are already being dropped?
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 162 lines · Chris Wilson
Quoting Lis, Tomasz (2019-02-22 15:17:34)
Quoted 161 lines · Prathap Kumar Valsan
Quoted 144 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v2:
- Cleaned up the code based on review comments from Lucas and Christests/i915/gem_mocs_settings.c | 96 ++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +71
-22@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -72,36 +75,66 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = icelake_mocs_pte, + [0 ] = {0x00000005 ,0x0010 }, + [1 ] = {0x00000004 ,0x0030 }, + [2 ] = {0x00000037 ,0x0030 }, + [3 ] = {0x00000005 ,0x0010 }, + [4 ] = {0x00000005 ,0x0030 }, + [5 ] = {0x00000037 ,0x0010 }, + [6 ] = {0x00000017 ,0x0010 }, + [7 ] = {0x00000017 ,0x0030 }, + [8 ] = {0x00000027 ,0x0010 }, + [9 ] = {0x00000027 ,0x0030 }, + [10 ] = {0x00000077 ,0x0010 }, + [11 ] = {0x00000077 ,0x0030 }, + [12 ] = {0x00000057 ,0x0010 }, + [13 ] = {0x00000057 ,0x0030 }, + [14 ] = {0x00000067 ,0x0010 }, + [15 ] = {0x00000067 ,0x0030 }, + [18 ] = {0x00060037 ,0x0030 }, + [19 ] = {0x00000737 ,0x0030 }, + [20 ] = {0x00000337 ,0x0030 }, + [21 ] = {0x00000137 ,0x0030 }, + [22 ] = {0x000003b7 ,0x0030 }, + [23 ] = {0x000007b7 ,0x0030 }, + [62 ] = {0x00000037 ,0x0010 }, + [63 ] = {0x00000037 ,0x0010 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x0000003b ,0x0030 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x00000039 ,0x0030 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +160,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -374,13 +416,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; + write_registers(fd, ctx_id, get_engine_base(engine), - write_values, ARRAY_SIZE(write_values),tests/i915/gem_mocs_settings.c static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir · line 436
Quoted 10 lines
tests/i915/gem_mocs_settings.c +2
-1+ write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }The "-dirty" subcase of the test doesn't seem suitable to current hardware..
The table is now global. So writing it from one context and checking if another context is unaffected is bound to fail.
As you pointed out On Gen11, "-dirty" subcases are failing. Test is not able to write to registers.
Quoted 3 lines
We shouldn't be able to do nonpriv writes to it then. Hopefully those writes are already being dropped?
So probably on latest hardware, test should still try to write and call it pass if the dirty values are not being written?
Quoted 1 line
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Kumar Valsan, Prathap (2019-02-22 21:32:55)
Quoted 163 lines · Chris Wilson
Quoted 162 lines
Quoting Lis, Tomasz (2019-02-22 15:17:34)
Quoted 161 lines · Prathap Kumar Valsan
Quoted 144 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v2:
- Cleaned up the code based on review comments from Lucas and Christests/i915/gem_mocs_settings.c | 96 ++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +71
-22@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -72,36 +75,66 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = icelake_mocs_pte, + [0 ] = {0x00000005 ,0x0010 }, + [1 ] = {0x00000004 ,0x0030 }, + [2 ] = {0x00000037 ,0x0030 }, + [3 ] = {0x00000005 ,0x0010 }, + [4 ] = {0x00000005 ,0x0030 }, + [5 ] = {0x00000037 ,0x0010 }, + [6 ] = {0x00000017 ,0x0010 }, + [7 ] = {0x00000017 ,0x0030 }, + [8 ] = {0x00000027 ,0x0010 }, + [9 ] = {0x00000027 ,0x0030 }, + [10 ] = {0x00000077 ,0x0010 }, + [11 ] = {0x00000077 ,0x0030 }, + [12 ] = {0x00000057 ,0x0010 }, + [13 ] = {0x00000057 ,0x0030 }, + [14 ] = {0x00000067 ,0x0010 }, + [15 ] = {0x00000067 ,0x0030 }, + [18 ] = {0x00060037 ,0x0030 }, + [19 ] = {0x00000737 ,0x0030 }, + [20 ] = {0x00000337 ,0x0030 }, + [21 ] = {0x00000137 ,0x0030 }, + [22 ] = {0x000003b7 ,0x0030 }, + [23 ] = {0x000007b7 ,0x0030 }, + [62 ] = {0x00000037 ,0x0010 }, + [63 ] = {0x00000037 ,0x0010 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x0000003b ,0x0030 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x00000039 ,0x0030 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +160,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -374,13 +416,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; + write_registers(fd, ctx_id, get_engine_base(engine), - write_values, ARRAY_SIZE(write_values),tests/i915/gem_mocs_settings.c static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir · line 436
Quoted 10 lines
tests/i915/gem_mocs_settings.c +2
-1+ write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }The "-dirty" subcase of the test doesn't seem suitable to current hardware..
The table is now global. So writing it from one context and checking if another context is unaffected is bound to fail.
Quoted 7 lines
As you pointed out On Gen11, "-dirty" subcases are failing. Test is not able to write to registers.
Quoted 3 lines
We shouldn't be able to do nonpriv writes to it then. Hopefully those writes are already being dropped?
So probably on latest hardware, test should still try to write and call it pass if the dirty values are not being written?
Yes, that would be useful confirmation that one context can't shoot another in the back, and that our global MOCS table remain invariant. -Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 165 lines · Chris Wilson
Quoting Kumar Valsan, Prathap (2019-02-22 21:32:55)
Quoted 164 lines · Chris Wilson
Quoted 161 lines
Quoting Lis, Tomasz (2019-02-22 15:17:34)
Quoted 160 lines · Prathap Kumar Valsan
Quoted 144 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v2:
- Cleaned up the code based on review comments from Lucas and Christests/i915/gem_mocs_settings.c | 96 ++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +71
-22@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -72,36 +75,66 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = icelake_mocs_pte, + [0 ] = {0x00000005 ,0x0010 }, + [1 ] = {0x00000004 ,0x0030 }, + [2 ] = {0x00000037 ,0x0030 }, + [3 ] = {0x00000005 ,0x0010 }, + [4 ] = {0x00000005 ,0x0030 }, + [5 ] = {0x00000037 ,0x0010 }, + [6 ] = {0x00000017 ,0x0010 }, + [7 ] = {0x00000017 ,0x0030 }, + [8 ] = {0x00000027 ,0x0010 }, + [9 ] = {0x00000027 ,0x0030 }, + [10 ] = {0x00000077 ,0x0010 }, + [11 ] = {0x00000077 ,0x0030 }, + [12 ] = {0x00000057 ,0x0010 }, + [13 ] = {0x00000057 ,0x0030 }, + [14 ] = {0x00000067 ,0x0010 }, + [15 ] = {0x00000067 ,0x0030 }, + [18 ] = {0x00060037 ,0x0030 }, + [19 ] = {0x00000737 ,0x0030 }, + [20 ] = {0x00000337 ,0x0030 }, + [21 ] = {0x00000137 ,0x0030 }, + [22 ] = {0x000003b7 ,0x0030 }, + [23 ] = {0x000007b7 ,0x0030 }, + [62 ] = {0x00000037 ,0x0010 }, + [63 ] = {0x00000037 ,0x0010 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x0000003b ,0x0030 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x00000039 ,0x0030 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +160,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -374,13 +416,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; + write_registers(fd, ctx_id, get_engine_base(engine), - write_values, ARRAY_SIZE(write_values),tests/i915/gem_mocs_settings.c static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir · line 436
Quoted 10 lines
tests/i915/gem_mocs_settings.c +2
-1+ write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }The "-dirty" subcase of the test doesn't seem suitable to current hardware..
The table is now global. So writing it from one context and checking if another context is unaffected is bound to fail.
As you pointed out On Gen11, "-dirty" subcases are failing. Test is not able to write to registers.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
We shouldn't be able to do nonpriv writes to it then. Hopefully those writes are already being dropped?
So probably on latest hardware, test should still try to write and call it pass if the dirty values are not being written?
Yes, that would be useful confirmation that one context can't shoot another in the back, and that our global MOCS table remain invariant. -Chris
Don't we have a separate test for privileged registers? I'm not very familiar with all the tests, but I remember someone told me that.
The scope of this test, as written at its beginning, is:
/** @file gem_mocs_settings.c
*
* Check that the MOCs cache settings are valid.
*/
If we already write to MOCS instead of only checking, the scope should be expanded. If we're going to check privileged operations, this should also be included in the scope. -Tomasz
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 151 lines · Tomasz
Quoted 133 lines · Prathap Kumar Valsan
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v2:
- Cleaned up the code based on review comments from Lucas and Christests/i915/gem_mocs_settings.c | 96 ++++++++++++++++++++++++++-------- 1 file changed, 73 insertions(+), 23 deletions(-)tests/i915/gem_mocs_settings.c +71
-21@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -72,36 +75,66 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = icelake_mocs_pte, + [0 ] = {0x00000005 ,0x0010 }, + [1 ] = {0x00000004 ,0x0030 }, + [2 ] = {0x00000037 ,0x0030 }, + [3 ] = {0x00000005 ,0x0010 }, + [4 ] = {0x00000005 ,0x0030 }, + [5 ] = {0x00000037 ,0x0010 }, + [6 ] = {0x00000017 ,0x0010 }, + [7 ] = {0x00000017 ,0x0030 }, + [8 ] = {0x00000027 ,0x0010 }, + [9 ] = {0x00000027 ,0x0030 }, + [10 ] = {0x00000077 ,0x0010 }, + [11 ] = {0x00000077 ,0x0030 }, + [12 ] = {0x00000057 ,0x0010 }, + [13 ] = {0x00000057 ,0x0030 }, + [14 ] = {0x00000067 ,0x0010 }, + [15 ] = {0x00000067 ,0x0030 }, + [18 ] = {0x00060037 ,0x0030 }, + [19 ] = {0x00000737 ,0x0030 }, + [20 ] = {0x00000337 ,0x0030 }, + [21 ] = {0x00000137 ,0x0030 }, + [22 ] = {0x000003b7 ,0x0030 }, + [23 ] = {0x000007b7 ,0x0030 }, + [62 ] = {0x00000037 ,0x0010 }, + [63 ] = {0x00000037 ,0x0010 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x0000003b ,0x0030 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, + [0 ] = {0x00000009 ,0x0010 }, + [1 ] = {0x00000038 ,0x0030 }, + [2 ] = {0x00000039 ,0x0030 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +160,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -374,13 +416,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +tests/i915/gem_mocs_settings.c static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir · line 433
Quoted 10 lines
tests/i915/gem_mocs_settings.c +2
-2write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }The "-dirty" subcase of the test doesn't seem suitable to current hardware..
The table is now global. So writing it from one context and checking if another context is unaffected is bound to fail.
Quoted 8 lines
Shouldn't the test for gen11+ be restricted to reading the values and checking whether they match pre-defined array?
(we may still do a test if everything is fine after reset/suspend, that won't hurt)
And if we are writing dirty values, shouldn't there be a restoration to original values afterwards?-Tomasz
I am observing following behaviour on Icelake platform
"-dirty" subcase of the test fails in checking l3 control register.
Tomasz mentioned that the table is now golbal. However, for control registers(LLC/eDRAM), the context is getting saved and restored between contexts like the Gen9. If the table was global this shouldn't be the expected behaviour. Also i don't see a reference in bspec which stated mocs table is global for GEN11+.
Now for L3 control registers the behaviour is different. This is where test is failing in "-dirty" subcase. For L3 control registers, writing dirty values are somehow ignored by the hardware. So checking the L3 Control registers after writing the dirty values fails.
-Prathap
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_mocs_settings: Add mocs table for icelake (rev4)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev4)
URL : https://patchwork.freedesktop.org/series/56459/
State : failure
== Summary ==
IGT patchset build failed on latest successful build 2b7dd10a4e2ea0cabff68421fd15e96c99be3cad i915/gem_eio: Not everyone actually has contexts!
../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[37]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[38]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[39]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[40]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[41]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[42]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[43]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[44]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[45]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[46]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[47]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[48]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[49]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[50]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[51]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[52]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[53]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[54]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[55]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[56]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[57]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[58]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[59]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[60]’) ../tests/i915/gem_mocs_settings.c:126:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:126:38: note: (near initialization for ‘broxton_mocs_table[61]’)
ninja: build stopped: subcommand failed.
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v3 1/1 i915/gem_mocs_settings: Add mocs table for icelake
In reply to Prathap Kumar Valsan via igt-devFrom: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
---
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Chris
tests/i915/gem_mocs_settings.c | 115 +++++++++++++++++++++++++-------- 1 file changed, 87 insertions(+), 28 deletions(-)
tests/i915/gem_mocs_settings.c +87 -28
@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,
@@ -65,6 +68,7 @@ static const char * const test_modes[] = {struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {
@@ -72,36 +76,67 @@ struct mocs_table {const struct mocs_entry *table; }; +static const struct mocs_entry icelake_mocs_pte = {0x00000004 ,0x0030 ,0x1 }; +static const struct mocs_entry mocs_pte = {0x00000038 ,0x0030 ,0x1 }; +/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] = icelake_mocs_pte, + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] = icelake_mocs_pte, + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...15 ] = {0x0007FFFF ,0x003F ,0x1 }, + [18 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F ,0x1 }, +}; + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] = mocs_pte, + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] = mocs_pte, + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] = mocs_pte, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)
@@ -127,6 +162,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;
@@ -283,9 +327,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);
@@ -315,10 +362,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )
@@ -374,13 +425,21 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dirstatic void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_mocs_settings: Add mocs table for icelake (rev5)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev5)
URL : https://patchwork.freedesktop.org/series/56459/
State : failure
== Summary ==
IGT patchset build failed on latest successful build 8afdfd8fa9ce17043d9105dedca46ad4555fdcdb tests/prime_self_import: Swap gtt mapping for cpu
../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[37]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[38]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[39]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[40]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[41]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[42]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[43]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[44]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[45]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[46]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[47]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[48]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[49]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[50]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[51]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[52]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[53]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[54]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[55]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[56]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[57]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[58]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[59]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[60]’) ../tests/i915/gem_mocs_settings.c:131:38: error: initializer element is not constant ../tests/i915/gem_mocs_settings.c:131:38: note: (near initialization for ‘broxton_mocs_table[61]’)
ninja: build stopped: subcommand failed.
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v4 1/1 i915/gem_mocs_settings: Add mocs table for icelake
In reply to Prathap Kumar Valsan via igt-devFrom: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
---
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Chris
tests/i915/gem_mocs_settings.c | 126 +++++++++++++++++++++++++-------- 1 file changed, 96 insertions(+), 30 deletions(-)
tests/i915/gem_mocs_settings.c +96 -30
@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,
@@ -61,10 +64,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {
@@ -73,35 +79,63 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...15 ] = {0x0007FFFF ,0x003F ,0x1 }, + [18 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F ,0x1 }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)
@@ -127,6 +161,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;
@@ -283,9 +326,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);
@@ -315,10 +361,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )
@@ -368,19 +418,35 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir {check_control_registers (fd, engine, ctx_id, dirty); -if (engine ==I915_EXEC_RENDER ) -check_l3cc_registers (fd, engine, ctx_id, dirty); +if (engine ==I915_EXEC_RENDER ) { +uint32_t devid =intel_get_drm_devid (fd); +/* L3 control registers are global in icl. +* dirty write from userspace will be ignored/ +*/ +if (dirty &&IS_ICELAKE (devid)) +check_l3cc_registers (fd, engine, ctx_id, !dirty); +else +check_l3cc_registers (fd, engine, ctx_id, dirty); + } }static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 191 lines · Prathap Kumar Valsan
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Christests/i915/gem_mocs_settings.c | 126 +++++++++++++++++++++++++-------- 1 file changed, 96 insertions(+), 30 deletions(-)tests/i915/gem_mocs_settings.c +77
-28@@ -33,6 +33,9 @@#include "igt_sysfs.h" #define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -61,10 +64,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {@@ -73,35 +79,63 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry dirty_icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ...15 ] = {0x0007FFFF ,0x003F ,0x1 }, + [18 ...GEN11_NUM_MOCS_ENTRIES -1 ] = {0x0007FFFF ,0x003F ,0x1 }, }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, +}; + +static const uint32_t write_values[MAX_NUMBER_MOCS_REGISTERS ] = { + [0 ...MAX_NUMBER_MOCS_REGISTERS -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +161,15 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { +if (dirty) { + table->size =ARRAY_SIZE (dirty_icelake_mocs_table); + table->table = dirty_icelake_mocs_table; + }else { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + } + result = true; }return result;@@ -283,9 +326,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);@@ -315,10 +361,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )@@ -368,19 +418,35 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir {check_control_registers (fd, engine, ctx_id, dirty); -if (engine ==I915_EXEC_RENDER ) -check_l3cc_registers (fd, engine, ctx_id, dirty); +if (engine ==I915_EXEC_RENDER ) {
tests/i915/gem_mocs_settings.c static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dir · line 431
Quoted 10 lines
tests/i915/gem_mocs_settings.c +9
-0+uint32_t devid =intel_get_drm_devid (fd); +/* L3 control registers are global in icl. +* dirty write from userspace will be ignored/ +*/ +if (dirty &&IS_ICELAKE (devid)) +check_l3cc_registers (fd, engine, ctx_id, !dirty); +else +check_l3cc_registers (fd, engine, ctx_id, dirty); + } }
After testing on icl platform, it is observed that LLC control registers can be context saved and restored between contexts, however write to L3 control registers are being dropped even though the writes is through a priviliged batch buffer(I915_EXEC_SECURE). Need to confirm if this is the expected behaviour.
With this patch test including "-dirty" subtests are passing on icl.
Quoted 26 lines
tests/i915/gem_mocs_settings.c +10
-2static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) { +uint32_t devid =intel_get_drm_devid (fd); +int num_of_mocs_entries; + +if (IS_ICELAKE (devid)) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries, engine);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values, num_of_mocs_entries/2 , engine); }Signature · 1 line
2.20.1
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for i915/gem_mocs_settings: Add mocs table for icelake (rev6)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev6)
URL : https://patchwork.freedesktop.org/series/56459/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5699 -> IGTPW_2551
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/6/mbox/
Known issues
------------
Here are the changes found in IGTPW_2551 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@cs-compute:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094]
* igt@amdgpu/amd_basic@query-info:
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] +56
* igt@gem_exec_basic@readonly-bsd2:
- fi-pnv-d510: NOTRUN -> SKIP [fdo#109271] +76
* igt@i915_pm_rpm@basic-rte:
- fi-bsw-kefka: NOTRUN -> FAIL [fdo#108800]
* igt@kms_busy@basic-flip-c:
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-pnv-d510: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
#### Possible fixes ####
* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS
* igt@gem_exec_suspend@basic-s4-devices:
- {fi-icl-y}: DMESG-WARN [fdo#109638] -> PASS
* igt@i915_selftest@live_execlists:
- fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS
* igt@kms_busy@basic-flip-a:
- fi-gdg-551: FAIL [fdo#103182] -> PASS +1
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS
* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: DMESG-FAIL [fdo#103182] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109638]: https://bugs.freedesktop.org/show_bug.cgi?id=109638
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
Participating hosts (43 -> 41)
------------------------------
Additional (2): fi-bsw-kefka fi-pnv-d510
Missing (4): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-bdw-samus
Build changes
-------------
* IGT: IGT_4870 -> IGTPW_2551
CI_DRM_5699: 19d7e6b4a6c43104823680ed766240300f5ef876 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2551: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2551/
IGT_4870: ed944b45563c694dc6373bc48dc83b8ba7edb19f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2551/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for i915/gem_mocs_settings: Add mocs table for icelake (rev6)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev6)
URL : https://patchwork.freedesktop.org/series/56459/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5699_full -> IGTPW_2551_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/6/mbox/
Known issues
------------
Here are the changes found in IGTPW_2551_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: PASS -> SKIP [fdo#109271]
* igt@i915_pm_rpm@gem-execbuf-stress-extra-wait:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +69
* igt@kms_atomic_transition@4x-modeset-transitions-nonblocking-fencing:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +6
* igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
- shard-kbl: PASS -> INCOMPLETE [fdo#103665] +1
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-kbl: PASS -> DMESG-WARN [fdo#107956]
- shard-snb: PASS -> DMESG-WARN [fdo#107956]
- shard-hsw: PASS -> DMESG-WARN [fdo#107956] * igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: NOTRUN -> FAIL [fdo#108145]
* igt@kms_cursor_crc@cursor-128x128-dpms:
- shard-kbl: PASS -> FAIL [fdo#103232] +1
- shard-apl: PASS -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-kbl: PASS -> FAIL [fdo#103191] / [fdo#103232]
* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: PASS -> FAIL [fdo#105363] +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-apl: PASS -> FAIL [fdo#103167]
- shard-kbl: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
- shard-glk: PASS -> FAIL [fdo#103167] +4
* igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +23
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: PASS -> DMESG-WARN [fdo#108566]
* igt@kms_plane_multiple@atomic-pipe-a-tiling-x:
- shard-apl: PASS -> FAIL [fdo#103166] +4
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-glk: PASS -> FAIL [fdo#103166] +6
* igt@kms_setmode@basic:
- shard-kbl: PASS -> FAIL [fdo#99912]
* igt@kms_universal_plane@universal-plane-pipe-c-functional:
- shard-kbl: PASS -> FAIL [fdo#103166] +1
#### Possible fixes ####
* igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
- shard-apl: FAIL [fdo#109660] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-kbl: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-hsw: DMESG-WARN [fdo#107956] -> PASS +2
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
- shard-snb: DMESG-WARN [fdo#107956] -> PASS +2
* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-glk: FAIL [fdo#108145] -> PASS
* igt@kms_color@pipe-a-legacy-gamma:
- shard-apl: FAIL [fdo#104782] / [fdo#108145] -> PASS +1
* igt@kms_color@pipe-b-ctm-max:
- shard-apl: FAIL [fdo#108147] -> PASS +1
* igt@kms_color@pipe-b-degamma:
- shard-apl: FAIL [fdo#104782] -> PASS
* igt@kms_color@pipe-c-ctm-max:
- shard-kbl: FAIL [fdo#108147] -> PASS
* igt@kms_cursor_crc@cursor-256x256-random:
- shard-apl: FAIL [fdo#103232] -> PASS +7
* igt@kms_cursor_crc@cursor-256x256-suspend:
- shard-kbl: FAIL [fdo#103191] / [fdo#103232] -> PASS
* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-kbl: FAIL [fdo#103232] -> PASS +1
* igt@kms_cursor_crc@cursor-alpha-opaque:
- shard-apl: FAIL [fdo#109350] -> PASS
* igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled:
- shard-glk: FAIL [fdo#107791] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
- shard-apl: FAIL [fdo#103167] -> PASS +3
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
- shard-glk: FAIL [fdo#103167] -> PASS +4
- shard-kbl: FAIL [fdo#103167] -> PASS +1
* igt@kms_plane_multiple@atomic-pipe-a-tiling-y:
- shard-glk: FAIL [fdo#103166] -> PASS +1
- shard-apl: FAIL [fdo#103166] -> PASS +2
* igt@kms_rotation_crc@multiplane-rotation-cropping-top:
- shard-kbl: FAIL [fdo#109016] -> PASS
* igt@kms_setmode@basic:
- shard-apl: FAIL [fdo#99912] -> PASS
- shard-hsw: FAIL [fdo#99912] -> PASS
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: FAIL [fdo#104894] -> PASS
- shard-apl: FAIL [fdo#104894] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#107791]: https://bugs.freedesktop.org/show_bug.cgi?id=107791
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109350]: https://bugs.freedesktop.org/show_bug.cgi?id=109350
[fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (6 -> 5)
------------------------------
Missing (1): shard-skl
Build changes
-------------
* IGT: IGT_4870 -> IGTPW_2551
* Piglit: piglit_4509 -> None
CI_DRM_5699: 19d7e6b4a6c43104823680ed766240300f5ef876 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2551: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2551/
IGT_4870: ed944b45563c694dc6373bc48dc83b8ba7edb19f @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2551/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v5 1/1 i915/gem_mocs_settings: Add mocs table for icelake
In reply to Prathap Kumar Valsan via igt-devFrom: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
---
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Chris
tests/i915/gem_mocs_settings.c | 103 ++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 28 deletions(-)
tests/i915/gem_mocs_settings.c +75 -28
@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,
@@ -61,10 +63,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {
@@ -73,35 +78,59 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)
@@ -127,6 +156,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }return result;
@@ -283,9 +316,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);
@@ -315,10 +351,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )
@@ -380,7 +420,7 @@ static void write_dirty_mocs(int fd, unsigned engine, uint32_t ctx_id)if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values,ARRAY_SIZE (write_values)/2 , engine); }
@@ -390,6 +430,13 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +/* As mocs is global for GEN11+, trying to dirtying the mocs +* and testing context save and restore of mocs between contexts +* is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 ); +gem_require_ring (fd, engine);/* Skip if we don't know where the registers are for this engine */
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 7 lines · Prathap Kumar Valsan
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Chris and Tomek suggested creating negative scenario, that will verify setting dirty mocs values instead of skipping for gen11+. But if they will agree that this is not a blocker, then
Quoted 217 lines
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Christests/i915/gem_mocs_settings.c | 103 ++++++++++++++++++++++++------- -- 1 file changed, 75 insertions(+), 28 deletions(-)tests/i915/gem_mocs_settings.c +1
-1@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */
+#defineGEN11_NUM_MOCS_ENTRIES64 /* 63-64 are reserved, but configured. */tests/i915/gem_mocs_settings.c +1
-0+enum {NONE ,RESET ,@@ -61,10 +63,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/
#defineGEN9_VEBOX_MOCS_0(0xcB00) /* Video MOCS base register*/
#defineGEN9_BLT_MOCS_0(0xcc00) /* Blitter MOCS base
register*/tests/i915/gem_mocs_settings.c +48
-21+#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {@@ -73,35 +78,59 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , }; static bool get_mocs_settings(int fd, struct mocs_table *table, booldirty)
tests/i915/gem_mocs_settings.c +4
-0@@ -127,6 +156,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }tests/i915/gem_mocs_settings.c +12
-5return result;@@ -283,9 +316,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);@@ -315,10 +351,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 + 1].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + }tests/i915/gem_mocs_settings.c +1
-1}if (table.size &1 )@@ -380,7 +420,7 @@ static void write_dirty_mocs(int fd, unsigned engine, uint32_t ctx_id)if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values,ARRAY_SIZE (write_values)/2 , engine);}
tests/i915/gem_mocs_settings.c +2
-0@@ -390,6 +430,13 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode) uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +/* As mocs is global for GEN11+, trying to dirtying the mocs +* and testing context save and restore of mocs between contexts
tests/i915/gem_mocs_settings.c +5
-0+* is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 ); +gem_require_ring (fd, engine);/* Skip if we don't know where the registers are for this
Quoted 1 line
engine */
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Kalamarz, Lukasz (2019-03-13 13:58:59)
Quoted 6 lines · Prathap Kumar Valsan
Quoted 5 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Chris and Tomek suggested creating negative scenario, that will verify setting dirty mocs values instead of skipping for gen11+. But if they will agree that this is not a blocker, then
Signed-off-by Lukasz Kalamarz <[email protected]>
It all depends on the level of confidence in follow through.
Lukasz, did you mean s-o-b or r-b? s-o-b just says you've handled the patch in some official capacity; with an r-b you confirm that the patch does what it says, and that it is doing the right thing (give or take we are totally not robots), and so ready for inclusion.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 18 lines · Chris Wilson
Quoting Kalamarz, Lukasz (2019-03-13 13:58:59)
Quoted 10 lines · Prathap Kumar Valsan
Quoted 8 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by: Kumar Valsan, Prathap <
[email protected]>
---Quoted 6 lines
Chris and Tomek suggested creating negative scenario, that will verify
setting dirty mocs values instead of skipping for gen11+. But if they
will agree that this is not a blocker, thenSigned-off-by Lukasz Kalamarz <[email protected]>
Quoted 8 lines
It all depends on the level of confidence in follow through.
Lukasz, did you mean s-o-b or r-b? s-o-b just says you've handled the patch in some official capacity; with an r-b you confirm that the patch
does what it says, and that it is doing the right thing (give or take we
are totally not robots), and so ready for inclusion.
I meant rb ...
-----
Lukasz
Quoted 1 line
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_mocs_settings: Add mocs table for icelake (rev7)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev7)
URL : https://patchwork.freedesktop.org/series/56459/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_5737 -> IGTPW_2597
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_2597 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_2597, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/7/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2597:
### IGT changes ###
#### Possible regressions ####
* igt@gem_ctx_exec@basic:
- fi-icl-u3: PASS -> INCOMPLETE
Known issues
------------
Here are the changes found in IGTPW_2597 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109315] +17
* igt@gem_ctx_create@basic-files:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106
* igt@gem_exec_basic@gtt-bsd2:
- fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57
* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57
- fi-icl-u2: NOTRUN -> SKIP [fdo#109276] +7
* igt@gem_exec_parse@basic-allowed:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109289] +1
* igt@i915_selftest@live_contexts:
- fi-icl-u2: NOTRUN -> DMESG-FAIL [fdo#108569]
* igt@kms_addfb_basic@addfb25-y-tiled-small:
- fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] +56
* igt@kms_busy@basic-flip-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@dp-edid-read:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109316] +2
* igt@kms_chamelium@hdmi-edid-read:
- fi-hsw-peppy: NOTRUN -> SKIP [fdo#109271] +46
* igt@kms_chamelium@vga-hpd-fast:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109309] +1
* igt@kms_force_connector_basic@prune-stale-modes:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109285] +3
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: NOTRUN -> DMESG-FAIL [fdo#102614] / [fdo#107814]
- fi-icl-u2: NOTRUN -> FAIL [fdo#103167]
- fi-byt-clapper: NOTRUN -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +20
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: NOTRUN -> FAIL [fdo#103191] / [fdo#107362] +1
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: NOTRUN -> INCOMPLETE [fdo#107718]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107814]: https://bugs.freedesktop.org/show_bug.cgi?id=107814
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
Participating hosts (41 -> 42)
------------------------------
Additional (6): fi-hsw-peppy fi-icl-u2 fi-snb-2520m fi-gdg-551 fi-byt-n2820 fi-byt-clapper
Missing (5): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-ctg-p8600 fi-bdw-samus
Build changes
-------------
* IGT: IGT_4883 -> IGTPW_2597
CI_DRM_5737: d5bb7d77aa77996702426496078a597f30bead58 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2597: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2597/
IGT_4883: b25e06d6ddf2e42044cd9c93b613cbc7339a8c33 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2597/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v5 1/1 i915/gem_mocs_settings: Add mocs table for icelake
In reply to Prathap Kumar Valsan via igt-devFrom: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
---
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Chris
tests/i915/gem_mocs_settings.c | 103 ++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 28 deletions(-)
tests/i915/gem_mocs_settings.c +75 -28
@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,
@@ -61,10 +63,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {
@@ -73,35 +78,59 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)
@@ -127,6 +156,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }return result;
@@ -283,9 +316,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);
@@ -315,10 +351,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )
@@ -380,7 +420,7 @@ static void write_dirty_mocs(int fd, unsigned engine, uint32_t ctx_id)if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), + write_values,ARRAY_SIZE (write_values)/2 , engine); }
@@ -390,6 +430,13 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +/* As mocs is global for GEN11+, trying to dirtying the mocs +* and testing context save and restore of mocs between contexts +* is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 ); +gem_require_ring (fd, engine);/* Skip if we don't know where the registers are for this engine */
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_mocs_settings: Add mocs table for icelake (rev8)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev8)
URL : https://patchwork.freedesktop.org/series/56459/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_5742 -> IGTPW_2613
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_2613 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_2613, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/8/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2613:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_hangcheck:
- fi-cfl-8109u: PASS -> DMESG-FAIL
Known issues
------------
Here are the changes found in IGTPW_2613 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@userptr:
- fi-whl-u: NOTRUN -> SKIP [fdo#109271] +41
* igt@gem_ctx_create@basic-files:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106
* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-byt-j1900: PASS -> SKIP [fdo#109271]
- fi-bsw-kefka: PASS -> SKIP [fdo#109271]
* igt@i915_pm_rpm@basic-rte:
- fi-byt-j1900: PASS -> FAIL [fdo#108800]
- fi-bsw-kefka: PASS -> FAIL [fdo#108800]
* igt@kms_busy@basic-flip-a:
- fi-gdg-551: NOTRUN -> FAIL [fdo#103182] +1
* igt@kms_busy@basic-flip-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@hdmi-edid-read:
- fi-hsw-peppy: NOTRUN -> SKIP [fdo#109271] +46
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: NOTRUN -> DMESG-FAIL [fdo#102614] / [fdo#107814]
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] +1
* igt@kms_psr@cursor_plane_move:
- fi-whl-u: NOTRUN -> FAIL [fdo#107383] +3
* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: NOTRUN -> DMESG-FAIL [fdo#103182]
* igt@runner@aborted:
- fi-bxt-dsi: NOTRUN -> FAIL [fdo#109516]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS
* igt@i915_selftest@live_evict:
- fi-bsw-kefka: DMESG-WARN [fdo#107709] -> PASS
[fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107383]: https://bugs.freedesktop.org/show_bug.cgi?id=107383
[fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107814]: https://bugs.freedesktop.org/show_bug.cgi?id=107814
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109516]: https://bugs.freedesktop.org/show_bug.cgi?id=109516
Participating hosts (42 -> 40)
------------------------------
Additional (5): fi-bxt-dsi fi-hsw-peppy fi-snb-2520m fi-whl-u fi-gdg-551
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 fi-icl-y fi-bdw-samus
Build changes
-------------
* IGT: IGT_4884 -> IGTPW_2613
CI_DRM_5742: 519a3f67aadea184cb97720c838946c1ba81c875 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2613: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2613/
IGT_4884: c46051337b972f8b5a302afb6f603df06fea527d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2613/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v6 1/1 i915/gem_mocs_settings: Add mocs table for icelake
In reply to Prathap Kumar Valsan via igt-devFrom: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
---
Changes in v6:
- We need to test non-privileged write to MOCS is dropped by the hardware.(As suggested by Chris)
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Chris
tests/i915/gem_mocs_settings.c | 147 ++++++++++++++++++++++++--------- 1 file changed, 109 insertions(+), 38 deletions(-)
tests/i915/gem_mocs_settings.c +109 -38
@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,
@@ -52,8 +54,10 @@ static const char * const test_modes[] = {#define MOCS_NON_DEFAULT_CTX (1<<0)#define MOCS_DIRTY_VALUES (1<<1) +#define MOCS_NONPRIVILEGED_DIRTY_VALUES (1<<2)#define ALL_MOCS_FLAGS (MOCS_NON_DEFAULT_CTX | \ - MOCS_DIRTY_VALUES) + MOCS_DIRTY_VALUES | \ + MOCS_NONPRIVILEGED_DIRTY_VALUES)#define GEN9_LNCFCMOCS0 (0xB020)/* L3 Cache Control base */ #define GEN9_GFX_MOCS_0 (0xc800)/* Graphics MOCS base register*/
@@ -61,10 +65,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {
@@ -73,35 +80,58 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)
@@ -127,6 +157,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }return result;
@@ -238,7 +272,8 @@ static void write_registers(int fd,uint32_t reg_base, const uint32_t *values, uint32_t size, - uint32_t engine_id) + uint32_t engine_id, + bool privileged) { struct drm_i915_gem_exec_object2 obj;struct drm_i915_gem_execbuffer2 execbuf;
@@ -254,7 +289,10 @@ static void write_registers(int fd, execbuf.buffer_count =1 ; execbuf.batch_len =create_write_batch (batch, values, size, reg_base);i915_execbuffer2_set_context_id (execbuf, ctx_id); - execbuf.flags =I915_EXEC_SECURE | engine_id; +if (privileged) + execbuf.flags =I915_EXEC_SECURE | engine_id; +else + execbuf.flags = engine_id;gem_write (fd, handle,0 , batch, execbuf.batch_len);gem_execbuf (fd, &execbuf);
@@ -283,9 +321,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);
@@ -315,10 +356,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )
@@ -372,16 +417,23 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dircheck_l3cc_registers (fd, engine, ctx_id, dirty); } -static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) +static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id,bool privileged) { +int num_of_mocs_entries; + +if (intel_gen (intel_get_drm_devid (fd)) >=11 ) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries, + engine, privileged);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries/2 , + engine, privileged); }static void run_test (int fd,unsigned engine,unsigned flags,unsigned mode)
@@ -389,6 +441,14 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)uint32_t ctx_id =0 ;uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +uint32_t ctx_nonprivileged_dirty_id; + +/* As mocs is global for GEN11+, trying privileged write to dirty +* the mocs and testing context save and restore of mocs between +* contexts is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 );gem_require_ring (fd, engine);
@@ -400,10 +460,20 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)if (flags &MOCS_DIRTY_VALUES ) { ctx_dirty_id =gem_context_create (fd); -write_dirty_mocs (fd, engine, ctx_dirty_id); +write_dirty_mocs (fd, engine, ctx_dirty_id, true);check_mocs_values (fd, engine, ctx_dirty_id, true); } +/* Non-privileged write to dirty the mocs +* should be ignored by the hardware +*/ +if (flags &MOCS_NONPRIVILEGED_DIRTY_VALUES ) { + ctx_nonprivileged_dirty_id =gem_context_create (fd); +write_dirty_mocs (fd, engine, ctx_nonprivileged_dirty_id, false); +check_mocs_values (fd, engine, ctx_nonprivileged_dirty_id, false); + } + +check_mocs_values (fd, engine, ctx_id, false);switch (mode) {
@@ -472,12 +542,13 @@ igt_mainif (flags && e->exec_id !=I915_EXEC_RENDER )continue ; -igt_subtest_f ("mocs-%s%s%s-%s" , +igt_subtest_f ("mocs-%s%s%s%s-%s" , test_modes[mode], flags &MOCS_NON_DEFAULT_CTX ?"-ctx" :"" , flags &MOCS_DIRTY_VALUES ?"-dirty" :"" , + flags &MOCS_NONPRIVILEGED_DIRTY_VALUES ?"-nonprivdirty" :"" , e->name) { -if (flags & (MOCS_NON_DEFAULT_CTX |MOCS_DIRTY_VALUES )) +if (flags & (MOCS_NON_DEFAULT_CTX |MOCS_DIRTY_VALUES |MOCS_NONPRIVILEGED_DIRTY_VALUES ))gem_require_contexts (fd);run_test (fd, e->exec_id | e->flags, flags, mode);
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Prathap Kumar Valsan (2019-03-14 17:28:52)
Quoted 266 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v6:
- We need to test non-privileged write to MOCS is dropped by the hardware.(As suggested by Chris)
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Christests/i915/gem_mocs_settings.c | 147 ++++++++++++++++++++++++--------- 1 file changed, 109 insertions(+), 38 deletions(-)tests/i915/gem_mocs_settings.c +96
-36@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -52,8 +54,10 @@ static const char * const test_modes[] = {#define MOCS_NON_DEFAULT_CTX (1<<0)#define MOCS_DIRTY_VALUES (1<<1) +#define MOCS_NONPRIVILEGED_DIRTY_VALUES (1<<2)#define ALL_MOCS_FLAGS (MOCS_NON_DEFAULT_CTX | \ - MOCS_DIRTY_VALUES) + MOCS_DIRTY_VALUES | \ + MOCS_NONPRIVILEGED_DIRTY_VALUES)#define GEN9_LNCFCMOCS0 (0xB020)/* L3 Cache Control base */ #define GEN9_GFX_MOCS_0 (0xc800)/* Graphics MOCS base register*/ @@ -61,10 +65,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {@@ -73,35 +80,58 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +157,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }return result;@@ -238,7 +272,8 @@ static void write_registers(int fd,uint32_t reg_base, const uint32_t *values, uint32_t size, - uint32_t engine_id) + uint32_t engine_id, + bool privileged) { struct drm_i915_gem_exec_object2 obj;struct drm_i915_gem_execbuffer2 execbuf;@@ -254,7 +289,10 @@ static void write_registers(int fd, execbuf.buffer_count =1 ; execbuf.batch_len =create_write_batch (batch, values, size, reg_base);i915_execbuffer2_set_context_id (execbuf, ctx_id); - execbuf.flags =I915_EXEC_SECURE | engine_id; +if (privileged) + execbuf.flags =I915_EXEC_SECURE | engine_id; +else + execbuf.flags = engine_id;gem_write (fd, handle,0 , batch, execbuf.batch_len);gem_execbuf (fd, &execbuf);@@ -283,9 +321,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);@@ -315,10 +356,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )@@ -372,16 +417,23 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dircheck_l3cc_registers (fd, engine, ctx_id, dirty); } -static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) +static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id,bool privileged) { +int num_of_mocs_entries; + +if (intel_gen (intel_get_drm_devid (fd)) >=11 ) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries, + engine, privileged);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries/2 , + engine, privileged); }static void run_test (int fd,unsigned engine,unsigned flags,unsigned mode)@@ -389,6 +441,14 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)uint32_t ctx_id =0 ;uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +uint32_t ctx_nonprivileged_dirty_id; + +/* As mocs is global for GEN11+, trying privileged write to dirty +* the mocs and testing context save and restore of mocs between +* contexts is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 );gem_require_ring (fd, engine);@@ -400,10 +460,20 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)if (flags &MOCS_DIRTY_VALUES ) { ctx_dirty_id =gem_context_create (fd); -write_dirty_mocs (fd, engine, ctx_dirty_id); +write_dirty_mocs (fd, engine, ctx_dirty_id, true);
tests/i915/gem_mocs_settings.c static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode) · line 473
Quoted 10 lines
tests/i915/gem_mocs_settings.c +7
-0check_mocs_values (fd, engine, ctx_dirty_id, true); } +/* Non-privileged write to dirty the mocs +* should be ignored by the hardware +*/ +if (flags &MOCS_NONPRIVILEGED_DIRTY_VALUES ) { + ctx_nonprivileged_dirty_id =gem_context_create (fd); +write_dirty_mocs (fd, engine, ctx_nonprivileged_dirty_id, false); +check_mocs_values (fd, engine, ctx_nonprivileged_dirty_id, false);
Are we just creating a bunch of ctx and leaving them hanging? I hope we are least closing the fd between runs.
I would rename this test to focus on isolation:
MOCS_ISOLATION, "-isolation"
if (flags & MOCS_ISOLATION) {
uint32_t ctx[2] = { gem_context_create(fd), gem_context_create(fd) }
/* Any writes by one normal client should not affect a second client */
write_dirty_mocs(fd, engine, ctx[0], false);
check_mocs_values(fd, engine, ctx[1], false);
for (int i = 0; i < ARRAY_SIZE(ctx); i++)
gem_context_destroy(fd, ctx[i]);
}This is just a standalone test that only needs to be checked per-engine; I would advise against stuffing it inside run_test().
But other than that, I think the test is sound and exercises the uABI correctly (i.e. clients depend on the MOCS values being static). Bonus points for proving an invalid MOCS value without reading a register :) -Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 295 lines · Chris Wilson
Quoting Prathap Kumar Valsan (2019-03-14 17:28:52)
Quoted 266 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v6:
- We need to test non-privileged write to MOCS is dropped by the hardware.(As suggested by Chris)
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Christests/i915/gem_mocs_settings.c | 147 ++++++++++++++++++++++++--------- 1 file changed, 109 insertions(+), 38 deletions(-)tests/i915/gem_mocs_settings.c +96
-36@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -52,8 +54,10 @@ static const char * const test_modes[] = {#define MOCS_NON_DEFAULT_CTX (1<<0)#define MOCS_DIRTY_VALUES (1<<1) +#define MOCS_NONPRIVILEGED_DIRTY_VALUES (1<<2)#define ALL_MOCS_FLAGS (MOCS_NON_DEFAULT_CTX | \ - MOCS_DIRTY_VALUES) + MOCS_DIRTY_VALUES | \ + MOCS_NONPRIVILEGED_DIRTY_VALUES)#define GEN9_LNCFCMOCS0 (0xB020)/* L3 Cache Control base */ #define GEN9_GFX_MOCS_0 (0xc800)/* Graphics MOCS base register*/ @@ -61,10 +65,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {@@ -73,35 +80,58 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +157,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }return result;@@ -238,7 +272,8 @@ static void write_registers(int fd,uint32_t reg_base, const uint32_t *values, uint32_t size, - uint32_t engine_id) + uint32_t engine_id, + bool privileged) { struct drm_i915_gem_exec_object2 obj;struct drm_i915_gem_execbuffer2 execbuf;@@ -254,7 +289,10 @@ static void write_registers(int fd, execbuf.buffer_count =1 ; execbuf.batch_len =create_write_batch (batch, values, size, reg_base);i915_execbuffer2_set_context_id (execbuf, ctx_id); - execbuf.flags =I915_EXEC_SECURE | engine_id; +if (privileged) + execbuf.flags =I915_EXEC_SECURE | engine_id; +else + execbuf.flags = engine_id;gem_write (fd, handle,0 , batch, execbuf.batch_len);gem_execbuf (fd, &execbuf);@@ -283,9 +321,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);@@ -315,10 +356,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )@@ -372,16 +417,23 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dircheck_l3cc_registers (fd, engine, ctx_id, dirty); } -static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) +static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id,bool privileged) { +int num_of_mocs_entries; + +if (intel_gen (intel_get_drm_devid (fd)) >=11 ) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries, + engine, privileged);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries/2 , + engine, privileged); }static void run_test (int fd,unsigned engine,unsigned flags,unsigned mode)@@ -389,6 +441,14 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)uint32_t ctx_id =0 ;uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +uint32_t ctx_nonprivileged_dirty_id; + +/* As mocs is global for GEN11+, trying privileged write to dirty +* the mocs and testing context save and restore of mocs between +* contexts is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 );gem_require_ring (fd, engine);@@ -400,10 +460,20 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)if (flags &MOCS_DIRTY_VALUES ) { ctx_dirty_id =gem_context_create (fd); -write_dirty_mocs (fd, engine, ctx_dirty_id); +write_dirty_mocs (fd, engine, ctx_dirty_id, true);tests/i915/gem_mocs_settings.c static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode) · line 473
Quoted 10 lines
tests/i915/gem_mocs_settings.c +7
-0check_mocs_values (fd, engine, ctx_dirty_id, true); } +/* Non-privileged write to dirty the mocs +* should be ignored by the hardware +*/ +if (flags &MOCS_NONPRIVILEGED_DIRTY_VALUES ) { + ctx_nonprivileged_dirty_id =gem_context_create (fd); +write_dirty_mocs (fd, engine, ctx_nonprivileged_dirty_id, false); +check_mocs_values (fd, engine, ctx_nonprivileged_dirty_id, false);Are we just creating a bunch of ctx and leaving them hanging? I hope we are least closing the fd between runs.
I would rename this test to focus on isolation:
MOCS_ISOLATION, "-isolation"if (flags & MOCS_ISOLATION) { uint32_t ctx[2] = { gem_context_create(fd), gem_context_create(fd) } /* Any writes by one normal client should not affect a second client */ write_dirty_mocs(fd, engine, ctx[0], false); check_mocs_values(fd, engine, ctx[1], false); for (int i = 0; i < ARRAY_SIZE(ctx); i++) gem_context_destroy(fd, ctx[i]); }
Quoted 3 lines
This is just a standalone test that only needs to be checked per-engine; I would advise against stuffing it inside
run_test().
Moved to a standalone subtest.
Quoted 3 lines
But other than that, I think the test is sound and exercises the uABI correctly (i.e. clients depend on the MOCS values being static). Bonus points for proving an invalid MOCS value without reading a register :)
Proving an invalid MOCS value without reading a register wasn't successful. One thing i tried is using I915_PARAM_HAS_CONTEXT_ISOLATION:
created a second context after writing to mocs using first context. Then check the value returned by I915_PARAM_HAS_CONTEXT_ISOLATION. If the second context inherited the mocs from the first context, then this ioctl should return false for the respective engine? Not very sure i am heading at the right direction. Will have to experiment further as TODO. :)
- Prathap
Quoted 1 line
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Kumar Valsan, Prathap (2019-03-15 19:28:29)
Quoted 12 lines · Chris Wilson
Quoted 3 lines
But other than that, I think the test is sound and exercises the uABI correctly (i.e. clients depend on the MOCS values being static). Bonus points for proving an invalid MOCS value without reading a register :)
Proving an invalid MOCS value without reading a register wasn't successful. One thing i tried is using
I915_PARAM_HAS_CONTEXT_ISOLATION:
created a second context after writing to mocs using first context. Then check the value returned byI915_PARAM_HAS_CONTEXT_ISOLATION. If the second context inherited the mocs from the first context, then this ioctl should return false for the respective engine? Not very sure i am heading at the right direction. Will have to experiment further as TODO. :)
No, that param concerns a separate uABI bug whereby the initial state of context saved registers were not scrubbed before new contexts. Global mocs state does not fall under the umbrella of context regs, so the HAS_CONTEXT_ISOLATION param doesn't apply universally.
But still, it is a uABI bug for one context to see the altered mocs state of another context; irrespective of that param. :)
For proving mocs actually does something, we need to look towards the coherency issues between different mocs settings; and detecting those quickly and reliably is hard.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for i915/gem_mocs_settings: Add mocs table for icelake (rev9)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev9)
URL : https://patchwork.freedesktop.org/series/56459/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5747 -> IGTPW_2624
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/9/mbox/
Known issues
------------
Here are the changes found in IGTPW_2624 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_basic@cs-compute:
- fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094]
* igt@amdgpu/amd_basic@cs-sdma:
- fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +28
* igt@amdgpu/amd_basic@query-info:
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] +55
* igt@amdgpu/amd_cs_nop@sync-compute0:
- fi-bdw-gvtdvm: NOTRUN -> SKIP [fdo#109271] +42
* igt@gem_ctx_param@basic:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106
* igt@gem_exec_basic@gtt-bsd1:
- fi-bxt-j4205: NOTRUN -> SKIP [fdo#109271] +47
* igt@gem_exec_basic@gtt-bsd2:
- fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57
* igt@gem_exec_store@basic-bsd2:
- fi-hsw-4770: NOTRUN -> SKIP [fdo#109271] +41
* igt@gem_mmap_gtt@basic-write-cpu-read-gtt:
- fi-apl-guc: NOTRUN -> SKIP [fdo#109271] +50
* igt@i915_pm_rpm@basic-rte:
- fi-byt-n2820: NOTRUN -> FAIL [fdo#108800]
* igt@kms_busy@basic-flip-c:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-ilk-650: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
- fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#102505] / [fdo#103558] / [fdo#105079] / [fdo#105602]
* igt@kms_chamelium@dp-edid-read:
- fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] +57
* igt@kms_chamelium@dp-hpd-fast:
- fi-ilk-650: NOTRUN -> SKIP [fdo#109271] +69
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: NOTRUN -> FAIL [fdo#103167]
#### Possible fixes ####
* igt@amdgpu/amd_basic@userptr:
- fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS
* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: DMESG-WARN [fdo#103841] -> PASS
[fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
Participating hosts (32 -> 33)
------------------------------
Additional (9): fi-bdw-gvtdvm fi-ilk-650 fi-apl-guc fi-hsw-4770 fi-bxt-j4205 fi-gdg-551 fi-bsw-kefka fi-byt-n2820 fi-byt-clapper
Missing (8): fi-ilk-m540 fi-icl-u2 fi-skl-6260u fi-snb-2520m fi-bsw-cyan fi-kbl-x1275 fi-icl-y fi-bdw-samus
Build changes
-------------
* IGT: IGT_4885 -> IGTPW_2624
CI_DRM_5747: 5b9f7d954ed4502fddc9d4b0ee09e59a1ef92895 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2624: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2624/
IGT_4885: 1e057f43cd30ab6acfd40794673843942521c0c5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@gem_mocs_settings@mocs-hibernate-ctx-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-hibernate-ctx-nonprivdirty-render +igt@gem_mocs_settings@mocs-hibernate-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-hibernate-nonprivdirty-render +igt@gem_mocs_settings@mocs-rc6-ctx-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-rc6-ctx-nonprivdirty-render +igt@gem_mocs_settings@mocs-rc6-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-rc6-nonprivdirty-render +igt@gem_mocs_settings@mocs-reset-ctx-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-reset-ctx-nonprivdirty-render +igt@gem_mocs_settings@mocs-reset-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-reset-nonprivdirty-render +igt@gem_mocs_settings@mocs-settings-ctx-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-settings-ctx-nonprivdirty-render +igt@gem_mocs_settings@mocs-settings-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-settings-nonprivdirty-render +igt@gem_mocs_settings@mocs-suspend-ctx-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-suspend-ctx-nonprivdirty-render +igt@gem_mocs_settings@mocs-suspend-dirty-nonprivdirty-render +igt@gem_mocs_settings@mocs-suspend-nonprivdirty-render
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2624/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✗ Fi.CI.IGT: failure for i915/gem_mocs_settings: Add mocs table for icelake (rev9)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev9)
URL : https://patchwork.freedesktop.org/series/56459/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_5747_full -> IGTPW_2624_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_2624_full absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_2624_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/9/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2624_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_eio@unwedge-stress:
- shard-glk: PASS -> FAIL
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* {igt@kms_plane@pixel-format-pipe-c-planes}:
- shard-apl: PASS -> FAIL
- shard-kbl: PASS -> FAIL
New tests
---------
New tests have been introduced between CI_DRM_5747_full and IGTPW_2624_full:
### New IGT tests (12) ###
* igt@gem_mocs_settings@mocs-rc6-ctx-dirty-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.36] s
* igt@gem_mocs_settings@mocs-rc6-ctx-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.35] s
* igt@gem_mocs_settings@mocs-rc6-dirty-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.36] s
* igt@gem_mocs_settings@mocs-rc6-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.35] s
* igt@gem_mocs_settings@mocs-reset-ctx-dirty-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.03] s
* igt@gem_mocs_settings@mocs-reset-ctx-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.01] s
* igt@gem_mocs_settings@mocs-reset-dirty-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.02] s
* igt@gem_mocs_settings@mocs-reset-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.01] s
* igt@gem_mocs_settings@mocs-settings-ctx-dirty-nonprivdirty-render:
- Statuses : 1 pass(s) 3 skip(s)
- Exec time: [0.0, 0.00] s
* igt@gem_mocs_settings@mocs-settings-ctx-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.01] s
* igt@gem_mocs_settings@mocs-settings-dirty-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.02] s
* igt@gem_mocs_settings@mocs-settings-nonprivdirty-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.01] s
Known issues
------------
Here are the changes found in IGTPW_2624_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_capture@capture-bsd2:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +123
* {igt@gem_mocs_settings@mocs-rc6-nonprivdirty-render} (NEW):
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +11
* igt@i915_pm_rpm@dpms-mode-unset-lpsp:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +23
* igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
- shard-apl: PASS -> FAIL [fdo#109660]
- shard-kbl: PASS -> FAIL [fdo#109660]
* igt@kms_atomic_transition@2x-modeset-transitions-nonblocking:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +23
* igt@kms_atomic_transition@3x-modeset-transitions-nonblocking:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2
- shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1
* igt@kms_atomic_transition@4x-modeset-transitions:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +11
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-snb: NOTRUN -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-hsw: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-glk: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-modeset-hang-newfb-render-e:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-kbl: PASS -> DMESG-WARN [fdo#107956] +1
* igt@kms_color@pipe-c-degamma:
- shard-apl: PASS -> FAIL [fdo#104782]
* igt@kms_color@pipe-c-legacy-gamma:
- shard-apl: NOTRUN -> FAIL [fdo#104782]
* igt@kms_content_protection@atomic-dpms:
- shard-kbl: NOTRUN -> FAIL [fdo#108739]
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232]
* igt@kms_cursor_crc@cursor-64x21-onscreen:
- shard-kbl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_crc@cursor-64x64-onscreen:
- shard-apl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
- shard-hsw: PASS -> FAIL [fdo#105767]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
- shard-kbl: PASS -> FAIL [fdo#103167] +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-apl: PASS -> FAIL [fdo#103167] +2
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-glk: PASS -> FAIL [fdo#103167] +6
* igt@kms_plane_alpha_blend@pipe-b-alpha-basic:
- shard-kbl: NOTRUN -> FAIL [fdo#108145] / [fdo#108590]
* igt@kms_setmode@basic:
- shard-kbl: PASS -> FAIL [fdo#99912]
* igt@kms_vblank@pipe-b-ts-continuation-modeset-hang:
- shard-apl: PASS -> FAIL [fdo#104894]
- shard-kbl: PASS -> FAIL [fdo#104894]
* igt@prime_vgem@sync-bsd1:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +19
* igt@tools_test@tools_test:
- shard-kbl: PASS -> SKIP [fdo#109271]
#### Possible fixes ####
* igt@i915_pm_rpm@system-suspend-execbuf:
- shard-kbl: INCOMPLETE [fdo#103665] / [fdo#107807] -> PASS
* igt@kms_atomic_transition@plane-all-modeset-transition:
- shard-apl: INCOMPLETE [fdo#103927] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-snb: DMESG-WARN [fdo#107956] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-render-c:
- shard-kbl: DMESG-WARN [fdo#107956] -> PASS +1
* igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
- shard-kbl: FAIL [fdo#107725] / [fdo#108145] -> PASS
* igt@kms_color@pipe-a-ctm-max:
- shard-apl: FAIL [fdo#108147] -> PASS
* igt@kms_cursor_crc@cursor-64x21-random:
- shard-apl: FAIL [fdo#103232] -> PASS +3
* igt@kms_cursor_crc@cursor-64x64-random:
- shard-kbl: FAIL [fdo#103232] -> PASS +1
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS
* igt@kms_cursor_crc@cursor-size-change:
- shard-glk: FAIL [fdo#103232] -> PASS
* igt@kms_flip@2x-modeset-vs-vblank-race:
- shard-glk: FAIL [fdo#103060] -> PASS
* igt@kms_flip@flip-vs-suspend:
- shard-kbl: DMESG-WARN [fdo#108566] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-apl: FAIL [fdo#103167] -> PASS +1
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
- shard-glk: FAIL [fdo#103167] -> PASS +4
* {igt@kms_plane@pixel-format-pipe-b-planes}:
- shard-kbl: DMESG-FAIL [fdo#103558] / [fdo#105602] -> PASS
- shard-apl: FAIL -> PASS
* {igt@kms_plane@pixel-format-pipe-c-planes-source-clamping}:
- shard-glk: SKIP [fdo#109271] -> PASS
* {igt@kms_plane@plane-position-covered-pipe-a-planes}:
- shard-apl: FAIL [fdo#110038] -> PASS +1
* {igt@kms_plane@plane-position-covered-pipe-c-planes}:
- shard-glk: FAIL [fdo#110038] -> PASS
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
- shard-glk: FAIL [fdo#108145] -> PASS
- shard-apl: FAIL [fdo#108145] -> PASS
- shard-kbl: FAIL [fdo#108145] -> PASS * {igt@kms_plane_multiple@atomic-pipe-a-tiling-x}:
- shard-apl: FAIL [fdo#110037] -> PASS +1
- shard-kbl: FAIL [fdo#110037] -> PASS
* {igt@kms_plane_multiple@atomic-pipe-c-tiling-none}:
- shard-glk: FAIL [fdo#110037] -> PASS +2
* igt@kms_rmfb@rmfb-ioctl:
- shard-kbl: DMESG-WARN [fdo#103558] / [fdo#105602] -> PASS +11
* igt@testdisplay:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS +1
#### Warnings ####
* igt@kms_content_protection@legacy:
- shard-apl: INCOMPLETE [fdo#103927] -> FAIL [fdo#108597] / [fdo#108739]
* igt@kms_rotation_crc@multiplane-rotation:
- shard-kbl: INCOMPLETE [fdo#103665] -> FAIL [fdo#109016]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#107725]: https://bugs.freedesktop.org/show_bug.cgi?id=107725
[fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108147]: https://bugs.freedesktop.org/show_bug.cgi?id=108147
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108590]: https://bugs.freedesktop.org/show_bug.cgi?id=108590
[fdo#108597]: https://bugs.freedesktop.org/show_bug.cgi?id=108597
[fdo#108739]: https://bugs.freedesktop.org/show_bug.cgi?id=108739
[fdo#109016]: https://bugs.freedesktop.org/show_bug.cgi?id=109016
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109660]: https://bugs.freedesktop.org/show_bug.cgi?id=109660
[fdo#110037]: https://bugs.freedesktop.org/show_bug.cgi?id=110037
[fdo#110038]: https://bugs.freedesktop.org/show_bug.cgi?id=110038
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (10 -> 5)
------------------------------
Missing (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u
Build changes
-------------
* IGT: IGT_4885 -> IGTPW_2624
* Piglit: piglit_4509 -> None
CI_DRM_5747: 5b9f7d954ed4502fddc9d4b0ee09e59a1ef92895 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2624: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2624/
IGT_4885: 1e057f43cd30ab6acfd40794673843942521c0c5 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2624/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH v7 1/1 i915/gem_mocs_settings: Add mocs table for icelake
In reply to Prathap Kumar Valsan via igt-devFrom: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
---
Changes in v7:
- Testing non-privileged write to MOCS is dropped by h/w and clients are isolated has moved to a new subtest. This subtest will be invoked per engine(suggested by Chris Wilson)
Changes in v6:
- We need to test non-privileged write to MOCS is dropped by the hardware.(suggested by Chris Wilson)
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Chris
tests/i915/gem_mocs_settings.c | 147 +++++++++++++++++++++++++-------- 1 file changed, 112 insertions(+), 35 deletions(-)
tests/i915/gem_mocs_settings.c +112 -35
@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,
@@ -61,10 +63,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {
@@ -73,35 +78,58 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)
@@ -127,6 +155,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }return result;
@@ -238,7 +270,8 @@ static void write_registers(int fd,uint32_t reg_base, const uint32_t *values, uint32_t size, - uint32_t engine_id) + uint32_t engine_id, + bool privileged) { struct drm_i915_gem_exec_object2 obj;struct drm_i915_gem_execbuffer2 execbuf;
@@ -254,7 +287,10 @@ static void write_registers(int fd, execbuf.buffer_count =1 ; execbuf.batch_len =create_write_batch (batch, values, size, reg_base);i915_execbuffer2_set_context_id (execbuf, ctx_id); - execbuf.flags =I915_EXEC_SECURE | engine_id; +if (privileged) + execbuf.flags =I915_EXEC_SECURE | engine_id; +else + execbuf.flags = engine_id;gem_write (fd, handle,0 , batch, execbuf.batch_len);gem_execbuf (fd, &execbuf);
@@ -283,9 +319,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);
@@ -315,10 +354,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )
@@ -372,16 +415,23 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dircheck_l3cc_registers (fd, engine, ctx_id, dirty); } -static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) +static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id,bool privileged) { +int num_of_mocs_entries; + +if (intel_gen (intel_get_drm_devid (fd)) >=11 ) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries, + engine, privileged);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries/2 , + engine, privileged); }static void run_test (int fd,unsigned engine,unsigned flags,unsigned mode)
@@ -390,6 +440,13 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +/* As mocs is global for GEN11+, trying privileged write to dirty +* the mocs and testing context save and restore of mocs between +* contexts is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 ); +gem_require_ring (fd, engine);/* Skip if we don't know where the registers are for this engine */
@@ -400,7 +457,7 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)if (flags &MOCS_DIRTY_VALUES ) { ctx_dirty_id =gem_context_create (fd); -write_dirty_mocs (fd, engine, ctx_dirty_id); +write_dirty_mocs (fd, engine, ctx_dirty_id, true);check_mocs_values (fd, engine, ctx_dirty_id, true); }
@@ -430,6 +487,18 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)gem_context_destroy (fd, ctx_id); } +static void isolation_test (int fd,unsigned engine) +{ +uint32_t ctx[2 ] = {gem_context_create (fd),gem_context_create (fd) }; + +/* Any writes by one normal client should not affect a second client */ +write_dirty_mocs (fd, engine, ctx[0 ], false); +check_mocs_values (fd, engine, ctx[1 ], false); + +for (int i =0 ; i <ARRAY_SIZE (ctx); i++) +gem_context_destroy (fd, ctx[i]); +} + igt_main {const struct intel_execution_engine *e;
@@ -490,6 +559,14 @@ igt_main } } } + +igt_subtest_f ("mocs-isolation-%s" , + e->name) { +gem_require_contexts (fd); + +isolation_test (fd, e->exec_id | e->flags); + } + } igt_fixture
Signature · 6 lines
2.20.1 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 283 lines · Prathap Kumar Valsan
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>---
Changes in v7:
- Testing non-privileged write to MOCS is dropped by h/w and clients are isolated has moved to a new subtest. This subtest will be invoked per engine(suggested by Chris Wilson)
Changes in v6:
- We need to test non-privileged write to MOCS is dropped by the hardware.(suggested by Chris Wilson)
Changes in v5:
- As mocs table is global, test need not write mocs table. Below jira has the discussion.
https://jira.devtools.intel.com/browse/VLK-1567
Changes in v4:
- L3 control registers are global in icelake. Test validates that dirty writes from userspace to L3 control registers are being dropped.
Changes in v3:
- There are holes in the mocs table(Lucas Pointed out). In icelake index 16 and 17 are reserved.
So test shouldn't be checking them.
Changes in v2:
- Cleaned up the code based on review
comments from Lucas and Christests/i915/gem_mocs_settings.c | 147 +++++++++++++++++++++++++-------- 1 file changed, 112 insertions(+), 35 deletions(-)tests/i915/gem_mocs_settings.c +104
-35@@ -32,7 +32,9 @@#include "igt_perf.h" #include "igt_sysfs.h" -#define MAX_NUMBER_MOCS_REGISTERS (64) +#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ +#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +enum {NONE ,RESET ,@@ -61,10 +63,13 @@ static const char * const test_modes[] = {#define GEN9_MFX1_MOCS_0 (0xcA00)/* Media 1 MOCS base register*/ #define GEN9_VEBOX_MOCS_0 (0xcB00)/* Video MOCS base register*/ #define GEN9_BLT_MOCS_0 (0xcc00)/* Blitter MOCS base register*/ +#define ICELAKE_MOCS_PTE {0x00000004, 0x0030, 0x1} +#define MOCS_PTE {0x00000038, 0x0030, 0x1}struct mocs_entry {uint32_t control_value;uint16_t l3cc_value; +uint8_t used; };struct mocs_table {@@ -73,35 +78,58 @@ struct mocs_table { };/* The first entries in the MOCS tables are defined by uABI */ -static const struct mocs_entry skylake_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x0000003b ,0x0030 }, +static const struct mocs_entry icelake_mocs_table[GEN11_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000005 ,0x0010 ,0x1 }, + [1 ] =ICELAKE_MOCS_PTE , + [2 ] = {0x00000037 ,0x0030 ,0x1 }, + [3 ] = {0x00000005 ,0x0010 ,0x1 }, + [4 ] = {0x00000005 ,0x0030 ,0x1 }, + [5 ] = {0x00000037 ,0x0010 ,0x1 }, + [6 ] = {0x00000017 ,0x0010 ,0x1 }, + [7 ] = {0x00000017 ,0x0030 ,0x1 }, + [8 ] = {0x00000027 ,0x0010 ,0x1 }, + [9 ] = {0x00000027 ,0x0030 ,0x1 }, + [10 ] = {0x00000077 ,0x0010 ,0x1 }, + [11 ] = {0x00000077 ,0x0030 ,0x1 }, + [12 ] = {0x00000057 ,0x0010 ,0x1 }, + [13 ] = {0x00000057 ,0x0030 ,0x1 }, + [14 ] = {0x00000067 ,0x0010 ,0x1 }, + [15 ] = {0x00000067 ,0x0030 ,0x1 }, + [18 ] = {0x00060037 ,0x0030 ,0x1 }, + [19 ] = {0x00000737 ,0x0030 ,0x1 }, + [20 ] = {0x00000337 ,0x0030 ,0x1 }, + [21 ] = {0x00000137 ,0x0030 ,0x1 }, + [22 ] = {0x000003b7 ,0x0030 ,0x1 }, + [23 ] = {0x000007b7 ,0x0030 ,0x1 }, + [24 ...61 ] =ICELAKE_MOCS_PTE , + [62 ] = {0x00000037 ,0x0010 ,0x1 }, + [63 ] = {0x00000037 ,0x0010 ,0x1 }, +}; + +static const struct mocs_entry skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x0000003b ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_skylake_mocs_table[] = { - {0x00003FFF ,0x003F },/* no snoop bit */ - {0x00003FFF ,0x003F }, - {0x00003FFF ,0x003F }, +static const struct mocs_entry dirty_skylake_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00003FFF ,0x003F ,0x1 }, }; -static const struct mocs_entry broxton_mocs_table[] = { - {0x00000009 ,0x0010 }, - {0x00000038 ,0x0030 }, - {0x00000039 ,0x0030 }, +static const struct mocs_entry broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ] = {0x00000009 ,0x0010 ,0x1 }, + [1 ] =MOCS_PTE , + [2 ] = {0x00000039 ,0x0030 ,0x1 }, + [3 ...GEN9_NUM_MOCS_ENTRIES -1 ] =MOCS_PTE , }; -static const struct mocs_entry dirty_broxton_mocs_table[] = { - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, - {0x00007FFF ,0x003F }, +static const struct mocs_entry dirty_broxton_mocs_table[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] = {0x00007FFF ,0x003F ,0x1 }, }; -static const uint32_t write_values[] = { -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF , -0xFFFFFFFF +static const uint32_t write_values[GEN9_NUM_MOCS_ENTRIES ] = { + [0 ...GEN9_NUM_MOCS_ENTRIES -1 ] =0xFFFFFFFF , };static bool get_mocs_settings (int fd,struct mocs_table *table,bool dirty)@@ -127,6 +155,10 @@ static bool get_mocs_settings(int fd, struct mocs_table *table, bool dirty) table->table = broxton_mocs_table; } result = true; + }else if (IS_ICELAKE (devid)) { + table->size =ARRAY_SIZE (icelake_mocs_table); + table->table = icelake_mocs_table; + result = true; }return result;@@ -238,7 +270,8 @@ static void write_registers(int fd,uint32_t reg_base, const uint32_t *values, uint32_t size, - uint32_t engine_id) + uint32_t engine_id, + bool privileged) { struct drm_i915_gem_exec_object2 obj;struct drm_i915_gem_execbuffer2 execbuf;@@ -254,7 +287,10 @@ static void write_registers(int fd, execbuf.buffer_count =1 ; execbuf.batch_len =create_write_batch (batch, values, size, reg_base);i915_execbuffer2_set_context_id (execbuf, ctx_id); - execbuf.flags =I915_EXEC_SECURE | engine_id; +if (privileged) + execbuf.flags =I915_EXEC_SECURE | engine_id; +else + execbuf.flags = engine_id;gem_write (fd, handle,0 , batch, execbuf.batch_len);gem_execbuf (fd, &execbuf);@@ -283,9 +319,12 @@ static void check_control_registers(int fd, read_regs =gem_mmap__cpu (fd, dst_handle,0 ,4096 ,PROT_READ );gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 ); -for (int index =0 ; index < table.size; index++) +for (int index =0 ; index < table.size; index++) { +if (!table.table[index].used) +continue ;igt_assert_eq_u32 (read_regs[index], table.table[index].control_value); + }munmap (read_regs,4096 );gem_close (fd, dst_handle);@@ -315,10 +354,14 @@ static void check_l3cc_registers(int fd,gem_set_domain (fd, dst_handle,I915_GEM_DOMAIN_CPU ,0 );for (index =0 ; index < table.size /2 ; index++) { -igt_assert_eq_u32 (read_regs[index] &0xffff , - table.table[index *2 ].l3cc_value); -igt_assert_eq_u32 (read_regs[index] >>16 , - table.table[index *2 +1 ].l3cc_value); +if (table.table[index *2 ].used) { +igt_assert_eq_u32 (read_regs[index] &0xffff , + table.table[index *2 ].l3cc_value); + } +if (table.table[index *2 +1 ].used) { +igt_assert_eq_u32 (read_regs[index] >>16 , + table.table[index *2 +1 ].l3cc_value); + } }if (table.size &1 )@@ -372,16 +415,23 @@ static void check_mocs_values(int fd, unsigned engine, uint32_t ctx_id, bool dircheck_l3cc_registers (fd, engine, ctx_id, dirty); } -static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id) +static void write_dirty_mocs (int fd,unsigned engine,uint32_t ctx_id,bool privileged) { +int num_of_mocs_entries; + +if (intel_gen (intel_get_drm_devid (fd)) >=11 ) + num_of_mocs_entries =GEN11_NUM_MOCS_ENTRIES ; +else + num_of_mocs_entries =GEN9_NUM_MOCS_ENTRIES ; +write_registers (fd, ctx_id,get_engine_base (engine), - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries, + engine, privileged);if (engine ==I915_EXEC_RENDER )write_registers (fd, ctx_id,GEN9_LNCFCMOCS0 , - write_values,ARRAY_SIZE (write_values), - engine); + write_values, num_of_mocs_entries/2 , + engine, privileged); }static void run_test (int fd,unsigned engine,unsigned flags,unsigned mode)@@ -390,6 +440,13 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)uint32_t ctx_clean_id;uint32_t ctx_dirty_id; +/* As mocs is global for GEN11+, trying privileged write to dirty +* the mocs and testing context save and restore of mocs between +* contexts is bound to fail. +*/ +if (flags &MOCS_DIRTY_VALUES ) +igt_skip_on (intel_gen (intel_get_drm_devid (fd)) >=11 ); +gem_require_ring (fd, engine);/* Skip if we don't know where the registers are for this engine */ @@ -400,7 +457,7 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)if (flags &MOCS_DIRTY_VALUES ) { ctx_dirty_id =gem_context_create (fd); -write_dirty_mocs (fd, engine, ctx_dirty_id); +write_dirty_mocs (fd, engine, ctx_dirty_id, true);check_mocs_values (fd, engine, ctx_dirty_id, true); }@@ -430,6 +487,18 @@ static void run_test(int fd, unsigned engine, unsigned flags, unsigned mode)gem_context_destroy (fd, ctx_id); } +static void isolation_test (int fd,unsigned engine) +{ +uint32_t ctx[2 ] = {gem_context_create (fd),gem_context_create (fd) }; + +/* Any writes by one normal client should not affect a second client */ +write_dirty_mocs (fd, engine, ctx[0 ], false); +check_mocs_values (fd, engine, ctx[1 ], false); + +for (int i =0 ; i <ARRAY_SIZE (ctx); i++) +gem_context_destroy (fd, ctx[i]); +} + igt_main {const struct intel_execution_engine *e;@@ -490,6 +559,14 @@ igt_main } }
tests/i915/gem_mocs_settings.c igt_main · line 570
Quoted 10 lines
tests/i915/gem_mocs_settings.c +8
-0} + +igt_subtest_f ("mocs-isolation-%s" , + e->name) { +gem_require_contexts (fd); + +isolation_test (fd, e->exec_id | e->flags); + } + }
Chris,
Added isolation_test as a subtest. Can i get a r-b if this looks good to you.
Thanks,
Prathap
Quoted 5 lines
tests/i915/gem_mocs_settings.c +0
-0igt_fixtureSignature · 1 line
2.20.1
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Chris Wilson
Reviewed-byQuoting Kumar Valsan, Prathap (2019-03-18 13:10:43)
Quoted 24 lines · Prathap Kumar Valsan
Quoted 23 lines
tests/i915/gem_mocs_settings.c +16
-0+static void isolation_test (int fd,unsigned engine) +{ +uint32_t ctx[2 ] = {gem_context_create (fd),gem_context_create (fd) }; + +/* Any writes by one normal client should not affect a second client */ +write_dirty_mocs (fd, engine, ctx[0 ], false); +check_mocs_values (fd, engine, ctx[1 ], false); + +for (int i =0 ; i <ARRAY_SIZE (ctx); i++) +gem_context_destroy (fd, ctx[i]); +} + igt_main {const struct intel_execution_engine *e;@@ -490,6 +559,14 @@ igt_main } } } + +igt_subtest_f ("mocs-isolation-%s" , + e->name) { +gem_require_contexts (fd);
Quoted 8 lines
tests/i915/gem_mocs_settings.c igt_main · line 570
Quoted 5 lines
tests/i915/gem_mocs_settings.c +4
-0+ +isolation_test (fd, e->exec_id | e->flags); + } + }Chris,
Addedisolation_testas a subtest. Can i get a r-b if this looks good to you.
Yup, that looks like what I expect we need to verify the ABI that mocs values are independent without overburdening ourselves with actual HW implementation.
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoted 34 lines · Chris Wilson
Quoting Kumar Valsan, Prathap (2019-03-18 13:10:43)
Quoted 24 lines · Prathap Kumar Valsan
Quoted 23 lines
tests/i915/gem_mocs_settings.c +16
-0+static void isolation_test (int fd,unsigned engine) +{ +uint32_t ctx[2 ] = {gem_context_create (fd),gem_context_create (fd) }; + +/* Any writes by one normal client should not affect a second client */ +write_dirty_mocs (fd, engine, ctx[0 ], false); +check_mocs_values (fd, engine, ctx[1 ], false); + +for (int i =0 ; i <ARRAY_SIZE (ctx); i++) +gem_context_destroy (fd, ctx[i]); +} + igt_main {const struct intel_execution_engine *e;@@ -490,6 +559,14 @@ igt_main } } } + +igt_subtest_f ("mocs-isolation-%s" , + e->name) { +gem_require_contexts (fd);Quoted 8 lines
tests/i915/gem_mocs_settings.c igt_main · line 570
Quoted 5 lines
tests/i915/gem_mocs_settings.c +4
-0+ +isolation_test (fd, e->exec_id | e->flags); + } + }Chris,
Addedisolation_testas a subtest. Can i get a r-b if this looks good to you.
Quoted 6 lines
Yup, that looks like what I expect we need to verify the ABI that mocs values are independent without overburdening ourselves with actual HW implementation.
Reviewed-by Chris Wilson <[email protected]>-Chris
Thanks for the reviews.
-Prathap
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Quoting Prathap Kumar Valsan (2019-03-15 19:15:55)
Quoted 6 lines
From: "Kumar Valsan, Prathap" <[email protected]>
This patch adds mocs table for icelake with expected L3 and eDRAM control values.
Signed-off-by Kumar Valsan, Prathap <[email protected]>
I've picked this patch up for pushing just as soon as gitlab is happy again. Thanks for the patch and reviews,
-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for i915/gem_mocs_settings: Add mocs table for icelake (rev11)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev11)
URL : https://patchwork.freedesktop.org/series/56459/
State : success
== Summary ==
CI Bug Log - changes from IGT_4888 -> IGTPW_2644
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/11/mbox/
Known issues
------------
Here are the changes found in IGTPW_2644 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@amdgpu/amd_cs_nop@sync-gfx0:
- fi-kbl-7567u: NOTRUN -> SKIP [fdo#109271] +17
* igt@i915_module_load@reload:
- fi-kbl-7567u: PASS -> DMESG-WARN [fdo#105602] / [fdo#108529]
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-byt-j1900: PASS -> SKIP [fdo#109271]
* igt@i915_pm_rpm@basic-rte:
- fi-byt-j1900: PASS -> FAIL [fdo#108800]
* igt@i915_pm_rpm@module-reload:
- fi-kbl-7567u: NOTRUN -> DMESG-WARN [fdo#108529]
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: PASS -> DMESG-WARN [fdo#103558] / [fdo#105079] / [fdo#105602]
* igt@kms_chamelium@dp-edid-read:
- fi-skl-iommu: NOTRUN -> SKIP [fdo#109271] +45
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-whl-u: PASS -> FAIL [fdo#103375] +3
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] +1
- fi-kbl-7567u: PASS -> DMESG-FAIL [fdo#105079] * igt@prime_vgem@basic-fence-flip:
- fi-kbl-7567u: PASS -> SKIP [fdo#109271] +4
#### Possible fixes ####
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-byt-clapper: FAIL [fdo#107362] -> PASS
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +2
* igt@prime_vgem@basic-fence-flip:
- fi-ilk-650: FAIL [fdo#104008] -> PASS
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108529]: https://bugs.freedesktop.org/show_bug.cgi?id=108529
[fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
Participating hosts (46 -> 39)
------------------------------
Additional (1): fi-skl-iommu
Missing (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-icl-y fi-bdw-samus
Build changes
-------------
* IGT: IGT_4888 -> IGTPW_2644
* Linux: CI_DRM_5756 -> CI_DRM_5763
CI_DRM_5756: 0a2a982693ac3f3ecabf8e6c12cb18aa993ae3b0 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_5763: de2772b353b83e6347687973dfff6f7f5257e364 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2644: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2644/
IGT_4888: 71ad19eb8fe4f0eecae3bf063e107293b90b9abc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Testlist changes ==
+igt@gem_mocs_settings@mocs-isolation-blt
+igt@gem_mocs_settings@mocs-isolation-bsd1
+igt@gem_mocs_settings@mocs-isolation-bsd2
+igt@gem_mocs_settings@mocs-isolation-render
+igt@gem_mocs_settings@mocs-isolation-vebox
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2644/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for i915/gem_mocs_settings: Add mocs table for icelake (rev11)
In reply to Prathap Kumar Valsan via igt-dev== Series Details ==
== Series Details ==
Series: i915/gem_mocs_settings: Add mocs table for icelake (rev11)
URL : https://patchwork.freedesktop.org/series/56459/
State : success
== Summary ==
CI Bug Log - changes from IGT_4888_full -> IGTPW_2644_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/56459/revisions/11/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2644_full:
### IGT changes ###
#### Possible regressions ####
* {igt@gem_mocs_settings@mocs-isolation-bsd2} (NEW):
- shard-apl: NOTRUN -> FAIL
New tests
---------
New tests have been introduced between IGT_4888_full and IGTPW_2644_full:
### New IGT tests (5) ###
* igt@gem_mocs_settings@mocs-isolation-blt:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.00] s
* igt@gem_mocs_settings@mocs-isolation-bsd1:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.00] s
* igt@gem_mocs_settings@mocs-isolation-bsd2:
- Statuses : 1 fail(s) 1 pass(s) 3 skip(s)
- Exec time: [0.0, 0.09] s
* igt@gem_mocs_settings@mocs-isolation-render:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.01] s
* igt@gem_mocs_settings@mocs-isolation-vebox:
- Statuses : 2 pass(s) 3 skip(s)
- Exec time: [0.0, 0.00] s
Known issues
------------
Here are the changes found in IGTPW_2644_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* {igt@gem_mocs_settings@mocs-isolation-bsd2} (NEW):
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +4
* igt@gem_wait@wait-bsd:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
* igt@kms_atomic_transition@3x-modeset-transitions-nonblocking:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +10
* igt@kms_atomic_transition@4x-modeset-transitions-nonblocking-fencing:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-snb: NOTRUN -> DMESG-WARN [fdo#107956]
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
- shard-hsw: PASS -> DMESG-WARN [fdo#107956] +1
- shard-kbl: PASS -> DMESG-WARN [fdo#107956]
* igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
- shard-glk: PASS -> FAIL [fdo#108145]
* igt@kms_color@pipe-b-degamma:
- shard-kbl: PASS -> FAIL [fdo#104782]
- shard-apl: PASS -> FAIL [fdo#104782] +1
* igt@kms_cursor_crc@cursor-128x128-random:
- shard-apl: PASS -> FAIL [fdo#103232] +7
- shard-kbl: PASS -> FAIL [fdo#103232] +1
* igt@kms_cursor_crc@cursor-128x128-suspend:
- shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
- shard-kbl: PASS -> FAIL [fdo#103167]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- shard-apl: PASS -> FAIL [fdo#103167] +2
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move:
- shard-glk: PASS -> FAIL [fdo#103167] +9
* igt@kms_frontbuffer_tracking@fbc-2p-rte:
- shard-glk: PASS -> FAIL [fdo#103167] / [fdo#105682]
* igt@kms_frontbuffer_tracking@fbcpsr-rgb565-draw-mmap-gtt:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +4
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +111
* igt@kms_psr@sprite_plane_onoff:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +16
* igt@kms_rotation_crc@multiplane-rotation-cropping-bottom:
- shard-kbl: PASS -> DMESG-FAIL [fdo#105763]
* igt@kms_setmode@basic:
- shard-hsw: PASS -> FAIL [fdo#99912]
* igt@perf_pmu@busy-idle-check-all-vecs0:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]
* igt@perf_pmu@rc6:
- shard-kbl: PASS -> SKIP [fdo#109271]
* igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +6
* igt@sw_sync@sync_busy_fork_unixsocket:
- shard-snb: NOTRUN -> FAIL [fdo#110150 ]
* igt@testdisplay:
- shard-kbl: PASS -> INCOMPLETE [fdo#103665] +2
#### Possible fixes ####
* igt@gem_eio@reset-stress:
- shard-snb: FAIL [fdo#109661] -> PASS
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-apl: FAIL [fdo#103191] / [fdo#103232] -> PASS
- shard-kbl: FAIL [fdo#103191] / [fdo#103232] -> PASS
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: FAIL [fdo#105767] -> PASS
* igt@kms_flip@modeset-vs-vblank-race-interruptible:
- shard-glk: FAIL [fdo#103060] -> PASS
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-fullscreen:
- shard-apl: FAIL [fdo#103167] -> PASS +1
- shard-kbl: FAIL [fdo#103167] -> PASS +1
* igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
- shard-glk: FAIL [fdo#103167] -> PASS +2
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
- shard-kbl: INCOMPLETE [fdo#103665] -> PASS
* {igt@kms_plane@pixel-format-pipe-a-planes-source-clamping}:
- shard-glk: SKIP [fdo#109271] -> PASS
- shard-apl: FAIL [fdo#110033] -> PASS +1
- shard-kbl: FAIL -> PASS * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-glk: FAIL [fdo#108145] -> PASS
* {igt@kms_plane_multiple@atomic-pipe-b-tiling-y}:
- shard-apl: FAIL [fdo#110037] -> PASS +2
* igt@kms_vblank@pipe-c-ts-continuation-modeset:
- shard-kbl: FAIL [fdo#104894] -> PASS
- shard-apl: FAIL [fdo#104894] -> PASS
#### Warnings ####
* igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format:
- shard-glk: SKIP [fdo#109271] / [fdo#109278] -> FAIL [fdo#110098] +2
* igt@kms_plane_scaling@pipe-a-scaler-with-rotation:
- shard-glk: FAIL [fdo#110098] -> SKIP [fdo#109271] / [fdo#109278] +1
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105682]: https://bugs.freedesktop.org/show_bug.cgi?id=105682
[fdo#105763]: https://bugs.freedesktop.org/show_bug.cgi?id=105763
[fdo#105767]: https://bugs.freedesktop.org/show_bug.cgi?id=105767
[fdo#107956]: https://bugs.freedesktop.org/show_bug.cgi?id=107956
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109661]: https://bugs.freedesktop.org/show_bug.cgi?id=109661
[fdo#110033]: https://bugs.freedesktop.org/show_bug.cgi?id=110033
[fdo#110037]: https://bugs.freedesktop.org/show_bug.cgi?id=110037
[fdo#110038]: https://bugs.freedesktop.org/show_bug.cgi?id=110038
[fdo#110098]: https://bugs.freedesktop.org/show_bug.cgi?id=110098
[fdo#110150 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110150
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (7 -> 5)
------------------------------
Missing (2): shard-skl shard-iclb
Build changes
-------------
* IGT: IGT_4888 -> IGTPW_2644
* Linux: CI_DRM_5756 -> CI_DRM_5763
CI_DRM_5756: 0a2a982693ac3f3ecabf8e6c12cb18aa993ae3b0 @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_5763: de2772b353b83e6347687973dfff6f7f5257e364 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2644: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2644/
IGT_4888: 71ad19eb8fe4f0eecae3bf063e107293b90b9abc @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2644/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev