mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
sun4m: Add Sun CG3 framebuffer initialisation function
In order to allow the user to choose the framebuffer for sparc-softmmu, add -vga tcx and -vga cg3 options to the QEMU command line. If no option is specified, the default TCX framebuffer is used. Since proprietary FCode ROMs use a resolution of 1152x900, slightly relax the validation rules to allow both displays to be initiated at the higher resolution used by these ROMs upon request (OpenBIOS FCode ROMs default to the normal QEMU sun4m default resolution of 1024x768). Finally move any fprintf(stderr ...) statements in the areas affected by this patch over to the new error_report() function. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Blue Swirl <blauwirbel@gmail.com> CC: Anthony Liguori <aliguori@amazon.com> CC: Peter Maydell <peter.maydell@linaro.org> CC: Bob Breuer <breuerr@mc.net> CC: Artyom Tarasenko <atar4qemu@gmail.com>
This commit is contained in:
parent
9eb08a435a
commit
af87bf290f
3 changed files with 84 additions and 3 deletions
24
vl.c
24
vl.c
|
@ -2031,6 +2031,16 @@ static bool qxl_vga_available(void)
|
|||
return object_class_by_name("qxl-vga");
|
||||
}
|
||||
|
||||
static bool tcx_vga_available(void)
|
||||
{
|
||||
return object_class_by_name("SUNW,tcx");
|
||||
}
|
||||
|
||||
static bool cg3_vga_available(void)
|
||||
{
|
||||
return object_class_by_name("cgthree");
|
||||
}
|
||||
|
||||
static void select_vgahw (const char *p)
|
||||
{
|
||||
const char *opts;
|
||||
|
@ -2066,6 +2076,20 @@ static void select_vgahw (const char *p)
|
|||
fprintf(stderr, "Error: QXL VGA not available\n");
|
||||
exit(0);
|
||||
}
|
||||
} else if (strstart(p, "tcx", &opts)) {
|
||||
if (tcx_vga_available()) {
|
||||
vga_interface_type = VGA_TCX;
|
||||
} else {
|
||||
fprintf(stderr, "Error: TCX framebuffer not available\n");
|
||||
exit(0);
|
||||
}
|
||||
} else if (strstart(p, "cg3", &opts)) {
|
||||
if (cg3_vga_available()) {
|
||||
vga_interface_type = VGA_CG3;
|
||||
} else {
|
||||
fprintf(stderr, "Error: CG3 framebuffer not available\n");
|
||||
exit(0);
|
||||
}
|
||||
} else if (!strstart(p, "none", &opts)) {
|
||||
invalid_vga:
|
||||
fprintf(stderr, "Unknown vga type: %s\n", p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue