[igt-dev] [PATCH i-g-t] tests/kms_plane_alpha_blend: Dont commit primary for 6bpc display in coverage-vs-premult-vs-none
Vidya Srinivas
vidya.srinivas at intel.com
Sat Jul 3 15:52:59 UTC 2021
Intel Gen11 6bpc panels are giving CRC mismatch in coverage-vs-premult-vs-none
if primary gray fb is commited before starting alpha tests. Patch removes primar plane
commit if device is intel and 6bpc.
Signed-off-by: Vidya Srinivas <vidya.srinivas at intel.com>
---
tests/kms_plane_alpha_blend.c | 36 ++++++++++++++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index a37cb27c7d62..5f0a8cb070dd 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -25,6 +25,7 @@
*/
#include "igt.h"
+#include <string.h>
IGT_TEST_DESCRIPTION("Test plane alpha and blending mode properties");
@@ -442,14 +443,45 @@ static void coverage_7efc(data_t *data, enum pipe pipe, igt_plane_t *plane)
igt_pipe_crc_stop(data->pipe_crc);
}
+static bool is_6bpc(igt_display_t *display)
+{
+ char buf[4096];
+ char *str;
+ bool ret;
+ int debugfs_fd;
+
+ if (!is_i915_device(display->drm_fd))
+ return false;
+
+ debugfs_fd = igt_debugfs_dir(display->drm_fd);
+
+ if (debugfs_fd < 0)
+ return false;
+
+ igt_debugfs_simple_read(debugfs_fd, "i915_display_info", buf, sizeof(buf));
+
+ str = strstr(buf, "bpp=");
+ if (strncmp(str, "bpp=18", 6) == 0)
+ ret = true;
+ else
+ ret = false;
+
+ close(debugfs_fd);
+ return ret;
+}
+
static void coverage_premult_constant(data_t *data, enum pipe pipe, igt_plane_t *plane)
{
igt_display_t *display = &data->display;
igt_crc_t ref_crc = {}, crc = {};
+
/* Set a background color on the primary fb for testing */
- if (plane->type != DRM_PLANE_TYPE_PRIMARY)
- igt_plane_set_fb(igt_pipe_get_plane_type(&display->pipes[pipe], DRM_PLANE_TYPE_PRIMARY), &data->gray_fb);
+ if (plane->type != DRM_PLANE_TYPE_PRIMARY) {
+ if (!is_6bpc(display))
+ igt_plane_set_fb(igt_pipe_get_plane_type(&display->pipes[pipe],
+ DRM_PLANE_TYPE_PRIMARY), &data->gray_fb);
+ }
igt_plane_set_prop_enum(plane, IGT_PLANE_PIXEL_BLEND_MODE, "Coverage");
igt_plane_set_fb(plane, &data->argb_fb_cov_7e);
--
2.7.4
More information about the igt-dev
mailing list