Date: Wed, 23 Jun 2010 23:34:56 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209491 - head/sys/dev/fb Message-ID: <201006232334.o5NNYula013722@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed Jun 23 23:34:56 2010 New Revision: 209491 URL: http://svn.freebsd.org/changeset/base/209491 Log: Use M_WAITOK for VESA BIOS initialization consistently. Modified: head/sys/dev/fb/vesa.c Modified: head/sys/dev/fb/vesa.c ============================================================================== --- head/sys/dev/fb/vesa.c Wed Jun 23 23:26:14 2010 (r209490) +++ head/sys/dev/fb/vesa.c Wed Jun 23 23:34:56 2010 (r209491) @@ -164,7 +164,7 @@ static char *vesa_revstr = NULL; static int int10_set_mode(int mode); static int vesa_bios_post(void); -static int vesa_bios_get_mode(int mode, struct vesa_mode *vmode); +static int vesa_bios_get_mode(int mode, struct vesa_mode *vmode, int flags); static int vesa_bios_set_mode(int mode); #if 0 static int vesa_bios_get_dac(void); @@ -278,13 +278,13 @@ vesa_bios_post(void) /* VESA BIOS calls */ static int -vesa_bios_get_mode(int mode, struct vesa_mode *vmode) +vesa_bios_get_mode(int mode, struct vesa_mode *vmode, int flags) { x86regs_t regs; uint32_t offs; void *buf; - buf = x86bios_alloc(&offs, sizeof(*vmode), M_NOWAIT); + buf = x86bios_alloc(&offs, sizeof(*vmode), flags); if (buf == NULL) return (1); @@ -856,7 +856,7 @@ vesa_bios_init(void) for (i = 0, modes = 0; (i < (M_VESA_MODE_MAX - M_VESA_BASE + 1)) && (vesa_vmodetab[i] != 0xffff); ++i) { vesa_vmodetab[i] = le16toh(vesa_vmodetab[i]); - if (vesa_bios_get_mode(vesa_vmodetab[i], &vmode)) + if (vesa_bios_get_mode(vesa_vmodetab[i], &vmode, M_WAITOK)) continue; vmode.v_modeattr = le16toh(vmode.v_modeattr); @@ -1788,7 +1788,7 @@ vesa_bios_info(int level) for (i = 0; (i < (M_VESA_MODE_MAX - M_VESA_BASE + 1)) && (vesa_vmodetab[i] != 0xffff); ++i) { - if (vesa_bios_get_mode(vesa_vmodetab[i], &vmode)) + if (vesa_bios_get_mode(vesa_vmodetab[i], &vmode, M_NOWAIT)) continue; /* print something for diagnostic purpose */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006232334.o5NNYula013722>