# RiscPC: disable video output if there's a tagged list # From: Jim Hawkins # Upstream status: the patch works as it is, but rmk would like to see a # different solution, see # http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3532/1 diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h index 06231ed..26aec62 100644 --- a/include/asm-arm/arch-rpc/uncompress.h +++ b/include/asm-arm/arch-rpc/uncompress.h @@ -11,7 +11,9 @@ #include #include +#include +int video_ok = 0; int video_num_columns, video_num_lines, video_size_row; int white, bytes_per_char_h; extern unsigned long con_charconvtable[256]; @@ -73,6 +75,10 @@ static void putc(int c) int x,y; char *ptr; + /* Do nothing if we don't have video info */ + if (!video_ok) + return; + x = params->video_x; y = params->video_y; @@ -108,6 +114,10 @@ static void error(char *x); static void arch_decomp_setup(void) { int i; + + /* Don't do video if we're passed a kernel tagged list */ + if (((struct tag_header *)params)->tag == ATAG_CORE) + return; video_num_lines = params->video_num_rows; video_num_columns = params->video_num_cols; @@ -147,6 +157,8 @@ static void arch_decomp_setup(void) } if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); + + video_ok = 1; } #endif