* [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64}
@ 2018-03-12 20:42 Ville Syrjala
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form Ville Syrjala
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Ville Syrjala @ 2018-03-12 20:42 UTC (permalink / raw)
To: igt-dev
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Add the binary hamming weight helpers to igt_aux.h.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_aux.h | 3 +++
tests/kms_atomic_transition.c | 14 ++++++--------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 43dd15fe3b32..244b9317b509 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -385,4 +385,7 @@ static inline bool igt_list_empty(const struct igt_list *list)
&pos->member != (head); \
pos = tmp, tmp = igt_list_next_entry(pos, member))
+#define igt_hweight32 __builtin_popcount
+#define igt_hweight64 __builtin_popcountll
+
#endif /* IGT_AUX_H */
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index aa9a6f8439ea..fe749bb7a919 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -44,8 +44,6 @@ struct plane_parms {
uint32_t width, height;
};
-#define hweight32 __builtin_popcount
-
/* globals for fence support */
int *timeline;
pthread_t *thread;
@@ -498,7 +496,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
}
for (i = 0; i < iter_max; i++) {
- int n_enable_planes = hweight32(i);
+ int n_enable_planes = igt_hweight32(i);
if (type == TRANSITION_MODESET_FAST &&
n_enable_planes > 1 &&
@@ -524,7 +522,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
/* i -> i+1 will be done when i increases, can be skipped here */
for (j = iter_max - 1; j > i + 1; j--) {
- n_enable_planes = hweight32(j);
+ n_enable_planes = igt_hweight32(j);
if (type == TRANSITION_MODESET_FAST &&
n_enable_planes > 1 &&
@@ -568,7 +566,7 @@ cleanup:
static void commit_display(igt_display_t *display, unsigned event_mask, bool nonblocking)
{
unsigned flags;
- int num_events = hweight32(event_mask);
+ int num_events = igt_hweight32(event_mask);
ssize_t ret;
flags = DRM_MODE_ATOMIC_ALLOW_MODESET | DRM_MODE_PAGE_FLIP_EVENT;
@@ -735,7 +733,7 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
igt_crc_t crcs[5][IGT_MAX_PIPES];
unsigned event_mask;
- if (hweight32(i) > howmany)
+ if (igt_hweight32(i) > howmany)
continue;
event_mask = set_combinations(display, i, &fbs[0]);
@@ -747,10 +745,10 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
collect_crcs_mask(pipe_crcs, i, crcs[0]);
for (j = iter_max - 1; j > i + 1; j--) {
- if (hweight32(j) > howmany)
+ if (igt_hweight32(j) > howmany)
continue;
- if (hweight32(i) < howmany && hweight32(j) < howmany)
+ if (igt_hweight32(i) < howmany && igt_hweight32(j) < howmany)
continue;
event_mask = set_combinations(display, j, &fbs[1]);
--
2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
@ 2018-03-12 20:42 ` Ville Syrjala
2018-03-13 18:30 ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_addfb_basic: Check that addfb2 accepts/rejects the expected formats Ville Syrjala
` (5 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2018-03-12 20:42 UTC (permalink / raw)
To: igt-dev
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Maintain straight up arrays of format+modifier tuples for each plane,
and also collect up a similar device wide array. These will make it
easy to confirm whether each plane (or the whole device) supports a
specific format+modifier pair.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_kms.c | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
lib/igt_kms.h | 12 +++++
2 files changed, 182 insertions(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 6bac4d1fae50..3385846f59e5 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -171,7 +171,8 @@ const char *igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
"CRTC_ID",
"IN_FENCE_FD",
"type",
- "rotation"
+ "rotation",
+ "IN_FORMATS",
};
const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
@@ -1801,6 +1802,9 @@ void igt_display_reset(igt_display_t *display)
}
}
+static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane);
+static void igt_fill_display_format_mod(igt_display_t *display);
+
/**
* igt_display_init:
* @display: a pointer to an #igt_display_t structure
@@ -1912,6 +1916,8 @@ void igt_display_init(igt_display_t *display, int drm_fd)
plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL;
igt_fill_plane_props(display, plane, IGT_NUM_PLANE_PROPS, igt_plane_prop_names);
+
+ igt_fill_plane_format_mod(display, plane);
}
/*
@@ -1929,6 +1935,8 @@ void igt_display_init(igt_display_t *display, int drm_fd)
pipe->n_planes = n_planes;
}
+ igt_fill_display_format_mod(display);
+
/*
* The number of connectors is set, so we just initialize the outputs
* array in _init(). This may change when we need dynamic connectors
@@ -3822,3 +3830,164 @@ uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
return pipe_flag;
}
}
+
+static inline const uint32_t *
+formats_ptr(const struct drm_format_modifier_blob *blob)
+{
+ return (const uint32_t *)((const char *)blob + blob->formats_offset);
+}
+
+static inline const struct drm_format_modifier *
+modifiers_ptr(const struct drm_format_modifier_blob *blob)
+{
+ return (const struct drm_format_modifier *)((const char *)blob + blob->modifiers_offset);
+}
+
+static int igt_count_plane_format_mod(const struct drm_format_modifier_blob *blob_data)
+{
+ const struct drm_format_modifier *modifiers;
+ int count = 0;
+
+ modifiers = modifiers_ptr(blob_data);
+
+ for (int i = 0; i < blob_data->count_modifiers; i++)
+ count += igt_hweight64(modifiers[i].formats);
+
+ return count;
+}
+
+static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane)
+{
+ const struct drm_format_modifier_blob *blob_data;
+ drmModePropertyBlobPtr blob;
+ uint64_t blob_id;
+ int idx = 0;
+ int count;
+
+ blob_id = igt_plane_get_prop(plane, IGT_PLANE_IN_FORMATS);
+
+ blob = drmModeGetPropertyBlob(display->drm_fd, blob_id);
+ if (!blob)
+ return;
+
+ blob_data = (const struct drm_format_modifier_blob *) blob->data;
+
+ count = igt_count_plane_format_mod(blob_data);
+ if (!count)
+ return;
+
+ 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);
+
+ for (int i = 0; i < blob_data->count_modifiers; i++) {
+ for (int j = 0; j < 64; j++) {
+ const struct drm_format_modifier *modifiers =
+ modifiers_ptr(blob_data);
+ const uint32_t *formats = formats_ptr(blob_data);
+
+ if (!(modifiers[i].formats & (1ULL << j)))
+ continue;
+
+ plane->formats[idx] = formats[modifiers[i].offset + j];
+ plane->modifiers[idx] = modifiers[i].modifier;
+ idx++;
+ igt_assert_lte(idx, plane->format_mod_count);
+ }
+ }
+
+ igt_assert_eq(idx, plane->format_mod_count);
+}
+
+bool igt_plane_has_format_mod(igt_plane_t *plane, uint32_t format,
+ uint64_t modifier)
+{
+ int i;
+
+ for (i = 0; i < plane->format_mod_count; i++) {
+ if (plane->formats[i] == format &&
+ plane->modifiers[i] == modifier)
+ return true;
+
+ }
+
+ return false;
+}
+
+static int igt_count_display_format_mod(igt_display_t *display)
+{
+ enum pipe pipe;
+ int count = 0;
+
+ for_each_pipe(display, pipe) {
+ igt_plane_t *plane;
+
+ for_each_plane_on_pipe(display, pipe, plane) {
+ count += plane->format_mod_count;
+ }
+ }
+
+ return count;
+}
+
+static void
+igt_add_display_format_mod(igt_display_t *display, uint32_t format,
+ uint64_t modifier)
+{
+ int i;
+
+ for (i = 0; i < display->format_mod_count; i++) {
+ if (display->formats[i] == format &&
+ display->modifiers[i] == modifier)
+ return;
+
+ }
+
+ display->formats[i] = format;
+ display->modifiers[i] = modifier;
+ display->format_mod_count++;
+}
+
+static void igt_fill_display_format_mod(igt_display_t *display)
+{
+ int count = igt_count_display_format_mod(display);
+ enum pipe pipe;
+
+ if (!count)
+ return;
+
+ display->formats = calloc(count, sizeof(display->formats[0]));
+ igt_assert(display->formats);
+ display->modifiers = calloc(count, sizeof(display->modifiers[0]));
+ igt_assert(display->modifiers);
+
+ for_each_pipe(display, pipe) {
+ igt_plane_t *plane;
+
+ for_each_plane_on_pipe(display, pipe, plane) {
+ for (int i = 0; i < plane->format_mod_count; i++) {
+ igt_add_display_format_mod(display,
+ plane->formats[i],
+ plane->modifiers[i]);
+ igt_assert_lte(display->format_mod_count, count);
+ }
+ }
+ }
+}
+
+bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
+ uint64_t modifier)
+{
+ int i;
+
+ for (i = 0; i < display->format_mod_count; i++) {
+ if (display->formats[i] == format &&
+ display->modifiers[i] == modifier)
+ return true;
+
+ }
+
+ return false;
+}
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 1c46186e8a9d..3a9df94c07e2 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -262,6 +262,7 @@ enum igt_atomic_plane_properties {
IGT_PLANE_IN_FENCE_FD,
IGT_PLANE_TYPE,
IGT_PLANE_ROTATION,
+ IGT_PLANE_IN_FORMATS,
IGT_NUM_PLANE_PROPS
};
@@ -309,6 +310,10 @@ typedef struct {
uint64_t changed;
uint32_t props[IGT_NUM_PLANE_PROPS];
uint64_t values[IGT_NUM_PLANE_PROPS];
+
+ uint64_t *modifiers;
+ uint32_t *formats;
+ int format_mod_count;
} igt_plane_t;
struct igt_pipe {
@@ -357,6 +362,10 @@ struct igt_display {
bool has_cursor_plane;
bool is_atomic;
bool first_commit;
+
+ uint64_t *modifiers;
+ uint32_t *formats;
+ int format_mod_count;
};
void igt_display_init(igt_display_t *display, int drm_fd);
@@ -671,4 +680,7 @@ bool igt_hotplug_detected(struct udev_monitor *mon,
void igt_flush_hotplugs(struct udev_monitor *mon);
void igt_cleanup_hotplug(struct udev_monitor *mon);
+bool igt_display_has_format_mod(igt_display_t *display, uint32_t format, uint64_t modifier);
+bool igt_plane_has_format_mod(igt_plane_t *plane, uint32_t format, uint64_t modifier);
+
#endif /* __IGT_KMS_H__ */
--
2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t 3/3] tests/kms_addfb_basic: Check that addfb2 accepts/rejects the expected formats
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form Ville Syrjala
@ 2018-03-12 20:42 ` Ville Syrjala
2018-03-13 0:14 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib: Add igt_hweight{32,64} Patchwork
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjala @ 2018-03-12 20:42 UTC (permalink / raw)
To: igt-dev
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Try to create a bunch of fbs with different formats/modfifiers and
make sure sure addfb2 accepts/rejects them in accordance with what
the plane IN_FORMATS blobifiers are advertizing.
We only check "easy" formats (ie. RGB/C8, no YUV/planar etc.). We
also assume that one can always create a 64x64 fb with stride of
64*8 bytes.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
tests/kms_addfb_basic.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 95 insertions(+), 3 deletions(-)
diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index 7d8852f02003..e7c23dc510b8 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -41,6 +41,88 @@
uint32_t gem_bo;
uint32_t gem_bo_small;
+static uint64_t modifiers[] = {
+ DRM_FORMAT_MOD_LINEAR,
+ I915_FORMAT_MOD_X_TILED,
+ I915_FORMAT_MOD_Y_TILED,
+ I915_FORMAT_MOD_Yf_TILED,
+ I915_FORMAT_MOD_Y_TILED_CCS,
+ I915_FORMAT_MOD_Yf_TILED_CCS,
+};
+
+static const uint32_t formats[] = {
+ DRM_FORMAT_C8,
+
+ DRM_FORMAT_RGB565,
+ DRM_FORMAT_BGR565,
+
+ DRM_FORMAT_RGB888,
+ DRM_FORMAT_BGR888,
+
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_XBGR8888,
+ DRM_FORMAT_RGBX8888,
+ DRM_FORMAT_BGRX8888,
+ DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_ABGR8888,
+ DRM_FORMAT_RGBA8888,
+ DRM_FORMAT_BGRA8888,
+
+ DRM_FORMAT_XRGB2101010,
+ DRM_FORMAT_XBGR2101010,
+ DRM_FORMAT_RGBX1010102,
+ DRM_FORMAT_BGRX1010102,
+ DRM_FORMAT_ARGB2101010,
+ DRM_FORMAT_ABGR2101010,
+ DRM_FORMAT_RGBA1010102,
+ DRM_FORMAT_BGRA1010102,
+};
+
+/*
+ * make sure addfb2 accepts/rejects every format/modifier
+ * in accordance with the plane IN_FORMATS properties.
+ */
+static void expected_formats(igt_display_t *display)
+{
+ int fd = display->drm_fd;
+ uint32_t handle;
+
+ handle = gem_create(fd, 64*8*64);
+ igt_assert(handle);
+
+ for (int i = 0; i < ARRAY_SIZE(formats); i++) {
+ uint32_t format = formats[i];
+
+ for (int j = 0; j < ARRAY_SIZE(modifiers); j++) {
+ uint64_t modifier = modifiers[j];
+ struct drm_mode_fb_cmd2 f = {
+ .width = 64,
+ .height = 64,
+ .pixel_format = format,
+ .handles[0] = handle,
+ .pitches[0] = 64 * 8,
+ .modifier[0] = modifier,
+ .flags = DRM_MODE_FB_MODIFIERS,
+ };
+ int ret;
+
+ ret = drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f);
+
+ if (igt_display_has_format_mod(display, format, modifier)) {
+ igt_assert_eq(ret, 0);
+ igt_assert_neq(f.fb_id, 0);
+ } else {
+ igt_assert_neq(ret, 0);
+ igt_assert_eq(f.fb_id, 0);
+ }
+
+ drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id);
+ }
+ }
+
+ gem_close(fd, handle);
+}
+
static void invalid_tests(int fd)
{
struct local_drm_mode_fb_cmd2 f = {};
@@ -539,13 +621,17 @@ static void prop_tests(int fd)
}
-int fd;
+static igt_display_t display;
+static int fd;
igt_main
{
- igt_fixture
+ igt_fixture {
fd = drm_open_driver_master(DRIVER_ANY);
+ igt_display_init(&display, fd);
+ }
+
invalid_tests(fd);
pitch_tests(fd);
@@ -560,6 +646,12 @@ igt_main
prop_tests(fd);
- igt_fixture
+ igt_subtest("expected-formats")
+ expected_formats(&display);
+
+ igt_fixture {
+ igt_display_fini(&display);
+
close(fd);
+ }
}
--
2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib: Add igt_hweight{32,64}
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form Ville Syrjala
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_addfb_basic: Check that addfb2 accepts/rejects the expected formats Ville Syrjala
@ 2018-03-13 0:14 ` Patchwork
2018-03-13 0:21 ` [igt-dev] [PATCH i-g-t 1/3] " Chris Wilson
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-03-13 0:14 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/3] lib: Add igt_hweight{32,64}
URL : https://patchwork.freedesktop.org/series/39815/
State : success
== Summary ==
IGT patchset tested on top of latest successful build
89b915f5aa465d5c3498b170b1572fae20460491 tests/pm_rpm: Don't try to create an X-tiled ARGB8888 framebuffer
with latest DRM-Tip kernel build CI_DRM_3915
da600bbe2441 drm-tip: 2018y-03m-12d-22h-06m-53s UTC integration manifest
Testlist changes:
+igt@kms_addfb_basic@expected-formats
---- Known issues:
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:442s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:384s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:541s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:303s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:510s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:509s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:518s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:506s
fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:417s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:586s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:433s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:324s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:534s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:403s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:423s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:471s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:434s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:487s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:472s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:520s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:643s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:448s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:530s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:541s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:508s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:500s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:430s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:536s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:404s
Blacklisted hosts:
fi-cfl-u total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:511s
fi-cnl-drrs total:288 pass:257 dwarn:3 dfail:0 fail:0 skip:28 time:545s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1113/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64}
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
` (2 preceding siblings ...)
2018-03-13 0:14 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib: Add igt_hweight{32,64} Patchwork
@ 2018-03-13 0:21 ` Chris Wilson
2018-03-13 5:40 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] " Patchwork
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-03-13 0:21 UTC (permalink / raw)
To: Ville Syrjala, igt-dev
Quoting Ville Syrjala (2018-03-12 20:42:22)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Add the binary hamming weight helpers to igt_aux.h.
Could we at least use __builtin_type_compatible_p to have a
igt_hweight() that does the right thing?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] lib: Add igt_hweight{32,64}
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
` (3 preceding siblings ...)
2018-03-13 0:21 ` [igt-dev] [PATCH i-g-t 1/3] " Chris Wilson
@ 2018-03-13 5:40 ` Patchwork
2018-03-13 18:29 ` [igt-dev] [PATCH i-g-t v2 1/3] lib: Add igt_hweight() Ville Syrjala
2018-03-13 19:16 ` [igt-dev] ✗ Fi.CI.BAT: warning for series starting with [i-g-t,v2,1/3] lib: Add igt_hweight() (rev3) Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-03-13 5:40 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,1/3] lib: Add igt_hweight{32,64}
URL : https://patchwork.freedesktop.org/series/39815/
State : success
== Summary ==
---- Known issues:
Test gem_eio:
Subgroup in-flight-external:
pass -> INCOMPLETE (shard-apl) fdo#105341
Test kms_atomic_transition:
Subgroup 1x-modeset-transitions-nonblocking-fencing:
fail -> PASS (shard-apl) fdo#103207
Test kms_chv_cursor_fail:
Subgroup pipe-b-64x64-top-edge:
pass -> SKIP (shard-snb) fdo#105185
Test kms_cursor_crc:
Subgroup cursor-256x256-suspend:
skip -> PASS (shard-snb) fdo#103375
Test kms_flip:
Subgroup 2x-flip-vs-expired-vblank:
pass -> FAIL (shard-hsw) fdo#102887
Subgroup flip-vs-wf_vblank-interruptible:
pass -> FAIL (shard-hsw) fdo#100368
Test prime_vgem:
Subgroup basic-fence-flip:
pass -> FAIL (shard-apl) fdo#104008
fdo#105341 https://bugs.freedesktop.org/show_bug.cgi?id=105341
fdo#103207 https://bugs.freedesktop.org/show_bug.cgi?id=103207
fdo#105185 https://bugs.freedesktop.org/show_bug.cgi?id=105185
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
shard-apl total:3457 pass:1819 dwarn:1 dfail:0 fail:9 skip:1625 time:12098s
shard-hsw total:3474 pass:1775 dwarn:1 dfail:0 fail:5 skip:1692 time:11898s
shard-snb total:3474 pass:1364 dwarn:1 dfail:0 fail:4 skip:2105 time:7266s
Blacklisted hosts:
shard-kbl total:3474 pass:1955 dwarn:1 dfail:0 fail:10 skip:1507 time:9606s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1113/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t v2 1/3] lib: Add igt_hweight()
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
` (4 preceding siblings ...)
2018-03-13 5:40 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] " Patchwork
@ 2018-03-13 18:29 ` Ville Syrjala
2018-03-13 20:49 ` Chris Wilson
2018-03-13 19:16 ` [igt-dev] ✗ Fi.CI.BAT: warning for series starting with [i-g-t,v2,1/3] lib: Add igt_hweight() (rev3) Patchwork
6 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2018-03-13 18:29 UTC (permalink / raw)
To: igt-dev
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Add the binary hamming weight helper to igt_aux.h.
v2: Add just the one macro that works for 64 and 32 bits (Chris)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_aux.h | 5 +++++
tests/kms_atomic_transition.c | 14 ++++++--------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 43dd15fe3b32..faddd478f0d1 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -385,4 +385,9 @@ static inline bool igt_list_empty(const struct igt_list *list)
&pos->member != (head); \
pos = tmp, tmp = igt_list_next_entry(pos, member))
+#define igt_hweight(x) \
+ __builtin_choose_expr(sizeof(x) == 8, \
+ __builtin_popcountll(x), \
+ __builtin_popcount(x))
+
#endif /* IGT_AUX_H */
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index aa9a6f8439ea..2fbd94bd2c57 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -44,8 +44,6 @@ struct plane_parms {
uint32_t width, height;
};
-#define hweight32 __builtin_popcount
-
/* globals for fence support */
int *timeline;
pthread_t *thread;
@@ -498,7 +496,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
}
for (i = 0; i < iter_max; i++) {
- int n_enable_planes = hweight32(i);
+ int n_enable_planes = igt_hweight(i);
if (type == TRANSITION_MODESET_FAST &&
n_enable_planes > 1 &&
@@ -524,7 +522,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
/* i -> i+1 will be done when i increases, can be skipped here */
for (j = iter_max - 1; j > i + 1; j--) {
- n_enable_planes = hweight32(j);
+ n_enable_planes = igt_hweight(j);
if (type == TRANSITION_MODESET_FAST &&
n_enable_planes > 1 &&
@@ -568,7 +566,7 @@ cleanup:
static void commit_display(igt_display_t *display, unsigned event_mask, bool nonblocking)
{
unsigned flags;
- int num_events = hweight32(event_mask);
+ int num_events = igt_hweight(event_mask);
ssize_t ret;
flags = DRM_MODE_ATOMIC_ALLOW_MODESET | DRM_MODE_PAGE_FLIP_EVENT;
@@ -735,7 +733,7 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
igt_crc_t crcs[5][IGT_MAX_PIPES];
unsigned event_mask;
- if (hweight32(i) > howmany)
+ if (igt_hweight(i) > howmany)
continue;
event_mask = set_combinations(display, i, &fbs[0]);
@@ -747,10 +745,10 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
collect_crcs_mask(pipe_crcs, i, crcs[0]);
for (j = iter_max - 1; j > i + 1; j--) {
- if (hweight32(j) > howmany)
+ if (igt_hweight(j) > howmany)
continue;
- if (hweight32(i) < howmany && hweight32(j) < howmany)
+ if (igt_hweight(i) < howmany && igt_hweight(j) < howmany)
continue;
event_mask = set_combinations(display, j, &fbs[1]);
--
2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t v2 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form Ville Syrjala
@ 2018-03-13 18:30 ` Ville Syrjala
2018-03-13 20:56 ` Chris Wilson
0 siblings, 1 reply; 12+ messages in thread
From: Ville Syrjala @ 2018-03-13 18:30 UTC (permalink / raw)
To: igt-dev
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Maintain straight up arrays of format+modifier tuples for each plane,
and also collect up a similar device wide array. These will make it
easy to confirm whether each plane (or the whole device) supports a
specific format+modifier pair.
v2: s/igt_hweight64/igt_hweight/
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/igt_kms.c | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
lib/igt_kms.h | 12 +++++
2 files changed, 182 insertions(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 6bac4d1fae50..cf6389f2474c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -171,7 +171,8 @@ const char *igt_plane_prop_names[IGT_NUM_PLANE_PROPS] = {
"CRTC_ID",
"IN_FENCE_FD",
"type",
- "rotation"
+ "rotation",
+ "IN_FORMATS",
};
const char *igt_crtc_prop_names[IGT_NUM_CRTC_PROPS] = {
@@ -1801,6 +1802,9 @@ void igt_display_reset(igt_display_t *display)
}
}
+static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane);
+static void igt_fill_display_format_mod(igt_display_t *display);
+
/**
* igt_display_init:
* @display: a pointer to an #igt_display_t structure
@@ -1912,6 +1916,8 @@ void igt_display_init(igt_display_t *display, int drm_fd)
plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL;
igt_fill_plane_props(display, plane, IGT_NUM_PLANE_PROPS, igt_plane_prop_names);
+
+ igt_fill_plane_format_mod(display, plane);
}
/*
@@ -1929,6 +1935,8 @@ void igt_display_init(igt_display_t *display, int drm_fd)
pipe->n_planes = n_planes;
}
+ igt_fill_display_format_mod(display);
+
/*
* The number of connectors is set, so we just initialize the outputs
* array in _init(). This may change when we need dynamic connectors
@@ -3822,3 +3830,164 @@ uint32_t kmstest_get_vbl_flag(uint32_t pipe_id)
return pipe_flag;
}
}
+
+static inline const uint32_t *
+formats_ptr(const struct drm_format_modifier_blob *blob)
+{
+ return (const uint32_t *)((const char *)blob + blob->formats_offset);
+}
+
+static inline const struct drm_format_modifier *
+modifiers_ptr(const struct drm_format_modifier_blob *blob)
+{
+ return (const struct drm_format_modifier *)((const char *)blob + blob->modifiers_offset);
+}
+
+static int igt_count_plane_format_mod(const struct drm_format_modifier_blob *blob_data)
+{
+ const struct drm_format_modifier *modifiers;
+ int count = 0;
+
+ modifiers = modifiers_ptr(blob_data);
+
+ for (int i = 0; i < blob_data->count_modifiers; i++)
+ count += igt_hweight(modifiers[i].formats);
+
+ return count;
+}
+
+static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane)
+{
+ const struct drm_format_modifier_blob *blob_data;
+ drmModePropertyBlobPtr blob;
+ uint64_t blob_id;
+ int idx = 0;
+ int count;
+
+ blob_id = igt_plane_get_prop(plane, IGT_PLANE_IN_FORMATS);
+
+ blob = drmModeGetPropertyBlob(display->drm_fd, blob_id);
+ if (!blob)
+ return;
+
+ blob_data = (const struct drm_format_modifier_blob *) blob->data;
+
+ count = igt_count_plane_format_mod(blob_data);
+ if (!count)
+ return;
+
+ 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);
+
+ for (int i = 0; i < blob_data->count_modifiers; i++) {
+ for (int j = 0; j < 64; j++) {
+ const struct drm_format_modifier *modifiers =
+ modifiers_ptr(blob_data);
+ const uint32_t *formats = formats_ptr(blob_data);
+
+ if (!(modifiers[i].formats & (1ULL << j)))
+ continue;
+
+ plane->formats[idx] = formats[modifiers[i].offset + j];
+ plane->modifiers[idx] = modifiers[i].modifier;
+ idx++;
+ igt_assert_lte(idx, plane->format_mod_count);
+ }
+ }
+
+ igt_assert_eq(idx, plane->format_mod_count);
+}
+
+bool igt_plane_has_format_mod(igt_plane_t *plane, uint32_t format,
+ uint64_t modifier)
+{
+ int i;
+
+ for (i = 0; i < plane->format_mod_count; i++) {
+ if (plane->formats[i] == format &&
+ plane->modifiers[i] == modifier)
+ return true;
+
+ }
+
+ return false;
+}
+
+static int igt_count_display_format_mod(igt_display_t *display)
+{
+ enum pipe pipe;
+ int count = 0;
+
+ for_each_pipe(display, pipe) {
+ igt_plane_t *plane;
+
+ for_each_plane_on_pipe(display, pipe, plane) {
+ count += plane->format_mod_count;
+ }
+ }
+
+ return count;
+}
+
+static void
+igt_add_display_format_mod(igt_display_t *display, uint32_t format,
+ uint64_t modifier)
+{
+ int i;
+
+ for (i = 0; i < display->format_mod_count; i++) {
+ if (display->formats[i] == format &&
+ display->modifiers[i] == modifier)
+ return;
+
+ }
+
+ display->formats[i] = format;
+ display->modifiers[i] = modifier;
+ display->format_mod_count++;
+}
+
+static void igt_fill_display_format_mod(igt_display_t *display)
+{
+ int count = igt_count_display_format_mod(display);
+ enum pipe pipe;
+
+ if (!count)
+ return;
+
+ display->formats = calloc(count, sizeof(display->formats[0]));
+ igt_assert(display->formats);
+ display->modifiers = calloc(count, sizeof(display->modifiers[0]));
+ igt_assert(display->modifiers);
+
+ for_each_pipe(display, pipe) {
+ igt_plane_t *plane;
+
+ for_each_plane_on_pipe(display, pipe, plane) {
+ for (int i = 0; i < plane->format_mod_count; i++) {
+ igt_add_display_format_mod(display,
+ plane->formats[i],
+ plane->modifiers[i]);
+ igt_assert_lte(display->format_mod_count, count);
+ }
+ }
+ }
+}
+
+bool igt_display_has_format_mod(igt_display_t *display, uint32_t format,
+ uint64_t modifier)
+{
+ int i;
+
+ for (i = 0; i < display->format_mod_count; i++) {
+ if (display->formats[i] == format &&
+ display->modifiers[i] == modifier)
+ return true;
+
+ }
+
+ return false;
+}
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 1c46186e8a9d..3a9df94c07e2 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -262,6 +262,7 @@ enum igt_atomic_plane_properties {
IGT_PLANE_IN_FENCE_FD,
IGT_PLANE_TYPE,
IGT_PLANE_ROTATION,
+ IGT_PLANE_IN_FORMATS,
IGT_NUM_PLANE_PROPS
};
@@ -309,6 +310,10 @@ typedef struct {
uint64_t changed;
uint32_t props[IGT_NUM_PLANE_PROPS];
uint64_t values[IGT_NUM_PLANE_PROPS];
+
+ uint64_t *modifiers;
+ uint32_t *formats;
+ int format_mod_count;
} igt_plane_t;
struct igt_pipe {
@@ -357,6 +362,10 @@ struct igt_display {
bool has_cursor_plane;
bool is_atomic;
bool first_commit;
+
+ uint64_t *modifiers;
+ uint32_t *formats;
+ int format_mod_count;
};
void igt_display_init(igt_display_t *display, int drm_fd);
@@ -671,4 +680,7 @@ bool igt_hotplug_detected(struct udev_monitor *mon,
void igt_flush_hotplugs(struct udev_monitor *mon);
void igt_cleanup_hotplug(struct udev_monitor *mon);
+bool igt_display_has_format_mod(igt_display_t *display, uint32_t format, uint64_t modifier);
+bool igt_plane_has_format_mod(igt_plane_t *plane, uint32_t format, uint64_t modifier);
+
#endif /* __IGT_KMS_H__ */
--
2.16.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: warning for series starting with [i-g-t,v2,1/3] lib: Add igt_hweight() (rev3)
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
` (5 preceding siblings ...)
2018-03-13 18:29 ` [igt-dev] [PATCH i-g-t v2 1/3] lib: Add igt_hweight() Ville Syrjala
@ 2018-03-13 19:16 ` Patchwork
6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2018-03-13 19:16 UTC (permalink / raw)
To: Ville Syrjala; +Cc: igt-dev
== Series Details ==
Series: series starting with [i-g-t,v2,1/3] lib: Add igt_hweight() (rev3)
URL : https://patchwork.freedesktop.org/series/39815/
State : warning
== Summary ==
IGT patchset tested on top of latest successful build
1bb3995eb6dba8e43981e0378e1c6eea3f730a0f tests/i915_query: fix expected subslice count on hsw
with latest DRM-Tip kernel build CI_DRM_3917
874b86a75985 drm-tip: 2018y-03m-13d-12h-36m-17s UTC integration manifest
Testlist changes:
+igt@kms_addfb_basic@expected-formats
---- Possible new issues:
Test kms_busy:
Subgroup basic-flip-a:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-b:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-c:
skip -> PASS (fi-ivb-3770)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
skip -> PASS (fi-ivb-3770)
Subgroup basic-busy-flip-before-cursor-legacy:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-after-cursor-atomic:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-after-cursor-legacy:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-after-cursor-varying-size:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-before-cursor-atomic:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-before-cursor-legacy:
skip -> PASS (fi-ivb-3770)
Subgroup basic-flip-before-cursor-varying-size:
skip -> PASS (fi-ivb-3770)
Test kms_force_connector_basic:
Subgroup prune-stale-modes:
pass -> SKIP (fi-ivb-3770)
Test kms_frontbuffer_tracking:
Subgroup basic:
skip -> PASS (fi-ivb-3770)
---- Known issues:
Test debugfs_test:
Subgroup read_all_entries:
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_chamelium:
Subgroup dp-crc-fast:
fail -> PASS (fi-kbl-7500u) fdo#103841
Test prime_vgem:
Subgroup basic-fence-flip:
skip -> PASS (fi-ivb-3770) fdo#104008
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:435s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:437s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:384s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:549s
fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:303s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:514s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:519s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:517s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:502s
fi-cfl-8700k total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:420s
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:594s
fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:592s
fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:441s
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:320s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:537s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:408s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:427s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:480s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:429s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:478s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:473s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:521s
fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:639s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:439s
fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:529s
fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:545s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:507s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:504s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:432s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:441s
fi-snb-2520m total:3 pass:2 dwarn:0 dfail:0 fail:0 skip:0
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:403s
Blacklisted hosts:
fi-cfl-u total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:514s
fi-cnl-drrs total:288 pass:257 dwarn:3 dfail:0 fail:0 skip:28 time:538s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1121/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 1/3] lib: Add igt_hweight()
2018-03-13 18:29 ` [igt-dev] [PATCH i-g-t v2 1/3] lib: Add igt_hweight() Ville Syrjala
@ 2018-03-13 20:49 ` Chris Wilson
0 siblings, 0 replies; 12+ messages in thread
From: Chris Wilson @ 2018-03-13 20:49 UTC (permalink / raw)
To: Ville Syrjala, igt-dev
Quoting Ville Syrjala (2018-03-13 18:29:47)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Add the binary hamming weight helper to igt_aux.h.
>
> v2: Add just the one macro that works for 64 and 32 bits (Chris)
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> lib/igt_aux.h | 5 +++++
> tests/kms_atomic_transition.c | 14 ++++++--------
> 2 files changed, 11 insertions(+), 8 deletions(-)
>
> diff --git a/lib/igt_aux.h b/lib/igt_aux.h
> index 43dd15fe3b32..faddd478f0d1 100644
> --- a/lib/igt_aux.h
> +++ b/lib/igt_aux.h
> @@ -385,4 +385,9 @@ static inline bool igt_list_empty(const struct igt_list *list)
> &pos->member != (head); \
> pos = tmp, tmp = igt_list_next_entry(pos, member))
>
> +#define igt_hweight(x) \
> + __builtin_choose_expr(sizeof(x) == 8, \
> + __builtin_popcountll(x), \
> + __builtin_popcount(x))
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form
2018-03-13 18:30 ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
@ 2018-03-13 20:56 ` Chris Wilson
2018-03-13 21:19 ` Ville Syrjälä
0 siblings, 1 reply; 12+ messages in thread
From: Chris Wilson @ 2018-03-13 20:56 UTC (permalink / raw)
To: Ville Syrjala, igt-dev
Quoting Ville Syrjala (2018-03-13 18:30:13)
> + for (int i = 0; i < blob_data->count_modifiers; i++) {
> + for (int j = 0; j < 64; j++) {
> + const struct drm_format_modifier *modifiers =
> + modifiers_ptr(blob_data);
> + const uint32_t *formats = formats_ptr(blob_data);
> +
> + if (!(modifiers[i].formats & (1ULL << j)))
> + continue;
> +
> + plane->formats[idx] = formats[modifiers[i].offset + j];
So far everything has been byte offset, but for drm_format_modifier you
now switch to an index offset. In drm_plane.c, I only found
drm_format_modifier.offset = 0 and no examples of a non-zero offset to
check against.
I presume you know what you are doing. :)
Otherwise the code looks consistent with itself and drm_plane.c
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t v2 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form
2018-03-13 20:56 ` Chris Wilson
@ 2018-03-13 21:19 ` Ville Syrjälä
0 siblings, 0 replies; 12+ messages in thread
From: Ville Syrjälä @ 2018-03-13 21:19 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
On Tue, Mar 13, 2018 at 08:56:39PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2018-03-13 18:30:13)
> > + for (int i = 0; i < blob_data->count_modifiers; i++) {
> > + for (int j = 0; j < 64; j++) {
> > + const struct drm_format_modifier *modifiers =
> > + modifiers_ptr(blob_data);
> > + const uint32_t *formats = formats_ptr(blob_data);
> > +
> > + if (!(modifiers[i].formats & (1ULL << j)))
> > + continue;
> > +
> > + plane->formats[idx] = formats[modifiers[i].offset + j];
>
> So far everything has been byte offset, but for drm_format_modifier you
> now switch to an index offset. In drm_plane.c, I only found
> drm_format_modifier.offset = 0 and no examples of a non-zero offset to
> check against.
>
> I presume you know what you are doing. :)
Possibly. IIRC the offset is was just supposed to be n*64 to index more
than 64 formats. But of course it's all very much theoretical until a
plane exposes that many formats.
>
> Otherwise the code looks consistent with itself and drm_plane.c
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris
--
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-03-13 21:19 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 20:42 [igt-dev] [PATCH i-g-t 1/3] lib: Add igt_hweight{32,64} Ville Syrjala
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 2/3] lib: Parse plane IN_FORMATS blobifiers into a nicer form Ville Syrjala
2018-03-13 18:30 ` [igt-dev] [PATCH i-g-t v2 " Ville Syrjala
2018-03-13 20:56 ` Chris Wilson
2018-03-13 21:19 ` Ville Syrjälä
2018-03-12 20:42 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_addfb_basic: Check that addfb2 accepts/rejects the expected formats Ville Syrjala
2018-03-13 0:14 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib: Add igt_hweight{32,64} Patchwork
2018-03-13 0:21 ` [igt-dev] [PATCH i-g-t 1/3] " Chris Wilson
2018-03-13 5:40 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] " Patchwork
2018-03-13 18:29 ` [igt-dev] [PATCH i-g-t v2 1/3] lib: Add igt_hweight() Ville Syrjala
2018-03-13 20:49 ` Chris Wilson
2018-03-13 19:16 ` [igt-dev] ✗ Fi.CI.BAT: warning for series starting with [i-g-t,v2,1/3] lib: Add igt_hweight() (rev3) 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.