]> Devoid-pointer.net GitWeb - KLGD.git/commitdiff
Add some debugging output, this shall be useful quite soon
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 25 Jul 2014 19:00:01 +0000 (21:00 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 25 Jul 2014 19:00:01 +0000 (21:00 +0200)
klgd.c

diff --git a/klgd.c b/klgd.c
index feb24844e1ea46cde823a6601cdcc7c0913a5618..86c9f53ae303af268e0d0e9a7992e2ecaf5bf3db 100644 (file)
--- a/klgd.c
+++ b/klgd.c
@@ -131,12 +131,16 @@ void klgd_notify_commands_sent(struct klgd_main *ctx)
        if (atomic_read(&priv->send_asap)) {
                unsigned long flags;
 
+               pr_debug("Command stream processed, send a new one immediately\n");
+
                spin_lock_irqsave(&priv->stream_lock, flags);
                klgd_build_command_stream(ctx);
                spin_unlock_irqrestore(&priv->stream_lock, flags);
                atomic_set(&priv->send_asap, 0);
-       } else
+       } else {
+               pr_debug("Command stream processed, wait for timer\n");
                atomic_set(&priv->can_send_commands, 1);
+       }
 }
 
 int klgd_post_event(struct klgd_main *ctx, size_t idx, void *data)
@@ -208,11 +212,15 @@ void klgd_timer_fired(unsigned long ctx)
        if (atomic_read(&priv->can_send_commands)) {
                unsigned long flags;
 
+               pr_debug("Timer fired, can send commands now\n");
+
                spin_lock_irqsave(&priv->stream_lock, flags);
                klgd_build_command_stream(m);
                spin_unlock_irqrestore(&priv->stream_lock, flags);
-       } else
+       } else {
+               pr_debug("Timer fired, last stream of commands is still being processed\n");
                atomic_set(&priv->send_asap, 1);
+       }
 
        klgd_schedule_update(ctx);
 }
\ No newline at end of file