Skip to content

Commit e579201

Browse files
author
Russell King
committed
ARM: riscpc: parse video information from tagged list
Correctly parse the video information from the tagged list, so that we end up with the right bytes-per-char values. When booting with a tagged list rather than a param block, this allows the decompressor to display its messages during boot on the screen. (Boot loaders normally pass a param block on this platform, but the latest boot loader version recently released does not.) Signed-off-by: Russell King <[email protected]>
1 parent 1eac59d commit e579201

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

arch/arm/mach-rpc/include/mach/uncompress.h

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,22 @@ static void arch_decomp_setup(void)
118118
struct tag *t = (struct tag *)params;
119119
unsigned int nr_pages = 0, page_size = PAGE_SIZE;
120120

121-
if (t->hdr.tag == ATAG_CORE)
122-
{
123-
for (; t->hdr.size; t = tag_next(t))
124-
{
125-
if (t->hdr.tag == ATAG_VIDEOTEXT)
126-
{
121+
if (t->hdr.tag == ATAG_CORE) {
122+
for (; t->hdr.size; t = tag_next(t)) {
123+
if (t->hdr.tag == ATAG_VIDEOTEXT) {
127124
video_num_rows = t->u.videotext.video_lines;
128125
video_num_cols = t->u.videotext.video_cols;
129-
bytes_per_char_h = t->u.videotext.video_points;
130-
bytes_per_char_v = t->u.videotext.video_points;
131126
video_x = t->u.videotext.x;
132127
video_y = t->u.videotext.y;
133-
}
134-
135-
if (t->hdr.tag == ATAG_MEM)
136-
{
128+
} else if (t->hdr.tag == ATAG_VIDEOLFB) {
129+
bytes_per_char_h = t->u.videolfb.lfb_depth;
130+
bytes_per_char_v = 8;
131+
} else if (t->hdr.tag == ATAG_MEM) {
137132
page_size = PAGE_SIZE;
138133
nr_pages += (t->u.mem.size / PAGE_SIZE);
139134
}
140135
}
141-
}
142-
else
143-
{
136+
} else {
144137
nr_pages = params->nr_pages;
145138
page_size = params->page_size;
146139
video_num_rows = params->video_num_rows;

0 commit comments

Comments
 (0)