Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: Hersen Wu <hersenxs.wu@amd.com>,
	igt-dev@lists.freedesktop.org, rodrigo.siqueira@amd.com,
	aurabindo.pillai@amd.com, stylon.wang@amd.com,
	hamza.mahfooz@amd.com
Subject: Re: [igt-dev] [PATCH] [i-g-t] tests/amdgpu/amd_color: fix sub test crtc-lut-accuracy failure
Date: Tue, 20 Jun 2023 14:37:37 -0600	[thread overview]
Message-ID: <c4e91633-c3c4-d809-f228-5e559265e043@amd.com> (raw)
In-Reply-To: <20230620191603.94265-1-hersenxs.wu@amd.com>

Reviewed-by: Alex Hung <alex.hung@amd.com>

On 2023-06-20 13:16, Hersen Wu wrote:
> Add reading degamma_lut_size and regamma_lut_size from Linux kernel
> within test_crtc_lut_accuracy. Test fails within lut_init when
> lut_size equals to zero.
> 
> Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
> ---
>   tests/amdgpu/amd_color.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/amdgpu/amd_color.c b/tests/amdgpu/amd_color.c
> index 9eed1da38..34002ed88 100644
> --- a/tests/amdgpu/amd_color.c
> +++ b/tests/amdgpu/amd_color.c
> @@ -53,7 +53,7 @@ typedef struct data {
>   
>   static void lut_init(lut_t *lut, uint32_t size)
>   {
> -	igt_assert(size > 0);
> +	igt_assert_lt(0, size);
>   
>   	lut->size = size;
>   	lut->data = malloc(size * sizeof(struct drm_color_lut));
> @@ -229,7 +229,6 @@ static void test_crtc_linear_degamma(data_t *data)
>   
>   	data->degamma_lut_size =
>   		igt_pipe_obj_get_prop(data->pipe, IGT_CRTC_DEGAMMA_LUT_SIZE);
> -	igt_assert_lt(0, data->degamma_lut_size);
>   
>   	lut_init(&lut_linear, data->degamma_lut_size);
>   	lut_gen_linear(&lut_linear, 0xffff);
> @@ -277,7 +276,6 @@ static void test_crtc_linear_regamma(data_t *data)
>   
>   	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_linear, data->regamma_lut_size);
>   	lut_gen_linear(&lut_linear, 0xffff);
> @@ -340,6 +338,12 @@ 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);
> +
> +	data->regamma_lut_size =
> +		igt_pipe_obj_get_prop(data->pipe, IGT_CRTC_GAMMA_LUT_SIZE);
> +
>   	lut_init(&lut_degamma, data->degamma_lut_size);
>   	lut_gen_degamma_srgb(&lut_degamma, 0xffff);
>   

  reply	other threads:[~2023-06-20 20:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 19:16 [igt-dev] [PATCH] [i-g-t] tests/amdgpu/amd_color: fix sub test crtc-lut-accuracy failure Hersen Wu
2023-06-20 20:37 ` Alex Hung [this message]
2023-06-20 20:38 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-06-21  3:55 ` [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=c4e91633-c3c4-d809-f228-5e559265e043@amd.com \
    --to=alex.hung@amd.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=hamza.mahfooz@amd.com \
    --cc=hersenxs.wu@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