[PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport

Saarinen, Jani jani.saarinen at intel.com
Tue Jun 25 10:55:48 UTC 2024


Hi, 
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Jeevan B
> Sent: Monday, 24 June 2024 21.16
> To: igt-dev at lists.freedesktop.org
> Cc: Hogander, Jouni <jouni.hogander at intel.com>; Konieczny, Kamil
> <kamil.konieczny at intel.com>; B, Jeevan <jeevan.b at intel.com>
> Subject: [PATCH i-g-t 1/2] lib/igt_psr: Added library functions for early trasport

s/ transport/ transport

> 
> Added helper functions to check sink support for early transport and check
> early transport active check.
> 
> v2: Add early trasport for PR and PSR2.
Same here

> v3: Fix check strings.
> v4: Add description to library function and correctstring logic.
> 
> Signed-off-by: Jeevan B <jeevan.b at intel.com>
> ---
>  lib/igt_psr.c | 19 +++++++++++++++++++
>  lib/igt_psr.h |  3 +++
>  2 files changed, 22 insertions(+)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c index 6008b73a6..dc85042b2 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -53,6 +53,19 @@ bool selective_fetch_check(int debugfs_fd,
> igt_output_t *output)
>  	return strstr(buf, "PSR2 selective fetch: enabled");  }
> 
> +/*
> + * Checks if Early Transport is enabled in PSR status by reading the debugfs.
> + */
> +bool early_transport_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, "enabled (Early Transport)"); }
> +
>  static bool psr_active_check(int debugfs_fd, enum psr_mode mode,
> igt_output_t *output)  {
>  	char debugfs_file[128] = {0};
> @@ -247,10 +260,16 @@ bool psr_sink_support(int device, int debugfs_fd,
> enum psr_mode mode, igt_output
>  		       strstr(buf, "Sink support: yes [0x04]") ||
>  		       (strstr(line, "PSR = yes") &&
>  		       (strstr(line, "[0x03]") || strstr(line, "[0x04]")));
> +	case PSR_MODE_2_ET:
> +		return strstr(buf, "Sink support: yes [0x04]") ||
> +		       (strstr(line, "PSR = yes") &&
> +			 strstr(line, "[0x04]"));
>  	case PR_MODE:
>  		return strstr(line, "Panel Replay = yes, Panel Replay Selective
> Update = no");
>  	case PR_MODE_SEL_FETCH:
>  		return strstr(line, "Panel Replay = yes, Panel Replay Selective
> Update = yes");
> +	case PR_MODE_SEL_FETCH_ET:
> +		return strstr(line, "Panel Replay Selective Update = yes (Early
> +Transport)");
>  	default:
>  		igt_assert_f(false, "Invalid psr mode\n");
>  		return false;
> diff --git a/lib/igt_psr.h b/lib/igt_psr.h index e8595fd8c..a7ebd0739 100644
> --- a/lib/igt_psr.h
> +++ b/lib/igt_psr.h
> @@ -35,8 +35,10 @@ enum psr_mode {
>  	PSR_MODE_1,
>  	PSR_MODE_2,
>  	PSR_MODE_2_SEL_FETCH,
> +	PSR_MODE_2_ET,
>  	PR_MODE,
>  	PR_MODE_SEL_FETCH,
> +	PR_MODE_SEL_FETCH_ET,
>  	PSR_DISABLED,
>  };
> 
> @@ -47,6 +49,7 @@ enum fbc_mode {
> 
>  bool psr_disabled_check(int debugfs_fd);  bool selective_fetch_check(int
> debugfs_fd, igt_output_t *output);
> +bool early_transport_check(int debugfs_fd);
>  bool psr_wait_entry(int debugfs_fd, enum psr_mode mode, igt_output_t
> *output);  bool psr_wait_update(int debugfs_fd, enum psr_mode mode,
> igt_output_t *output);  bool psr_long_wait_update(int debugfs_fd, enum
> psr_mode mode, igt_output_t *output);
> --
> 2.25.1



More information about the igt-dev mailing list