From: Tomeu Vizoso <tomeu.vizoso@collabora.com> To: Development mailing list for IGT GPU Tools <igt-dev@lists.freedesktop.org> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>, dri-devel@lists.freedesktop.org Subject: [PATCH i-g-t 2/2] tests/panfrost: Fix couple of things so submit tests work on T720 Date: Wed, 12 Jun 2019 08:55:30 +0200 [thread overview] Message-ID: <20190612065530.64238-2-tomeu.vizoso@collabora.com> (raw) In-Reply-To: <20190612065530.64238-1-tomeu.vizoso@collabora.com> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> --- tests/panfrost_submit.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/panfrost_submit.c b/tests/panfrost_submit.c index 5770dc24a42b..13ce85b73d9e 100644 --- a/tests/panfrost_submit.c +++ b/tests/panfrost_submit.c @@ -34,10 +34,11 @@ #include <errno.h> #include <sys/stat.h> #include <sys/ioctl.h> +#include "panfrost-job.h" #include "panfrost_drm.h" -#define WIDTH 1366 -#define HEIGHT 768 +#define WIDTH 1920 +#define HEIGHT 1080 #define CLEAR_COLOR 0xff7f7f7f /* One tenth of a second */ @@ -56,14 +57,30 @@ abs_timeout(uint64_t duration) return (uint64_t)current.tv_sec * NSECS_PER_SEC + current.tv_nsec + duration; } +static void check_error(int fd, struct panfrost_submit *submit) +{ + struct mali_job_descriptor_header *header; + + header = submit->submit_bo->map; + igt_assert_eq_u64(header->fault_pointer, 0); +} + static void check_fb(int fd, struct panfrost_bo *bo) { + int gpu_prod_id = igt_panfrost_get_param(fd, DRM_PANFROST_PARAM_GPU_PROD_ID); __uint32_t *fbo; int i; fbo = bo->map; - for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) - igt_assert_eq_u32(fbo[i], CLEAR_COLOR); + + if (gpu_prod_id >= 0x0750) { + for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) + igt_assert_eq_u32(fbo[i], CLEAR_COLOR); + } else { + // Mask the alpha away because on <=T720 we don't know how to have it + for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) + igt_assert_eq_u32(fbo[i], CLEAR_COLOR & 0x00ffffff); + } } igt_main @@ -84,6 +101,7 @@ igt_main do_ioctl(fd, DRM_IOCTL_PANFROST_SUBMIT, submit->args); igt_assert(syncobj_wait(fd, &submit->args->out_sync, 1, abs_timeout(SHORT_TIME_NSEC), 0, NULL)); + check_error(fd, submit); check_fb(fd, submit->fbo); igt_panfrost_free_job(fd, submit); } -- 2.20.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Tomeu Vizoso <tomeu.vizoso@collabora.com> To: Development mailing list for IGT GPU Tools <igt-dev@lists.freedesktop.org> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>, dri-devel@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t 2/2] tests/panfrost: Fix couple of things so submit tests work on T720 Date: Wed, 12 Jun 2019 08:55:30 +0200 [thread overview] Message-ID: <20190612065530.64238-2-tomeu.vizoso@collabora.com> (raw) In-Reply-To: <20190612065530.64238-1-tomeu.vizoso@collabora.com> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> --- tests/panfrost_submit.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/panfrost_submit.c b/tests/panfrost_submit.c index 5770dc24a42b..13ce85b73d9e 100644 --- a/tests/panfrost_submit.c +++ b/tests/panfrost_submit.c @@ -34,10 +34,11 @@ #include <errno.h> #include <sys/stat.h> #include <sys/ioctl.h> +#include "panfrost-job.h" #include "panfrost_drm.h" -#define WIDTH 1366 -#define HEIGHT 768 +#define WIDTH 1920 +#define HEIGHT 1080 #define CLEAR_COLOR 0xff7f7f7f /* One tenth of a second */ @@ -56,14 +57,30 @@ abs_timeout(uint64_t duration) return (uint64_t)current.tv_sec * NSECS_PER_SEC + current.tv_nsec + duration; } +static void check_error(int fd, struct panfrost_submit *submit) +{ + struct mali_job_descriptor_header *header; + + header = submit->submit_bo->map; + igt_assert_eq_u64(header->fault_pointer, 0); +} + static void check_fb(int fd, struct panfrost_bo *bo) { + int gpu_prod_id = igt_panfrost_get_param(fd, DRM_PANFROST_PARAM_GPU_PROD_ID); __uint32_t *fbo; int i; fbo = bo->map; - for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) - igt_assert_eq_u32(fbo[i], CLEAR_COLOR); + + if (gpu_prod_id >= 0x0750) { + for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) + igt_assert_eq_u32(fbo[i], CLEAR_COLOR); + } else { + // Mask the alpha away because on <=T720 we don't know how to have it + for (i = 0; i < ALIGN(WIDTH, 16) * HEIGHT; i++) + igt_assert_eq_u32(fbo[i], CLEAR_COLOR & 0x00ffffff); + } } igt_main @@ -84,6 +101,7 @@ igt_main do_ioctl(fd, DRM_IOCTL_PANFROST_SUBMIT, submit->args); igt_assert(syncobj_wait(fd, &submit->args->out_sync, 1, abs_timeout(SHORT_TIME_NSEC), 0, NULL)); + check_error(fd, submit); check_fb(fd, submit->fbo); igt_panfrost_free_job(fd, submit); } -- 2.20.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-06-12 6:55 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-12 6:55 [PATCH i-g-t 1/2] lib/panfrost: Add support for SFBD to igt_panfrost_trivial_job Tomeu Vizoso 2019-06-12 6:55 ` [igt-dev] " Tomeu Vizoso 2019-06-12 6:55 ` Tomeu Vizoso [this message] 2019-06-12 6:55 ` [igt-dev] [PATCH i-g-t 2/2] tests/panfrost: Fix couple of things so submit tests work on T720 Tomeu Vizoso 2019-06-12 7:52 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] lib/panfrost: Add support for SFBD to igt_panfrost_trivial_job Patchwork
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190612065530.64238-2-tomeu.vizoso@collabora.com \ --to=tomeu.vizoso@collabora.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=igt-dev@lists.freedesktop.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.