Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Kunal Joshi <kunal1.joshi@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/kms_display_modes: fit modes in mst bw
Date: Mon, 10 Feb 2025 17:53:04 +0530	[thread overview]
Message-ID: <a57ad29b-62f6-4ea5-9fbb-14ad35811530@intel.com> (raw)
In-Reply-To: <20250116061749.2082287-1-kunal1.joshi@intel.com>

Hi Kunal,


On 16-01-2025 11:47 am, Kunal Joshi wrote:
> Instead of checking only currrent modes,
> find combination of modes in mst topology
> that can be accomodated in current link bw.
>
> Fixes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2633
> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
>   tests/kms_display_modes.c | 20 +++++++++++++++++---
>   1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_display_modes.c b/tests/kms_display_modes.c
> index e41c60cc0..a582ba1a9 100644
> --- a/tests/kms_display_modes.c
> +++ b/tests/kms_display_modes.c
> @@ -60,6 +60,22 @@ typedef struct {
>   	int n_pipes;
>   } data_t;
>   
> +static bool fit_modes_in_bw(data_t *data)
> +{
> +        bool found;
> +        int ret;
> +
> +        ret = igt_display_try_commit_atomic(&data->display,
> +                                            DRM_MODE_ATOMIC_TEST_ONLY |
> +                                            DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +        if (ret != 0) {
> +                found = igt_override_all_active_output_modes_to_fit_bw(&data->display);
> +                igt_require_f(found,
> +                              "No valid mode combo found for modeset\n");
> +        }
> +        return true;
> +}
> +
>   /* Get higher mode supported by panel. */
>   static drmModeModeInfo *get_highres_mode(igt_output_t *output)
>   {
> @@ -279,7 +295,6 @@ static void run_extendedmode_negative(data_t *data, int pipe1, int pipe2)
>   	struct igt_fb fbs[2];
>   	igt_display_t *display = &data->display;
>   	igt_plane_t *plane[2];
> -	int ret;
>   
>   	igt_display_reset(display);
>   
> @@ -306,8 +321,7 @@ static void run_extendedmode_negative(data_t *data, int pipe1, int pipe2)
>   	igt_output_override_mode(data->mst_output[1], &data->mode_mst[1]);
>   
>   	igt_require(intel_pipe_output_combo_valid(display));
> -	ret = igt_display_try_commit2(display, COMMIT_ATOMIC);
> -	igt_assert(ret != 0 && errno == ENOSPC);
> +	igt_assert_f(fit_modes_in_bw(data), "Unable to fit modes in bw\n");
Don't we have to check 2nd condition? errno == ENOSPC?
>   }
>   
>   igt_main


      parent reply	other threads:[~2025-02-10 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16  6:17 [PATCH i-g-t] tests/kms_display_modes: fit modes in mst bw Kunal Joshi
2025-01-16  7:28 ` ✗ Xe.CI.BAT: failure for " Patchwork
2025-01-16  7:30 ` ✗ i915.CI.BAT: " Patchwork
2025-01-16 11:10 ` ✗ Xe.CI.Full: " Patchwork
2025-02-10 12:23 ` 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=a57ad29b-62f6-4ea5-9fbb-14ad35811530@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kunal1.joshi@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