From patchwork Wed May 22 14:40:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 2602281 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id B96BFDF215 for ; Wed, 22 May 2013 14:42:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF16BE6416 for ; Wed, 22 May 2013 07:42:17 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 045E2E63FC for ; Wed, 22 May 2013 07:40:57 -0700 (PDT) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 22 May 2013 07:40:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,721,1363158000"; d="scan'208";a="245160958" Received: from intelbox.fi.intel.com (HELO localhost) ([10.237.72.70]) by AZSMGA002.ch.intel.com with ESMTP; 22 May 2013 07:40:56 -0700 From: Imre Deak To: intel-gfx@lists.freedesktop.org Date: Wed, 22 May 2013 17:40:48 +0300 Message-Id: <1369233648-5873-4-git-send-email-imre.deak@intel.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1369233648-5873-1-git-send-email-imre.deak@intel.com> References: <1369233648-5873-1-git-send-email-imre.deak@intel.com> Subject: [Intel-gfx] [PATCH 4/4] kms_flip: add subtests for the DPMS OFF->modeset->flip sequence X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Add a double buffer and a single buffer version of the above sequence, to check if the modeset does a DPMS ON. Tested on IVB, with and without the relevant kernel fix, got the expected results. Signed-off-by: Imre Deak --- tests/kms_flip.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 83293ba..735b4dd 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -62,6 +62,8 @@ #define TEST_HANG (1 << 14) #define TEST_NOEVENT (1 << 15) #define TEST_FB_BAD_TILING (1 << 16) +#define TEST_SINGLE_BUFFER (1 << 17) +#define TEST_DPMS_OFF (1 << 18) #define EVENT_FLIP (1 << 0) #define EVENT_VBLANK (1 << 1) @@ -678,7 +680,9 @@ static unsigned int run_test_step(struct test_output *o) emit_dummy_load(o); - o->current_fb_id = !o->current_fb_id; + if (!(o->flags & TEST_SINGLE_BUFFER)) + o->current_fb_id = !o->current_fb_id; + if (o->flags & TEST_FB_RECREATE) recreate_fb(o); new_fb_id = o->fb_ids[o->current_fb_id]; @@ -712,6 +716,9 @@ static unsigned int run_test_step(struct test_output *o) assert(do_wait_for_vblank(o, o->pipe, target_seq, &vbl_reply) == -EINVAL); + if (o->flags & TEST_DPMS_OFF) + do_or_die(set_dpms(o, DRM_MODE_DPMS_OFF)); + if (o->flags & TEST_MODESET) { if (drmModeSetCrtc(drm_fd, o->crtc, o->fb_ids[o->current_fb_id], @@ -1218,6 +1225,11 @@ int main(int argc, char **argv) { 15, TEST_FLIP | TEST_MODESET | TEST_HANG | TEST_NOEVENT, "flip-vs-modeset-vs-hang" }, { 15, TEST_FLIP | TEST_PAN | TEST_HANG, "flip-vs-panning-vs-hang" }, { 1, TEST_FLIP | TEST_EINVAL | TEST_FB_BAD_TILING, "flip-vs-bad-tiling" }, + + { 1, TEST_DPMS_OFF | TEST_MODESET | TEST_FLIP, + "flip-vs-dpms-off-vs-modeset" }, + { 1, TEST_DPMS_OFF | TEST_MODESET | TEST_FLIP | TEST_SINGLE_BUFFER, + "single-buffer-flip-vs-dpms-off-vs-modeset" }, }; int i;