From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] igt/pm_backlight: Skip if pm is not supported
Date: Wed, 5 Sep 2018 16:18:05 +0300 [thread overview]
Message-ID: <20180905131805.GQ5565@intel.com> (raw)
In-Reply-To: <153615282022.28292.3809975377564480477@skylake-alporthouse-com>
On Wed, Sep 05, 2018 at 02:07:00PM +0100, Chris Wilson wrote:
> Quoting Ville Syrjälä (2018-09-05 13:34:39)
> > On Wed, Sep 05, 2018 at 10:17:47AM +0100, Chris Wilson wrote:
> > > If we cannot do runtime suspend, testing it's impact on the backlight is
> > > moot. Simply skip on systems that cannot runtime suspend.
> > >
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107789
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107790
> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107794
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > ---
> > > tests/pm_backlight.c | 36 +++++++++++++++++++++++++-----------
> > > 1 file changed, 25 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
> > > index 4c0399d46..e94340a2b 100644
> > > --- a/tests/pm_backlight.c
> > > +++ b/tests/pm_backlight.c
> > > @@ -151,23 +151,37 @@ static void test_fade(struct context *context)
> > > nanosleep(&ts, NULL);
> > > }
> > > }
> > > -static void test_fade_with_dpms(struct context *context, igt_output_t *output)
> > > +
> > > +static void
> > > +test_fade_with_dpms(struct context *context, igt_output_t *output)
> > > {
> > > - bool has_runtime_pm;
> > > - has_runtime_pm = igt_setup_runtime_pm();
> > > - igt_info("Runtime PM support: %d\n", has_runtime_pm);
> > > - igt_assert(has_runtime_pm);
> > > - kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_OFF);
> > > - igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
> > > - kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_ON);
> > > + igt_require(igt_setup_runtime_pm());
> > > +
> > > + kmstest_set_connector_dpms(output->display->drm_fd,
> > > + output->config.connector,
> > > + DRM_MODE_DPMS_OFF);
> > > + igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
> >
> > Should this stays as igt_assert() or is the earlier
> > igt_require(igt_setup_runtime_pm()) not good enough to
> > detect that runtime PM is supported?
>
> The setup only tells us if the runtime pm iface exists. What it doesn't
> establish is if there is a raised wakeref (e.g. no DMC) preventing us
> from entering runtime suspend. To do that we have to try and fail. I
> haven't spotted a better way.
Ah. OK, I guess there's no better way without eg. changing the kernel to
disable runtime pm entirely in such cases.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-09-05 13:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 9:17 [igt-dev] [PATCH i-g-t] igt/pm_backlight: Skip if pm is not supported Chris Wilson
2018-09-05 12:29 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-05 12:34 ` [igt-dev] [PATCH i-g-t] " Ville Syrjälä
2018-09-05 13:07 ` Chris Wilson
2018-09-05 13:18 ` Ville Syrjälä [this message]
2018-09-05 16:19 ` [igt-dev] ✓ Fi.CI.IGT: success for " 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=20180905131805.GQ5565@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
/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