Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
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	[thread overview]
Message-ID: <20231228075149.745785-1-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20231228075017.745594-1-bhanuprakash.modem@intel.com>

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 <jouni.hogander@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 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

  reply	other threads:[~2023-12-28  7:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27 13:30 [i-g-t 1/4] lib/i915/intel_drrs: Fix igt helper to get drrs status Bhanuprakash Modem
2023-12-27 13:30 ` [i-g-t 2/4] tests/intel/kms_frontbuffer_tracking: Drop unused macros Bhanuprakash Modem
2024-01-05  6:02   ` [i-g-t,2/4] " Joshi, Kunal1
2023-12-27 13:30 ` [i-g-t 3/4] tests/intel/kms_frontbuffer_tracking: Re-use devid & display_ver Bhanuprakash Modem
2024-01-05  6:36   ` [i-g-t, " Joshi, Kunal1
2023-12-27 13:30 ` [i-g-t 4/4] tests/intel/kms_dirtyfb: Fix few fixtures Bhanuprakash Modem
2024-01-05  6:40   ` [i-g-t,4/4] " Joshi, Kunal1
2023-12-28  7:50 ` [i-g-t 1/7] lib/i915/intel_drrs: Fix igt helper to get drrs status Bhanuprakash Modem
2023-12-28  7:51   ` Bhanuprakash Modem [this message]
2024-01-05  6:00     ` [i-g-t,1/4] " Joshi, Kunal1
2024-01-05  5:49   ` [i-g-t 1/7] " Joshi, Kunal1

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=20231228075149.745785-1-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kunal1.joshi@intel.com \
    /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