* [igt-dev] [PATCH i-g-t 0/2] lib/igt_draw: Change MOCS settings for MTL
@ 2023-01-13 6:22 Jeevan B
2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jeevan B @ 2023-01-13 6:22 UTC (permalink / raw)
To: igt-dev; +Cc: lucas.demarchi
On MTL, we want the table entry labelled "UC (GO:Mem)"
which has index 5. This means that the MOCS value is 10.
v2: Add define for MOCS settings. (Lucas)
v3: Extending get_mocs_index and using get_mocs_index
to get mocs val. (Zbigniew)
v4: Spliting the patches as Fix and MTL changes.
Jeevan B (2):
lib/igt_draw: Use intel_get_uc_mocs to get MOCS value
lib/igt_draw: Add MOCS values for MTL
lib/i915/intel_mocs.c | 12 ++++++++----
lib/igt_draw.c | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
--
2.19.1
^ permalink raw reply [flat|nested] 6+ messages in thread* [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value 2023-01-13 6:22 [igt-dev] [PATCH i-g-t 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B @ 2023-01-13 6:22 ` Jeevan B 2023-01-13 16:24 ` Lucas De Marchi 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL Jeevan B 2023-01-13 6:33 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_draw: Change MOCS settings for MTL (rev8) Patchwork 2 siblings, 1 reply; 6+ messages in thread From: Jeevan B @ 2023-01-13 6:22 UTC (permalink / raw) To: igt-dev; +Cc: lucas.demarchi Use intel_get_uc_mocs instead of hardcoding to get table entry. Signed-off-by: Jeevan B <jeevan.b@intel.com> --- lib/igt_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_draw.c b/lib/igt_draw.c index 975d65cd..d8f4596a 100644 --- a/lib/igt_draw.c +++ b/lib/igt_draw.c @@ -703,7 +703,7 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data, intel_bb_out(ibb, XY_FAST_COLOR_BLT | blt_cmd_depth); /* DG2 MOCS entry 2 is "UC - Non-Coherent; GO:Memory" */ - intel_bb_out(ibb, blt_cmd_tiling | 2 << 21 | (pitch-1)); + intel_bb_out(ibb, blt_cmd_tiling | intel_get_uc_mocs(fd) << 21 | (pitch-1)); intel_bb_out(ibb, (rect->y << 16) | rect->x); intel_bb_out(ibb, ((rect->y + rect->h) << 16) | (rect->x + rect->w)); intel_bb_emit_reloc_fenced(ibb, dst->handle, 0, -- 2.19.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B @ 2023-01-13 16:24 ` Lucas De Marchi 0 siblings, 0 replies; 6+ messages in thread From: Lucas De Marchi @ 2023-01-13 16:24 UTC (permalink / raw) To: Jeevan B; +Cc: igt-dev On Fri, Jan 13, 2023 at 11:52:32AM +0530, Jeevan B wrote: >Use intel_get_uc_mocs instead of hardcoding to get table entry. > >Signed-off-by: Jeevan B <jeevan.b@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Lucas De Marchi >--- > lib/igt_draw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/igt_draw.c b/lib/igt_draw.c >index 975d65cd..d8f4596a 100644 >--- a/lib/igt_draw.c >+++ b/lib/igt_draw.c >@@ -703,7 +703,7 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data, > > intel_bb_out(ibb, XY_FAST_COLOR_BLT | blt_cmd_depth); > /* DG2 MOCS entry 2 is "UC - Non-Coherent; GO:Memory" */ >- intel_bb_out(ibb, blt_cmd_tiling | 2 << 21 | (pitch-1)); >+ intel_bb_out(ibb, blt_cmd_tiling | intel_get_uc_mocs(fd) << 21 | (pitch-1)); > intel_bb_out(ibb, (rect->y << 16) | rect->x); > intel_bb_out(ibb, ((rect->y + rect->h) << 16) | (rect->x + rect->w)); > intel_bb_emit_reloc_fenced(ibb, dst->handle, 0, >-- >2.19.1 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL 2023-01-13 6:22 [igt-dev] [PATCH i-g-t 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B @ 2023-01-13 6:22 ` Jeevan B 2023-01-13 16:25 ` Lucas De Marchi 2023-01-13 6:33 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_draw: Change MOCS settings for MTL (rev8) Patchwork 2 siblings, 1 reply; 6+ messages in thread From: Jeevan B @ 2023-01-13 6:22 UTC (permalink / raw) To: igt-dev; +Cc: lucas.demarchi On MTL, we want the table entry labelled "UC (GO:Mem)" which has index 5. This means that the MOCS value is 10. Signed-off-by: Jeevan B <jeevan.b@intel.com> --- lib/i915/intel_mocs.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/i915/intel_mocs.c b/lib/i915/intel_mocs.c index df541ab0..95f0fbde 100644 --- a/lib/i915/intel_mocs.c +++ b/lib/i915/intel_mocs.c @@ -11,6 +11,8 @@ #define DG1_MOCS_WB_IDX 5 #define DG2_MOCS_UC_IDX 1 #define DG2_MOCS_WB_IDX 3 +#define MTL_MOCS_UC_IDX 5 +#define MTL_MOCS_WB_IDX 10 #define GEN12_MOCS_UC_IDX 3 #define GEN12_MOCS_WB_IDX 2 #define XY_BLOCK_COPY_BLT_MOCS_SHIFT 21 @@ -32,13 +34,15 @@ static void get_mocs_index(int fd, struct drm_i915_mocs_index *mocs) * This helper function is providing current UC as well * as WB MOCS index based on platform. */ - if (IS_DG1(devid)) { - mocs->uc_index = DG1_MOCS_UC_IDX; - mocs->wb_index = DG1_MOCS_WB_IDX; + if (IS_METEORLAKE(devid)) { + mocs->uc_index = MTL_MOCS_UC_IDX; + mocs->wb_index = MTL_MOCS_WB_IDX; } else if (IS_DG2(devid)) { mocs->uc_index = DG2_MOCS_UC_IDX; mocs->wb_index = DG2_MOCS_WB_IDX; - + } else if (IS_DG1(devid)) { + mocs->uc_index = DG1_MOCS_UC_IDX; + mocs->wb_index = DG1_MOCS_WB_IDX; } else if (IS_GEN12(devid)) { mocs->uc_index = GEN12_MOCS_UC_IDX; mocs->wb_index = GEN12_MOCS_WB_IDX; -- 2.19.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL Jeevan B @ 2023-01-13 16:25 ` Lucas De Marchi 0 siblings, 0 replies; 6+ messages in thread From: Lucas De Marchi @ 2023-01-13 16:25 UTC (permalink / raw) To: Jeevan B; +Cc: igt-dev On Fri, Jan 13, 2023 at 11:52:33AM +0530, Jeevan B wrote: >On MTL, we want the table entry labelled "UC (GO:Mem)" >which has index 5. This means that the MOCS value is 10. > >Signed-off-by: Jeevan B <jeevan.b@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Lucas De Marchi ^ permalink raw reply [flat|nested] 6+ messages in thread
* [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_draw: Change MOCS settings for MTL (rev8) 2023-01-13 6:22 [igt-dev] [PATCH i-g-t 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL Jeevan B @ 2023-01-13 6:33 ` Patchwork 2 siblings, 0 replies; 6+ messages in thread From: Patchwork @ 2023-01-13 6:33 UTC (permalink / raw) To: Jeevan B; +Cc: igt-dev == Series Details == Series: lib/igt_draw: Change MOCS settings for MTL (rev8) URL : https://patchwork.freedesktop.org/series/111958/ State : failure == Summary == IGT patchset build failed on latest successful build 1e6d24e6dfa42b22f950f7d5e436b8f9acf8747f Update NEWS, bump version to 1.27 ninja: Entering directory `/opt/igt/build' [1/788] Generating version.h with a custom command. [2/785] Linking static target lib/libigt-i915_intel_decode_c.a. [3/785] Linking static target lib/libigt-igt_device_scan_c.a. [4/785] Linking static target lib/libigt-intel_batchbuffer_c.a. [5/785] Linking static target lib/libigt-intel_bufops_c.a. [6/785] Linking static target lib/libigt-rendercopy_gen6_c.a. [7/785] Linking static target lib/libigt-rendercopy_gen7_c.a. [8/785] Linking static target lib/libigt-rendercopy_gen8_c.a. [9/785] Linking static target lib/libigt-rendercopy_gen9_c.a. [10/785] Compiling C object 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o'. FAILED: lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o cc -Ilib/76b5a35@@igt-igt_draw_c@sta -Ilib -I../../../usr/src/igt-gpu-tools/lib -I../../../usr/src/igt-gpu-tools/include/drm-uapi -I../../../usr/src/igt-gpu-tools/include/linux-uapi -I../../../usr/src/igt-gpu-tools/lib/stubs/syscalls -I. -I../../../usr/src/igt-gpu-tools/ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/x86_64-linux-gnu -I/usr/include/valgrind -I/usr/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-address-of-packed-member -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon -fPIC -pthread '-DIGT_DATADIR="/opt/igt/share/igt-gpu-tools"' '-DIGT_SRCDIR="/usr/src/igt-gpu-tools/tests"' '-DIGT_LOG_DOMAIN="igt_draw"' -MD -MQ 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o' -MF 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o.d' -o 'lib/76b5a35@@igt-igt_draw_c@sta/igt_draw.c.o' -c ../../../usr/src/igt-gpu-tools/lib/igt_draw.c ../../../usr/src/igt-gpu-tools/lib/igt_draw.c: In function ‘draw_rect_blt’: ../../../usr/src/igt-gpu-tools/lib/igt_draw.c:706:38: error: implicit declaration of function ‘intel_get_uc_mocs’; did you mean ‘intel_get_pci_device’? [-Werror=implicit-function-declaration] 706 | intel_bb_out(ibb, blt_cmd_tiling | intel_get_uc_mocs(fd) << 21 | (pitch-1)); | ^~~~~~~~~~~~~~~~~ | intel_get_pci_device ../../../usr/src/igt-gpu-tools/lib/igt_draw.c:706:38: warning: nested extern declaration of ‘intel_get_uc_mocs’ [-Wnested-externs] cc1: some warnings being treated as errors ninja: build stopped: subcommand failed. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-13 16:25 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-01-13 6:22 [igt-dev] [PATCH i-g-t 0/2] lib/igt_draw: Change MOCS settings for MTL Jeevan B 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_draw: Use intel_get_uc_mocs to get MOCS value Jeevan B 2023-01-13 16:24 ` Lucas De Marchi 2023-01-13 6:22 ` [igt-dev] [PATCH i-g-t 2/2] lib/igt_draw: Add MOCS values for MTL Jeevan B 2023-01-13 16:25 ` Lucas De Marchi 2023-01-13 6:33 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_draw: Change MOCS settings for MTL (rev8) Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox