return str[pipe];
}
+/**
+ * kmstest_plane_name:
+ * @plane: display plane
+ *
+ * Returns: String represnting @pipe, e.g. "plane1".
+ */
+const char *kmstest_plane_name(enum igt_plane plane)
+{
+ static const char *names[] = {
+ [IGT_PLANE_1] = "plane1",
+ [IGT_PLANE_2] = "plane2",
+ [IGT_PLANE_3] = "plane3",
+ [IGT_PLANE_CURSOR] = "cursor",
+ };
+
+ igt_assert(plane < ARRAY_SIZE(names) && names[plane]);
+
+ return names[plane];
+}
+
struct type_name {
int type;
const char *name;
}
}
+/**
+ * kmstest_dump_mode:
+ * @mode: libdrm mode structure
+ *
+ * Prints @mode to stdout in a huma-readable form.
+ */
void kmstest_dump_mode(drmModeModeInfo *mode)
{
const char *stereo = mode_stereo_name(mode);
drmModeFreeConnector(config->connector);
}
-const char *plane_name(enum igt_plane p)
-{
- static const char *names[] = {
- [IGT_PLANE_1] = "plane1",
- [IGT_PLANE_2] = "plane2",
- [IGT_PLANE_3] = "plane3",
- [IGT_PLANE_CURSOR] = "cursor",
- };
-
- igt_assert(p < ARRAY_SIZE(names) && names[p]);
-
- return names[p];
-}
-
/*
* A small modeset API
*/
IGT_PLANE_CURSOR,
};
-const char *plane_name(enum igt_plane p);
-
-#define sprite_name(p, s) ((p) * dev_priv->num_plane + (s) + 'A')
+const char *kmstest_plane_name(enum igt_plane plane);
enum port {
PORT_A = 0,
PORT_E,
I915_MAX_PORTS
};
-#define port_name(p) ((p) + 'A')
+
+/**
+ * kmstest_port_name:
+ * @port: display plane
+ *
+ * Returns: String represnting @port, e.g. "A".
+ */
+#define kmstest_port_name(port) ((port) + 'A')
enum igt_commit_style {
COMMIT_LEGACY = 0,