diff options
author | Mark Kettenis <kettenis@openbsd.org> | 2013-08-02 21:55:06 +0200 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-08-12 10:47:05 +1000 |
commit | 30f095322b1171c1073d74ca08e5cc43788aa320 (patch) | |
tree | 35f102ca380c548a27b6f104ace357228049b9c3 /sys/dev/pci/drm | |
parent | bea87e2da8588e1d1ac7fd0192ced15fd20eb569 (diff) |
conditionalize the use of vga_console_attached on NVGA > 0
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/radeon/radeon_kms.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_kms.c b/sys/dev/pci/drm/radeon/radeon_kms.c index 0382a3b3a66..505fe1d56ec 100644 --- a/sys/dev/pci/drm/radeon/radeon_kms.c +++ b/sys/dev/pci/drm/radeon/radeon_kms.c @@ -33,6 +33,12 @@ /* can't include radeon_drv.h due to duplicated defines in radeon_reg.h */ +#include "vga.h" + +#if NVGA > 0 +extern int vga_console_attached; +#endif + #define DRIVER_NAME "radeon" #define DRIVER_DESC "ATI Radeon" #define DRIVER_DATE "20080613" @@ -1539,8 +1545,6 @@ radeondrm_attach_kms(struct device *parent, struct device *self, void *aux) #ifdef __sparc64__ extern int fbnode; -#elif !defined(__macppc__) - extern int vga_console_attached; #endif id_entry = drm_find_description(PCI_VENDOR(pa->pa_id), @@ -1562,7 +1566,7 @@ radeondrm_attach_kms(struct device *parent, struct device *self, void *aux) & (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) == (PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE)) { rdev->console = 1; -#ifndef __macppc__ +#if NVGA > 0 vga_console_attached = 1; #endif } @@ -1681,11 +1685,9 @@ radeondrm_forcedetach(struct radeon_device *rdev) struct pci_softc *sc = (struct pci_softc *)rdev->dev.dv_parent; pcitag_t tag = rdev->pa_tag; -#if !defined(__sparc64__) && !defined(__macppc__) - if (rdev->console) { - extern int vga_console_attached; +#if NVGA > 0 + if (rdev->console) vga_console_attached = 0; - } #endif config_detach(&rdev->dev, 0); |