Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v1] lib/igt_kms: Call get_assigned_primary only if display is initialized
@ 2022-06-03 18:32 Jessica Zhang
  2022-06-04  1:25 ` Dixit, Ashutosh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jessica Zhang @ 2022-06-03 18:32 UTC (permalink / raw)
  To: igt-dev; +Cc: quic_aravindh, petri.latvala

Move code for getting the driver-assigned primary plane to before the
`out` tag. This will avoid any crashes in cases where the display
resources haven't been initialized.

Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
---
 lib/igt_kms.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index af4fb85b9a7b..36dfcfcb886d 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2528,9 +2528,6 @@ 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);
 
-out:
-	LOG_UNINDENT(display);
-
 	for_each_pipe(display, i) {
 		igt_pipe_t *pipe = &display->pipes[i];
 		igt_output_t *output;
@@ -2565,6 +2562,9 @@ out:
 		}
 	}
 
+out:
+	LOG_UNINDENT(display);
+
 	if (display->n_pipes && display->n_outputs)
 		igt_enable_connectors(drm_fd);
 	else
-- 
2.31.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-04  4:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-03 18:32 [igt-dev] [PATCH i-g-t v1] lib/igt_kms: Call get_assigned_primary only if display is initialized Jessica Zhang
2022-06-04  1:25 ` Dixit, Ashutosh
2022-06-04  1:51 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-06-04  4:34 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox