* [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers.
@ 2021-06-21 15:41 Mark Yacoub
2021-06-21 16:50 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_fb: Support Tile Size for AMD non linear modifiers. (rev2) Patchwork
2021-06-21 16:54 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
0 siblings, 2 replies; 7+ messages in thread
From: Mark Yacoub @ 2021-06-21 15:41 UTC (permalink / raw)
To: igt-dev; +Cc: seanpaul, petri.latvala, bas
Calculate the width and height of the tile on amdgpu when the modifier
is not linear.
v1:
Change width_ret to bytes not pixels.
Cc: bas@basnieuwenhuizen.nl
Cc: daniel.vetter@ffwll.ch
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
lib/igt_fb.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 71b89855..6b926e2e 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -396,6 +396,19 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
vc4_modifier_param = fourcc_mod_broadcom_param(modifier);
modifier = fourcc_mod_broadcom_mod(modifier);
}
+ // For all non-linear modifiers, AMD uses 64 KiB tiles
+ else if (IS_AMD_FMT_MOD(modifier)) {
+ igt_require_amdgpu(fd);
+ const int bytes_per_pixel = fb_bpp / 8;
+ const int format_log2 = log2(bytes_per_pixel);
+ const int pixel_log2 = log2(64 * 1024) - format_log2;
+ const int width_log2 = (pixel_log2 1) / 2;
+ const int height_log2 = pixel_log2 - width_log2;
+
+ *width_ret = bytes_per_pixel << width_log2;
+ *height_ret = 1 << height_log2;
+ return;
+ }
switch (modifier) {
case LOCAL_DRM_FORMAT_MOD_NONE:
--
2.32.0.288.g62a8d224e6-goog
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_fb: Support Tile Size for AMD non linear modifiers. (rev2)
2021-06-21 15:41 [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers Mark Yacoub
@ 2021-06-21 16:50 ` Patchwork
2021-06-21 16:54 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
1 sibling, 0 replies; 7+ messages in thread
From: Patchwork @ 2021-06-21 16:50 UTC (permalink / raw)
To: Mark Yacoub; +Cc: igt-dev
== Series Details ==
Series: lib/igt_fb: Support Tile Size for AMD non linear modifiers. (rev2)
URL : https://patchwork.freedesktop.org/series/89017/
State : failure
== Summary ==
IGT patchset build failed on latest successful build
4ef420186b82f1a6d9c9b69d2f8de4fd100a2af3 tests/kms_dp_dsc: Avoid SIGSEGV when release DRM connector.
ninja: Entering directory `build'
[1/426] Generating version.h with a custom command.
[2/422] Linking static target lib/libigt-igt_core_c.a.
[3/422] Compiling C object 'lib/lib@@i915_perf@sha/meson-generated_.._i915_perf_registers_tglgt1.c.o'.
[4/422] Compiling C object 'lib/lib@@i915_perf@sha/meson-generated_.._i915_perf_metrics_tglgt1.c.o'.
[5/422] Compiling C object 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o
ccache cc -Ilib/lib@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -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/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/x86_64-linux-gnu -I/usr/include/alsa -I/usr/include -I/home/cidrm/kernel_headers/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-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="/home/cidrm/igt-gpu-tools/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
const int bytes_per_pixel = fb_bpp / 8;
^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
const int width_log2 = (pixel_log2 1) / 2;
~ ^ ~
)
ninja: build stopped: subcommand failed.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✗ GitLab.Pipeline: warning for lib/igt_fb: Support Tile Size for AMD non linear modifiers. (rev2)
2021-06-21 15:41 [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers Mark Yacoub
2021-06-21 16:50 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_fb: Support Tile Size for AMD non linear modifiers. (rev2) Patchwork
@ 2021-06-21 16:54 ` Patchwork
1 sibling, 0 replies; 7+ messages in thread
From: Patchwork @ 2021-06-21 16:54 UTC (permalink / raw)
To: Mark Yacoub; +Cc: igt-dev
== Series Details ==
Series: lib/igt_fb: Support Tile Size for AMD non linear modifiers. (rev2)
URL : https://patchwork.freedesktop.org/series/89017/
State : warning
== Summary ==
Pipeline status: FAILED.
see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/344312 for the overview.
build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109263):
[16/836] Linking static target lib/libigt-igt_kms_c.a.
[17/836] Linking static target lib/libigt-igt_draw_c.a.
[18/836] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
cc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -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/libdrm/nouveau -I/usr/include/x86_64-linux-gnu -I/usr/include/valgrind -I/usr/include/alsa -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-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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
const int bytes_per_pixel = fb_bpp / 8;
^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
const int width_log2 = (pixel_log2 1) / 2;
~ ^ ~
)
ninja: build stopped: subcommand failed.
section_end:1624294321:step_script
section_start:1624294321:cleanup_file_variables
Cleaning up file based variables
section_end:1624294322:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-debian-meson-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109266):
[15/794] Linking static target lib/libigt-igt_kms_c.a.
[16/794] Linking static target lib/libigt-igt_core_c.a.
[17/794] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
/usr/bin/aarch64-linux-gnu-gcc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I../lib/stubs/drm -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/aarch64-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/libdrm/nouveau -I/usr/include/aarch64-linux-gnu -I/usr/include/valgrind -I/usr/include/alsa -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-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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
const int bytes_per_pixel = fb_bpp / 8;
^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
const int width_log2 = (pixel_log2 1) / 2;
~ ^ ~
)
ninja: build stopped: subcommand failed.
section_end:1624294354:step_script
section_start:1624294354:cleanup_file_variables
Cleaning up file based variables
section_end:1624294359:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109265):
[19/773] Linking static target lib/libigt-igt_kms_c.a.
[20/773] Linking static target lib/libigt-igt_draw_c.a.
[21/773] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
/usr/bin/arm-linux-gnueabihf-gcc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I../lib/stubs/drm -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/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/libdrm/nouveau -I/usr/include/arm-linux-gnueabihf -I/usr/include/valgrind -I/usr/include/alsa -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-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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
const int bytes_per_pixel = fb_bpp / 8;
^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
const int width_log2 = (pixel_log2 1) / 2;
~ ^ ~
)
ninja: build stopped: subcommand failed.
section_end:1624294330:step_script
section_start:1624294330:cleanup_file_variables
Cleaning up file based variables
section_end:1624294331:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109267):
[20/810] Linking static target lib/libigt-igt_kms_c.a.
[21/810] Linking static target lib/libigt-igt_draw_c.a.
[22/810] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
/usr/bin/mips-linux-gnu-gcc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I../lib/stubs/drm -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/mips-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/libdrm/nouveau -I/usr/include/mips-linux-gnu -I/usr/include/valgrind -I/usr/include/alsa -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-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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
const int bytes_per_pixel = fb_bpp / 8;
^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
const int width_log2 = (pixel_log2 1) / 2;
~ ^ ~
)
ninja: build stopped: subcommand failed.
section_end:1624294356:step_script
section_start:1624294356:cleanup_file_variables
Cleaning up file based variables
section_end:1624294359:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-debian-minimal has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109264):
[9/235] Linking static target lib/libigt-igt_kms_c.a.
[10/235] Linking static target lib/libigt-igt_core_c.a.
[11/235] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
cc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I../lib/stubs/drm -I../lib/stubs/libunwind -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 -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-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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
const int bytes_per_pixel = fb_bpp / 8;
^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
const int width_log2 = (pixel_log2 1) / 2;
~ ^ ~
)
ninja: build stopped: subcommand failed.
section_end:1624294322:step_script
section_start:1624294322:cleanup_file_variables
Cleaning up file based variables
section_end:1624294323:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109258):
[9/831] Linking static target lib/libigt-rendercopy_gen9_c.a.
[10/831] Linking static target lib/libigt-igt_kms_c.a.
[11/831] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
cc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/valgrind -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="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
402 | const int bytes_per_pixel = fb_bpp / 8;
| ^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
405 | const int width_log2 = (pixel_log2 1) / 2;
| ~ ^ ~
| )
ninja: build stopped: subcommand failed.
section_end:1624294327:step_script
section_start:1624294327:cleanup_file_variables
Cleaning up file based variables
section_end:1624294330:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109262):
[3/828] Linking static target lib/libigt-rendercopy_gen8_c.a.
[4/828] Linking static target lib/libigt-rendercopy_gen9_c.a.
[5/828] Linking static target lib/libigt-igt_kms_c.a.
[6/828] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
clang -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/valgrind -Xclang -fcolor-diagnostics -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 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c:405:39: error: expected ')'
const int width_log2 = (pixel_log2 1) / 2;
^
../lib/igt_fb.c:405:26: note: to match this '('
const int width_log2 = (pixel_log2 1) / 2;
^
1 error generated.
ninja: build stopped: subcommand failed.
section_end:1624294337:step_script
section_start:1624294337:cleanup_file_variables
Cleaning up file based variables
section_end:1624294338:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109261):
[6/761] Linking static target lib/libigt-igt_kms_c.a.
[7/761] Linking static target lib/libigt-igt_core_c.a.
[8/761] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
cc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I../lib/stubs/drm -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/valgrind -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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
402 | const int bytes_per_pixel = fb_bpp / 8;
| ^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
405 | const int width_log2 = (pixel_log2 1) / 2;
| ~ ^ ~
| )
ninja: build stopped: subcommand failed.
section_end:1624294322:step_script
section_start:1624294322:cleanup_file_variables
Cleaning up file based variables
section_end:1624294323:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109259):
[6/831] Linking static target lib/libigt-rendercopy_gen8_c.a.
[7/831] Linking static target lib/libigt-igt_kms_c.a.
[8/831] Compiling C object 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o
cc -Ilib/76b5a35@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I../lib/stubs/libunwind -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/valgrind -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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/76b5a35@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
402 | const int bytes_per_pixel = fb_bpp / 8;
| ^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
405 | const int width_log2 = (pixel_log2 1) / 2;
| ~ ^ ~
| )
ninja: build stopped: subcommand failed.
section_end:1624294330:step_script
section_start:1624294330:cleanup_file_variables
Cleaning up file based variables
section_end:1624294332:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/11109260):
[6/892] Linking static target lib/libigt-igt_kms_c.a.
[7/892] Compiling C object 'lib/lib@@i915_perf@sha/meson-generated_.._i915_perf_registers_tglgt1.c.o'.
[8/892] Compiling C object 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o'.
FAILED: lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o
cc -Ilib/lib@@igt-igt_fb_c@sta -Ilib -I../lib -I../include/drm-uapi -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/valgrind -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="/usr/local/share/igt-gpu-tools"' '-DIGT_SRCDIR="/builds/gfx-ci/igt-ci-tags/tests"' '-DIGT_LOG_DOMAIN="igt_fb"' -MD -MQ 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o' -MF 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o.d' -o 'lib/lib@@igt-igt_fb_c@sta/igt_fb.c.o' -c ../lib/igt_fb.c
../lib/igt_fb.c: In function ‘igt_get_fb_tile_size’:
../lib/igt_fb.c:402:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
402 | const int bytes_per_pixel = fb_bpp / 8;
| ^~~~~
../lib/igt_fb.c:405:37: error: expected ‘)’ before numeric constant
405 | const int width_log2 = (pixel_log2 1) / 2;
| ~ ^ ~
| )
ninja: build stopped: subcommand failed.
section_end:1624294330:step_script
section_start:1624294330:cleanup_file_variables
Cleaning up file based variables
section_end:1624294332:cleanup_file_variables
ERROR: Job failed: exit code 1
== Logs ==
For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/344312
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers.
2021-06-23 6:15 ` Petri Latvala
@ 2021-07-06 12:35 ` Rodrigo Siqueira
0 siblings, 0 replies; 7+ messages in thread
From: Rodrigo Siqueira @ 2021-07-06 12:35 UTC (permalink / raw)
To: Petri Latvala; +Cc: igt-dev, Mark Yacoub, seanpaul, bas
[-- Attachment #1.1: Type: text/plain, Size: 2231 bytes --]
On 06/23, Petri Latvala wrote:
> On Tue, Jun 22, 2021 at 02:11:52PM -0400, Rodrigo Siqueira wrote:
> > On 06/21, Mark Yacoub wrote:
> > > From: Mark Yacoub <markyacoub@google.com>
> > >
> > > Calculate the width and height of the tile on amdgpu when the modifier
> > > is not linear.
> > >
> > > v1:
> > > Change width_ret to bytes not pixels.
> > >
> > > Cc: bas@basnieuwenhuizen.nl
> > > Cc: daniel.vetter@ffwll.ch
> > > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > > Change-Id: I30849ee1368fc626d1ce2826fb726cd76565a449
> > > ---
> > > lib/igt_fb.c | 13 +++++++++++++
> > > 1 file changed, 13 insertions(+)
> > >
> > > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > > index 71b89855..a3926dc9 100644
> > > --- a/lib/igt_fb.c
> > > +++ b/lib/igt_fb.c
> > > @@ -396,6 +396,19 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
> > > vc4_modifier_param = fourcc_mod_broadcom_param(modifier);
> > > modifier = fourcc_mod_broadcom_mod(modifier);
> > > }
> > > + // For all non-linear modifiers, AMD uses 64 KiB tiles
> > > + else if (IS_AMD_FMT_MOD(modifier)) {
> > > + igt_require_amdgpu(fd);
> > > + const int bytes_per_pixel = fb_bpp / 8;
> > > + const int format_log2 = log2(bytes_per_pixel);
> > > + const int pixel_log2 = log2(64 * 1024) - format_log2;
> > > + const int width_log2 = (pixel_log2 + 1) / 2;
> > > + const int height_log2 = pixel_log2 - width_log2;
> > > +
> > > + *width_ret = bytes_per_pixel << width_log2;
> > > + *height_ret = 1 << height_log2;
> > > + return;
> > > + }
> >
> > Hi Mark,
> >
> > This patch lgtm,
> >
> > Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> >
> > However, let's check if Bas has any comment about it.
> >
> > Btw, is the CI failure a false positive?
>
> Looks like those results are caused by the regression in the kernel we
> had for a bit. I queued this patch for a re-test.
Hi Petri,
Thanks a lot for queued the path for re-test. I can see that everything
is looks good now:
https://patchwork.freedesktop.org/series/89017/
I'm going to apply it.
Thanks
Siqueira
>
> --
> Petri Latvala
--
Rodrigo Siqueira
https://siqueira.tech
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers.
2021-06-22 18:11 ` Rodrigo Siqueira
@ 2021-06-23 6:15 ` Petri Latvala
2021-07-06 12:35 ` Rodrigo Siqueira
0 siblings, 1 reply; 7+ messages in thread
From: Petri Latvala @ 2021-06-23 6:15 UTC (permalink / raw)
To: Rodrigo Siqueira; +Cc: igt-dev, Mark Yacoub, seanpaul, bas
On Tue, Jun 22, 2021 at 02:11:52PM -0400, Rodrigo Siqueira wrote:
> On 06/21, Mark Yacoub wrote:
> > From: Mark Yacoub <markyacoub@google.com>
> >
> > Calculate the width and height of the tile on amdgpu when the modifier
> > is not linear.
> >
> > v1:
> > Change width_ret to bytes not pixels.
> >
> > Cc: bas@basnieuwenhuizen.nl
> > Cc: daniel.vetter@ffwll.ch
> > Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> > Change-Id: I30849ee1368fc626d1ce2826fb726cd76565a449
> > ---
> > lib/igt_fb.c | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index 71b89855..a3926dc9 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -396,6 +396,19 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
> > vc4_modifier_param = fourcc_mod_broadcom_param(modifier);
> > modifier = fourcc_mod_broadcom_mod(modifier);
> > }
> > + // For all non-linear modifiers, AMD uses 64 KiB tiles
> > + else if (IS_AMD_FMT_MOD(modifier)) {
> > + igt_require_amdgpu(fd);
> > + const int bytes_per_pixel = fb_bpp / 8;
> > + const int format_log2 = log2(bytes_per_pixel);
> > + const int pixel_log2 = log2(64 * 1024) - format_log2;
> > + const int width_log2 = (pixel_log2 + 1) / 2;
> > + const int height_log2 = pixel_log2 - width_log2;
> > +
> > + *width_ret = bytes_per_pixel << width_log2;
> > + *height_ret = 1 << height_log2;
> > + return;
> > + }
>
> Hi Mark,
>
> This patch lgtm,
>
> Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>
> However, let's check if Bas has any comment about it.
>
> Btw, is the CI failure a false positive?
Looks like those results are caused by the regression in the kernel we
had for a bit. I queued this patch for a re-test.
--
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers.
2021-06-21 17:21 [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers Mark Yacoub
@ 2021-06-22 18:11 ` Rodrigo Siqueira
2021-06-23 6:15 ` Petri Latvala
0 siblings, 1 reply; 7+ messages in thread
From: Rodrigo Siqueira @ 2021-06-22 18:11 UTC (permalink / raw)
To: Mark Yacoub; +Cc: igt-dev, Mark Yacoub, seanpaul, petri.latvala, bas
On 06/21, Mark Yacoub wrote:
> From: Mark Yacoub <markyacoub@google.com>
>
> Calculate the width and height of the tile on amdgpu when the modifier
> is not linear.
>
> v1:
> Change width_ret to bytes not pixels.
>
> Cc: bas@basnieuwenhuizen.nl
> Cc: daniel.vetter@ffwll.ch
> Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
> Change-Id: I30849ee1368fc626d1ce2826fb726cd76565a449
> ---
> lib/igt_fb.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index 71b89855..a3926dc9 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -396,6 +396,19 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
> vc4_modifier_param = fourcc_mod_broadcom_param(modifier);
> modifier = fourcc_mod_broadcom_mod(modifier);
> }
> + // For all non-linear modifiers, AMD uses 64 KiB tiles
> + else if (IS_AMD_FMT_MOD(modifier)) {
> + igt_require_amdgpu(fd);
> + const int bytes_per_pixel = fb_bpp / 8;
> + const int format_log2 = log2(bytes_per_pixel);
> + const int pixel_log2 = log2(64 * 1024) - format_log2;
> + const int width_log2 = (pixel_log2 + 1) / 2;
> + const int height_log2 = pixel_log2 - width_log2;
> +
> + *width_ret = bytes_per_pixel << width_log2;
> + *height_ret = 1 << height_log2;
> + return;
> + }
Hi Mark,
This patch lgtm,
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
However, let's check if Bas has any comment about it.
Btw, is the CI failure a false positive?
Thanks
>
> switch (modifier) {
> case LOCAL_DRM_FORMAT_MOD_NONE:
> --
> 2.32.0.288.g62a8d224e6-goog
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Figt-dev&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7C9bb62f4ec1014d6c59c508d934d9127e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637598929185530952%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1D6ewDi%2FlMRkDjtg94ZNeaxHQFJhfMrYAbKLGQ2%2F9DA%3D&reserved=0
--
Rodrigo Siqueira
https://siqueira.tech
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers.
@ 2021-06-21 17:21 Mark Yacoub
2021-06-22 18:11 ` Rodrigo Siqueira
0 siblings, 1 reply; 7+ messages in thread
From: Mark Yacoub @ 2021-06-21 17:21 UTC (permalink / raw)
To: igt-dev; +Cc: petri.latvala, bas, seanpaul, Mark Yacoub
From: Mark Yacoub <markyacoub@google.com>
Calculate the width and height of the tile on amdgpu when the modifier
is not linear.
v1:
Change width_ret to bytes not pixels.
Cc: bas@basnieuwenhuizen.nl
Cc: daniel.vetter@ffwll.ch
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Change-Id: I30849ee1368fc626d1ce2826fb726cd76565a449
---
lib/igt_fb.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 71b89855..a3926dc9 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -396,6 +396,19 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
vc4_modifier_param = fourcc_mod_broadcom_param(modifier);
modifier = fourcc_mod_broadcom_mod(modifier);
}
+ // For all non-linear modifiers, AMD uses 64 KiB tiles
+ else if (IS_AMD_FMT_MOD(modifier)) {
+ igt_require_amdgpu(fd);
+ const int bytes_per_pixel = fb_bpp / 8;
+ const int format_log2 = log2(bytes_per_pixel);
+ const int pixel_log2 = log2(64 * 1024) - format_log2;
+ const int width_log2 = (pixel_log2 + 1) / 2;
+ const int height_log2 = pixel_log2 - width_log2;
+
+ *width_ret = bytes_per_pixel << width_log2;
+ *height_ret = 1 << height_log2;
+ return;
+ }
switch (modifier) {
case LOCAL_DRM_FORMAT_MOD_NONE:
--
2.32.0.288.g62a8d224e6-goog
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-07-06 12:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 15:41 [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers Mark Yacoub
2021-06-21 16:50 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_fb: Support Tile Size for AMD non linear modifiers. (rev2) Patchwork
2021-06-21 16:54 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-06-21 17:21 [igt-dev] [PATCH v2] lib/igt_fb: Support Tile Size for AMD non linear modifiers Mark Yacoub
2021-06-22 18:11 ` Rodrigo Siqueira
2021-06-23 6:15 ` Petri Latvala
2021-07-06 12:35 ` Rodrigo Siqueira
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.