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

Hogander, Jouni jouni.hogander at intel.com
Fri May 31 06:54:09 UTC 2024


On Mon, 2024-05-20 at 15:16 +0530, Jeevan B wrote:
> Added helper functions to check sink support for early transport and
> check early transport active check.
> 
> Signed-off-by: Jeevan B <jeevan.b at intel.com>
> ---
>  lib/igt_psr.c | 13 +++++++++++++
>  lib/igt_psr.h |  2 ++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 6008b73a6..8dc6b9b78 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -53,6 +53,16 @@ bool selective_fetch_check(int debugfs_fd,
> igt_output_t *output)
>         return strstr(buf, "PSR2 selective fetch: enabled");
>  }
>  
> +bool psr2_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, "PSR2 Early Transport: enabled");

Current plan is to have
(https://patchwork.freedesktop.org/patch/596084/?series=134181&rev=1):

PSR mode: Panel Replay Selective Update enabled (Early Transport)

and

PSR mode: PSR2 (Early Transport)

> +}
> +
>  staPSR mode: tic bool psr_active_check(int debugfs_fd, enum psr_mode
> mode, igt_output_t *output)
>  {
>         char debugfs_file[128] = {0};
> @@ -249,6 +259,9 @@ bool psr_sink_support(int device, int debugfs_fd,
> enum psr_mode mode, igt_output
>                        (strstr(line, "[0x03]") || strstr(line,
> "[0x04]")));
>         case PR_MODE:
>                 return strstr(line, "Panel Replay = yes, Panel Replay
> Selective Update = no");
> +       case ET_MODE:
> +               return strstr(buf, "Sink support: yes [0x04]") ||
> +                            (strstr(line, "PSR = yes") &&
> strstr(line, "Early Transport = yes"));

Early transport is not only for PSR, but Panel Replay as well.

BR,

Jouni Högander

>         case PR_MODE_SEL_FETCH:
>                 return strstr(line, "Panel Replay = yes, Panel Replay
> Selective Update = yes");
>         default:
> diff --git a/lib/igt_psr.h b/lib/igt_psr.h
> index e8595fd8c..23f4dd35b 100644
> --- a/lib/igt_psr.h
> +++ b/lib/igt_psr.h
> @@ -37,6 +37,7 @@ enum psr_mode {
>         PSR_MODE_2_SEL_FETCH,
>         PR_MODE,
>         PR_MODE_SEL_FETCH,
> +       ET_MODE,
>         PSR_DISABLED,
>  };
>  
> @@ -47,6 +48,7 @@ enum fbc_mode {
>  
>  bool psr_disabled_check(int debugfs_fd);
>  bool selective_fetch_check(int debugfs_fd, igt_output_t *output);
> +bool psr2_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);



More information about the igt-dev mailing list