Deleted Added
full compact
s3_pci.c (201223) s3_pci.c (234362)
1/*-
2 * Copyright (c) 2000 Alcove - Nicolas Souchu <nsouch@freebsd.org>
3 * All rights reserved.
4 *
5 * Code based on Peter Horton <pdh@colonel-panic.com> patch.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 13 unchanged lines hidden (view full) ---

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000 Alcove - Nicolas Souchu <nsouch@freebsd.org>
3 * All rights reserved.
4 *
5 * Code based on Peter Horton <pdh@colonel-panic.com> patch.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 13 unchanged lines hidden (view full) ---

22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/dev/fb/s3_pci.c 201223 2009-12-29 21:51:28Z rnoland $");
30__FBSDID("$FreeBSD: head/sys/dev/fb/s3_pci.c 234362 2012-04-16 23:29:12Z jkim $");
31
32/* Enable LFB on S3 cards that has only VESA 1.2 BIOS */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <machine/bus.h>
38

--- 469 unchanged lines hidden (view full) ---

508 */
509 /* sc->mem_base = (u_long)rman_get_virtual(sc->mem_res); */
510 sc->mem_base = bus_get_resource_start(dev, SYS_RES_MEMORY, rid);
511 sc->mem_size = bus_get_resource_count(dev, SYS_RES_MEMORY, rid);
512
513 /* Attach the driver to the VGA/VESA framework
514 */
515 for (i = 0; (adp = vid_get_adapter(i)) != NULL; ++i) {
31
32/* Enable LFB on S3 cards that has only VESA 1.2 BIOS */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <machine/bus.h>
38

--- 469 unchanged lines hidden (view full) ---

508 */
509 /* sc->mem_base = (u_long)rman_get_virtual(sc->mem_res); */
510 sc->mem_base = bus_get_resource_start(dev, SYS_RES_MEMORY, rid);
511 sc->mem_size = bus_get_resource_count(dev, SYS_RES_MEMORY, rid);
512
513 /* Attach the driver to the VGA/VESA framework
514 */
515 for (i = 0; (adp = vid_get_adapter(i)) != NULL; ++i) {
516 if ((adp->va_type == KD_VGA))
516 if (adp->va_type == KD_VGA)
517 break;
518 }
519
520 /* If the VESA module hasn't been loaded, or VGA doesn't
521 * exist, abort
522 */
523 if ((adp == NULL) || !(adp->va_flags & V_ADP_VESA)) {
524 printf("%s: VGA adapter not found or VESA module not loaded!\n",

--- 43 unchanged lines hidden ---
517 break;
518 }
519
520 /* If the VESA module hasn't been loaded, or VGA doesn't
521 * exist, abort
522 */
523 if ((adp == NULL) || !(adp->va_flags & V_ADP_VESA)) {
524 printf("%s: VGA adapter not found or VESA module not loaded!\n",

--- 43 unchanged lines hidden ---