[i-g-t] tests/intel: Add tests to run suspend without display

Gupta, Anshuman anshuman.gupta at intel.com
Mon Feb 26 03:24:06 UTC 2024



> -----Original Message-----
> From: Sundaresan, Sujaritha <sujaritha.sundaresan at intel.com>
> Sent: Monday, February 26, 2024 8:51 AM
> To: Gupta, Anshuman <anshuman.gupta at intel.com>; igt-
> dev at lists.freedesktop.org
> Subject: Re: [i-g-t] tests/intel: Add tests to run suspend without display
> 
> 
> On 2/22/2024 12:49 PM, Sundaresan, Sujaritha wrote:
> >
> > On 2/22/2024 12:33 PM, Gupta, Anshuman wrote:
> >>
> >>> -----Original Message-----
> >>> From: Sundaresan, Sujaritha <sujaritha.sundaresan at intel.com>
> >>> Sent: Thursday, February 22, 2024 12:26 PM
> >>> To: igt-dev at lists.freedesktop.org
> >>> Cc: Gupta, Anshuman <anshuman.gupta at intel.com>
> >>> Subject: Re: [i-g-t] tests/intel: Add tests to run suspend without
> >>> display
> >>>
> >>> Hi all,
> >>>
> >>> As a heads up to those reviewing the patch, the pre-merge testing
> >>> for the added subtests is likely to fail due to a known sporadic
> >>> issue with unloading and reloading the driver with no display.
> >>>
> >>> Thanks,
> >>>
> >>> Suja
> >>>
> >>> On 2/22/2024 12:36 PM, Sujaritha Sundaresan wrote:
> >>>> Add tests to validate basic execution suspend/resume cycle without
> >>>> display module to rule out display related issues from the
> >>>> suspend/resume stack.
> >>>>
> >>>> Signed-off-by: Sujaritha Sundaresan
> >>>> <sujaritha.sundaresan at intel.com>
> >>>> ---
> >>>>    tests/intel/xe_pm.c | 22 ++++++++++++++++++++++
> >>>>    1 file changed, 22 insertions(+)
> >>>>
> >>>> diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c index
> >>>> a0045da0b..e94835f0d 100644
> >>>> --- a/tests/intel/xe_pm.c
> >>>> +++ b/tests/intel/xe_pm.c
> >>>> @@ -16,6 +16,7 @@
> >>>>
> >>>>    #include "igt.h"
> >>>>    #include "lib/igt_device.h"
> >>>> +#include "lib/igt_kmod.h"
> >>>>    #include "lib/igt_pm.h"
> >>>>    #include "lib/igt_sysfs.h"
> >>>>    #include "lib/igt_syncobj.h"
> >>>> @@ -236,6 +237,10 @@ static void close_fw_handle(int sig)
> >>>>     * Description: suspend/autoresume on %arg[1] state and exec
> >>>> after RPM
> >>>>     * Functionality: pm - %arg[1]
> >>>>     *
> >>>> + * SUBTEST: %s-without-display
> >>>> + * Description: suspend/autoresume on %arg[1] state without
> >>>> + display
> >>>> + * Functionality: pm - %arg[1]
> >>>> + *
> >>>>     * arg[1]:
> >>>>     *
> >>>>     * @s2idle:    s2idle
> >>>> @@ -618,6 +623,23 @@ igt_main
> >>>>                          NO_RPM);
> >>>>            }
> >>>>
> >>>> +        igt_subtest_f("%s-without-display", s->name) {
> >>>> +
> >>>> +            if (!drmModeGetResources(device.fd_xe))
> >>>> +                return;
> >>>> +
> >>>> +            xe_for_each_engine(device.fd_xe, hwe) {
> >>>> +                igt_kmsg(KMSG_INFO "Unloading Xe\n");
> >>>> +                igt_assert_eq(igt_xe_driver_unload(),0);
> >>>> +
> >>>> +                igt_kmsg(KMSG_INFO "Re-loading Xe without
> >>> display\n");
> >>>> +
> >>>     igt_assert_eq(igt_xe_driver_load("enable_display=0"),0);
> >>>> +
> >>>> +                test_exec(device, hwe, 1, 2, s->state,
> >>>> +                      NO_RPM);
> >>>> +            }
> >>>> +        }
> >> We need to reload the driver with display as normal ?
> >> Anshuman.
> >
> > Hmm maybe. That will need another unload and non-conditional re-load
> > cycle right ?
> >
> > Suja
> >
> Hi Anshuman,
> 
> Should I go ahead with the above change ?
@Sharma, Swati2 do we need above ?
Thanks,
Anshuman.
> 
> Thanks,
> 
> Suja
> 
> >>>> +
> >>>>            for (const struct d_state *d = d_states; d->name; d++) {
> >>>>                igt_subtest_f("%s-%s-basic-exec", s->name, d->name)
> >>> {
> >>>> igt_assert(setup_d3(device, d->state));


More information about the igt-dev mailing list