From: Jani Nikula <jani.nikula@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
igt-dev@lists.freedesktop.org
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
Kunal Joshi <kunal1.joshi@intel.com>
Subject: Re: [i-g-t V5 1/8] lib/igt_kms: Split the bigjoiner check into multiple
Date: Fri, 14 Jun 2024 13:18:01 +0300 [thread overview]
Message-ID: <87a5jnj09y.fsf@intel.com> (raw)
In-Reply-To: <20240429090930.1905110-2-bhanuprakash.modem@intel.com>
On Mon, 29 Apr 2024, Bhanuprakash Modem <bhanuprakash.modem@intel.com> wrote:
> To increase the readabilty, split the bigjoiner check
> into multiple small ones. So that it would be easy to
> extend/fix the logic further.
Please use primary/secondary instead of master/slave terminology.
BR,
Jani.
>
> Cc: Kunal Joshi <kunal1.joshi@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> lib/igt_kms.c | 57 ++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 47 insertions(+), 10 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 98d3fb79c..6a41b535b 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -6357,6 +6357,7 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
> struct {
> enum pipe idx;
> drmModeModeInfo *mode;
> + igt_output_t *output;
> } pipes[IGT_MAX_PIPES];
> int max_dotclock;
>
> @@ -6374,11 +6375,12 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
>
> pipes[pipes_in_use].idx = output->pending_pipe;
> pipes[pipes_in_use].mode = igt_output_get_mode(output);
> + pipes[pipes_in_use].output = output;
> pipes_in_use++;
> }
>
> if (!pipes_in_use) {
> - igt_debug("We must set at least one output to pipe.\n");
> + igt_info("We must set at least one output to pipe.\n");
> return true;
> }
>
> @@ -6395,16 +6397,51 @@ bool igt_check_bigjoiner_support(igt_display_t *display)
> * - current & previous crtcs are consecutive
> */
> for (i = 0; i < pipes_in_use; i++) {
> - if ((igt_bigjoiner_possible(pipes[i].mode, max_dotclock) &&
> - ((pipes[i].idx >= (total_pipes - 1)) ||
> - (!display->pipes[pipes[i].idx + 1].enabled) ||
> - ((i < (pipes_in_use - 1)) && (abs(pipes[i + 1].idx - pipes[i].idx) <= 1)))) ||
> - ((i > 0) && igt_bigjoiner_possible(pipes[i - 1].mode, max_dotclock) &&
> - ((!display->pipes[pipes[i - 1].idx + 1].enabled) ||
> - (abs(pipes[i].idx - pipes[i - 1].idx) <= 1)))) {
> - igt_debug("Pipe/Output combo is not possible with selected mode(s).\n");
> + if (igt_bigjoiner_possible(pipes[i].mode, max_dotclock)) {
> + igt_info("pipe-%s-%s: (Max dot-clock: %d KHz)",
> + kmstest_pipe_name(pipes[i].idx),
> + igt_output_name(pipes[i].output),
> + max_dotclock);
> + kmstest_dump_mode(pipes[i].mode);
> +
> + if (pipes[i].idx >= (total_pipes - 1)) {
> + igt_info("pipe-%s: Last pipe couldn't be used as a bigjoiner master.\n",
> + kmstest_pipe_name(pipes[i].idx));
> + return false;
> + }
>
> - return false;
> + if (!display->pipes[pipes[i].idx + 1].enabled) {
> + igt_info("Consecutive pipe-%s: not available to use it as a bigjoiner slave.\n",
> + kmstest_pipe_name(display->pipes[pipes[i].idx + 1].pipe));
> + return false;
> + }
> +
> + if ((i < (pipes_in_use - 1)) &&
> + (abs(pipes[i + 1].idx - pipes[i].idx) <= 1)) {
> + igt_info("Consecutive pipe-%s: not free to use it as a bigjoiner slave.\n",
> + kmstest_pipe_name(pipes[i + 1].idx));
> + return false;
> + }
> + }
> +
> + if ((i > 0) && igt_bigjoiner_possible(pipes[i - 1].mode, max_dotclock)) {
> + igt_info("pipe-%s-%s: (Max dot-clock: %d KHz)",
> + kmstest_pipe_name(pipes[i - 1].idx),
> + igt_output_name(pipes[i - 1].output),
> + max_dotclock);
> + kmstest_dump_mode(pipes[i - 1].mode);
> +
> + if (!display->pipes[pipes[i - 1].idx + 1].enabled) {
> + igt_info("Consecutive pipe-%s: not available to use it as a bigjoiner slave.\n",
> + kmstest_pipe_name(display->pipes[pipes[i - 1].idx + 1].pipe));
> + return false;
> + }
> +
> + if (abs(pipes[i].idx - pipes[i - 1].idx) <= 1) {
> + igt_info("Consecutive pipe-%s: not free to use it as a bigjoiner slave.\n",
> + kmstest_pipe_name(pipes[i].idx));
> + return false;
> + }
> }
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-06-14 10:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 9:09 [i-g-t V5 0/8] Force joiner support in bigjoiner checks Bhanuprakash Modem
2024-04-29 9:09 ` [i-g-t V5 1/8] lib/igt_kms: Split the bigjoiner check into multiple Bhanuprakash Modem
2024-06-14 10:18 ` Jani Nikula [this message]
2024-04-29 9:09 ` [i-g-t V5 2/8] lib/igt_kms: Update force joiner debugfs check Bhanuprakash Modem
2024-06-14 8:56 ` B, Jeevan
2024-04-29 9:09 ` [i-g-t V5 3/8] lib/igt_kms: New helper to check force joiner status Bhanuprakash Modem
2024-04-29 9:09 ` [i-g-t V5 4/8] lib/igt_kms: Force joiner support in bigjoiner checks Bhanuprakash Modem
2024-04-29 9:09 ` [i-g-t V5 5/8] tests/intel/kms_pm_lpsp: " Bhanuprakash Modem
2024-04-29 9:09 ` [i-g-t V5 6/8] tests/kms_flip: " Bhanuprakash Modem
2024-04-29 9:09 ` [i-g-t V5 7/8] tests/kms_setmode: " Bhanuprakash Modem
2024-04-29 9:09 ` [i-g-t V5 8/8] HAX: Test force joiner on BAT Bhanuprakash Modem
2024-04-29 9:43 ` ✓ CI.xeBAT: success for Force joiner support in bigjoiner checks (rev6) Patchwork
2024-04-29 9:52 ` ✓ Fi.CI.BAT: " Patchwork
2024-04-29 10:40 ` ✗ CI.xeFULL: failure " Patchwork
2024-04-29 10:56 ` ✗ Fi.CI.IGT: " Patchwork
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=87a5jnj09y.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=bhanuprakash.modem@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.