From 2097d743f287d994bd001baedd39e3bc808999c6 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 23 Jul 2007 13:26:28 -0700 Subject: Eliminate XGI_CHECK_PCI_CONFIG. Based on review comments from airlied, XGI_CHECK_PCI_CONFIG is removed. He believes (and I tend to agree) that this is a largely unnecessary workaround for a bug elsewhere. --- linux-core/xgi_drv.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'linux-core/xgi_drv.c') diff --git a/linux-core/xgi_drv.c b/linux-core/xgi_drv.c index bcb6946d..19a9a10d 100644 --- a/linux-core/xgi_drv.c +++ b/linux-core/xgi_drv.c @@ -139,40 +139,6 @@ MODULE_LICENSE("GPL and additional rights"); void xgi_kern_isr_bh(struct drm_device *dev); -/* - * verify access to pci config space wasn't disabled behind our back - * unfortunately, XFree86 enables/disables memory access in pci config space at - * various times (such as restoring initial pci config space settings during vt - * switches or when doing mulicard). As a result, all of our register accesses - * are garbage at this point. add a check to see if access was disabled and - * reenable any such access. - */ -#define XGI_CHECK_PCI_CONFIG(xgi) \ - xgi_check_pci_config(xgi, __LINE__) - -static inline void xgi_check_pci_config(struct xgi_info * info, int line) -{ - u16 cmd; - bool flag = 0; - - pci_read_config_word(info->dev->pdev, PCI_COMMAND, &cmd); - if (!(cmd & PCI_COMMAND_MASTER)) { - DRM_INFO("restoring bus mastering! (%d)\n", line); - cmd |= PCI_COMMAND_MASTER; - flag = 1; - } - - if (!(cmd & PCI_COMMAND_MEMORY)) { - DRM_INFO("restoring MEM access! (%d)\n", line); - cmd |= PCI_COMMAND_MEMORY; - flag = 1; - } - - if (flag) - pci_write_config_word(info->dev->pdev, PCI_COMMAND, cmd); -} - - int xgi_bootstrap(DRM_IOCTL_ARGS) { DRM_DEVICE; @@ -262,8 +228,6 @@ irqreturn_t xgi_kern_isr(DRM_IRQ_ARGS) //DRM_INFO("xgi_kern_isr \n"); - //XGI_CHECK_PCI_CONFIG(info); - //xgi_dvi_irq_handler(info); if (need_to_run_bottom_half) { @@ -280,8 +244,6 @@ void xgi_kern_isr_bh(struct drm_device *dev) DRM_INFO("xgi_kern_isr_bh \n"); //xgi_dvi_irq_handler(info); - - XGI_CHECK_PCI_CONFIG(info); } int xgi_driver_load(struct drm_device *dev, unsigned long flags) -- cgit v1.2.3