From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: soumya prabhu nidoni <soumya.prabhu.nidoni@intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH] [i-g-t] lib/kms_psr: Honour PSR OS capability alongside Sink capability
Date: Thu, 18 Jan 2024 10:42:46 +0530 [thread overview]
Message-ID: <51ab10a6-c2dd-4a94-a67a-ce8d2803c5a5@intel.com> (raw)
In-Reply-To: <20240117094907.401866-1-soumya.prabhu.nidoni@intel.com>
Hi Soumya,
On 17-Jan-24 3:19 PM, soumya prabhu nidoni wrote:
> Currently IGT code is checking only the Sink Support it's not verifying
> OS capability.So this patch is verifying OS PSR capability.
>
> Signed-off-by: soumya prabhu nidoni <soumya.prabhu.nidoni@intel.com>
> ---
> lib/igt_psr.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 663bac163..f43d46dfb 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -208,7 +208,8 @@ bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode, igt_output
> {
> char *line;
> char debugfs_file[128] = {0};
> - char buf[PSR_STATUS_MAX_LEN];
> + char debugfs_file1[128] = {0};
> + char buf[PSR_STATUS_MAX_LEN], buf1[5000];
> int ret;
>
> if (output)
> @@ -216,10 +217,16 @@ bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode, igt_output
> else
> sprintf(debugfs_file, "%s", "i915_edp_psr_status");
>
> + sprintf(debugfs_file1, "%s", "i915_capabilities");
i915_capabilities is specific to i915 driver. However for xe and i915 we
have i915_display_capabilities where you can parse has_psr: yes to know
h/w capability.
So, this change of yours won't work with xe driver and we need to make
generic change supporting both drivers.
> +
> ret = igt_debugfs_simple_read(debugfs_fd, debugfs_file, buf,
> sizeof(buf));
> if (ret < 1)
> return false;
> + ret = igt_debugfs_simple_read(debugfs_fd, debugfs_file1, buf1,
> + sizeof(buf1));
> + if (ret < 1)
> + return false;
>
> line = strstr(buf, "Sink support: ");
> if (!line)
> @@ -227,9 +234,10 @@ bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode, igt_output
>
> switch (mode) {
> case PSR_MODE_1:
> - return strstr(line, "PSR = yes") ||
> + return ((strstr(line, "PSR = yes") ||
> strstr(buf, "Sink_Support: yes\n") ||
> - strstr(buf, "Sink support: yes");
> + strstr(buf, "Sink support: yes")) &&
> + strstr(buf1, "i915.enable_psr=1"));
> case PSR_MODE_2:
> case PSR_MODE_2_SEL_FETCH:
> /*
> @@ -240,10 +248,11 @@ bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode, igt_output
> * PSR version 0x4 that is PSR2 + SU w/ Y-coordinate and SU
> * Region Early Transport to support PSR2 (eDP 1.5)
> */
> - return strstr(buf, "Sink support: yes [0x03]") ||
> + return ((strstr(buf, "Sink support: yes [0x03]") ||
> strstr(buf, "Sink support: yes [0x04]") ||
> (strstr(line, "PSR = yes") &&
> - (strstr(line, "[0x03]") || strstr(line, "[0x04]")));
> + (strstr(line, "[0x03]") || strstr(line, "[0x04]")))) &&
> + strstr(buf1, "i915.enable_psr=2"));
> case PR_MODE:
> return strstr(line, "Panel Replay = yes");
> default:
prev parent reply other threads:[~2024-01-18 5:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-17 9:49 [PATCH] [i-g-t] lib/kms_psr: Honour PSR OS capability alongside Sink capability soumya prabhu nidoni
2024-01-17 11:09 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-01-17 11:10 ` ✓ CI.xeBAT: " Patchwork
2024-01-17 13:51 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-01-18 5:12 ` Sharma, Swati2 [this message]
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=51ab10a6-c2dd-4a94-a67a-ce8d2803c5a5@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=soumya.prabhu.nidoni@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