From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id D725B10E090 for ; Thu, 28 Dec 2023 07:57:11 +0000 (UTC) From: Bhanuprakash Modem To: igt-dev@lists.freedesktop.org, kunal1.joshi@intel.com Subject: [i-g-t 1/4] lib/i915/intel_drrs: Fix igt helper to get drrs status Date: Thu, 28 Dec 2023 13:21:49 +0530 Message-Id: <20231228075149.745785-1-bhanuprakash.modem@intel.com> In-Reply-To: <20231228075017.745594-1-bhanuprakash.modem@intel.com> References: <20231228075017.745594-1-bhanuprakash.modem@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: intel_is_drrs_supported() helper is giving False if DRRS supports on selected pipe which is not correct. Fix the helper to give True if DRRS supports on selected pipe. Fixes: c6f857e46 lib/i915/drrs: Add drrs helpers Cc: Jouni Högander Signed-off-by: Bhanuprakash Modem --- lib/i915/intel_drrs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/i915/intel_drrs.c b/lib/i915/intel_drrs.c index deaec90d3..9c6aefbf6 100644 --- a/lib/i915/intel_drrs.c +++ b/lib/i915/intel_drrs.c @@ -29,10 +29,8 @@ bool intel_is_drrs_supported(int device, enum pipe pipe) igt_require_fd(dir); igt_debugfs_simple_read(dir, "i915_drrs_status", buf, sizeof(buf)); close(dir); - if (*buf == '\0') - return false; - return !strcasestr(buf, "DRRS enabled:"); + return strstr(buf, "DRRS enabled: yes"); } /** -- 2.40.0