igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 01/25] lib/igt_kms: Fill the plane format/mod information for pre-blobifier drivers
@ 2018-07-19 15:03 Ville Syrjala
  2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 02/25] tests/kms_ccs: Use igt_plane_has_format_mod() Ville Syrjala
                   ` (26 more replies)
  0 siblings, 27 replies; 52+ messages in thread
From: Ville Syrjala @ 2018-07-19 15:03 UTC (permalink / raw)
  To: igt-dev; +Cc: Ulrich Hecht

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

For drivers that don't support the IN_FORMATS blob we should just
consult the format list returned by getplane. Since we can't know
which modifiers are supported we'll assume linear-only. Obviously
that may not work for every driver out there, but not much more
we can do unless we start to actually probing with addfb.

Cc: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 lib/igt_kms.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 476a786233c0..5641d8c1cf7c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -4068,8 +4068,28 @@ static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane
 	int idx = 0;
 	int count;
 
-	if (!igt_plane_has_prop(plane, IGT_PLANE_IN_FORMATS))
+	if (!igt_plane_has_prop(plane, IGT_PLANE_IN_FORMATS)) {
+		drmModePlanePtr p = plane->drm_plane;
+
+		count = p->count_formats;
+
+		plane->format_mod_count = count;
+		plane->formats = calloc(count, sizeof(plane->formats[0]));
+		igt_assert(plane->formats);
+		plane->modifiers = calloc(count, sizeof(plane->modifiers[0]));
+		igt_assert(plane->modifiers);
+
+		/*
+		 * We don't know which modifiers are
+		 * supported, so we'll assume linear only.
+		 */
+		for (int i = 0; i < count; i++) {
+			plane->formats[i] = p->formats[i];
+			plane->modifiers[i] = DRM_FORMAT_MOD_LINEAR;
+		}
+
 		return;
+	}
 
 	blob_id = igt_plane_get_prop(plane, IGT_PLANE_IN_FORMATS);
 
-- 
2.16.4

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

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

end of thread, other threads:[~2018-11-27 21:20 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 15:03 [igt-dev] [PATCH i-g-t 01/25] lib/igt_kms: Fill the plane format/mod information for pre-blobifier drivers Ville Syrjala
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 02/25] tests/kms_ccs: Use igt_plane_has_format_mod() Ville Syrjala
2018-09-20 20:56   ` Paulo Zanoni
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 03/25] tests/kms_plane: Add validate-in-formats subtest Ville Syrjala
2018-09-20 21:10   ` Paulo Zanoni
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 04/25] tests/kms_addfb_basic: Check that addfb2 accepts/rejects the expected formats Ville Syrjala
2018-09-20 23:36   ` Paulo Zanoni
2018-09-21 13:37     ` Ville Syrjälä
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 05/25] tests/gem_render_copy: Fix clipped height Ville Syrjala
2018-08-24  3:17   ` Dhinakaran Pandiyan
2018-08-28 14:21     ` Ville Syrjälä
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 06/25] lib/igt_fb: Respect the users choice of stride Ville Syrjala
2018-09-21  0:04   ` Paulo Zanoni
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 07/25] lib: Add DIV_ROUND_UP() Ville Syrjala
2018-09-18 21:17   ` Paulo Zanoni
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 08/25] lib/igt_fb: Use fb_blit_upload as the base class for fb_convert_blit_upload Ville Syrjala
2018-09-21  0:15   ` Paulo Zanoni
2018-07-19 15:03 ` [igt-dev] [PATCH i-g-t 09/25] lib/igt_fb: Pass fb_blit_upload to free_linear_mapping() Ville Syrjala
2018-09-21  0:20   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 10/25] lib/igt_fb: s/planar_foo/fb_plane_foo/ Ville Syrjala
2018-09-21 21:58   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 11/25] lib/igt_fb: Add fb_plane_bpp() Ville Syrjala
2018-09-21 22:02   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 12/25] lib/igt_fb: Add fb_num_planes() Ville Syrjala
2018-09-21 22:05   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 13/25] lib/igt_fb: Extract calc_plane_stride() Ville Syrjala
2018-09-21 22:33   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 14/25] lib/igt_fb: Consolidate fb size calculation to one function Ville Syrjala
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 15/25] lib/kms: Pass strides[] to __kms_addfb Ville Syrjala
2018-09-21 22:45   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 16/25] lib/kms: Pass the number of planes explicitly to __kms_addfb() Ville Syrjala
2018-09-21 22:54   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 17/25] lib/igt_fb: Remove the hand rolled addfb2 Ville Syrjala
2018-09-21 23:15   ` Paulo Zanoni
2018-10-03 10:56     ` Petri Latvala
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 18/25] lib/igt_fb: Constify format_desc_struct Ville Syrjala
2018-09-21 23:20   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 19/25] lib/igt_fb: Pass around igt_fb internally Ville Syrjala
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 20/25] lib/igt_fb: Refactor blitter usage Ville Syrjala
2018-09-21 23:48   ` Paulo Zanoni
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 21/25] lib/igt_fb: Don't use blitter for large buffers Ville Syrjala
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 22/25] lib/rendercopy: Add support for Yf/Ys tiling to gen9 rendercopy Ville Syrjala
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 23/25] tests/gem_render_copy: Test Yf tiling Ville Syrjala
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 24/25] lib/igt_fb: Use rendercopy for rendering into compressed buffers Ville Syrjala
2018-07-19 15:04 ` [igt-dev] [PATCH i-g-t 25/25] tests/kms_plane: Test all modifiers as well Ville Syrjala
2018-07-19 15:26 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/25] lib/igt_kms: Fill the plane format/mod information for pre-blobifier drivers Patchwork
2018-07-19 17:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-09-20 20:26 ` [igt-dev] [PATCH i-g-t 01/25] " Paulo Zanoni
2018-09-21 13:26   ` Ville Syrjälä
2018-09-21 21:39     ` Paulo Zanoni
2018-11-27 20:30       ` Kazlauskas, Nicholas
2018-11-27 21:20         ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).