summaryrefslogtreecommitdiff
path: root/lib/igt_chamelium.h
diff options
context:
space:
mode:
authorKunal Joshi <kunal1.joshi@intel.com>2021-04-26 15:02:03 +0530
committerKunal Joshi <kunal1.joshi@intel.com>2021-04-26 19:57:27 +0530
commitc16bef698086eca8c68f583dde463d6418bccd8b (patch)
treec5dfc52905db5ed72e1abaf1eaec971d51dd66ca /lib/igt_chamelium.h
parent3f43ae9fd22dc5a517786b984dc3aa717997664f (diff)
Make basic chamelium function accessible to other tests
There are many use case where we can integrate chamelium with other tests, Migrating some of basic chamelium functions to igt_chamelium lib to avoid Code rewriting. v2: Moved one more function reset_state from tests/kms_chamelium to lib/igt_chamelium. v3: - Shifted disabling of modeset to igt_kms - Replace connection_str with kmstest_connector_status_str (Petri) - Generalized require__connector_present (Petri) - Avoided using data_chamelium_t struct (Petri) v4: - Moved function to library (Petri) - Renamed some functions and added documentation (Petri) v6: - Documentation of functions(Petri) - Shifted function to igt_kms and renamed (Petri) Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Karthik B S <karthik.b.s@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/igt_chamelium.h')
-rw-r--r--lib/igt_chamelium.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index bfcb7bb4..a4ace397 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -32,6 +32,7 @@
#include <xf86drmMode.h>
#include "igt_debugfs.h"
+#include "igt_kms.h"
struct igt_fb;
struct edid;
@@ -81,6 +82,11 @@ struct chamelium_infoframe {
struct chamelium_edid;
+/* Set of Video Identification Codes advertised in the EDID */
+static const uint8_t edid_ar_svds[] = {
+ 16, /* 1080p @ 60Hz, 16:9 */
+};
+
/**
* CHAMELIUM_MAX_PORTS: the maximum number of ports supported by igt_chamelium.
*
@@ -102,6 +108,8 @@ struct chamelium_edid;
extern bool igt_chamelium_allow_fsm_handling;
+#define CHAMELIUM_HOTPLUG_TIMEOUT 20 /* seconds */
+
void chamelium_deinit_rpc_only(struct chamelium *chamelium);
struct chamelium *chamelium_init_rpc_only(void);
struct chamelium *chamelium_init(int drm_fd);
@@ -115,6 +123,26 @@ drmModeConnector *chamelium_port_get_connector(struct chamelium *chamelium,
struct chamelium_port *port,
bool reprobe);
const char *chamelium_port_get_name(struct chamelium_port *port);
+void
+chamelium_require_connector_present(struct chamelium_port **ports,
+ unsigned int type,
+ int port_count,
+ int count);
+drmModeConnection
+chamelium_reprobe_connector(igt_display_t *display,
+ struct chamelium *chamelium,
+ struct chamelium_port *port);
+void
+chamelium_wait_for_conn_status_change(igt_display_t *display,
+ struct chamelium *chamelium,
+ struct chamelium_port *port,
+ drmModeConnection status);
+void
+chamelium_reset_state(igt_display_t *display,
+ struct chamelium *chamelium,
+ struct chamelium_port *port,
+ struct chamelium_port **ports,
+ int port_count);
bool chamelium_wait_reachable(struct chamelium *chamelium, int timeout);
void chamelium_assert_reachable(struct chamelium *chamelium, int timeout);