···6#7config DRM8 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"9- depends on AGP || AGP=n10 help11 Kernel-level support for the Direct Rendering Infrastructure (DRI)12 introduced in XFree86 4.0. If you say Y here, you need to select
···6#7config DRM8 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)"9+ depends on (AGP || AGP=n) && PCI10 help11 Kernel-level support for the Direct Rendering Infrastructure (DRI)12 introduced in XFree86 4.0. If you say Y here, you need to select
+22-2
drivers/char/drm/i915_dma.c
···1/* i915_dma.c -- DMA support for the I915 -*- linux-c -*-2 */3/**************************************************************************4- * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7- * 000000000000000000008 **************************************************************************/910#include "drmP.h"
···1/* i915_dma.c -- DMA support for the I915 -*- linux-c -*-2 */3/**************************************************************************4+ *5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7+ *8+ * Permission is hereby granted, free of charge, to any person obtaining a9+ * copy of this software and associated documentation files (the10+ * "Software"), to deal in the Software without restriction, including11+ * without limitation the rights to use, copy, modify, merge, publish,12+ * distribute, sub license, and/or sell copies of the Software, and to13+ * permit persons to whom the Software is furnished to do so, subject to14+ * the following conditions:15+ *16+ * The above copyright notice and this permission notice (including the17+ * next paragraph) shall be included in all copies or substantial portions18+ * of the Software.19+ *20+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS21+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF22+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.23+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR24+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,25+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE26+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.27+ *28 **************************************************************************/2930#include "drmP.h"
···1+/**************************************************************************2+ *3+ * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.4+ * All Rights Reserved.5+ *6+ * Permission is hereby granted, free of charge, to any person obtaining a7+ * copy of this software and associated documentation files (the8+ * "Software"), to deal in the Software without restriction, including9+ * without limitation the rights to use, copy, modify, merge, publish,10+ * distribute, sub license, and/or sell copies of the Software, and to11+ * permit persons to whom the Software is furnished to do so, subject to12+ * the following conditions:13+ *14+ * The above copyright notice and this permission notice (including the15+ * next paragraph) shall be included in all copies or substantial portions16+ * of the Software.17+ *18+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS19+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF20+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.21+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR22+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,23+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE24+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.25+ *26+ **************************************************************************/27+28#ifndef _I915_DRM_H_29#define _I915_DRM_H_30
+22-3
drivers/char/drm/i915_drv.c
···1/* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*-2 */3-4/**************************************************************************5- * 6 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.7 * All Rights Reserved.8- * 000000000000000000009 **************************************************************************/1011#include "drmP.h"
···1/* i915_drv.c -- i830,i845,i855,i865,i915 driver -*- linux-c -*-2 */03/**************************************************************************4+ *5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7+ *8+ * Permission is hereby granted, free of charge, to any person obtaining a9+ * copy of this software and associated documentation files (the10+ * "Software"), to deal in the Software without restriction, including11+ * without limitation the rights to use, copy, modify, merge, publish,12+ * distribute, sub license, and/or sell copies of the Software, and to13+ * permit persons to whom the Software is furnished to do so, subject to14+ * the following conditions:15+ *16+ * The above copyright notice and this permission notice (including the17+ * next paragraph) shall be included in all copies or substantial portions18+ * of the Software.19+ *20+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS21+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF22+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.23+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR24+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,25+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE26+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.27+ *28 **************************************************************************/2930#include "drmP.h"
+22-2
drivers/char/drm/i915_drv.h
···1/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-2 */3/**************************************************************************4- * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7- * 000000000000000000008 **************************************************************************/910#ifndef _I915_DRV_H_
···1/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-2 */3/**************************************************************************4+ *5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7+ *8+ * Permission is hereby granted, free of charge, to any person obtaining a9+ * copy of this software and associated documentation files (the10+ * "Software"), to deal in the Software without restriction, including11+ * without limitation the rights to use, copy, modify, merge, publish,12+ * distribute, sub license, and/or sell copies of the Software, and to13+ * permit persons to whom the Software is furnished to do so, subject to14+ * the following conditions:15+ *16+ * The above copyright notice and this permission notice (including the17+ * next paragraph) shall be included in all copies or substantial portions18+ * of the Software.19+ *20+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS21+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF22+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.23+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR24+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,25+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE26+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.27+ *28 **************************************************************************/2930#ifndef _I915_DRV_H_
+22-2
drivers/char/drm/i915_irq.c
···1/* i915_dma.c -- DMA support for the I915 -*- linux-c -*-2 */3/**************************************************************************4- * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7- * 000000000000000000008 **************************************************************************/910#include "drmP.h"
···1/* i915_dma.c -- DMA support for the I915 -*- linux-c -*-2 */3/**************************************************************************4+ *5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7+ *8+ * Permission is hereby granted, free of charge, to any person obtaining a9+ * copy of this software and associated documentation files (the10+ * "Software"), to deal in the Software without restriction, including11+ * without limitation the rights to use, copy, modify, merge, publish,12+ * distribute, sub license, and/or sell copies of the Software, and to13+ * permit persons to whom the Software is furnished to do so, subject to14+ * the following conditions:15+ *16+ * The above copyright notice and this permission notice (including the17+ * next paragraph) shall be included in all copies or substantial portions18+ * of the Software.19+ *20+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS21+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF22+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.23+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR24+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,25+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE26+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.27+ *28 **************************************************************************/2930#include "drmP.h"
+22-2
drivers/char/drm/i915_mem.c
···1/* i915_mem.c -- Simple agp/fb memory manager for i915 -*- linux-c -*-2 */3/**************************************************************************4- * 5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7- * 000000000000000000008 **************************************************************************/910#include "drmP.h"
···1/* i915_mem.c -- Simple agp/fb memory manager for i915 -*- linux-c -*-2 */3/**************************************************************************4+ *5 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.6 * All Rights Reserved.7+ *8+ * Permission is hereby granted, free of charge, to any person obtaining a9+ * copy of this software and associated documentation files (the10+ * "Software"), to deal in the Software without restriction, including11+ * without limitation the rights to use, copy, modify, merge, publish,12+ * distribute, sub license, and/or sell copies of the Software, and to13+ * permit persons to whom the Software is furnished to do so, subject to14+ * the following conditions:15+ *16+ * The above copyright notice and this permission notice (including the17+ * next paragraph) shall be included in all copies or substantial portions18+ * of the Software.19+ *20+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS21+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF22+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.23+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR24+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,25+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE26+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.27+ *28 **************************************************************************/2930#include "drmP.h"
+13-14
drivers/char/drm/radeon_irq.c
···35#include "radeon_drm.h"36#include "radeon_drv.h"370000000038/* Interrupts - Used for device synchronization and flushing in the39 * following circumstances:40 *···71 /* Only consider the bits we're interested in - others could be used72 * outside the DRM73 */74- stat = RADEON_READ(RADEON_GEN_INT_STATUS)75- & (RADEON_SW_INT_TEST | RADEON_CRTC_VBLANK_STAT);76 if (!stat)77 return IRQ_NONE;78···88 drm_vbl_send_signals( dev );89 }9091- /* Acknowledge interrupts we handle */92- RADEON_WRITE(RADEON_GEN_INT_STATUS, stat);93 return IRQ_HANDLED;94-}95-96-static __inline__ void radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv)97-{98- u32 tmp = RADEON_READ( RADEON_GEN_INT_STATUS )99- & (RADEON_SW_INT_TEST_ACK | RADEON_CRTC_VBLANK_STAT);100- if (tmp)101- RADEON_WRITE( RADEON_GEN_INT_STATUS, tmp );102}103104static int radeon_emit_irq(drm_device_t *dev)···139 return DRM_ERR(EINVAL);140 }141142- radeon_acknowledge_irqs( dev_priv );143144 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE;145···217 RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 );218219 /* Clear bits if they're already high */220- radeon_acknowledge_irqs( dev_priv );0221}222223void radeon_driver_irq_postinstall( drm_device_t *dev ) {
···35#include "radeon_drm.h"36#include "radeon_drv.h"3738+static __inline__ u32 radeon_acknowledge_irqs(drm_radeon_private_t *dev_priv, u32 mask)39+{40+ u32 irqs = RADEON_READ(RADEON_GEN_INT_STATUS) & mask;41+ if (irqs)42+ RADEON_WRITE(RADEON_GEN_INT_STATUS, irqs);43+ return irqs;44+}45+46/* Interrupts - Used for device synchronization and flushing in the47 * following circumstances:48 *···63 /* Only consider the bits we're interested in - others could be used64 * outside the DRM65 */66+ stat = radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK | 67+ RADEON_CRTC_VBLANK_STAT));68 if (!stat)69 return IRQ_NONE;70···80 drm_vbl_send_signals( dev );81 }820083 return IRQ_HANDLED;0000000084}8586static int radeon_emit_irq(drm_device_t *dev)···141 return DRM_ERR(EINVAL);142 }143144+ radeon_acknowledge_irqs(dev_priv, RADEON_CRTC_VBLANK_STAT);145146 dev_priv->stats.boxes |= RADEON_BOX_WAIT_IDLE;147···219 RADEON_WRITE( RADEON_GEN_INT_CNTL, 0 );220221 /* Clear bits if they're already high */222+ radeon_acknowledge_irqs(dev_priv, (RADEON_SW_INT_TEST_ACK |223+ RADEON_CRTC_VBLANK_STAT));224}225226void radeon_driver_irq_postinstall( drm_device_t *dev ) {