[PATCH i-g-t v3 2/2] lib/igt_psr: Fix PR state check for DisplayPort connectors

Hogander, Jouni jouni.hogander at intel.com
Wed Sep 18 07:36:13 UTC 2024


On Thu, 2024-09-12 at 01:54 +0530, Naladala Ramanaidu wrote:
> The PR state check logic has been updated to handle DisplayPort
> connectors.
> 
> v1: Update connecter logic for PR tests.
> 
> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>

Reviewed-by: Jouni Högander <jouni.hogander at intel.com>
> ---
>  lib/igt_psr.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 222e05e6c..99f08f3c2 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -77,12 +77,11 @@ static bool psr_active_check(int debugfs_fd, enum
> psr_mode mode, igt_output_t *o
>         if (mode == PR_MODE || mode == PR_MODE_SEL_FETCH) {
>                 igt_assert_f(output, "Output not given\n");
>                 c = output->config.connector;
> -       }
> -
> -       if ((mode == PR_MODE || mode == PR_MODE_SEL_FETCH) &&
> -           c && c->connector_type == DRM_MODE_CONNECTOR_eDP)
> -               state = "SLEEP";
> -       else if (mode == PSR_MODE_1 || mode == PR_MODE || mode ==
> PR_MODE_SEL_FETCH)
> +               if (c->connector_type ==
> DRM_MODE_CONNECTOR_DisplayPort)
> +                       state = "SRDENT_ON";
> +               else if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
> +                       state = "SLEEP";
> +       } else if (mode == PSR_MODE_1)
>                 state = "SRDENT";
>         else if (mode == PSR_MODE_2 || mode == PSR_MODE_2_SEL_FETCH)
>                 state = "DEEP_SLEEP";



More information about the igt-dev mailing list