Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@intel.com>
To: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <suraj.kandpal@intel.com>, <swati2.sharma@intel.com>
Subject: Re: [PATCH i-g-t v1] tests/intel/kms_pm_backlight: Add brightness-with-suspend subtest
Date: Wed, 13 May 2026 08:38:36 +0530	[thread overview]
Message-ID: <4bb85e06-d16a-4a54-bb7b-2e190a2c21f4@intel.com> (raw)
In-Reply-To: <20260512112019.676242-1-santhosh.reddy.guddati@intel.com>

Hi Santhosh,

On 5/12/2026 4:50 PM, Santhosh Reddy Guddati wrote:
> Verify backlight brightness is preserved after suspend resume cycle,
> The test sets backlight to  a value , suspend the system and checks the
> brightness value is preserved after resume.
>
> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati@intel.com>
> ---
>   tests/intel/kms_pm_backlight.c | 26 ++++++++++++++++++++++++++
>   1 file changed, 26 insertions(+)
>
> diff --git a/tests/intel/kms_pm_backlight.c b/tests/intel/kms_pm_backlight.c
> index 58c0b4427..c2228986e 100644
> --- a/tests/intel/kms_pm_backlight.c
> +++ b/tests/intel/kms_pm_backlight.c
> @@ -65,6 +65,9 @@
>    *
>    * SUBTEST: brightness-with-dpms
>    * Description: test brightness with dpms on and off cycle.
> + *
> + * SUBTEST: brightness-with-suspend
> + * Description: Test that brightness set before suspend is preserved after resume.
>    */
>   
>   enum {
> @@ -72,6 +75,7 @@ enum {
>   	TEST_DPMS,
>   	TEST_DPMS_CYCLE,
>   	TEST_SUSPEND,
> +	TEST_SUSPEND_CYCLE,
This enum is unused, can we use TEST_NONE if we need a default enum?
>   };
>   
>   #define TOLERANCE 5 /* percent */
> @@ -188,6 +192,8 @@ static void check_dpms_cycle(igt_backlight_context_t *context)
>   {
>   	int max, val_1, val_2;
>   
> +	printf("Toggling DPMS...\n");
> +

Please remove this stray print as this is unrelated to the new test 
being added.

Regards,
Karthik.B.S
>   	igt_backlight_read(&max, "max_brightness", context);
>   	igt_assert(max);
>   
> @@ -206,6 +212,24 @@ check_suspend(igt_output_t *output)
>   	igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
>   }
>   
> +static void check_suspend_cycle(igt_backlight_context_t *context)
> +{
> +	int max, val1, val2;
> +
> +	igt_backlight_read(&max, "max_brightness", context);
> +	igt_assert(max);
> +
> +	igt_backlight_write(max / 2, "brightness", context);
> +	igt_backlight_read(&val1, "actual_brightness", context);
> +
> +	igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
> +
> +	igt_backlight_read(&val2, "actual_brightness", context);
> +	igt_assert_f(val2 == val1,
> +		     "actual_brightness after resume [%d] does not match value before suspend [%d]\n",
> +		     val2, val1);
> +}
> +
>   static void test_cleanup(igt_display_t *display, igt_backlight_context_t *context)
>   {
>   	igt_output_t *output = context->output;
> @@ -273,6 +297,8 @@ int igt_main()
>   		{ "brightness-with-dpms", "test brightness with dpms on and off cycle.",
>   		   check_dpms_cycle, TEST_DPMS_CYCLE},
>   		{ "fade-with-suspend", "test the fade with suspend.", test_fade, TEST_SUSPEND },
> +		{ "brightness-with-suspend", "test brightness is preserved after suspend/resume.",
> +		   check_suspend_cycle, TEST_SUSPEND_CYCLE },
>   	};
>   
>   	igt_fixture() {

  parent reply	other threads:[~2026-05-13  3:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 11:20 [PATCH i-g-t v1] tests/intel/kms_pm_backlight: Add brightness-with-suspend subtest Santhosh Reddy Guddati
2026-05-12 21:27 ` ✓ i915.CI.BAT: success for " Patchwork
2026-05-12 22:33 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-13  3:08 ` Karthik B S [this message]
2026-05-13 14:01 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-13 20:46 ` ✗ i915.CI.Full: " 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=4bb85e06-d16a-4a54-bb7b-2e190a2c21f4@intel.com \
    --to=karthik.b.s@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=santhosh.reddy.guddati@intel.com \
    --cc=suraj.kandpal@intel.com \
    --cc=swati2.sharma@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