From: Hersen Wu <hersenxs.wu@amd.com>
To: <igt-dev@lists.freedesktop.org>, <rodrigo.siqueira@amd.com>,
<aurabindo.pillai@amd.com>, <alex.hung@amd.com>,
<stylon.wang@amd.com>, <hamza.mahfooz@amd.com>
Cc: Hersen Wu <hersenxs.wu@amd.com>
Subject: [igt-dev] [PATCH] [i-g-t] tests/amdgpu/amd_color: fix test crash within crtc_lut_accuracy
Date: Tue, 20 Jun 2023 09:54:25 -0400 [thread overview]
Message-ID: <20230620135425.32639-1-hersenxs.wu@amd.com> (raw)
Add reading degamma_lut_size and regamma_lut_size from Linux kernel.
Test crash when lut_size equals to zero.
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
---
tests/amdgpu/amd_color.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/amdgpu/amd_color.c b/tests/amdgpu/amd_color.c
index 9eed1da38..97a3c16ec 100644
--- a/tests/amdgpu/amd_color.c
+++ b/tests/amdgpu/amd_color.c
@@ -340,6 +340,14 @@ static void test_crtc_lut_accuracy(data_t *data)
igt_require(igt_pipe_obj_has_prop(data->pipe, IGT_CRTC_DEGAMMA_LUT));
igt_require(igt_pipe_obj_has_prop(data->pipe, IGT_CRTC_GAMMA_LUT));
+ data->degamma_lut_size =
+ igt_pipe_obj_get_prop(data->pipe, IGT_CRTC_DEGAMMA_LUT_SIZE);
+ igt_assert_lt(0, data->degamma_lut_size);
+
+ data->regamma_lut_size =
+ igt_pipe_obj_get_prop(data->pipe, IGT_CRTC_GAMMA_LUT_SIZE);
+ igt_assert_lt(0, data->regamma_lut_size);
+
lut_init(&lut_degamma, data->degamma_lut_size);
lut_gen_degamma_srgb(&lut_degamma, 0xffff);
--
2.25.1
next reply other threads:[~2023-06-20 13:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-20 13:54 Hersen Wu [this message]
2023-06-20 14:48 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/amdgpu/amd_color: fix test crash within crtc_lut_accuracy Patchwork
2023-06-20 17:21 ` [igt-dev] [PATCH] [i-g-t] " Alex Hung
2023-06-20 20:08 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2023-06-26 19:55 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/amdgpu/amd_color: fix test crash within crtc_lut_accuracy (rev2) Patchwork
2023-06-27 16:05 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/amdgpu/amd_color: fix test crash within crtc_lut_accuracy (rev3) Patchwork
2023-06-28 14:31 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/amdgpu/amd_color: fix test crash within crtc_lut_accuracy (rev4) 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=20230620135425.32639-1-hersenxs.wu@amd.com \
--to=hersenxs.wu@amd.com \
--cc=alex.hung@amd.com \
--cc=aurabindo.pillai@amd.com \
--cc=hamza.mahfooz@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=rodrigo.siqueira@amd.com \
--cc=stylon.wang@amd.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