From: Francois Dugast <francois.dugast@intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2 4/9] lib/intel_compute: Add name field for debugging purposes
Date: Fri, 8 Sep 2023 11:05:50 +0200 [thread overview]
Message-ID: <ZPrj7sWRRgHbqnbn@fdugast-desk.home> (raw)
In-Reply-To: <20230905133309.365109-5-zbigniew.kempczynski@intel.com>
On Tue, Sep 05, 2023 at 03:33:04PM +0200, Zbigniew Kempczyński wrote:
> Debugging without knowledge about object characteristics is hard and
> time consuming. Simple name field added for printing binded addresses
> and their sizes might speed up development. I experienced this on
> extending to DG2 so I decided to permanently add it. But to avoid
> annoying output this is limited to igt_debug() which will print
> only on user request or on the test failure.
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Christoph Manszewski <christoph.manszewski@intel.com>
> Cc: Francois Dugast <francois.dugast@intel.com>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
> ---
> lib/intel_compute.c | 33 ++++++++++++++++++++++++++-------
> 1 file changed, 26 insertions(+), 7 deletions(-)
>
> diff --git a/lib/intel_compute.c b/lib/intel_compute.c
> index b42f3eca0e..a1e87ef46f 100644
> --- a/lib/intel_compute.c
> +++ b/lib/intel_compute.c
> @@ -37,6 +37,7 @@ struct bo_dict_entry {
> uint64_t addr;
> uint32_t size;
> void *data;
> + const char *name;
> };
>
> struct bo_execenv {
> @@ -92,6 +93,11 @@ static void bo_execenv_bind(struct bo_execenv *execenv,
> bo_dict[i].addr, bo_dict[i].size, &sync, 1);
> syncobj_wait(fd, &sync.handle, 1, INT64_MAX, 0, NULL);
> memset(bo_dict[i].data, 0, bo_dict[i].size);
> +
> + igt_debug("[i: %2d name: %20s] data: %p, addr: %16llx, size: %llx\n",
> + i, bo_dict[i].name, bo_dict[i].data,
> + (long long)bo_dict[i].addr,
> + (long long)bo_dict[i].size);
> }
>
> syncobj_destroy(fd, sync.handle);
> @@ -480,13 +486,26 @@ static void tgl_compute_exec(int fd, const unsigned char *kernel,
> {
> #define TGL_BO_DICT_ENTRIES 7
> struct bo_dict_entry bo_dict[TGL_BO_DICT_ENTRIES] = {
> - { .addr = ADDR_INDIRECT_OBJECT_BASE + OFFSET_KERNEL}, // kernel
> - { .addr = ADDR_DYNAMIC_STATE_BASE, .size = 0x1000}, // dynamic state
> - { .addr = ADDR_SURFACE_STATE_BASE, .size = 0x1000}, // surface state
> - { .addr = ADDR_INDIRECT_OBJECT_BASE + OFFSET_INDIRECT_DATA_START, .size = 0x10000}, // indirect data
> - { .addr = ADDR_INPUT, .size = SIZE_BUFFER_INPUT }, // input
> - { .addr = ADDR_OUTPUT, .size = SIZE_BUFFER_OUTPUT }, // output
> - { .addr = ADDR_BATCH, .size = SIZE_BATCH }, // batch
> + { .addr = ADDR_INDIRECT_OBJECT_BASE + OFFSET_KERNEL,
> + .name = "kernel" },
> + { .addr = ADDR_DYNAMIC_STATE_BASE,
> + .size = 0x1000,
> + .name = "dynamic state base" },
> + { .addr = ADDR_SURFACE_STATE_BASE,
> + .size = 0x1000,
> + .name = "surface state base" },
> + { .addr = ADDR_INDIRECT_OBJECT_BASE + OFFSET_INDIRECT_DATA_START,
> + .size = 0x10000,
> + .name = "indirect data start" },
> + { .addr = ADDR_INPUT,
> + .size = SIZE_BUFFER_INPUT,
> + .name = "input" },
> + { .addr = ADDR_OUTPUT,
> + .size = SIZE_BUFFER_OUTPUT,
> + .name = "output" },
> + { .addr = ADDR_BATCH,
> + .size = SIZE_BATCH,
> + .name = "batch" },
> };
> struct bo_execenv execenv;
> float *dinput;
> --
> 2.34.1
>
next prev parent reply other threads:[~2023-09-08 9:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 13:33 [igt-dev] [PATCH i-g-t v2 0/9] Extend compute square to i915 and Xe Zbigniew Kempczyński
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 1/9] lib/intel_compute: Migrate xe_compute library to intel_compute Zbigniew Kempczyński
2023-09-06 16:42 ` Kamil Konieczny
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 2/9] lib/intel_compute: Add compatibility flags for running compute Zbigniew Kempczyński
2023-09-08 9:03 ` Francois Dugast
2023-09-08 11:07 ` Zbigniew Kempczyński
2023-09-08 11:29 ` Mauro Carvalho Chehab
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 3/9] lib/intel_compute: Reorganize the code for i915 version preparation Zbigniew Kempczyński
2023-09-08 9:05 ` Francois Dugast
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 4/9] lib/intel_compute: Add name field for debugging purposes Zbigniew Kempczyński
2023-09-08 9:05 ` Francois Dugast [this message]
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 5/9] lib/intel_compute: Add i915 path in compute library Zbigniew Kempczyński
2023-09-08 9:13 ` Francois Dugast
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 6/9] intel/gem_compute: Add test which runs compute workload on i915 Zbigniew Kempczyński
2023-09-08 9:15 ` Francois Dugast
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 7/9] lib/intel_compute: Add XeHP implementation of compute pipeline Zbigniew Kempczyński
2023-09-08 13:55 ` Francois Dugast
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 8/9] lib/intel_compute: Adding pvc compute pipeline implementation Zbigniew Kempczyński
2023-09-08 13:56 ` Francois Dugast
2023-09-05 13:33 ` [igt-dev] [PATCH i-g-t v2 9/9] tests/gem|xe_compute: Update documentation regarding test requirements Zbigniew Kempczyński
2023-09-08 13:56 ` Francois Dugast
2023-09-05 18:23 ` [igt-dev] ✗ Fi.CI.BAT: failure for Extend compute square to i915 and Xe (rev2) 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=ZPrj7sWRRgHbqnbn@fdugast-desk.home \
--to=francois.dugast@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=zbigniew.kempczynski@intel.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox