From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Gupta, Nidhi1" <nidhi1.gupta@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/i915/kms_fbcon_fbt: Execute test on multiple modes
Date: Tue, 9 May 2023 08:45:19 +0000 [thread overview]
Message-ID: <5f773680aba5c418bcfb112edc4a6162f5dcb5c7.camel@intel.com> (raw)
In-Reply-To: <20230509020228.25780-1-nidhi1.gupta@intel.com>
Hello Nidhi,
See my comment inline below.
On Tue, 2023-05-09 at 07:32 +0530, Nidhi Gupta wrote:
> In present situation the test is executing only for single mode,
> execute the test for the next mode supported by the connector if
> the first one is invalid to enable fbc.
>
> Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
> ---
> tests/i915/kms_fbcon_fbt.c | 16 +++++++++++-----
> 1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/tests/i915/kms_fbcon_fbt.c b/tests/i915/kms_fbcon_fbt.c
> index 831ec867..543426d1 100644
> --- a/tests/i915/kms_fbcon_fbt.c
> +++ b/tests/i915/kms_fbcon_fbt.c
> @@ -37,6 +37,7 @@ IGT_TEST_DESCRIPTION("Test the relationship between
> fbcon and the frontbuffer "
> "tracking infrastructure.");
>
> #define MAX_CONNECTORS 32
> +int j = 0;
>
> struct drm_info {
> int fd, debugfs_fd;
> @@ -164,14 +165,14 @@ typedef bool
> (*connector_possible_fn)(drmModeConnectorPtr connector);
> static void set_mode_for_one_screen(struct drm_info *drm,
> connector_possible_fn
> connector_possible)
> {
> - int i, rc;
> + int rc;
> uint32_t crtc_id;
> drmModeModeInfoPtr mode;
> uint32_t buffer_id;
> drmModeConnectorPtr c = NULL;
>
> - for (i = 0; i < drm->res->count_connectors; i++) {
> - c = drm->connectors[i];
> + for (;j < drm->res->count_connectors; j++) {
> + c = drm->connectors[j];
See fbc_stride_not_supported() in kms_frontbuffer_tracking.c. You could
loop through modes until check fbc_stride_not_supported returns 0.
>
> if (c->connection == DRM_MODE_CONNECTED && c-
> >count_modes &&
> connector_possible(c)) {
> @@ -179,7 +180,7 @@ static void set_mode_for_one_screen(struct
> drm_info *drm,
> break;
> }
> }
> - igt_require_f(i < drm->res->count_connectors,
> + igt_require_f(j < drm->res->count_connectors,
> "No connector available\n");
>
> crtc_id = kmstest_find_crtc_for_connector(drm->fd, drm->res,
> c, 0);
> @@ -348,7 +349,12 @@ static void subtest(struct drm_info *drm, struct
> feature *feature, bool suspend)
>
> set_mode_for_one_screen(drm, feature->connector_possible_fn);
> wait_user("Screen set.");
> - igt_assert(feature->wait_until_enabled(drm->debugfs_fd));
> + if (!(feature->wait_until_enabled(drm->debugfs_fd))) {
> + ++j;
> + set_mode_for_one_screen(drm, feature-
> >connector_possible_fn);
> + wait_user("Screen set for next mode.");
> + igt_assert(feature->wait_until_enabled(drm-
> >debugfs_fd));
> + }
>
> if (suspend) {
> igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
prev parent reply other threads:[~2023-05-09 8:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 2:02 [igt-dev] [PATCH i-g-t] tests/i915/kms_fbcon_fbt: Execute test on multiple modes Nidhi Gupta
2023-05-09 2:36 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-05-09 8:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-09 8:45 ` Hogander, Jouni [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=5f773680aba5c418bcfb112edc4a6162f5dcb5c7.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nidhi1.gupta@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