From: Alex Hung <alex.hung@amd.com>
To: Aurabindo Pillai <aurabindo.pillai@amd.com>,
igt-dev@lists.freedesktop.org
Cc: hersenxs.wu@amd.com
Subject: Re: [igt-dev] [PATCH i-g-t v2 3/5] lib/amd: improve readablity for MALL capability check
Date: Tue, 7 Nov 2023 23:39:33 -0700 [thread overview]
Message-ID: <314938e1-4163-4923-a902-e817efe0b2d4@amd.com> (raw)
In-Reply-To: <20231103182230.1039191-4-aurabindo.pillai@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 2023-11-03 12:22, Aurabindo Pillai wrote:
> Move the hard coded string out of the function and define
> an identifier for checking MALL supported/enabled status
>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> ---
> lib/igt_amd.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_amd.c b/lib/igt_amd.c
> index 8c736b3e2..177a1094d 100644
> --- a/lib/igt_amd.c
> +++ b/lib/igt_amd.c
> @@ -45,6 +45,8 @@
> #define Y6 64
> #define Y7 128
>
> +#define mall_supported "mall supported: yes"
> +#define mall_enabled "mall supported: yes, enabled: yes"
>
> uint32_t igt_amd_create_bo(int fd, uint64_t size)
> {
> @@ -1192,11 +1194,11 @@ void igt_amd_get_mall_status(int drm_fd, bool *supported, bool *enabled)
> if (!get_dm_capabilities(drm_fd, buf, 1024))
> return;
>
> - mall_loc = strstr(buf, "mall supported: yes");
> + mall_loc = strstr(buf, mall_supported);
> if (mall_loc)
> *supported = true;
>
> - mall_loc = strstr(buf, "enabled: yes");
> + mall_loc = strstr(buf, mall_enabled);
> if (mall_loc && *supported)
> *enabled = true;
> }
next prev parent reply other threads:[~2023-11-08 6:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 18:22 [igt-dev] [PATCH i-g-t v2 0/5] Add a new test for Sub-viewport Aurabindo Pillai
2023-11-03 18:22 ` [igt-dev] [PATCH i-g-t v2 1/5] lib/amdgpu: Remove unused struct Aurabindo Pillai
2023-11-08 6:38 ` Alex Hung
2023-11-03 18:22 ` [igt-dev] [PATCH i-g-t v2 2/5] llib/amd: Update function documentation Aurabindo Pillai
2023-11-08 6:38 ` Alex Hung
2023-11-03 18:22 ` [igt-dev] [PATCH i-g-t v2 3/5] lib/amd: improve readablity for MALL capability check Aurabindo Pillai
2023-11-08 6:39 ` Alex Hung [this message]
2023-11-03 18:22 ` [igt-dev] [PATCH i-g-t v2 4/5] lib/amd: Add check for SubVP feature status Aurabindo Pillai
2023-11-08 6:40 ` Alex Hung
2023-11-03 18:22 ` [igt-dev] [PATCH i-g-t v2 5/5] test/amdgpu: Add test for Sub-viewport Aurabindo Pillai
2023-11-03 18:25 ` Aurabindo Pillai
2023-11-08 6:41 ` Alex Hung
2023-11-03 19:31 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add a new " Patchwork
2023-11-06 20:00 ` [igt-dev] [PATCH i-g-t v2 0/5] " Aurabindo Pillai
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=314938e1-4163-4923-a902-e817efe0b2d4@amd.com \
--to=alex.hung@amd.com \
--cc=aurabindo.pillai@amd.com \
--cc=hersenxs.wu@amd.com \
--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: 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