Revision e9c05b42 hw/pl110.c
b/hw/pl110.c | ||
---|---|---|
10 | 10 |
#include "vl.h" |
11 | 11 |
|
12 | 12 |
#define PL110_CR_EN 0x001 |
13 |
#define PL110_CR_BGR 0x100 |
|
13 | 14 |
#define PL110_CR_BEBO 0x200 |
14 | 15 |
#define PL110_CR_BEPO 0x400 |
15 | 16 |
#define PL110_CR_PWR 0x800 |
... | ... | |
114 | 115 |
int first, last = 0; |
115 | 116 |
int dirty, new_dirty; |
116 | 117 |
int i; |
118 |
int bpp_offset; |
|
117 | 119 |
|
118 | 120 |
if (!pl110_enabled(s)) |
119 | 121 |
return; |
... | ... | |
145 | 147 |
fprintf(stderr, "pl110: Bad color depth\n"); |
146 | 148 |
exit(1); |
147 | 149 |
} |
150 |
if (s->cr & PL110_CR_BGR) |
|
151 |
bpp_offset = 0; |
|
152 |
else |
|
153 |
bpp_offset = 18; |
|
154 |
|
|
148 | 155 |
if (s->cr & PL110_CR_BEBO) |
149 |
fn = fntable[s->bpp + 6];
|
|
156 |
fn = fntable[s->bpp + 6 + bpp_offset];
|
|
150 | 157 |
else if (s->cr & PL110_CR_BEPO) |
151 |
fn = fntable[s->bpp + 12];
|
|
158 |
fn = fntable[s->bpp + 12 + bpp_offset];
|
|
152 | 159 |
else |
153 |
fn = fntable[s->bpp];
|
|
160 |
fn = fntable[s->bpp + bpp_offset];
|
|
154 | 161 |
|
155 | 162 |
src_width = s->cols; |
156 | 163 |
switch (s->bpp) { |
Also available in: Unified diff