From: Daniel Vetter Subject: Re: [PATCH 5/5] tests/kms_psr_sink_crc: Dry run with PSR disabled. Date: Fri, 5 Sep 2014 10:23:34 +0200 Message-ID: <20140905082334.GC15520@phenom.ffwll.local> References: <20140904084551.GZ15520@phenom.ffwll.local> <1409869371-7558-1-git-send-email-rodrigo.vivi@intel.com> <1409869371-7558-5-git-send-email-rodrigo.vivi@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C45488071 for ; Fri, 5 Sep 2014 01:23:11 -0700 (PDT) Received: by mail-we0-f178.google.com with SMTP id u57so11512337wes.37 for ; Fri, 05 Sep 2014 01:23:10 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1409869371-7558-5-git-send-email-rodrigo.vivi@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Sep 04, 2014 at 06:22:51PM -0400, Rodrigo Vivi wrote: > This allows to run tests with psr disabled and know what to expect when > PSR is actually enabled. > > Signed-off-by: Rodrigo Vivi I don't really follow what this is useful for ... Can you please elaborate how this is used and how it helps debugging? -Daniel > --- > tests/kms_psr_sink_crc.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c > index 51e54a7..1380ca4 100644 > --- a/tests/kms_psr_sink_crc.c > +++ b/tests/kms_psr_sink_crc.c > @@ -72,6 +72,7 @@ typedef struct { > igt_display_t display; > struct igt_fb fb[2]; > igt_plane_t *plane[2]; > + bool running_with_psr_disabled; > } data_t; > > static const char *tests_str(enum tests test) > @@ -264,6 +265,9 @@ static bool psr_enabled(data_t *data) > FILE *file; > char str[4]; > > + if (data->running_with_psr_disabled) > + return true; > + > file = igt_debugfs_fopen("i915_edp_psr_status", "r"); > igt_require(file); > > @@ -284,6 +288,9 @@ static bool psr_active(data_t *data) > FILE *file; > char str[4]; > > + if (data->running_with_psr_disabled) > + return true; > + > file = igt_debugfs_fopen("i915_edp_psr_status", "r"); > igt_require(file); > > @@ -604,6 +611,7 @@ igt_main > kmstest_set_vt_graphics_mode(); > > data.devid = intel_get_drm_devid(data.drm_fd); > + data.running_with_psr_disabled = igt_dry_run; > > igt_skip_on(!psr_enabled(&data)); > > -- > 1.9.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch