All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
To: gwan-gyeong.mun@intel.com, igt-dev@lists.freedesktop.org,
	jose.souza@intel.com
Subject: [igt-dev] [PATCH i-g-t 2/3] lib/igt_psr: Add function to check PSR2 selective fetch
Date: Tue,  8 Dec 2020 22:31:08 +0530	[thread overview]
Message-ID: <20201208170109.23073-3-pankaj.laxminarayan.bharadiya@intel.com> (raw)
In-Reply-To: <20201208170109.23073-1-pankaj.laxminarayan.bharadiya@intel.com>

Add a helper function to check whether "PSR2 selective fetch" is
enabled.
This function should be used wherever "PSR2 selective fetch"
status check needed.

Reviewed-by: Jose Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 lib/igt_psr.c | 10 ++++++++++
 lib/igt_psr.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 6cdb97bcc..d5167fbad 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -36,6 +36,16 @@ bool psr_disabled_check(int debugfs_fd)
 	return strstr(buf, "PSR mode: disabled\n");
 }
 
+bool psr2_selective_fetch_check(int debugfs_fd)
+{
+	char buf[PSR_STATUS_MAX_LEN];
+
+	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
+				sizeof(buf));
+
+	return strstr(buf, "PSR2 selective fetch: enabled");
+}
+
 static bool psr_active_check(int debugfs_fd, enum psr_mode mode)
 {
 	char buf[PSR_STATUS_MAX_LEN];
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 8368ecb49..25111cc2b 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -36,6 +36,7 @@ enum psr_mode {
 };
 
 bool psr_disabled_check(int debugfs_fd);
+bool psr2_selective_fetch_check(int debugfs_fd);
 bool psr_wait_entry(int debugfs_fd, enum psr_mode mode);
 bool psr_wait_update(int debugfs_fd, enum psr_mode mode);
 bool psr_long_wait_update(int debugfs_fd, enum psr_mode mode);
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2020-12-08 17:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 17:01 [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Pankaj Bharadiya
2020-12-08 17:01 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add fb damage clip plane property Pankaj Bharadiya
2020-12-08 17:01 ` Pankaj Bharadiya [this message]
2020-12-08 17:01 ` [igt-dev] [PATCH i-g-t 3/3] tests: Add new PSR2 selective fetch test Pankaj Bharadiya
2020-12-16 10:50   ` Mun, Gwan-gyeong
2020-12-21  4:44     ` Laxminarayan Bharadiya, Pankaj
2021-01-04 19:37       ` Mun, Gwan-gyeong
2020-12-08 17:22 ` [igt-dev] [PATCH i-g-t 0/3] Add FB_DAMAGE_CLIPS prop and new test for Selective fetch Souza, Jose
2020-12-08 19:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-12-09  0:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-01-08 12:21 ` [igt-dev] [PATCH i-g-t 0/3] " Petri Latvala
  -- strict thread matches above, loose matches on Subject: below --
2020-11-18  8:14 Pankaj Bharadiya
2020-11-18  8:14 ` [igt-dev] [PATCH i-g-t 2/3] lib/igt_psr: Add function to check PSR2 selective fetch Pankaj Bharadiya

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=20201208170109.23073-3-pankaj.laxminarayan.bharadiya@intel.com \
    --to=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=gwan-gyeong.mun@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jose.souza@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.