From patchwork Tue Sep 9 23:12:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 4873361 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1F1279F32F for ; Tue, 9 Sep 2014 23:12:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4598C201B4 for ; Tue, 9 Sep 2014 23:12:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 416012018E for ; Tue, 9 Sep 2014 23:12:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A9716E363; Tue, 9 Sep 2014 16:12:15 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 98EC86E21C for ; Tue, 9 Sep 2014 16:12:14 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Sep 2014 16:12:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,494,1406617200"; d="scan'208";a="600532376" Received: from rdvivi-bratislava.jf.intel.com ([10.7.196.158]) by orsmga002.jf.intel.com with ESMTP; 09 Sep 2014 16:12:14 -0700 From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Tue, 9 Sep 2014 19:12:14 -0400 Message-Id: <1410304334-6722-1-git-send-email-rodrigo.vivi@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <20140904084707.GA15520@phenom.ffwll.local> References: <20140904084707.GA15520@phenom.ffwll.local> Cc: Rodrigo Vivi Subject: [Intel-gfx] [PATCH] tests: Kill pm_psr X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP kms_psr_sink_crc check psr activity, residency and exit for screen updates. So this test is useless. Signed-off-by: Rodrigo Vivi --- tests/Makefile.sources | 1 - tests/pm_psr.c | 86 -------------------------------------------------- 2 files changed, 87 deletions(-) delete mode 100644 tests/pm_psr.c diff --git a/tests/Makefile.sources b/tests/Makefile.sources index a6677dd..4dc508f 100644 --- a/tests/Makefile.sources +++ b/tests/Makefile.sources @@ -146,7 +146,6 @@ TESTS_progs = \ kms_force_connector \ kms_sink_crc_basic \ kms_fence_pin_leak \ - pm_psr \ prime_udl \ $(NULL) diff --git a/tests/pm_psr.c b/tests/pm_psr.c deleted file mode 100644 index 3ab7e7a..0000000 --- a/tests/pm_psr.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2013 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Authors: - * Rodrigo Vivi - */ - -#define _GNU_SOURCE -#include -#include -#include -#include -#include - -#include "drmtest.h" - -#define SLEEP_DURATION 5000 // in milliseconds - -static int get_perf(const char *path) -{ - int ret, perf; - FILE *file; - char str[4]; - - file = fopen(path, "r"); - igt_assert(file); - - ret = fscanf(file, "Sink_Support: %s\n", str); - igt_skip_on_f(ret == 0, - "i915_edp_psr_status format not supported by this test case\n"); - igt_require(strcmp(str, "yes") == 0); - ret = fscanf(file, "Source_OK: %s\n", str); - igt_assert(ret != 0); - - igt_require(strcmp(str, "yes") == 0); - - ret = fscanf(file, "Enabled: %s\n", str); - igt_assert(ret != 0); - igt_assert(strcmp(str, "yes") == 0); - - ret = fscanf(file, "Performance_Counter: %i", &perf); - igt_assert(ret != 0); - - igt_assert(perf); - - fclose(file); - return perf; -} - -igt_simple_main -{ - int ret, perf1, perf2; - int device = drm_get_card(); - char *path; - - igt_skip_on_simulation(); - - ret = asprintf(&path, "/sys/kernel/debug/dri/%d/i915_edp_psr_status", device); - igt_assert(ret != -1); - - perf1 = get_perf(path); - sleep(SLEEP_DURATION / 1000); - perf2 = get_perf(path); - - igt_assert_f(perf1 != perf2, - "Unable to enter PSR state again\n"); -}