xref: /linux/drivers/video/fbdev/core/fbcon_rotate.h (revision 5ea5880764cbb164afb17a62e76ca75dc371409d)
1 /*
2  *  linux/drivers/video/console/fbcon_rotate.h -- Software Display Rotation
3  *
4  *	Copyright (C) 2005 Antonino Daplas <adaplas@pol.net>
5  *
6  *  This file is subject to the terms and conditions of the GNU General Public
7  *  License.  See the file COPYING in the main directory of this archive
8  *  for more details.
9  */
10 
11 #ifndef _FBCON_ROTATE_H
12 #define _FBCON_ROTATE_H
13 
14 #define GETVYRES(s,i) ({                           \
15         (fb_scrollmode(s) == SCROLL_REDRAW || fb_scrollmode(s) == SCROLL_MOVE) ? \
16         (i)->var.yres : (i)->var.yres_virtual; })
17 
18 #define GETVXRES(s,i) ({                           \
19         (fb_scrollmode(s) == SCROLL_REDRAW || fb_scrollmode(s) == SCROLL_MOVE || !(i)->fix.xpanstep) ? \
20         (i)->var.xres : (i)->var.xres_virtual; })
21 
22 int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc);
23 
24 #if defined(CONFIG_FRAMEBUFFER_CONSOLE_ROTATION)
25 void fbcon_set_bitops_cw(struct fbcon_par *par);
26 void fbcon_set_bitops_ud(struct fbcon_par *par);
27 void fbcon_set_bitops_ccw(struct fbcon_par *par);
28 #else
29 static inline void fbcon_set_bitops_cw(struct fbcon_par *par)
30 { }
31 static inline void fbcon_set_bitops_ud(struct fbcon_par *par)
32 { }
33 static inline void fbcon_set_bitops_ccw(struct fbcon_par *par)
34 { }
35 #endif
36 
37 #endif
38