summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKunal Joshi <kunal1.joshi@intel.com>2021-02-19 14:12:56 +0530
committerKunal Joshi <kunal1.joshi@intel.com>2021-02-21 21:24:43 +0530
commit4087b6e021e29145950e46458e38ec1635666c0a (patch)
tree0246d51db780d6ccfda7c8cb21c4f592ea676e16 /lib
parenta4dccf189b34a55338feec9927dac57c467c4100 (diff)
lib/igt_chamelium: Added toggle for fsm_handling
Added igt_chamelium_allow_fsm_handling. v2: changes for resolving gcc warnings (Petri) Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_chamelium.c6
-rw-r--r--lib/igt_chamelium.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index 585fdfa8..99b6a8df 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -135,6 +135,8 @@ struct chamelium {
int port_count;
};
+bool igt_chamelium_allow_fsm_handling = true;
+
static struct chamelium *cleanup_instance;
static void chamelium_do_calculate_fb_crc(cairo_surface_t *fb_surface,
@@ -327,7 +329,7 @@ static xmlrpc_value *__chamelium_rpc_va(struct chamelium *chamelium,
* to handle the chamelium attempting FSM, we have to fork into another
* thread and have that handle hotplugging displays
*/
- if (fsm_port) {
+ if (fsm_port && igt_chamelium_allow_fsm_handling) {
monitor_args.chamelium = chamelium;
monitor_args.port = fsm_port;
monitor_args.mon = igt_watch_uevents();
@@ -355,7 +357,7 @@ static xmlrpc_value *__chamelium_rpc_va(struct chamelium *chamelium,
/* i2c error, let's try to retry */
}
- if (fsm_port) {
+ if (fsm_port && igt_chamelium_allow_fsm_handling) {
pthread_cancel(fsm_thread_id);
pthread_join(fsm_thread_id, NULL);
igt_cleanup_uevents(monitor_args.mon);
diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h
index 359f4ab3..bfcb7bb4 100644
--- a/lib/igt_chamelium.h
+++ b/lib/igt_chamelium.h
@@ -100,6 +100,8 @@ struct chamelium_edid;
*/
#define CHAMELIUM_MAX_AUDIO_CHANNELS 8
+extern bool igt_chamelium_allow_fsm_handling;
+
void chamelium_deinit_rpc_only(struct chamelium *chamelium);
struct chamelium *chamelium_init_rpc_only(void);
struct chamelium *chamelium_init(int drm_fd);