diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-08-02 12:05:41 -0700 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-08-05 09:22:31 -0500 |
commit | d219adc1228a3887486b58a430e736b0831f192c (patch) | |
tree | a734e48a573774201ab8c6c06ff6eb6de60648f1 /include | |
parent | 408a4be1f8cbee511895ee07da2a007a5a24303f (diff) |
fb: add hooks to handle KDB enter/exit
Add fb ops to handle enter/exit of the kernel debugger. If present, the
fb core will register them with KGDB and they'll be called when the
debugger is entered and exited. The new functions are responsible for
switching to an appropriate debug framebuffer and restoring the
interrupted state at exit time.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fb.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index e7445df44d6..0c5659c41b0 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -3,6 +3,9 @@ #include <linux/types.h> #include <linux/i2c.h> +#ifdef __KERNEL__ +#include <linux/kgdb.h> +#endif /* __KERNEL__ */ /* Definitions of frame buffers */ @@ -607,6 +610,12 @@ struct fb_deferred_io { * LOCKING NOTE: those functions must _ALL_ be called with the console * semaphore held, this is the only suitable locking mechanism we have * in 2.6. Some may be called at interrupt time at this point though. + * + * The exception to this is the debug related hooks. Putting the fb + * into a debug state (e.g. flipping to the kernel console) and restoring + * it must be done in a lock-free manner, so low level drivers should + * keep track of the initial console (if applicable) and may need to + * perform direct, unlocked hardware writes in these hooks. */ struct fb_ops { @@ -676,6 +685,10 @@ struct fb_ops { /* teardown any resources to do with this framebuffer */ void (*fb_destroy)(struct fb_info *info); + + /* called at KDB enter and leave time to prepare the console */ + int (*fb_debug_enter)(struct fb_info *info); + int (*fb_debug_leave)(struct fb_info *info); }; #ifdef CONFIG_FB_TILEBLITTING |