Release 4.11 drivers/video/console/fbcon_rotate.h
/*
* linux/drivers/video/console/fbcon_rotate.h -- Software Display Rotation
*
* Copyright (C) 2005 Antonino Daplas <adaplas@pol.net>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*/
#ifndef _FBCON_ROTATE_H
#define _FBCON_ROTATE_H
#define GETVYRES(s,i) ({ \
(s == SCROLL_REDRAW || s == SCROLL_MOVE) ? \
(i)->var.yres : (i)->var.yres_virtual; })
#define GETVXRES(s,i) ({ \
(s == SCROLL_REDRAW || s == SCROLL_MOVE || !(i)->fix.xpanstep) ? \
(i)->var.xres : (i)->var.xres_virtual; })
static inline int pattern_test_bit(u32 x, u32 y, u32 pitch, const char *pat)
{
u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8;
pat +=index;
return (*pat) & (0x80 >> bit);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Antonino A. Daplas | 54 | 90.00% | 1 | 50.00% |
Benjamin Herrenschmidt | 6 | 10.00% | 1 | 50.00% |
Total | 60 | 100.00% | 2 | 100.00% |
static inline void pattern_set_bit(u32 x, u32 y, u32 pitch, char *pat)
{
u32 tmp = (y * pitch) + x, index = tmp / 8, bit = tmp % 8;
pat += index;
(*pat) |= 0x80 >> bit;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Antonino A. Daplas | 51 | 91.07% | 1 | 50.00% |
Benjamin Herrenschmidt | 5 | 8.93% | 1 | 50.00% |
Total | 56 | 100.00% | 2 | 100.00% |
static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)
{
int i, j;
int shift = (8 - (width % 8)) & 7;
width = (width + 7) & ~7;
for (i = 0; i < height; i++) {
for (j = 0; j < width - shift; j++) {
if (pattern_test_bit(j, i, width, in))
pattern_set_bit(width - (1 + j + shift),
height - (1 + i),
width, out);
}
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Antonino A. Daplas | 121 | 98.37% | 2 | 66.67% |
Stefani Seibold | 2 | 1.63% | 1 | 33.33% |
Total | 123 | 100.00% | 3 | 100.00% |
static inline void rotate_cw(const char *in, char *out, u32 width, u32 height)
{
int i, j, h = height, w = width;
int shift = (8 - (height % 8)) & 7;
width = (width + 7) & ~7;
height = (height + 7) & ~7;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
if (pattern_test_bit(j, i, width, in))
pattern_set_bit(height - 1 - i - shift, j,
height, out);
}
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Antonino A. Daplas | 132 | 100.00% | 1 | 100.00% |
Total | 132 | 100.00% | 1 | 100.00% |
static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height)
{
int i, j, h = height, w = width;
int shift = (8 - (width % 8)) & 7;
width = (width + 7) & ~7;
height = (height + 7) & ~7;
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
if (pattern_test_bit(j, i, width, in))
pattern_set_bit(i, width - 1 - j - shift,
height, out);
}
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Antonino A. Daplas | 132 | 100.00% | 2 | 100.00% |
Total | 132 | 100.00% | 2 | 100.00% |
extern void fbcon_rotate_cw(struct fbcon_ops *ops);
extern void fbcon_rotate_ud(struct fbcon_ops *ops);
extern void fbcon_rotate_ccw(struct fbcon_ops *ops);
#endif
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Antonino A. Daplas | 547 | 97.68% | 5 | 71.43% |
Benjamin Herrenschmidt | 11 | 1.96% | 1 | 14.29% |
Stefani Seibold | 2 | 0.36% | 1 | 14.29% |
Total | 560 | 100.00% | 7 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.