public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Naladala, Ramanaidu" <Ramanaidu.naladala@intel.com>
To: Karthik B S <karthik.b.s@intel.com>,
	"Kandpal, Suraj" <suraj.kandpal@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Cc: "Sharma, Swati2" <swati2.sharma@intel.com>
Subject: Re: [PATCH i-g-t v2] tests/intel/kms_pm_backlight: Setup output before reading writing backlight
Date: Wed, 8 Apr 2026 10:05:12 +0530	[thread overview]
Message-ID: <a71fdad8-67a3-4283-981a-1de57c737e1e@intel.com> (raw)
In-Reply-To: <c8eb555a-e7b5-49c6-a42d-a1602a39380c@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3155 bytes --]

Hi Suraj,

On 4/7/2026 1:47 PM, Karthik B S wrote:
> Hi Suraj,
>
> On 4/7/2026 11:13 AM, Suraj Kandpal wrote:
>> Currently many pm backlight tests assume that panel will stay up until
>> unless we tell it to go down or AUX transactions are happening.
>> That is not the case, some panels when they detect that there are no
>> changes or commits going in, it will go to a lower power state. This
>> causes issue in this test like AUX suddenly timing out (mostly in
>> fade tests where each backlight change has a 10ms sleep and many
>> steps giving panel to internally go in low power state). Also since
>> changing backlight has its own interface it does not count as a commit
>> hence does not contribute to the panel staying on.
>> Also trying to change a backlight when panel is not up does not make sense.
>> To solve this setup the output and do a flip to make sure panel is not
>> down to simulate a real life use case on when backlight is changed.
>>
>> Signed-off-by: Suraj Kandpal<suraj.kandpal@intel.com>
>> Reviewed-by: Karthik B S<karthik.b.s@intel.com>
>> ---
>> v1 -> v2:
>> - Remove setup and commit function from check dpms as it is not
>> needed there (Karthik)
>>
>>    tests/intel/kms_pm_backlight.c | 20 ++++++++++++++++++++
>>    1 file changed, 20 insertions(+)
>>
>> diff --git a/tests/intel/kms_pm_backlight.c b/tests/intel/kms_pm_backlight.c
>> index daa70c716..f108e8387 100644
>> --- a/tests/intel/kms_pm_backlight.c
>> +++ b/tests/intel/kms_pm_backlight.c
>> @@ -84,6 +84,24 @@ enum {
>>    
>>    IGT_TEST_DESCRIPTION("Basic backlight sysfs test");
>>    
>> +static void setup_output_and_commit(igt_backlight_context_t *context)
>> +{
>> +	igt_output_t *output = context->output;
>> +	igt_display_t *display = output->display;
>> +	drmModeModeInfo *mode;
>> +	igt_plane_t *primary;
>> +	struct igt_fb fb;
>> +
>> +	mode = igt_output_get_mode(output);
>> +	igt_create_pattern_fb(display->drm_fd,
>> +			      mode->hdisplay, mode->vdisplay,
>> +			      DRM_FORMAT_XRGB8888,
>> +			      DRM_FORMAT_MOD_LINEAR, &fb);
>> +	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
>> +	igt_plane_set_fb(primary, &fb);
>> +	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>> +}
>> +
Ensure the framebuffer is destroyed once it is no longer needed.

Thanks,
Ramanaidu N.
> Sorry missed this part on rev1. Instead of creating fb's everytime we
> could just create two fbs and toggle b/n them. Also remove the fb after
> the test.
>
> Regards,
> Karthik.B.S
>>    static void test_and_verify(igt_backlight_context_t *context, int val)
>>    {
>>    	const int tolerance = val * TOLERANCE / 100;
>> @@ -133,10 +151,12 @@ static void test_fade(igt_backlight_context_t *context)
>>    
>>    	/* Fade out, then in */
>>    	for (i = context->max; i > 0; i -= context->max / FADESTEPS) {
>> +		setup_output_and_commit(context);
>>    		test_and_verify(context, i);
>>    		nanosleep(&ts, NULL);
>>    	}
>>    	for (i = 0; i <= context->max; i += context->max / FADESTEPS) {
>> +		setup_output_and_commit(context);
>>    		test_and_verify(context, i);
>>    		nanosleep(&ts, NULL);
>>    	}

[-- Attachment #2: Type: text/html, Size: 4771 bytes --]

  reply	other threads:[~2026-04-08  4:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  7:34 [PATCH i-g-t] tests/intel/kms_pm_backlight: Setup output before reading writing backlight Suraj Kandpal
2026-03-31 11:45 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-31 12:10 ` ✓ i915.CI.BAT: " Patchwork
2026-03-31 17:00 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-01  0:32 ` ✓ i915.CI.Full: " Patchwork
2026-04-07  5:21 ` [PATCH i-g-t] " Karthik B S
2026-04-07  5:43 ` [PATCH i-g-t v2] " Suraj Kandpal
2026-04-07  8:17   ` Karthik B S
2026-04-08  4:35     ` Naladala, Ramanaidu [this message]
2026-04-08  5:03   ` [PATCH i-g-t v3] " Suraj Kandpal
2026-04-07  6:50 ` ✓ Xe.CI.BAT: success for tests/intel/kms_pm_backlight: Setup output before reading writing backlight (rev2) Patchwork
2026-04-07  7:29 ` ✓ i915.CI.BAT: " Patchwork
2026-04-07  9:11 ` ✓ Xe.CI.FULL: " Patchwork
2026-04-07  9:40 ` ✗ i915.CI.Full: failure " Patchwork
2026-04-09 23:39 ` ✓ Xe.CI.BAT: success for tests/intel/kms_pm_backlight: Setup output before reading writing backlight (rev4) Patchwork
2026-04-09 23:48 ` ✗ i915.CI.BAT: failure " Patchwork
2026-04-10  1:32 ` ✓ Xe.CI.FULL: success " 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=a71fdad8-67a3-4283-981a-1de57c737e1e@intel.com \
    --to=ramanaidu.naladala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@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