All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/4] lib/igt_kms: Return the first overlay not the last one
@ 2020-01-31 20:15 Ville Syrjala
  2020-01-31 20:15 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_legacy_colorkey: Test a lot more things Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ville Syrjala @ 2020-01-31 20:15 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

For some reason igt_pipe_get_plane_type() returns the last overlay
plane it can find. I'd prefer it to do the opposite since on
Intel hw the set of features supported by the plane generally
goes down the further up you go.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_kms.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d20daaad7764..645e6c54c041 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2293,9 +2293,12 @@ igt_plane_t *igt_pipe_get_plane_type(igt_pipe_t *pipe, int plane_type)
 		plane_idx = pipe->plane_primary;
 		break;
 	case DRM_PLANE_TYPE_OVERLAY:
-		for(i = 0; i < pipe->n_planes; i++)
-			if (pipe->planes[i].type == DRM_PLANE_TYPE_OVERLAY)
-			    plane_idx = i;
+		for(i = 0; i < pipe->n_planes; i++) {
+			if (pipe->planes[i].type == DRM_PLANE_TYPE_OVERLAY) {
+				plane_idx = i;
+				break;
+			}
+		}
 		break;
 	default:
 		break;
-- 
2.24.1

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

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

end of thread, other threads:[~2020-02-04 16:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 20:15 [igt-dev] [PATCH i-g-t 1/4] lib/igt_kms: Return the first overlay not the last one Ville Syrjala
2020-01-31 20:15 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_legacy_colorkey: Test a lot more things Ville Syrjala
2020-01-31 20:15 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_legacy_colorkey: Rename to kms_legacy_colorkey_basic Ville Syrjala
2020-01-31 20:15 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_legacy_colorkey: Add a real colorkey test Ville Syrjala
2020-01-31 20:39 ` [igt-dev] ✗ GitLab.Pipeline: failure for series starting with [i-g-t,1/4] lib/igt_kms: Return the first overlay not the last one Patchwork
2020-01-31 20:52 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-02-04 16:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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.