From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t] tests/intel/km_pm_brightness: Check for flickers with changes in brightness
Date: Tue, 10 Sep 2024 00:31:11 +0530 [thread overview]
Message-ID: <8ec4acb2-a420-432b-8b72-4632d778a15d@intel.com> (raw)
In-Reply-To: <20240906025423.507838-1-santhosh.reddy.guddati@intel.com>
Hi Santosh,
Please find review comments below
On 06-Sep-24 8:24 AM, Santhosh Reddy Guddati wrote:
> The test is added to check for flickers on the panel while
This can be rephrased as "New test is added..."
> changing brightness.
>
> If there is any flicker observed on the panel while changing
> the brightness then crc will change.This patch set is trying
^^
Add space after full stop.
> to address the flickers observed using crc when brightness
> is being changed.
>
> v3: Addressed review feedback - Kamil , thasleem
Also, what got changed from previous patch is mentioned in commit
There is extra tab in commit message.
Apart from this, fixes are still required in subject. There is no file
named kms_pm_brightness :/
/s/km_pm_brightness/kms_pm_backlight
Also, subject can be made more meaningful something like
"Add test to detect flickering with brightness changes"
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
> ---
> tests/intel/kms_pm_backlight.c | 41 ++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/tests/intel/kms_pm_backlight.c b/tests/intel/kms_pm_backlight.c
> index 140a95bcc..ae0ef8462 100644
> --- a/tests/intel/kms_pm_backlight.c
> +++ b/tests/intel/kms_pm_backlight.c
> @@ -66,6 +66,10 @@
> * SUBTEST: fade-with-suspend
> * Description: Test the fade with suspend.
> * Functionality: backlight, suspend
> + *
> + * SUBTEST: brightness-with-crc
> + * Description: Test the brightness change with CRC.
> + * Functionality: backlight, CRC
This subtest can be added after "SUBTEST: basic-brightness" to club all
brightness test together and it can be renamed as "basic-crc-brightness".
Functionality as defined in other IGTs is crc. So, /s/CRC/crc.
> */
>
> struct context {
> @@ -257,6 +261,41 @@ static void test_setup(igt_display_t display, igt_output_t *output)
> }
> }
>
> +static void test_brightness_crc(struct context *context)
> +{
> + int min = 0;
> + int max = context->max;
> + int step = (max - min) / 10;
> + int brightness;
> + igt_crc_t out_crc_before, out_crc_after;
> + igt_display_t *display = context->output->display;
> + char *crc_str;
> + igt_pipe_crc_t *ref_crc;
> + bool crc_ok;
> +
> + /* create the pipe_crc object for this pipe */
This comment is not required
> + ref_crc = igt_pipe_crc_new(display->drm_fd, context->output->config.pipe, IGT_PIPE_CRC_SOURCE_AUTO);
> + igt_assert(ref_crc);
> +
> + for (brightness = min; brightness <= max; brightness += step) {
> + igt_pipe_crc_collect_crc(ref_crc, &out_crc_before);
> + crc_str = igt_crc_to_string(&out_crc_before);
> + igt_debug("CRC before write: %s\n", crc_str);
> +
> + igt_assert_eq(backlight_write(brightness, "brightness", context), 0);
> + igt_debug("Brightness after write: %d\n", brightness);
> +
> + igt_pipe_crc_collect_crc(ref_crc, &out_crc_after);
> + crc_str = igt_crc_to_string(&out_crc_after);
> + igt_debug("CRC after write: %s\n", crc_str);
IMO, all all igt_debug prints are not required.
> +
> + /* compare the crc values before and after changing brightness */
> + crc_ok = igt_check_crc_equal(&out_crc_before, &out_crc_after);
In igt_check_crc_equal(), we already have igt_debug to print mismatched
CRC values.
> + igt_debug("brightness: %d flicker: %s\n", brightness, crc_ok ? "none" : "detected");
> + igt_assert_f(crc_ok, "Flicker observed for brightness %d\n", brightness);
> + }
> +}
> +
> igt_main
> {
> int fd;
> @@ -277,6 +316,7 @@ igt_main
> { "fade", "test basic fade.", test_fade, TEST_NONE },
> { "fade-with-dpms", "test the fade with DPMS.", test_fade, TEST_DPMS },
> { "fade-with-suspend", "test the fade with suspend.", test_fade, TEST_SUSPEND },
> + { "brightness-with-crc", "test the brightness change with CRC.", test_brightness_crc, TEST_NONE },
Move it up. Add after brightness tests.
> };
>
> igt_fixture {
> @@ -290,6 +330,7 @@ igt_main
> */
> kmstest_set_vt_graphics_mode();
> igt_display_require(&display, drm_open_driver(DRIVER_INTEL | DRIVER_XE));
> + igt_require_pipe_crc(display.drm_fd);
>
> for_each_connected_output(&display, output) {
> if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
next prev parent reply other threads:[~2024-09-09 19:01 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 3:02 [PATCH i-g-t] tests/km_pm_brightness.c: check for flickers while adjusting the brightness Santhosh Reddy Guddati
2024-06-27 3:29 ` ✓ CI.xeBAT: success for " Patchwork
2024-06-27 3:37 ` ✓ Fi.CI.BAT: " Patchwork
2024-06-27 14:09 ` ✓ CI.xeFULL: " Patchwork
2024-06-28 3:06 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-07-02 17:29 ` [PATCH i-g-t] " Kamil Konieczny
2024-07-10 10:54 ` [PATCH i-g-t] tests/km_pm_brightness: " Santhosh Reddy Guddati
2024-09-05 9:29 ` Thasleem, Mohammed
2024-07-10 16:03 ` ✓ CI.xeBAT: success for tests/km_pm_brightness.c: check for flickers while adjusting the brightness. (rev2) Patchwork
2024-07-10 16:09 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-10 17:23 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-05 9:46 ` [PATCH i-g-t] tests/intel/km_pm_brightness: Check for flickers with changes in brightness Santhosh Reddy Guddati
2024-09-05 9:59 ` Santhosh Reddy Guddati
2024-09-05 21:25 ` ✗ Fi.CI.BUILD: failure for tests/km_pm_brightness.c: check for flickers while adjusting the brightness. (rev4) Patchwork
2024-09-05 21:30 ` ✗ GitLab.Pipeline: warning " Patchwork
2024-09-06 2:54 ` [PATCH i-g-t] tests/intel/km_pm_brightness: Check for flickers with changes in brightness Santhosh Reddy Guddati
2024-09-09 19:01 ` Sharma, Swati2 [this message]
2024-09-06 3:39 ` ✓ CI.xeBAT: success for tests/km_pm_brightness.c: check for flickers while adjusting the brightness. (rev5) Patchwork
2024-09-06 3:57 ` ✓ Fi.CI.BAT: " Patchwork
2024-09-08 6:52 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-10 0:58 ` ✗ Fi.CI.IGT: " Patchwork
2024-09-10 3:46 ` [PATCH i-g-t] tests/intel/kms_pm_backlight: Detect flickering with brightness change Santhosh Reddy Guddati
2024-09-12 0:31 ` ✓ CI.xeBAT: success for tests/km_pm_brightness.c: check for flickers while adjusting the brightness. (rev6) Patchwork
2024-09-12 0:49 ` ✓ Fi.CI.BAT: " Patchwork
2024-09-12 2:55 ` ✗ CI.xeFULL: failure " Patchwork
2024-09-12 8:10 ` ✗ 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=8ec4acb2-a420-432b-8b72-4632d778a15d@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=santhosh.reddy.guddati@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