public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 4/7] lib/kms: Commit reasonable defaults on display init
Date: Tue, 7 Apr 2020 16:16:30 +0300	[thread overview]
Message-ID: <20200407131633.1350311-4-arkadiusz.hiler@intel.com> (raw)
In-Reply-To: <20200407131633.1350311-1-arkadiusz.hiler@intel.com>

We often end up with a leftover state from fbcon with a mode enabled on
some of the connecters. Let's clean that up.

v2: commit only if we have pipes and outputs

Issue: https://gitlab.freedesktop.org/drm/intel/issues/323
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 lib/igt_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7f9fafb3..4ffc3ed2 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2066,6 +2066,12 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	/* Set reasonable default values for every object in the display. */
 	igt_display_reset(display);
 
+	/* Commit those resonable defaults to clean up fbcon/etc leftover state */
+	if (display->n_pipes && display->n_outputs) {
+		igt_display_commit2(display,
+				    display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+	}
+
 out:
 	LOG_UNINDENT(display);
 
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2020-04-07 13:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 2/7] tests/kms_dp_dsc: Explicitly enable mode before DSC checks Arkadiusz Hiler
2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 3/7] lib/igt_psr: Set mode before checking if PSR is supported Arkadiusz Hiler
2020-04-07 13:16 ` Arkadiusz Hiler [this message]
2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 5/7] lib/kms: Reprobe connector state after disabling modest Arkadiusz Hiler
2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 6/7] tests/kms_chamelium: Issue disabling modeset when resetting state Arkadiusz Hiler
2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 7/7] tests/kms_chamelium: Test HPD for different mode handling scenarios Arkadiusz Hiler
2020-04-07 13:44 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set Patchwork
2020-04-07 14:08 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2020-04-08 14:15 ` [igt-dev] [PATCH i-g-t 1/7] " Imre Deak
2020-04-08 14:23   ` Imre Deak

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=20200407131633.1350311-4-arkadiusz.hiler@intel.com \
    --to=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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