Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys - add support for using compressed images as splash images
details: https://anonhg.NetBSD.org/src/rev/7759f4869ebf
branches: trunk
changeset: 761757:7759f4869ebf
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Feb 06 23:25:16 2011 +0000
description:
- add support for using compressed images as splash images
- retire SPLASHSCREEN_PROGRESS and SPLASHSCREEN_IMAGE options
diffstat:
sys/arch/amd64/conf/GENERIC | 5 +-
sys/arch/evbarm/conf/MPCSA_GENERIC | 5 +-
sys/arch/evbppc/conf/VIRTEX_DFC | 4 +-
sys/arch/evbppc/virtex/dev/tft.c | 20 +-
sys/arch/evbppc/virtex/dev/tftvar.h | 5 +-
sys/arch/x86/x86/x86_machdep.c | 32 +-
sys/dev/pci/radeonfb.c | 41 +-
sys/dev/pci/radeonfbvar.h | 6 +-
sys/dev/splash/files.splash | 7 +-
sys/dev/splash/images/bikeshed.h | 30926 ---------------------------------
sys/dev/splash/images/netbsd-small.h | 5426 -----
sys/dev/splash/images/netbsd.h | 27806 -----------------------------
sys/dev/splash/splash.c | 326 +-
sys/dev/splash/splash.h | 30 +-
sys/dev/wsfb/genfb.c | 59 +-
sys/kern/subr_autoconf.c | 35 +-
16 files changed, 240 insertions(+), 64493 deletions(-)
diffs (truncated from 65188 to 300 lines):
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/arch/amd64/conf/GENERIC Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.300 2011/01/26 00:25:55 pooka Exp $
+# $NetBSD: GENERIC,v 1.301 2011/02/06 23:25:16 jmcneill Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.300 $"
+#ident "GENERIC-$Revision: 1.301 $"
maxusers 64 # estimated number of users
@@ -245,7 +245,6 @@
#options VGA_RASTERCONSOLE
# enable splash screen support; requires genfb or radeonfb
#options SPLASHSCREEN
-#options SPLASHSCREEN_PROGRESS
# Kernel root file system and dump configuration.
config netbsd root on ? type ?
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/arch/evbarm/conf/MPCSA_GENERIC
--- a/sys/arch/evbarm/conf/MPCSA_GENERIC Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/arch/evbarm/conf/MPCSA_GENERIC Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: MPCSA_GENERIC,v 1.17 2010/11/23 11:13:56 hannken Exp $
+# $NetBSD: MPCSA_GENERIC,v 1.18 2011/02/06 23:25:16 jmcneill Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.17 $"
+#ident "GENERIC-$Revision: 1.18 $"
maxusers 32 # estimated number of users
@@ -250,7 +250,6 @@
#options VGA_RASTERCONSOLE
# enable splash screen support; requires hw driver support
#options SPLASHSCREEN
-#options SPLASHSCREEN_PROGRESS
# Kernel root file system and dump configuration.
#config netbsd root on sd0c type ffs
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/arch/evbppc/conf/VIRTEX_DFC
--- a/sys/arch/evbppc/conf/VIRTEX_DFC Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/arch/evbppc/conf/VIRTEX_DFC Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: VIRTEX_DFC,v 1.11 2010/11/23 11:13:57 hannken Exp $
+# $NetBSD: VIRTEX_DFC,v 1.12 2011/02/06 23:25:17 jmcneill Exp $
#
# VIRTEX_DFC
#
@@ -145,8 +145,6 @@
#options WSDISPLAY_DEFAULTSCREENS=4
options FONT_VT220L8x16
#options SPLASHSCREEN
-#options SPLASHSCREEN_PROGRESS
-#options SPLASHSCREEN_IMAGE="\"dev/splash/images/netbsd-small.h\""
# Kernel root file system and dump configuration.
#config netbsd root on ? type ?
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/arch/evbppc/virtex/dev/tft.c
--- a/sys/arch/evbppc/virtex/dev/tft.c Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/arch/evbppc/virtex/dev/tft.c Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tft.c,v 1.2 2007/03/04 05:59:46 christos Exp $ */
+/* $NetBSD: tft.c,v 1.3 2011/02/06 23:25:17 jmcneill Exp $ */
/*
* Copyright (c) 2006 Jachym Holecek
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tft.c,v 1.2 2007/03/04 05:59:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tft.c,v 1.3 2011/02/06 23:25:17 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -119,20 +119,8 @@
sc->sc_sp_info.si_stride = ri->ri_stride;
sc->sc_sp_info.si_fillrect = NULL;
- splash_render(&sc->sc_sp_info, SPLASH_F_CENTER | SPLASH_F_FILL);
-#endif
-
-#ifdef SPLASHSCREEN_PROGRESS
- sc->sc_sp_progress.sp_top = (sc->sc_height / 8) * 7;
- sc->sc_sp_progress.sp_width = (sc->sc_width / 4) * 3;
- sc->sc_sp_progress.sp_left = (sc->sc_width -
- sc->sc_sp_progress.sp_width) / 2;
- sc->sc_sp_progress.sp_height = 20;
- sc->sc_sp_progress.sp_state = -1;
- sc->sc_sp_progress.sp_si = &sc->sc_sp_info;
-
- splash_progress_init(&sc->sc_sp_progress);
- SCREEN_DISABLE_DRAWING(&sc->sc_vc_screen);
+ if (splash_render(&sc->sc_sp_info, SPLASH_F_CENTER|SPLASH_F_FILL) == 0)
+ SCREEN_DISABLE_DRAWING(&sc->sc_vc_screen);
#endif
if (sc->sc_sdhook == NULL) {
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/arch/evbppc/virtex/dev/tftvar.h
--- a/sys/arch/evbppc/virtex/dev/tftvar.h Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/arch/evbppc/virtex/dev/tftvar.h Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tftvar.h,v 1.2 2007/03/04 05:59:46 christos Exp $ */
+/* $NetBSD: tftvar.h,v 1.3 2011/02/06 23:25:17 jmcneill Exp $ */
/*
* Copyright (c) 2006 Jachym Holecek
@@ -59,9 +59,6 @@
#ifdef SPLASHSCREEN
struct splash_info sc_sp_info;
#endif
-#ifdef SPLASHSCREEN_PROGRESS
- struct splash_progress sc_sp_progress;
-#endif
};
void tft_attach(device_t, struct wsdisplay_accessops *);
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_machdep.c,v 1.44 2010/10/21 11:17:54 yamt Exp $ */
+/* $NetBSD: x86_machdep.c,v 1.45 2011/02/06 23:25:17 jmcneill Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,10 +31,11 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.44 2010/10/21 11:17:54 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.45 2011/02/06 23:25:17 jmcneill Exp $");
#include "opt_modular.h"
#include "opt_physmem.h"
+#include "opt_splash.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -56,6 +57,7 @@
#include <x86/nmi.h>
#include <x86/pio.h>
+#include <dev/splash/splash.h>
#include <dev/isa/isareg.h>
#include <dev/ic/i8042reg.h>
@@ -150,15 +152,27 @@
bi = (struct bi_modulelist_entry *)((uint8_t *)biml + sizeof(*biml));
bimax = bi + biml->num;
for (; bi < bimax; bi++) {
- if (bi->type != BI_MODULE_ELF) {
+ switch (bi->type) {
+ case BI_MODULE_ELF:
+ aprint_debug("Prep module path=%s len=%d pa=%x\n",
+ bi->path, bi->len, bi->base);
+ KASSERT(trunc_page(bi->base) == bi->base);
+ module_prime((void *)((uintptr_t)bi->base + KERNBASE),
+ bi->len);
+ break;
+ case BI_MODULE_IMAGE:
+#ifdef SPLASHSCREEN
+ aprint_debug("Splash image path=%s len=%d pa=%x\n",
+ bi->path, bi->len, bi->base);
+ KASSERT(trunc_page(bi->base) == bi->base);
+ splash_setimage(
+ (void *)((uintptr_t)bi->base + KERNBASE), bi->len);
+#endif
+ break;
+ default:
aprint_debug("Skipping non-ELF module\n");
- continue;
+ break;
}
- aprint_debug("Prep module path=%s len=%d pa=%x\n", bi->path,
- bi->len, bi->base);
- KASSERT(trunc_page(bi->base) == bi->base);
- (void)module_prime((void *)((uintptr_t)bi->base + KERNBASE),
- bi->len);
}
}
#endif /* MODULAR */
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/dev/pci/radeonfb.c
--- a/sys/dev/pci/radeonfb.c Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/dev/pci/radeonfb.c Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeonfb.c,v 1.41 2011/01/22 15:14:28 cegger Exp $ */
+/* $NetBSD: radeonfb.c,v 1.42 2011/02/06 23:25:17 jmcneill Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.41 2011/01/22 15:14:28 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.42 2011/02/06 23:25:17 jmcneill Exp $");
#define RADEONFB_DEFAULT_DEPTH 8
@@ -873,24 +873,12 @@
wsdisplay_cnattach(dp->rd_wsscreens, ri, 0, 0,
defattr);
#ifdef SPLASHSCREEN
- splash_render(&dp->rd_splash,
- SPLASH_F_CENTER|SPLASH_F_FILL);
-#else
- vcons_replay_msgbuf(&dp->rd_vscreen);
+ if (splash_render(&dp->rd_splash,
+ SPLASH_F_CENTER|SPLASH_F_FILL) == 0)
+ SCREEN_DISABLE_DRAWING(&dp->rd_vscreen);
+ else
#endif
-
-#ifdef SPLASHSCREEN_PROGRESS
- dp->rd_progress.sp_top = (dp->rd_virty / 8) * 7;
- dp->rd_progress.sp_width = (dp->rd_virtx / 4) * 3;
- dp->rd_progress.sp_left = (dp->rd_virtx -
- dp->rd_progress.sp_width) / 2;
- dp->rd_progress.sp_height = 20;
- dp->rd_progress.sp_state = -1;
- dp->rd_progress.sp_si = &dp->rd_splash;
- splash_progress_init(&dp->rd_progress);
- SCREEN_DISABLE_DRAWING(&dp->rd_vscreen);
-#endif
-
+ vcons_replay_msgbuf(&dp->rd_vscreen);
} else {
/*
@@ -903,9 +891,9 @@
radeonfb_modeswitch(dp);
#ifdef SPLASHSCREEN
- splash_render(&dp->rd_splash,
- SPLASH_F_CENTER|SPLASH_F_FILL);
- SCREEN_DISABLE_DRAWING(&dp->rd_vscreen);
+ if (splash_render(&dp->rd_splash,
+ SPLASH_F_CENTER|SPLASH_F_FILL) == 0)
+ SCREEN_DISABLE_DRAWING(&dp->rd_vscreen);
#endif
}
@@ -1066,15 +1054,6 @@
#else
return ENODEV;
#endif
- case WSDISPLAYIO_SPROGRESS:
-#if defined(SPLASHSCREEN) && defined(SPLASHSCREEN_PROGRESS)
- dp->rd_progress.sp_force = 1;
- splash_progress_update(&dp->rd_progress);
- dp->rd_progress.sp_force = 0;
- return 0;
-#else
- return ENODEV;
-#endif
case WSDISPLAYIO_GETPARAM:
param = (struct wsdisplay_param *)d;
if (param->param == WSDISPLAYIO_PARAM_BACKLIGHT) {
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/dev/pci/radeonfbvar.h
--- a/sys/dev/pci/radeonfbvar.h Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/dev/pci/radeonfbvar.h Sun Feb 06 23:25:16 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: radeonfbvar.h,v 1.10 2010/11/03 00:49:02 macallan Exp $ */
+/* $NetBSD: radeonfbvar.h,v 1.11 2011/02/06 23:25:17 jmcneill Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -201,10 +201,6 @@
#ifdef SPLASHSCREEN
struct splash_info rd_splash;
#endif
-
-#ifdef SPLASHSCREEN_PROGRESS
- struct splash_progress rd_progress;
-#endif
};
struct radeon_tmds_pll {
diff -r 11cd19fb17e0 -r 7759f4869ebf sys/dev/splash/files.splash
--- a/sys/dev/splash/files.splash Sun Feb 06 23:16:05 2011 +0000
+++ b/sys/dev/splash/files.splash Sun Feb 06 23:25:16 2011 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: files.splash,v 1.2 2006/02/19 01:39:54 macallan Exp $
+# $NetBSD: files.splash,v 1.3 2011/02/06 23:25:18 jmcneill Exp $
-define splash
Home |
Main Index |
Thread Index |
Old Index