From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: "Dong, Zhanjun" <zhanjun.dong@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [i-g-t, v2, 01/11] tools/intel_guc_logger: Re-enable basic functionality
Date: Tue, 14 Mar 2023 21:46:27 +0000 [thread overview]
Message-ID: <7421415def6d627b3398b2c17371fac505f7e1df.camel@intel.com> (raw)
In-Reply-To: <5122d036-9fed-3ebd-5680-574596d6b74a@intel.com>
thanks for reviewing - will rerev with below fixes
On Fri, 2023-01-20 at 15:26 -0500, Dong, Zhanjun wrote:
> See my comments inline below.
>
>
> Regards,
>
> Zhanjun Dong
>
>
> On 2022-12-06 3:58 a.m., Alan Previn wrote:
> > Fix these multiple issues to get basic functionality up
> > and running on GuC using:
> >
> >
> >
alan:snip
> > + subbuf_size = tmp[0];
> > + subbuf_count = tmp[1];
> How about define tmp[x] the same data type as subbuf_xxx to avoid type
> rang diff?
> >
> >
sure - will fix
alan:snip
> > - ret = write(control_fd, data, ret);
> > - igt_assert_f(ret > 0, "couldn't write to the log control file\n");
> > +static void guc_log_control(bool enable, uint32_t log_level)
> How about to have the same log_level type among the file?
right - will fix this.
alan:snip
> > +
>
> val could only be 0 or 1 in this function now, no uint64 needed, it
> could be something like:
>
> str = val? "0x1" : "0x0";
>
> No string alloc/free needed.
alan: actually in coming patches more we end up with 3 options "0x1", "0x2" or "0x3".
instead, i could add a local array of 'const char * array_strings = { "0x1", "0x2", "0x3" };'
and use string 'array_strings[val-1]' (after verifying val)?
since its a known short list, we dont need to use the asprintf
alan:snip
> > @@ -404,6 +476,11 @@ int main(int argc, char **argv)
> > int nfds;
> > int ret;
> >
> > + drm_fd = drm_open_driver(DRIVER_INTEL);
> > + igt_assert(drm_fd != -1);
> > + igt_assert_neq(asprintf(&gucfspath, "gt0/uc"), -1);
> > +
> > + get_guc_subbuf_info();
> > process_command_line(argc, argv);
> >
> Can we parse options before open driver? When run with -h, open driver
> is not expected.
alan: as per our offline joint debug: yes definitely :)
next prev parent reply other threads:[~2023-03-14 21:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 8:58 [igt-dev] [PATCH i-g-t v2 00/11] Resurrect GuC Relay Logging Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 01/11] tools/intel_guc_logger: Re-enable basic functionality Alan Previn
2023-01-20 20:26 ` [igt-dev] [i-g-t, v2, " Dong, Zhanjun
2023-03-14 21:46 ` Teres Alexis, Alan Previn [this message]
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 02/11] tools/intel_guc_logger: Refactor intel_guc_logger globals into structs Alan Previn
2023-02-01 0:04 ` [igt-dev] [i-g-t, v2, " Dong, Zhanjun
2023-03-14 21:47 ` Teres Alexis, Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 03/11] tools/intel_guc_logger: Add GT-ID selection for intel_guc_logger Alan Previn
2023-03-14 21:54 ` Teres Alexis, Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 04/11] tools/intel_guc_logger: Add helper function for flusher code Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 05/11] tools/intel_guc_logger: Add GuC Log header structure definition Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 06/11] tools/intel_guc_logger: Concatenate log samples into a contiguous file Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 07/11] tools/intel_guc_logger: Add overflow awareness Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 08/11] tools/intel_guc_logger: Limit relay logging output file to 4GB Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 09/11] tools/intel_guc_logger: By default don't change GuC log verbosity Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 10/11] tools/intel_guc_logger: On exit, save any leftover GuC log data Alan Previn
2022-12-06 8:58 ` [igt-dev] [PATCH i-g-t v2 11/11] tools/intel_guc_logger: Add useful debug messages Alan Previn
2022-12-06 9:41 ` [igt-dev] ✓ Fi.CI.BAT: success for Resurrect GuC Relay Logging (rev2) Patchwork
2022-12-06 11:27 ` [igt-dev] ✓ Fi.CI.IGT: " 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=7421415def6d627b3398b2c17371fac505f7e1df.camel@intel.com \
--to=alan.previn.teres.alexis@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=zhanjun.dong@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