diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-15 10:05:03 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-15 15:41:52 +0100 |
commit | 18d5ae3bd9075ac1a2ee21b071ac133e2e634b62 (patch) | |
tree | 82e60e279e52956df3c4d4f124c8d489d2ed106d /src/radeon_probe.c | |
parent | 248e912c487636d7352cfad43c03fc9f19fc2215 (diff) |
radeon: drop all UMS/DRI1/XAA/overlay support.
This overhauls the radeon driver and removes all the old UMS-only code,
it drops all the UMS, DRI1, XAA, overlay Xv, video capture, tv tuners
There are probably a lot more cleanups that will fall out of this afterwards.
So far this is compile/build tested.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/radeon_probe.c')
-rw-r--r-- | src/radeon_probe.c | 68 |
1 files changed, 10 insertions, 58 deletions
diff --git a/src/radeon_probe.c b/src/radeon_probe.c index 26dec285..8044b45a 100644 --- a/src/radeon_probe.c +++ b/src/radeon_probe.c @@ -50,40 +50,15 @@ #include "xf86Resources.h" #endif -#ifdef XF86DRM_MODE #include "xf86drmMode.h" #include "dri.h" -#endif #include "radeon_chipset_gen.h" #include "radeon_pci_chipset_gen.h" -#include "radeon_chipinfo_gen.h" - #ifdef XSERVER_LIBPCIACCESS #include "radeon_pci_device_match_gen.h" - -static Bool radeon_ums_supported(ScrnInfoPtr pScrn, struct pci_device *pci_dev) -{ - unsigned family = 0, i; - - for (i = 0; i < sizeof(RADEONCards) / sizeof(RADEONCardInfo); i++) { - if (pci_dev->device_id == RADEONCards[i].pci_device_id) { - family = RADEONCards[i].chip_family; - break; - } - } - - if (family >= CHIP_FAMILY_SUMO) { - xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, - "GPU only supported with KMS, using vesa instead.\n"); - return FALSE; - } - return TRUE; -} -#else -#define radeon_ums_supported(x, y) TRUE #endif #ifndef XSERVER_LIBPCIACCESS @@ -109,7 +84,6 @@ RADEONIdentify(int flags) } -#ifdef XF86DRM_MODE static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci_dev) { char *busIdString; @@ -134,16 +108,12 @@ static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci "[KMS] Kernel modesetting enabled.\n"); return TRUE; } -#else -#define radeon_kernel_mode_enabled(x, y) FALSE -#endif static Bool radeon_get_scrninfo(int entity_num, void *pci_dev) { ScrnInfoPtr pScrn = NULL; EntityInfoPtr pEnt; - int kms = 0; pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, RADEONPciChipsets, NULL, @@ -153,12 +123,8 @@ radeon_get_scrninfo(int entity_num, void *pci_dev) return FALSE; if (pci_dev) { - if (radeon_kernel_mode_enabled(pScrn, pci_dev)) { - kms = 1; - } else { - if (!radeon_ums_supported(pScrn, pci_dev)) { - return FALSE; - } + if (!radeon_kernel_mode_enabled(pScrn, pci_dev)) { + return FALSE; } } @@ -171,28 +137,14 @@ radeon_get_scrninfo(int entity_num, void *pci_dev) pScrn->Probe = RADEONProbe; #endif -#ifdef XF86DRM_MODE - if (kms == 1) { - pScrn->PreInit = RADEONPreInit_KMS; - pScrn->ScreenInit = RADEONScreenInit_KMS; - pScrn->SwitchMode = RADEONSwitchMode_KMS; - pScrn->AdjustFrame = RADEONAdjustFrame_KMS; - pScrn->EnterVT = RADEONEnterVT_KMS; - pScrn->LeaveVT = RADEONLeaveVT_KMS; - pScrn->FreeScreen = RADEONFreeScreen_KMS; - pScrn->ValidMode = RADEONValidMode; - } else -#endif - { - pScrn->PreInit = RADEONPreInit; - pScrn->ScreenInit = RADEONScreenInit; - pScrn->SwitchMode = RADEONSwitchMode; - pScrn->AdjustFrame = RADEONAdjustFrame; - pScrn->EnterVT = RADEONEnterVT; - pScrn->LeaveVT = RADEONLeaveVT; - pScrn->FreeScreen = RADEONFreeScreen; - pScrn->ValidMode = RADEONValidMode; - } + pScrn->PreInit = RADEONPreInit_KMS; + pScrn->ScreenInit = RADEONScreenInit_KMS; + pScrn->SwitchMode = RADEONSwitchMode_KMS; + pScrn->AdjustFrame = RADEONAdjustFrame_KMS; + pScrn->EnterVT = RADEONEnterVT_KMS; + pScrn->LeaveVT = RADEONLeaveVT_KMS; + pScrn->FreeScreen = RADEONFreeScreen_KMS; + pScrn->ValidMode = RADEONValidMode; pEnt = xf86GetEntityInfo(entity_num); |